@gusto/embedded-react-sdk 0.56.0 → 0.56.2
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 +27 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -9
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -6
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -6
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +6 -7
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +24 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +39 -21
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +85 -82
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +52 -51
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +12 -12
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +40 -40
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +26 -25
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +71 -61
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +13 -16
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +0 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js +138 -110
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +149 -146
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +4 -0
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +22 -35
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +49 -36
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +24 -47
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Transition/transitionStateMachine.js +35 -40
- package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
- package/dist/components/Payroll/TransitionPayroll/TransitionPayroll.js +48 -0
- package/dist/components/Payroll/TransitionPayroll/TransitionPayroll.js.map +1 -0
- package/dist/components/Payroll/TransitionPayroll/TransitionPayrollComponents.js +35 -0
- package/dist/components/Payroll/TransitionPayroll/TransitionPayrollComponents.js.map +1 -0
- package/dist/components/Payroll/TransitionPayroll/transitionPayrollStateMachine.js +23 -0
- package/dist/components/Payroll/TransitionPayroll/transitionPayrollStateMachine.js.map +1 -0
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js +32 -0
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js +48 -47
- package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/index.js +7 -5
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +12 -15
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/i18n/I18n.js +9 -4
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +10 -8
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
- package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js +52 -50
- package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/es_US/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/es_US/Contractor.ContractorList.json.js +14 -12
- package/dist/i18n/es_US/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/es_US/Contractor.Management.Compensation.json.js +4 -4
- package/dist/i18n/es_US/Contractor.Management.Profile.json.js +4 -4
- package/dist/i18n/es_US/Contractor.ManagementContractorList.json.js +40 -38
- package/dist/i18n/es_US/Contractor.ManagementContractorList.json.js.map +1 -1
- package/dist/i18n/es_US/Contractor.Payments.PaymentsList.json.js +18 -16
- package/dist/i18n/es_US/Contractor.Payments.PaymentsList.json.js.map +1 -1
- package/dist/i18n/es_US/Contractor.Profile.json.js +5 -5
- package/dist/i18n/es_US/Payroll.OffCycleCreation.json.js +11 -9
- package/dist/i18n/es_US/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/es_US/Payroll.OffCyclePayPeriodDateForm.json.js +2 -2
- package/dist/i18n/es_US/Payroll.OffCycleTaxWithholding.json.js +6 -6
- package/dist/i18n/es_US/Payroll.PayrollConfiguration.json.js +15 -15
- package/dist/i18n/es_US/Payroll.PayrollEditEmployee.json.js +28 -26
- package/dist/i18n/es_US/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/es_US/Payroll.PayrollOverview.json.js +40 -38
- package/dist/i18n/es_US/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/es_US/Payroll.PrintChecksBanner.json.js +14 -0
- package/dist/i18n/es_US/Payroll.PrintChecksBanner.json.js.map +1 -0
- package/dist/i18n/es_US/Payroll.PrintChecksFailure.json.js +12 -0
- package/dist/i18n/es_US/Payroll.PrintChecksFailure.json.js.map +1 -0
- package/dist/i18n/es_US/Payroll.PrintChecksForm.json.js +26 -0
- package/dist/i18n/es_US/Payroll.PrintChecksForm.json.js.map +1 -0
- package/dist/i18n/es_US/Payroll.PrintChecksSummary.json.js +14 -0
- package/dist/i18n/es_US/Payroll.PrintChecksSummary.json.js.map +1 -0
- package/dist/i18n/es_US/Payroll.UNSTABLE_PayrollEditEmployee.json.js +78 -0
- package/dist/i18n/es_US/Payroll.UNSTABLE_PayrollEditEmployee.json.js.map +1 -0
- package/dist/i18n/es_US/common.json.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/shared/constants.js +21 -20
- package/dist/shared/constants.js.map +1 -1
- package/dist/src/components/Common/ActionsLayout/ActionsLayout.d.ts +1 -1
- package/dist/src/components/Common/Alert/Alert.d.ts +1 -1
- package/dist/src/components/Common/DataView/DataCards/DataCards.d.ts +1 -1
- package/dist/src/components/Common/DataView/DataTable/DataTable.d.ts +1 -1
- package/dist/src/components/Common/DataView/DataView.d.ts +1 -1
- package/dist/src/components/Common/DateRangeFilter/DateRangeFilter.d.ts +1 -1
- package/dist/src/components/Common/DetailViewLayout/DetailViewLayout.d.ts +1 -1
- package/dist/src/components/Common/DocumentList/DocumentList.d.ts +1 -1
- package/dist/src/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
- package/dist/src/components/Common/EmptyData/EmptyData.d.ts +1 -1
- package/dist/src/components/Common/FieldCaption/FieldCaption.d.ts +1 -1
- package/dist/src/components/Common/FieldErrorMessage/FieldErrorMessage.d.ts +1 -1
- package/dist/src/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/src/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/src/components/Common/Fields/PercentageField/PercentageField.d.ts +1 -1
- package/dist/src/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/src/components/Common/Fields/SelectField/SelectField.d.ts +1 -1
- package/dist/src/components/Common/Fields/hooks/FieldElementRegistryProvider.d.ts +1 -1
- package/dist/src/components/Common/Flex/Flex.d.ts +2 -2
- package/dist/src/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +1 -1
- package/dist/src/components/Common/Form/Form.d.ts +1 -1
- package/dist/src/components/Common/Grid/Grid.d.ts +1 -1
- package/dist/src/components/Common/HamburgerMenu/HamburgerMenu.d.ts +1 -1
- package/dist/src/components/Common/InlineSpinner/InlineSpinner.d.ts +1 -1
- package/dist/src/components/Common/InternalError/InternalError.d.ts +1 -1
- package/dist/src/components/Common/Loading/Loading.d.ts +1 -1
- package/dist/src/components/Common/OnboardingStatusBadge/index.d.ts +3 -3
- package/dist/src/components/Common/PaginationControl/PaginationControl.d.ts +1 -1
- package/dist/src/components/Common/PayrollLoading/PayrollLoading.d.ts +1 -1
- package/dist/src/components/Common/ReorderableList/ReorderableList.d.ts +1 -1
- package/dist/src/components/Common/RequirementsList/RequirementsList.d.ts +1 -1
- package/dist/src/components/Common/TaxInputs/TaxInputs.d.ts +7 -7
- package/dist/src/components/Common/Toast/Toast.d.ts +1 -1
- package/dist/src/components/Common/UI/Alert/Alert.d.ts +1 -1
- package/dist/src/components/Common/UI/Box/Box.d.ts +1 -1
- package/dist/src/components/Common/UI/BoxHeader/BoxHeader.d.ts +1 -1
- package/dist/src/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/src/components/Common/UI/Button/Button.d.ts +1 -1
- package/dist/src/components/Common/UI/Button/ButtonIcon.d.ts +1 -1
- package/dist/src/components/Common/UI/CalendarPreview/CalendarLegend.d.ts +1 -1
- package/dist/src/components/Common/UI/CalendarPreview/CalendarPreview.d.ts +1 -1
- package/dist/src/components/Common/UI/Card/Card.d.ts +1 -1
- package/dist/src/components/Common/UI/Checkbox/Checkbox.d.ts +1 -1
- package/dist/src/components/Common/UI/ComboBox/ComboBox.d.ts +1 -1
- package/dist/src/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/src/components/Common/UI/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/src/components/Common/UI/Dialog/Dialog.d.ts +1 -1
- package/dist/src/components/Common/UI/FileInput/FileInput.d.ts +1 -1
- package/dist/src/components/Common/UI/FormBox/FormBox.d.ts +1 -1
- package/dist/src/components/Common/UI/FormBoxHeader/FormBoxHeader.d.ts +1 -1
- package/dist/src/components/Common/UI/Heading/Heading.d.ts +1 -1
- package/dist/src/components/Common/UI/Input/Input.d.ts +1 -1
- package/dist/src/components/Common/UI/Link/Link.d.ts +1 -1
- package/dist/src/components/Common/UI/List/OrderedList.d.ts +1 -1
- package/dist/src/components/Common/UI/List/UnorderedList.d.ts +1 -1
- package/dist/src/components/Common/UI/Menu/Menu.d.ts +1 -1
- package/dist/src/components/Common/UI/Modal/Modal.d.ts +1 -1
- package/dist/src/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.d.ts +1 -1
- package/dist/src/components/Common/UI/NumberInput/NumberInput.d.ts +1 -1
- package/dist/src/components/Common/UI/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/src/components/Common/UI/Radio/Radio.d.ts +1 -1
- package/dist/src/components/Common/UI/Select/Select.d.ts +1 -1
- package/dist/src/components/Common/UI/Switch/Switch.d.ts +1 -1
- package/dist/src/components/Common/UI/Table/Table.d.ts +1 -1
- package/dist/src/components/Common/UI/Tabs/Tabs.d.ts +1 -1
- package/dist/src/components/Common/UI/Text/Text.d.ts +1 -1
- package/dist/src/components/Common/UI/TextArea/TextArea.d.ts +1 -1
- package/dist/src/components/Common/UI/TextInput/TextInput.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/AssignSignatory.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/AssignSignatorySelection.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/CreateSignatory/Actions.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/Head.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/InviteSignatory/Actions.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/SignatoryForm.d.ts +1 -1
- package/dist/src/components/Company/AssignSignatory/TitleSelect.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccount.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountComponents.d.ts +3 -3
- package/dist/src/components/Company/BankAccount/BankAccountForm/Actions.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountForm/Head.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountList/AccountView.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountList/Actions.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountList/Head.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountVerify/Actions.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -1
- package/dist/src/components/Company/BankAccount/BankAccountVerify/Head.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/DocumentList/Actions.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/DocumentList/Head.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/DocumentList/List.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/DocumentList/ManageSignatories.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/DocumentSigner.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/src/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +3 -3
- package/dist/src/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +2 -2
- package/dist/src/components/Company/FederalTaxes/Actions.d.ts +1 -1
- package/dist/src/components/Company/FederalTaxes/FederalTaxes.d.ts +1 -1
- package/dist/src/components/Company/FederalTaxes/Form.d.ts +1 -1
- package/dist/src/components/Company/FederalTaxes/Head.d.ts +1 -1
- package/dist/src/components/Company/Industry/Actions.d.ts +1 -1
- package/dist/src/components/Company/Industry/Edit.d.ts +1 -1
- package/dist/src/components/Company/Industry/Head.d.ts +1 -1
- package/dist/src/components/Company/Industry/Industry.d.ts +1 -1
- package/dist/src/components/Company/Industry/IndustrySelect.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationForm/Actions.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationForm/Form.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationForm/Head.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationForm/LocationForm.d.ts +1 -1
- package/dist/src/components/Company/Locations/Locations.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationsList/Actions.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationsList/Head.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationsList/List.d.ts +1 -1
- package/dist/src/components/Company/Locations/LocationsList/LocationsList.d.ts +1 -1
- package/dist/src/components/Company/Locations/locationsStateMachine.d.ts +2 -2
- package/dist/src/components/Company/OnboardingFlow/OnboardingFlow.d.ts +1 -1
- package/dist/src/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +9 -9
- package/dist/src/components/Company/OnboardingOverview/Completed.d.ts +1 -1
- package/dist/src/components/Company/OnboardingOverview/MissingRequirements.d.ts +1 -1
- package/dist/src/components/Company/OnboardingOverview/OnboardingOverview.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/PaySchedule.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/PayScheduleComponents.d.ts +2 -2
- package/dist/src/components/Company/PaySchedule/PayScheduleForm.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/PayScheduleList.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +8 -8
- package/dist/src/components/Company/StateTaxes/StateTaxes.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesComponents.d.ts +3 -3
- package/dist/src/components/Company/StateTaxes/StateTaxesForm/Actions.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesForm/Head.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesList/Actions.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesList/Head.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesList/List.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/TaxRateManagement/AddRateAction.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.d.ts +1 -1
- package/dist/src/components/Company/StateTaxes/shared/RequirementFields.d.ts +1 -1
- package/dist/src/components/Contractor/Address/management/Address.d.ts +1 -1
- package/dist/src/components/Contractor/Address/management/AddressCard/AddressCard.d.ts +1 -1
- package/dist/src/components/Contractor/Address/management/AddressComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Address/management/AddressEditForm.d.ts +1 -1
- package/dist/src/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +5 -5
- package/dist/src/components/Contractor/Compensation/management/Compensation.d.ts +1 -1
- package/dist/src/components/Contractor/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -1
- package/dist/src/components/Contractor/Compensation/management/CompensationComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Compensation/management/CompensationEditForm.d.ts +1 -1
- package/dist/src/components/Contractor/Compensation/shared/useContractorPayForm/fields.d.ts +2 -2
- package/dist/src/components/Contractor/ContractorList/management/ManagementContractorList.d.ts +1 -1
- package/dist/src/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +1 -1
- package/dist/src/components/Contractor/ContractorList/onboarding/ContractorList.d.ts +1 -1
- package/dist/src/components/Contractor/ContractorList/onboarding/ContractorListView.d.ts +1 -1
- package/dist/src/components/Contractor/ContractorListFlow/ContractorListFlow.d.ts +1 -1
- package/dist/src/components/Contractor/ContractorListFlow/ContractorListFlowComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Dashboard/Dashboard.d.ts +1 -1
- package/dist/src/components/Contractor/Dashboard/DashboardComponents.d.ts +5 -5
- package/dist/src/components/Contractor/Dashboard/DashboardFlow.d.ts +1 -1
- package/dist/src/components/Contractor/Dashboard/DetailsView.d.ts +1 -1
- package/dist/src/components/Contractor/Dashboard/PayView.d.ts +1 -1
- package/dist/src/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.d.ts +1 -1
- package/dist/src/components/Contractor/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +1 -1
- package/dist/src/components/Contractor/Documents/onboarding/DocumentSigner/documentSignerStateMachine.d.ts +2 -2
- package/dist/src/components/Contractor/Documents/onboarding/DocumentsList/DocumentsList.d.ts +1 -1
- package/dist/src/components/Contractor/Documents/shared/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/src/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/fields.d.ts +19 -19
- package/dist/src/components/Contractor/Landing/Landing.d.ts +1 -1
- package/dist/src/components/Contractor/NewHireReport/NewHireReport.d.ts +1 -1
- package/dist/src/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +1 -1
- package/dist/src/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +7 -7
- package/dist/src/components/Contractor/OnboardingSummary/OnboardingSummary.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/management/PaymentMethod.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/management/PaymentMethodCard/PaymentMethodCard.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/management/PaymentMethodComponents.d.ts +2 -2
- package/dist/src/components/Contractor/PaymentMethod/management/PaymentMethodEditForm.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/onboarding/PaymentMethod.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/shared/ContractorBankAccountFields/ContractorBankAccountFields.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.d.ts +1 -1
- package/dist/src/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.d.ts +4 -4
- package/dist/src/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlowComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/HistoricalPaymentFlow/HistoricalPaymentFlowComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +5 -5
- package/dist/src/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlowComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/shared/SetPaymentAmounts/EditContractorPaymentPresentation.d.ts +1 -1
- package/dist/src/components/Contractor/Payments/shared/SetPaymentAmounts/SetPaymentAmounts.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/management/Profile.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/management/ProfileCard/ProfileCard.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/management/ProfileComponents.d.ts +2 -2
- package/dist/src/components/Contractor/Profile/management/ProfileEditForm.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/onboarding/BusinessSelfOnboardingProfile.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/onboarding/ContractorProfile.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/onboarding/IndividualSelfOnboardingProfile.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.d.ts +1 -1
- package/dist/src/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +14 -14
- package/dist/src/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +6 -6
- package/dist/src/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +1 -1
- package/dist/src/components/Contractor/Submit/Submit.d.ts +1 -1
- package/dist/src/components/Contractor/Submit/SubmitDone.d.ts +1 -1
- package/dist/src/components/Contractor/shared/SelectContractors/SelectContractors.d.ts +1 -1
- package/dist/src/components/Contractor/shared/SelectContractors/SelectContractorsPresentation.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/Compensation.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/CompensationComponents.d.ts +4 -4
- package/dist/src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/onboarding/Compensation.d.ts +2 -2
- package/dist/src/components/Employee/Compensation/onboarding/CompensationFlowComponents.d.ts +3 -3
- package/dist/src/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/shared/PendingChangesReviewModal.d.ts +1 -1
- package/dist/src/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +7 -7
- package/dist/src/components/Employee/Compensation/shared/useJobForm/fields.d.ts +5 -5
- package/dist/src/components/Employee/Dashboard/BasicDetailsView.d.ts +1 -1
- package/dist/src/components/Employee/Dashboard/Dashboard.d.ts +1 -1
- package/dist/src/components/Employee/Dashboard/DashboardComponents.d.ts +13 -13
- package/dist/src/components/Employee/Dashboard/DashboardFlow.d.ts +1 -1
- package/dist/src/components/Employee/Dashboard/JobAndPayView.d.ts +1 -1
- package/dist/src/components/Employee/Dashboard/TaxesView.d.ts +2 -2
- package/dist/src/components/Employee/Deductions/management/Deductions.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/management/DeductionsComponents.d.ts +2 -2
- package/dist/src/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +2 -2
- package/dist/src/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +1 -1
- package/dist/src/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +8 -8
- package/dist/src/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +7 -7
- package/dist/src/components/Employee/Documents/management/DocumentManager.d.ts +1 -1
- package/dist/src/components/Employee/Documents/management/Documents.d.ts +1 -1
- package/dist/src/components/Employee/Documents/management/DocumentsCard/DocumentsCard.d.ts +1 -1
- package/dist/src/components/Employee/Documents/management/DocumentsComponents.d.ts +2 -2
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +1 -1
- package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.d.ts +4 -4
- package/dist/src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.d.ts +2 -2
- package/dist/src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -1
- package/dist/src/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/src/components/Employee/Documents/shared/useSignEmployeeForm/fields.d.ts +39 -39
- package/dist/src/components/Employee/EmployeeList/management/ManagementEmployeeList.d.ts +1 -1
- package/dist/src/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -1
- package/dist/src/components/Employee/EmployeeList/onboarding/EmployeeList.d.ts +1 -1
- package/dist/src/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +1 -1
- package/dist/src/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +1 -1
- package/dist/src/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +4 -4
- package/dist/src/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +1 -1
- package/dist/src/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.d.ts +1 -1
- package/dist/src/components/Employee/FederalTaxes/management/FederalTaxesComponents.d.ts +2 -2
- package/dist/src/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +1 -1
- package/dist/src/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +1 -1
- package/dist/src/components/Employee/FederalTaxes/shared/FederalTaxesView.d.ts +1 -1
- package/dist/src/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +6 -6
- package/dist/src/components/Employee/HomeAddress/management/HomeAddress.d.ts +1 -1
- package/dist/src/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.d.ts +1 -1
- package/dist/src/components/Employee/HomeAddress/management/HomeAddressComponents.d.ts +2 -2
- package/dist/src/components/Employee/HomeAddress/management/HomeAddressEditForm.d.ts +1 -1
- package/dist/src/components/Employee/HomeAddress/management/HomeAddressView.d.ts +1 -1
- package/dist/src/components/Employee/Landing/Landing.d.ts +1 -1
- package/dist/src/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +1 -1
- package/dist/src/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +3 -3
- package/dist/src/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +1 -1
- package/dist/src/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +1 -1
- package/dist/src/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -2
- package/dist/src/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +2 -2
- package/dist/src/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/management/PaymentMethodBankForm.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/management/PaymentMethodCard.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +3 -3
- package/dist/src/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/onboarding/ListView.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +2 -2
- package/dist/src/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +3 -3
- package/dist/src/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +4 -4
- package/dist/src/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +1 -1
- package/dist/src/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +1 -1
- package/dist/src/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.d.ts +1 -1
- package/dist/src/components/Employee/Profile/management/Profile.d.ts +1 -1
- package/dist/src/components/Employee/Profile/management/ProfileCard/ProfileCard.d.ts +1 -1
- package/dist/src/components/Employee/Profile/management/ProfileComponents.d.ts +2 -2
- package/dist/src/components/Employee/Profile/management/ProfileEditForm.d.ts +1 -1
- package/dist/src/components/Employee/Profile/onboarding/AdminProfile.d.ts +1 -1
- package/dist/src/components/Employee/Profile/onboarding/EmployeeProfile.d.ts +1 -1
- package/dist/src/components/Employee/Profile/onboarding/Profile.d.ts +2 -2
- package/dist/src/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.d.ts +7 -7
- package/dist/src/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +7 -7
- package/dist/src/components/Employee/Profile/shared/useWorkAddressForm/fields.d.ts +2 -2
- package/dist/src/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +7 -7
- package/dist/src/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +1 -1
- package/dist/src/components/Employee/StateTaxes/management/StateTaxes.d.ts +1 -1
- package/dist/src/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.d.ts +1 -1
- package/dist/src/components/Employee/StateTaxes/management/StateTaxesComponents.d.ts +2 -2
- package/dist/src/components/Employee/StateTaxes/management/StateTaxesEditForm.d.ts +1 -1
- package/dist/src/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +1 -1
- package/dist/src/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.d.ts +1 -1
- package/dist/src/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.d.ts +6 -6
- package/dist/src/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -1
- package/dist/src/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +1 -1
- package/dist/src/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +1 -1
- package/dist/src/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +4 -4
- package/dist/src/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -1
- package/dist/src/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +1 -1
- package/dist/src/components/Employee/WorkAddress/management/WorkAddress.d.ts +1 -1
- package/dist/src/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.d.ts +1 -1
- package/dist/src/components/Employee/WorkAddress/management/WorkAddressComponents.d.ts +2 -2
- package/dist/src/components/Employee/WorkAddress/management/WorkAddressEditForm.d.ts +1 -1
- package/dist/src/components/Employee/WorkAddress/management/WorkAddressView.d.ts +1 -1
- package/dist/src/components/Flow/Flow.d.ts +1 -1
- package/dist/src/components/Flow/FlowHeader.d.ts +1 -1
- package/dist/src/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +2 -2
- package/dist/src/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +1 -1
- package/dist/src/components/InformationRequests/InformationRequests.d.ts +1 -1
- package/dist/src/components/InformationRequests/InformationRequestsComponents.d.ts +1 -1
- package/dist/src/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
- package/dist/src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +1 -1
- package/dist/src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +2 -2
- package/dist/src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -1
- package/dist/src/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +1 -1
- package/dist/src/components/Payroll/Dismissal/DismissalFlow.d.ts +1 -1
- package/dist/src/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
- package/dist/src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +1 -1
- package/dist/src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/src/components/Payroll/OffCycle/OffCycleFlow.d.ts +3 -1
- package/dist/src/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +4 -2
- package/dist/src/components/Payroll/OffCycle/offCycleStateMachine.d.ts +1 -0
- package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +2 -1
- package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +5 -0
- package/dist/src/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
- package/dist/src/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +1 -1
- package/dist/src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.d.ts +1 -1
- package/dist/src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.d.ts +18 -0
- package/dist/src/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +3 -3
- package/dist/src/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +8 -0
- package/dist/src/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +7 -7
- package/dist/src/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +7 -2
- package/dist/src/components/Payroll/PayrollHistory/PayrollHistory.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollLanding/PayrollLanding.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +3 -3
- package/dist/src/components/Payroll/PayrollList/PayrollList.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +1 -1
- package/dist/src/components/Payroll/PrintChecks/PrintChecks.d.ts +1 -1
- package/dist/src/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.d.ts +1 -1
- package/dist/src/components/Payroll/PrintChecks/PrintChecksComponents.d.ts +3 -3
- package/dist/src/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.d.ts +1 -1
- package/dist/src/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.d.ts +1 -1
- package/dist/src/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.d.ts +1 -1
- package/dist/src/components/Payroll/RecoveryCases/RecoveryCases.d.ts +1 -1
- package/dist/src/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +1 -1
- package/dist/src/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +1 -1
- package/dist/src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +1 -1
- package/dist/src/components/Payroll/Transition/TransitionFlow.d.ts +17 -15
- package/dist/src/components/Payroll/Transition/TransitionFlowComponents.d.ts +21 -12
- package/dist/src/components/Payroll/Transition/transitionStateMachine.d.ts +25 -4
- package/dist/src/components/Payroll/TransitionCreation/TransitionCreation.d.ts +1 -1
- package/dist/src/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/TransitionPayroll/TransitionPayroll.d.ts +55 -0
- package/dist/src/components/Payroll/TransitionPayroll/TransitionPayrollComponents.d.ts +24 -0
- package/dist/src/components/Payroll/TransitionPayroll/TransitionPayrollTypes.d.ts +23 -0
- package/dist/src/components/Payroll/TransitionPayroll/index.d.ts +2 -0
- package/dist/src/components/Payroll/TransitionPayroll/transitionPayrollStateMachine.d.ts +15 -0
- package/dist/src/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.d.ts +28 -0
- package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
- package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.d.ts +1 -1
- package/dist/src/components/Payroll/index.d.ts +2 -0
- package/dist/src/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +1 -1
- package/dist/src/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +1 -1
- package/dist/src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +1 -1
- package/dist/src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +1 -1
- package/dist/src/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/src/components/TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -1
- package/dist/src/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +1 -1
- package/dist/src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +12 -12
- package/dist/src/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +1 -1
- package/dist/src/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
- package/dist/src/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +1 -1
- package/dist/src/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +1 -1
- package/dist/src/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +1 -1
- package/dist/src/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
- package/dist/src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
- package/dist/src/contexts/ApiProvider/ApiProvider.d.ts +1 -1
- package/dist/src/contexts/LoadingIndicatorProvider/LoadingIndicatorProvider.d.ts +1 -1
- package/dist/src/contexts/LocaleProvider/LocaleProvider.d.ts +1 -1
- package/dist/src/contexts/ObservabilityProvider/ObservabilityProvider.d.ts +1 -1
- package/dist/src/contexts/ThemeProvider/customRender.d.ts +1 -1
- package/dist/src/contexts/UnstableFeaturesProvider/UnstableFeaturesProvider.d.ts +1 -1
- package/dist/src/i18n/types.d.ts +9 -1
- package/dist/src/partner-hook-utils/form/FormFieldsMetadataProvider.d.ts +1 -1
- package/dist/src/partner-hook-utils/form/SDKFormProvider.d.ts +1 -1
- package/dist/src/shared/constants.d.ts +2 -0
- package/dist/src/test-utils/renderWithProviders.d.ts +1 -1
- package/docs/guides/endpoint-inventory.json +14 -19
- package/package.json +8 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as d } from "react";
|
|
3
3
|
import { useMachine as F } from "react-robot";
|
|
4
|
+
import { Flex as s } from "../Common/Flex/Flex.js";
|
|
4
5
|
import { FlowContext as v } from "./useFlow.js";
|
|
5
6
|
import { FlowHeader as E } from "./FlowHeader.js";
|
|
6
7
|
import { useLoadingIndicator as a } from "../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
7
|
-
import { Flex as s } from "../Common/Flex/Flex.js";
|
|
8
8
|
const g = 40;
|
|
9
9
|
function H() {
|
|
10
10
|
const { LoadingIndicator: o } = a();
|
|
@@ -18,15 +18,14 @@ import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
|
18
18
|
import { formatNumberAsCurrency as D } from "../../../helpers/formattedStrings.js";
|
|
19
19
|
import "../../../shared/constants.js";
|
|
20
20
|
import { useComponentContext as L } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
21
|
-
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
22
21
|
import { useI18n as V } from "../../../i18n/I18n.js";
|
|
23
22
|
import { NumberInputField as E } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
24
23
|
const T = w.object({
|
|
25
24
|
netPay: w.number().positive()
|
|
26
25
|
});
|
|
27
|
-
function ue({ isOpen: n, onCalculateGrossUp: P, onApply: x, onCancel:
|
|
26
|
+
function ue({ isOpen: n, onCalculateGrossUp: P, onApply: x, onCancel: u }) {
|
|
28
27
|
V("Payroll.GrossUpModal");
|
|
29
|
-
const { t: r } = z("Payroll.GrossUpModal"), { Modal: A, Heading:
|
|
28
|
+
const { t: r } = z("Payroll.GrossUpModal"), { Modal: A, Heading: p, Text: i, Button: c, Alert: f } = L(), { baseSubmitHandler: y } = B(), M = F(null), [l, m] = o(null), [h, d] = o(null), [g, b] = o(!1), [N, v] = o(!1), s = R({
|
|
30
29
|
resolver: H(T),
|
|
31
30
|
// Start blank rather than 0: 0 is not a valid net amount, and a leading 0
|
|
32
31
|
// in the field means typing an amount produces values like "0350".
|
|
@@ -49,7 +48,7 @@ function ue({ isOpen: n, onCalculateGrossUp: P, onApply: x, onCancel: p }) {
|
|
|
49
48
|
A,
|
|
50
49
|
{
|
|
51
50
|
isOpen: n,
|
|
52
|
-
onClose:
|
|
51
|
+
onClose: u,
|
|
53
52
|
containerRef: M,
|
|
54
53
|
footer: /* @__PURE__ */ t(k, { children: [
|
|
55
54
|
/* @__PURE__ */ e(
|
|
@@ -70,11 +69,11 @@ function ue({ isOpen: n, onCalculateGrossUp: P, onApply: x, onCancel: p }) {
|
|
|
70
69
|
children: r("applyCta")
|
|
71
70
|
}
|
|
72
71
|
),
|
|
73
|
-
/* @__PURE__ */ e(c, { variant: "secondary", onClick:
|
|
72
|
+
/* @__PURE__ */ e(c, { variant: "secondary", onClick: u, children: r("cancelCta") })
|
|
74
73
|
] }),
|
|
75
74
|
children: /* @__PURE__ */ t(U, { ...s, children: [
|
|
76
75
|
/* @__PURE__ */ t("div", { className: a.header, children: [
|
|
77
|
-
/* @__PURE__ */ e(
|
|
76
|
+
/* @__PURE__ */ e(p, { as: "h2", styledAs: "h3", children: r("title") }),
|
|
78
77
|
/* @__PURE__ */ e(i, { variant: "supporting", as: "p", children: r("description") })
|
|
79
78
|
] }),
|
|
80
79
|
/* @__PURE__ */ t("div", { className: a.content, children: [
|
|
@@ -106,7 +105,7 @@ function ue({ isOpen: n, onCalculateGrossUp: P, onApply: x, onCancel: p }) {
|
|
|
106
105
|
] }),
|
|
107
106
|
l ? /* @__PURE__ */ t("div", { className: a.result, children: [
|
|
108
107
|
/* @__PURE__ */ e(i, { size: "sm", variant: "supporting", weight: "semibold", children: r("grossPayResult") }),
|
|
109
|
-
/* @__PURE__ */ e(
|
|
108
|
+
/* @__PURE__ */ e(p, { as: "h3", children: D(parseFloat(l)) })
|
|
110
109
|
] }) : /* @__PURE__ */ e(i, { size: "sm", variant: "supporting", children: r("applyHint") })
|
|
111
110
|
] })
|
|
112
111
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrossUpModal.js","sources":["../../../../src/components/Payroll/GrossUpModal/GrossUpModal.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { GrossUpModalProps } from './GrossUpModalTypes'\nimport styles from './GrossUpModal.module.scss'\nimport { ActionsLayout, Flex, NumberInputField } from '@/components/Common'\nimport { useBase } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\nconst GrossUpFormSchema = z.object({\n netPay: z.number().positive(),\n})\n\ntype GrossUpFormValues = z.infer<typeof GrossUpFormSchema>\n\n/** @internal */\nexport function GrossUpModal({ isOpen, onCalculateGrossUp, onApply, onCancel }: GrossUpModalProps) {\n useI18n('Payroll.GrossUpModal')\n const { t } = useTranslation('Payroll.GrossUpModal')\n const { Modal, Heading, Text, Button, Alert } = useComponentContext()\n const { baseSubmitHandler } = useBase()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const [calculatedGrossUp, setCalculatedGrossUp] = useState<string | null>(null)\n const [errorMessage, setErrorMessage] = useState<string | null>(null)\n const [isCalculating, setIsCalculating] = useState(false)\n const [isApplying, setIsApplying] = useState(false)\n\n const formHandlers = useForm<GrossUpFormValues>({\n resolver: zodResolver(GrossUpFormSchema),\n // Start blank rather than 0: 0 is not a valid net amount, and a leading 0\n // in the field means typing an amount produces values like \"0350\".\n defaultValues: {},\n })\n\n useEffect(() => {\n if (!isOpen) {\n formHandlers.reset()\n setCalculatedGrossUp(null)\n setErrorMessage(null)\n }\n }, [isOpen, formHandlers.reset])\n\n const handleCalculate = async (data: GrossUpFormValues) => {\n setErrorMessage(null)\n setCalculatedGrossUp(null)\n setIsCalculating(true)\n\n await baseSubmitHandler(null, async () => {\n try {\n const result = await onCalculateGrossUp(data.netPay)\n\n if (result) {\n setCalculatedGrossUp(result)\n } else {\n setErrorMessage(t('errorMessage'))\n }\n } finally {\n setIsCalculating(false)\n }\n })\n }\n\n const handleApply = async () => {\n if (calculatedGrossUp) {\n setIsApplying(true)\n await baseSubmitHandler(null, async () => {\n try {\n await onApply(calculatedGrossUp)\n } finally {\n setIsApplying(false)\n }\n })\n }\n }\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button\n variant=\"primary\"\n isDisabled={!calculatedGrossUp}\n onClick={handleApply}\n isLoading={isApplying}\n >\n {t('applyCta')}\n </Button>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('cancelCta')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.header}>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text variant=\"supporting\" as=\"p\">\n {t('description')}\n </Text>\n </div>\n\n <div className={styles.content}>\n {errorMessage && (\n <div className={styles.alert}>\n <Alert label={errorMessage} status=\"error\" disableScrollIntoView />\n </div>\n )}\n\n <div className={styles.alert}>\n <Alert label={t('warning')} status=\"warning\" disableScrollIntoView />\n </div>\n\n {/* Bottom-align on the row itself: the .calculateButton align-self\n rule below only targets the default (react-aria) adapter, so in\n other adapters the button otherwise falls back to flex-start. */}\n <Flex flexDirection=\"row\" gap={8} alignItems=\"flex-end\">\n <NumberInputField\n name=\"netPay\"\n label={t('netPayLabel')}\n format=\"currency\"\n adornmentStart=\"$\"\n errorMessage={t('validations.netPay')}\n min={0}\n isRequired\n />\n <Button\n variant=\"secondary\"\n className={styles.calculateButton}\n isDisabled={isCalculating}\n onClick={formHandlers.handleSubmit(handleCalculate)}\n >\n {isCalculating ? t('calculatingCta') : t('calculateCta')}\n </Button>\n </Flex>\n\n {calculatedGrossUp ? (\n <div className={styles.result}>\n <Text size=\"sm\" variant=\"supporting\" weight=\"semibold\">\n {t('grossPayResult')}\n </Text>\n <Heading as=\"h3\">{formatNumberAsCurrency(parseFloat(calculatedGrossUp))}</Heading>\n </div>\n ) : (\n <Text size=\"sm\" variant=\"supporting\">\n {t('applyHint')}\n </Text>\n )}\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["GrossUpFormSchema","z","GrossUpModal","isOpen","onCalculateGrossUp","onApply","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","Alert","useComponentContext","baseSubmitHandler","useBase","modalContainerRef","useRef","calculatedGrossUp","setCalculatedGrossUp","useState","errorMessage","setErrorMessage","isCalculating","setIsCalculating","isApplying","setIsApplying","formHandlers","useForm","zodResolver","useEffect","handleCalculate","data","result","jsx","ActionsLayout","jsxs","FormProvider","styles","Flex","NumberInputField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GrossUpModal.js","sources":["../../../../src/components/Payroll/GrossUpModal/GrossUpModal.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { GrossUpModalProps } from './GrossUpModalTypes'\nimport styles from './GrossUpModal.module.scss'\nimport { ActionsLayout, Flex, NumberInputField } from '@/components/Common'\nimport { useBase } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\nconst GrossUpFormSchema = z.object({\n netPay: z.number().positive(),\n})\n\ntype GrossUpFormValues = z.infer<typeof GrossUpFormSchema>\n\n/** @internal */\nexport function GrossUpModal({ isOpen, onCalculateGrossUp, onApply, onCancel }: GrossUpModalProps) {\n useI18n('Payroll.GrossUpModal')\n const { t } = useTranslation('Payroll.GrossUpModal')\n const { Modal, Heading, Text, Button, Alert } = useComponentContext()\n const { baseSubmitHandler } = useBase()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const [calculatedGrossUp, setCalculatedGrossUp] = useState<string | null>(null)\n const [errorMessage, setErrorMessage] = useState<string | null>(null)\n const [isCalculating, setIsCalculating] = useState(false)\n const [isApplying, setIsApplying] = useState(false)\n\n const formHandlers = useForm<GrossUpFormValues>({\n resolver: zodResolver(GrossUpFormSchema),\n // Start blank rather than 0: 0 is not a valid net amount, and a leading 0\n // in the field means typing an amount produces values like \"0350\".\n defaultValues: {},\n })\n\n useEffect(() => {\n if (!isOpen) {\n formHandlers.reset()\n setCalculatedGrossUp(null)\n setErrorMessage(null)\n }\n }, [isOpen, formHandlers.reset])\n\n const handleCalculate = async (data: GrossUpFormValues) => {\n setErrorMessage(null)\n setCalculatedGrossUp(null)\n setIsCalculating(true)\n\n await baseSubmitHandler(null, async () => {\n try {\n const result = await onCalculateGrossUp(data.netPay)\n\n if (result) {\n setCalculatedGrossUp(result)\n } else {\n setErrorMessage(t('errorMessage'))\n }\n } finally {\n setIsCalculating(false)\n }\n })\n }\n\n const handleApply = async () => {\n if (calculatedGrossUp) {\n setIsApplying(true)\n await baseSubmitHandler(null, async () => {\n try {\n await onApply(calculatedGrossUp)\n } finally {\n setIsApplying(false)\n }\n })\n }\n }\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button\n variant=\"primary\"\n isDisabled={!calculatedGrossUp}\n onClick={handleApply}\n isLoading={isApplying}\n >\n {t('applyCta')}\n </Button>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('cancelCta')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.header}>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text variant=\"supporting\" as=\"p\">\n {t('description')}\n </Text>\n </div>\n\n <div className={styles.content}>\n {errorMessage && (\n <div className={styles.alert}>\n <Alert label={errorMessage} status=\"error\" disableScrollIntoView />\n </div>\n )}\n\n <div className={styles.alert}>\n <Alert label={t('warning')} status=\"warning\" disableScrollIntoView />\n </div>\n\n {/* Bottom-align on the row itself: the .calculateButton align-self\n rule below only targets the default (react-aria) adapter, so in\n other adapters the button otherwise falls back to flex-start. */}\n <Flex flexDirection=\"row\" gap={8} alignItems=\"flex-end\">\n <NumberInputField\n name=\"netPay\"\n label={t('netPayLabel')}\n format=\"currency\"\n adornmentStart=\"$\"\n errorMessage={t('validations.netPay')}\n min={0}\n isRequired\n />\n <Button\n variant=\"secondary\"\n className={styles.calculateButton}\n isDisabled={isCalculating}\n onClick={formHandlers.handleSubmit(handleCalculate)}\n >\n {isCalculating ? t('calculatingCta') : t('calculateCta')}\n </Button>\n </Flex>\n\n {calculatedGrossUp ? (\n <div className={styles.result}>\n <Text size=\"sm\" variant=\"supporting\" weight=\"semibold\">\n {t('grossPayResult')}\n </Text>\n <Heading as=\"h3\">{formatNumberAsCurrency(parseFloat(calculatedGrossUp))}</Heading>\n </div>\n ) : (\n <Text size=\"sm\" variant=\"supporting\">\n {t('applyHint')}\n </Text>\n )}\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["GrossUpFormSchema","z","GrossUpModal","isOpen","onCalculateGrossUp","onApply","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","Alert","useComponentContext","baseSubmitHandler","useBase","modalContainerRef","useRef","calculatedGrossUp","setCalculatedGrossUp","useState","errorMessage","setErrorMessage","isCalculating","setIsCalculating","isApplying","setIsApplying","formHandlers","useForm","zodResolver","useEffect","handleCalculate","data","result","jsx","ActionsLayout","jsxs","FormProvider","styles","Flex","NumberInputField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACjC,QAAQA,EAAE,OAAA,EAAS,SAAA;AACrB,CAAC;AAKM,SAASC,GAAa,EAAE,QAAAC,GAAQ,oBAAAC,GAAoB,SAAAC,GAAS,UAAAC,KAA+B;AACjG,EAAAC,EAAQ,sBAAsB;AAC9B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,OAAAC,GAAO,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,OAAAC,EAAA,IAAUC,EAAA,GAC1C,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxBC,IAAoBC,EAAuB,IAAI,GAE/C,CAACC,GAAmBC,CAAoB,IAAIC,EAAwB,IAAI,GACxE,CAACC,GAAcC,CAAe,IAAIF,EAAwB,IAAI,GAC9D,CAACG,GAAeC,CAAgB,IAAIJ,EAAS,EAAK,GAClD,CAACK,GAAYC,CAAa,IAAIN,EAAS,EAAK,GAE5CO,IAAeC,EAA2B;AAAA,IAC9C,UAAUC,EAAY/B,CAAiB;AAAA;AAAA;AAAA,IAGvC,eAAe,CAAA;AAAA,EAAC,CACjB;AAED,EAAAgC,EAAU,MAAM;AACd,IAAK7B,MACH0B,EAAa,MAAA,GACbR,EAAqB,IAAI,GACzBG,EAAgB,IAAI;AAAA,EAExB,GAAG,CAACrB,GAAQ0B,EAAa,KAAK,CAAC;AAE/B,QAAMI,IAAkB,OAAOC,MAA4B;AACzD,IAAAV,EAAgB,IAAI,GACpBH,EAAqB,IAAI,GACzBK,EAAiB,EAAI,GAErB,MAAMV,EAAkB,MAAM,YAAY;AACxC,UAAI;AACF,cAAMmB,IAAS,MAAM/B,EAAmB8B,EAAK,MAAM;AAEnD,QAAIC,IACFd,EAAqBc,CAAM,IAE3BX,EAAgBhB,EAAE,cAAc,CAAC;AAAA,MAErC,UAAA;AACE,QAAAkB,EAAiB,EAAK;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,EACH;AAeA,SACE,gBAAAU;AAAA,IAAC1B;AAAA,IAAA;AAAA,MACC,QAAAP;AAAA,MACA,SAASG;AAAA,MACT,cAAcY;AAAA,MACd,0BACGmB,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACvB;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,YAAY,CAACO;AAAA,YACb,SAvBU,YAAY;AAC9B,cAAIA,MACFQ,EAAc,EAAI,GAClB,MAAMZ,EAAkB,MAAM,YAAY;AACxC,oBAAI;AACF,wBAAMX,EAAQe,CAAiB;AAAA,gBACjC,UAAA;AACE,kBAAAQ,EAAc,EAAK;AAAA,gBACrB;AAAA,cACF,CAAC;AAAA,YAEL;AAAA,YAaU,WAAWD;AAAA,YAEV,YAAE,UAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAEf,gBAAAS,EAACvB,KAAO,SAAQ,aAAY,SAASP,GAClC,UAAAE,EAAE,WAAW,EAAA,CAChB;AAAA,MAAA,GACF;AAAA,MAGF,UAAA,gBAAA8B,EAACC,GAAA,EAAc,GAAGV,GAChB,UAAA;AAAA,QAAA,gBAAAS,EAAC,OAAA,EAAI,WAAWE,EAAO,QACrB,UAAA;AAAA,UAAA,gBAAAJ,EAACzB,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAAH,EAAE,OAAO,GACZ;AAAA,UACA,gBAAA4B,EAACxB,KAAK,SAAQ,cAAa,IAAG,KAC3B,UAAAJ,EAAE,aAAa,EAAA,CAClB;AAAA,QAAA,GACF;AAAA,QAEA,gBAAA8B,EAAC,OAAA,EAAI,WAAWE,EAAO,SACpB,UAAA;AAAA,UAAAjB,KACC,gBAAAa,EAAC,OAAA,EAAI,WAAWI,EAAO,OACrB,UAAA,gBAAAJ,EAACtB,GAAA,EAAM,OAAOS,GAAc,QAAO,SAAQ,uBAAqB,IAAC,GACnE;AAAA,UAGF,gBAAAa,EAAC,OAAA,EAAI,WAAWI,EAAO,OACrB,UAAA,gBAAAJ,EAACtB,GAAA,EAAM,OAAON,EAAE,SAAS,GAAG,QAAO,WAAU,uBAAqB,IAAC,GACrE;AAAA,4BAKCiC,GAAA,EAAK,eAAc,OAAM,KAAK,GAAG,YAAW,YAC3C,UAAA;AAAA,YAAA,gBAAAL;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,OAAOlC,EAAE,aAAa;AAAA,gBACtB,QAAO;AAAA,gBACP,gBAAe;AAAA,gBACf,cAAcA,EAAE,oBAAoB;AAAA,gBACpC,KAAK;AAAA,gBACL,YAAU;AAAA,cAAA;AAAA,YAAA;AAAA,YAEZ,gBAAA4B;AAAA,cAACvB;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,WAAW2B,EAAO;AAAA,gBAClB,YAAYf;AAAA,gBACZ,SAASI,EAAa,aAAaI,CAAe;AAAA,gBAEjD,UAAgBzB,EAAhBiB,IAAkB,mBAAsB,cAAN;AAAA,cAAoB;AAAA,YAAA;AAAA,UACzD,GACF;AAAA,UAECL,IACC,gBAAAkB,EAAC,OAAA,EAAI,WAAWE,EAAO,QACrB,UAAA;AAAA,YAAA,gBAAAJ,EAACxB,GAAA,EAAK,MAAK,MAAK,SAAQ,cAAa,QAAO,YACzC,UAAAJ,EAAE,gBAAgB,EAAA,CACrB;AAAA,YACA,gBAAA4B,EAACzB,KAAQ,IAAG,MAAM,YAAuB,WAAWS,CAAiB,CAAC,EAAA,CAAE;AAAA,UAAA,EAAA,CAC1E,sBAECR,GAAA,EAAK,MAAK,MAAK,SAAQ,cACrB,UAAAJ,EAAE,WAAW,EAAA,CAChB;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleFlow.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlow.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { offCycleMachine, offCycleBreadcrumbsNodes } from './offCycleStateMachine'\nimport {\n OffCycleCreationContextual,\n type OffCycleFlowContextInterface,\n type OffCycleFlowProps,\n} from './OffCycleFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport { buildBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\n/**\n * Guided flow to create and run a bonus or correction payroll.\n *\n * @remarks\n * Guides the user through configuring pay period dates, selecting a reason, choosing\n * employees, and setting deduction and tax withholding preferences, then transitions\n * into the standard payroll execution experience (configuration, overview, submission,\n * receipts). All off-cycle payroll types share the same execution steps as regular\n * payrolls — only the creation step differs.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `breadcrumb/navigate` | User navigates via the flow breadcrumb header | `{ key: string }` |\n * | `offCycle/created` | Off-cycle payroll has been created and the flow transitions to execution | `{ payrollUuid: string }` |\n *\n * Once the flow transitions to execution, all standard run-payroll events are emitted\n * (e.g. `runPayroll/calculated`, `runPayroll/submitted`, `runPayroll/processed`).\n *\n * @components\n * - {@link OffCycleCreation}\n * - {@link PayrollExecutionFlow}\n *\n * @param props - {@link OffCycleFlowProps}\n * @returns The rendered off-cycle payroll flow.\n * @public\n *\n * @example\n * ```tsx title=\"App.tsx\"\n * import { Payroll, type EventType } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <Payroll.OffCycleFlow\n * companyId=\"a007e1ab-3595-43c2-ab4b-af7a5af2e365\"\n * onEvent={(eventType: EventType) => {\n * if (eventType === 'runPayroll/submitted') {\n * // Payroll submitted — navigate to your next screen\n * }\n * }}\n * />\n * )\n * }\n * ```\n */\nexport function OffCycleFlow({\n companyId,\n payrollType,\n onEvent,\n withReimbursements,\n}: OffCycleFlowProps) {\n const offCycleFlowMachine = useMemo(\n () =>\n createMachine(\n 'createOffCyclePayroll',\n offCycleMachine,\n (initialContext: OffCycleFlowContextInterface) => ({\n ...initialContext,\n component: OffCycleCreationContextual,\n companyId,\n payrollType,\n withReimbursements,\n header: {\n type: 'breadcrumbs' as const,\n breadcrumbs: buildBreadcrumbs(offCycleBreadcrumbsNodes),\n currentBreadcrumbId: 'createOffCyclePayroll',\n },\n }),\n ),\n [companyId, payrollType, withReimbursements],\n )\n\n return <Flow machine={offCycleFlowMachine} onEvent={onEvent} />\n}\n"],"names":["OffCycleFlow","companyId","payrollType","onEvent","withReimbursements","offCycleFlowMachine","useMemo","createMachine","offCycleMachine","initialContext","OffCycleCreationContextual","buildBreadcrumbs","offCycleBreadcrumbsNodes","jsx","Flow"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"OffCycleFlow.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlow.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { offCycleMachine, offCycleBreadcrumbsNodes } from './offCycleStateMachine'\nimport {\n OffCycleCreationContextual,\n type OffCycleFlowContextInterface,\n type OffCycleFlowProps,\n} from './OffCycleFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport { buildBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\n/**\n * Guided flow to create and run a bonus or correction payroll.\n *\n * @remarks\n * Guides the user through configuring pay period dates, selecting a reason, choosing\n * employees, and setting deduction and tax withholding preferences, then transitions\n * into the standard payroll execution experience (configuration, overview, submission,\n * receipts). All off-cycle payroll types share the same execution steps as regular\n * payrolls — only the creation step differs.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `breadcrumb/navigate` | User navigates via the flow breadcrumb header | `{ key: string }` |\n * | `offCycle/created` | Off-cycle payroll has been created and the flow transitions to execution | `{ payrollUuid: string }` |\n * | `offCycle/blockers/viewAll` | User opens the payroll blockers step from the creation screen's blocker alert | none |\n *\n * Once the flow transitions to execution, all standard run-payroll events are emitted\n * (e.g. `runPayroll/calculated`, `runPayroll/submitted`, `runPayroll/processed`).\n *\n * @components\n * - {@link OffCycleCreation}\n * - {@link PayrollBlockerList}\n * - {@link PayrollExecutionFlow}\n *\n * @param props - {@link OffCycleFlowProps}\n * @returns The rendered off-cycle payroll flow.\n * @public\n *\n * @example\n * ```tsx title=\"App.tsx\"\n * import { Payroll, type EventType } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <Payroll.OffCycleFlow\n * companyId=\"a007e1ab-3595-43c2-ab4b-af7a5af2e365\"\n * onEvent={(eventType: EventType) => {\n * if (eventType === 'runPayroll/submitted') {\n * // Payroll submitted — navigate to your next screen\n * }\n * }}\n * />\n * )\n * }\n * ```\n */\nexport function OffCycleFlow({\n companyId,\n payrollType,\n onEvent,\n withReimbursements,\n}: OffCycleFlowProps) {\n const offCycleFlowMachine = useMemo(\n () =>\n createMachine(\n 'createOffCyclePayroll',\n offCycleMachine,\n (initialContext: OffCycleFlowContextInterface) => ({\n ...initialContext,\n component: OffCycleCreationContextual,\n companyId,\n payrollType,\n withReimbursements,\n header: {\n type: 'breadcrumbs' as const,\n breadcrumbs: buildBreadcrumbs(offCycleBreadcrumbsNodes),\n currentBreadcrumbId: 'createOffCyclePayroll',\n },\n }),\n ),\n [companyId, payrollType, withReimbursements],\n )\n\n return <Flow machine={offCycleFlowMachine} onEvent={onEvent} />\n}\n"],"names":["OffCycleFlow","companyId","payrollType","onEvent","withReimbursements","offCycleFlowMachine","useMemo","createMachine","offCycleMachine","initialContext","OffCycleCreationContextual","buildBreadcrumbs","offCycleBreadcrumbsNodes","jsx","Flow"],"mappings":";;;;;;;AA0DO,SAASA,EAAa;AAAA,EAC3B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,oBAAAC;AACF,GAAsB;AACpB,QAAMC,IAAsBC;AAAA,IAC1B,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAkD;AAAA,QACjD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAT;AAAA,QACA,aAAAC;AAAA,QACA,oBAAAE;AAAA,QACA,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,aAAaO,EAAiBC,CAAwB;AAAA,UACtD,qBAAqB;AAAA,QAAA;AAAA,MACvB;AAAA,IACF;AAAA,IAEJ,CAACX,GAAWC,GAAaE,CAAkB;AAAA,EAAA;AAG7C,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAAST,GAAqB,SAAAF,EAAA,CAAkB;AAC/D;"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as y } from "react";
|
|
3
3
|
import { usePayrollsGetSuspense as p } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
4
4
|
import { PayrollExecutionInternalFlow as u } from "../PayrollExecutionFlow/PayrollExecutionFlow.js";
|
|
5
5
|
import { isDismissalPayroll as d } from "../helpers.js";
|
|
6
|
-
import { useFlow as
|
|
6
|
+
import { useFlow as c } from "../../Flow/useFlow.js";
|
|
7
7
|
import { ensureRequired as a } from "../../../helpers/ensureRequired.js";
|
|
8
8
|
import { BaseComponent as C } from "../../Base/Base.js";
|
|
9
9
|
import { OffCycleCreation as P } from "../OffCycleCreation/OffCycleCreation.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import { PayrollBlockerList as x } from "../PayrollBlocker/components/PayrollBlockerList.js";
|
|
11
|
+
function k() {
|
|
12
|
+
const { companyId: o, payrollType: r, onEvent: e } = c();
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
13
14
|
P,
|
|
14
15
|
{
|
|
15
16
|
companyId: a(o),
|
|
@@ -18,41 +19,46 @@ function D() {
|
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
const { companyId: o,
|
|
22
|
+
function F() {
|
|
23
|
+
const { companyId: o, onEvent: r } = c();
|
|
24
|
+
return /* @__PURE__ */ t(x, { companyId: a(o), onEvent: r });
|
|
25
|
+
}
|
|
26
|
+
function L() {
|
|
27
|
+
const { companyId: o, payrollUuid: r, onEvent: e, withReimbursements: n, header: l } = c(), m = a(o), s = a(r), i = l?.type === "breadcrumbs" ? l.breadcrumbs?.createOffCyclePayroll?.[0] : void 0, f = y(
|
|
23
28
|
() => i ? [i] : void 0,
|
|
24
29
|
[i]
|
|
25
30
|
);
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
31
|
+
return /* @__PURE__ */ t(C, { onEvent: e, children: /* @__PURE__ */ t(
|
|
32
|
+
I,
|
|
28
33
|
{
|
|
29
34
|
companyId: m,
|
|
30
|
-
payrollId:
|
|
35
|
+
payrollId: s,
|
|
31
36
|
onEvent: e,
|
|
32
|
-
withReimbursements:
|
|
37
|
+
withReimbursements: n,
|
|
33
38
|
prefixBreadcrumbs: f
|
|
34
39
|
}
|
|
35
40
|
) });
|
|
36
41
|
}
|
|
37
|
-
function
|
|
42
|
+
function I({
|
|
38
43
|
companyId: o,
|
|
39
44
|
payrollId: r,
|
|
40
45
|
...e
|
|
41
46
|
}) {
|
|
42
|
-
const { data:
|
|
43
|
-
return /* @__PURE__ */
|
|
47
|
+
const { data: n } = p({ companyId: o, payrollId: r }), l = n.payrollShow?.payPeriod;
|
|
48
|
+
return /* @__PURE__ */ t(
|
|
44
49
|
u,
|
|
45
50
|
{
|
|
46
51
|
companyId: o,
|
|
47
52
|
payrollId: r,
|
|
48
|
-
initialPayPeriod:
|
|
49
|
-
isDismissalPayroll: d(
|
|
53
|
+
initialPayPeriod: l,
|
|
54
|
+
isDismissalPayroll: d(n.payrollShow?.offCycleReason),
|
|
50
55
|
...e
|
|
51
56
|
}
|
|
52
57
|
);
|
|
53
58
|
}
|
|
54
59
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
k as OffCycleCreationContextual,
|
|
61
|
+
L as OffCycleExecutionContextual,
|
|
62
|
+
F as PayrollBlockerListContextual
|
|
57
63
|
};
|
|
58
64
|
//# sourceMappingURL=OffCycleFlowComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleFlowComponents.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlowComponents.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { OffCycleCreation } from '../OffCycleCreation'\nimport {\n PayrollExecutionInternalFlow,\n type PayrollExecutionInternalFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport type { OffCycleReason } from '../OffCycleReasonSelection'\nimport { isDismissalPayroll } from '../helpers'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\n/**\n * Flow context shared across the off-cycle payroll flow steps.\n *\n * @internal\n */\nexport interface OffCycleFlowContextInterface extends FlowContextInterface {\n /** The associated company identifier. */\n companyId: string\n /** Identifier of the off-cycle payroll created during the flow; set once creation completes. */\n payrollUuid?: string\n /** Pre-selected off-cycle reason (bonus or correction). */\n payrollType?: OffCycleReason\n /** Whether to show reimbursement fields throughout the execution steps. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/**\n * Props for {@link OffCycleFlow}.\n *\n * @public\n */\nexport interface OffCycleFlowProps {\n /** The associated company identifier. */\n companyId: string\n /** Optional pre-selected off-cycle reason. When provided, the creation form starts with this reason selected. */\n payrollType?: OffCycleReason\n /** Callback invoked when the flow emits an event. See the events table on {@link OffCycleFlow}. */\n onEvent: OnEventType<EventType, unknown>\n /** Optional flag to show/hide reimbursement fields throughout the flow. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/** @internal */\nexport function OffCycleCreationContextual() {\n const { companyId, payrollType, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return (\n <OffCycleCreation\n companyId={ensureRequired(companyId)}\n payrollType={payrollType}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function OffCycleExecutionContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, header } =\n useFlow<OffCycleFlowContextInterface>()\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n const offCycleRootBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.['createOffCyclePayroll']?.[0] : undefined\n const prefixBreadcrumbs = useMemo(\n () => (offCycleRootBreadcrumb ? [offCycleRootBreadcrumb] : undefined),\n [offCycleRootBreadcrumb],\n )\n\n return (\n <BaseComponent onEvent={onEvent}>\n <OffCycleExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n withReimbursements={withReimbursements}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n </BaseComponent>\n )\n}\n\ntype OffCycleExecutionWithDataProps = Pick<\n PayrollExecutionInternalFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs' | 'withReimbursements'\n>\n\nfunction OffCycleExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: OffCycleExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionInternalFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll={isDismissalPayroll(data.payrollShow?.offCycleReason)}\n {...rest}\n />\n )\n}\n"],"names":["OffCycleCreationContextual","companyId","payrollType","onEvent","useFlow","jsx","OffCycleCreation","ensureRequired","OffCycleExecutionContextual","payrollUuid","withReimbursements","header","resolvedCompanyId","resolvedPayrollId","offCycleRootBreadcrumb","prefixBreadcrumbs","useMemo","BaseComponent","OffCycleExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionInternalFlow","isDismissalPayroll"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCycleFlowComponents.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlowComponents.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { OffCycleCreation } from '../OffCycleCreation'\nimport { PayrollBlockerList } from '../PayrollBlocker'\nimport {\n PayrollExecutionInternalFlow,\n type PayrollExecutionInternalFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport type { OffCycleReason } from '../OffCycleReasonSelection'\nimport { isDismissalPayroll } from '../helpers'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\n/**\n * Flow context shared across the off-cycle payroll flow steps.\n *\n * @internal\n */\nexport interface OffCycleFlowContextInterface extends FlowContextInterface {\n /** The associated company identifier. */\n companyId: string\n /** Identifier of the off-cycle payroll created during the flow; set once creation completes. */\n payrollUuid?: string\n /** Pre-selected off-cycle reason (bonus or correction). */\n payrollType?: OffCycleReason\n /** Whether to show reimbursement fields throughout the execution steps. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/**\n * Props for {@link OffCycleFlow}.\n *\n * @public\n */\nexport interface OffCycleFlowProps {\n /** The associated company identifier. */\n companyId: string\n /** Optional pre-selected off-cycle reason. When provided, the creation form starts with this reason selected. */\n payrollType?: OffCycleReason\n /** Callback invoked when the flow emits an event. See the events table on {@link OffCycleFlow}. */\n onEvent: OnEventType<EventType, unknown>\n /** Optional flag to show/hide reimbursement fields throughout the flow. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/** @internal */\nexport function OffCycleCreationContextual() {\n const { companyId, payrollType, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return (\n <OffCycleCreation\n companyId={ensureRequired(companyId)}\n payrollType={payrollType}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function PayrollBlockerListContextual() {\n const { companyId, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return <PayrollBlockerList companyId={ensureRequired(companyId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function OffCycleExecutionContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, header } =\n useFlow<OffCycleFlowContextInterface>()\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n const offCycleRootBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.['createOffCyclePayroll']?.[0] : undefined\n const prefixBreadcrumbs = useMemo(\n () => (offCycleRootBreadcrumb ? [offCycleRootBreadcrumb] : undefined),\n [offCycleRootBreadcrumb],\n )\n\n return (\n <BaseComponent onEvent={onEvent}>\n <OffCycleExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n withReimbursements={withReimbursements}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n </BaseComponent>\n )\n}\n\ntype OffCycleExecutionWithDataProps = Pick<\n PayrollExecutionInternalFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs' | 'withReimbursements'\n>\n\nfunction OffCycleExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: OffCycleExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionInternalFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll={isDismissalPayroll(data.payrollShow?.offCycleReason)}\n {...rest}\n />\n )\n}\n"],"names":["OffCycleCreationContextual","companyId","payrollType","onEvent","useFlow","jsx","OffCycleCreation","ensureRequired","PayrollBlockerListContextual","PayrollBlockerList","OffCycleExecutionContextual","payrollUuid","withReimbursements","header","resolvedCompanyId","resolvedPayrollId","offCycleRootBreadcrumb","prefixBreadcrumbs","useMemo","BaseComponent","OffCycleExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionInternalFlow","isDismissalPayroll"],"mappings":";;;;;;;;;;AAiDO,SAASA,IAA6B;AAC3C,QAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,EAAA,IAAYC,EAAA;AAC5C,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeN,CAAS;AAAA,MACnC,aAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASK,IAA+B;AAC7C,QAAM,EAAE,WAAAP,GAAW,SAAAE,EAAA,IAAYC,EAAA;AAC/B,2BAAQK,GAAA,EAAmB,WAAWF,EAAeN,CAAS,GAAG,SAAAE,GAAkB;AACrF;AAGO,SAASO,IAA8B;AAC5C,QAAM,EAAE,WAAAT,GAAW,aAAAU,GAAa,SAAAR,GAAS,oBAAAS,GAAoB,QAAAC,EAAA,IAC3DT,EAAA,GAEIU,IAAoBP,EAAeN,CAAS,GAC5Cc,IAAoBR,EAAeI,CAAW,GAE9CK,IACJH,GAAQ,SAAS,gBAAgBA,EAAO,aAAc,wBAA2B,CAAC,IAAI,QAClFI,IAAoBC;AAAA,IACxB,MAAOF,IAAyB,CAACA,CAAsB,IAAI;AAAA,IAC3D,CAACA,CAAsB;AAAA,EAAA;AAGzB,SACE,gBAAAX,EAACc,KAAc,SAAAhB,GACb,UAAA,gBAAAE;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,WAAWN;AAAA,MACX,WAAWC;AAAA,MACX,SAAAZ;AAAA,MACA,oBAAAS;AAAA,MACA,mBAAAK;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAOA,SAASG,EAA0B;AAAA,EACjC,WAAAnB;AAAA,EACA,WAAAoB;AAAA,EACA,GAAGC;AACL,GAAmC;AACjC,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAuB,EAAE,WAAAvB,GAAW,WAAAoB,GAAW,GAC1DI,IAAmBF,EAAK,aAAa;AAE3C,SACE,gBAAAlB;AAAA,IAACqB;AAAA,IAAA;AAAA,MACC,WAAAzB;AAAA,MACA,WAAAoB;AAAA,MACA,kBAAAI;AAAA,MACA,oBAAoBE,EAAmBJ,EAAK,aAAa,cAAc;AAAA,MACtE,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { state as
|
|
2
|
-
import { OffCycleExecutionContextual as
|
|
3
|
-
import { componentEvents as
|
|
4
|
-
import { patchBreadcrumbsHeader as
|
|
1
|
+
import { state as l, transition as o, reduce as a, guard as f } from "robot3";
|
|
2
|
+
import { OffCycleExecutionContextual as d, PayrollBlockerListContextual as i, OffCycleCreationContextual as y } from "./OffCycleFlowComponents.js";
|
|
3
|
+
import { componentEvents as c } from "../../../shared/constants.js";
|
|
4
|
+
import { patchBreadcrumbsHeader as t, updateBreadcrumbs as u } from "../../../helpers/breadcrumbHelpers.js";
|
|
5
5
|
const O = {
|
|
6
6
|
createOffCyclePayroll: {
|
|
7
7
|
parent: null,
|
|
@@ -10,45 +10,63 @@ const O = {
|
|
|
10
10
|
label: "createOffCyclePayroll.breadcrumbLabel",
|
|
11
11
|
namespace: "Payroll.OffCycle",
|
|
12
12
|
onNavigate: ((e) => ({
|
|
13
|
-
...
|
|
14
|
-
component:
|
|
13
|
+
...t(e, { currentBreadcrumbId: "createOffCyclePayroll" }),
|
|
14
|
+
component: y,
|
|
15
15
|
payrollUuid: void 0
|
|
16
16
|
}))
|
|
17
17
|
}
|
|
18
|
+
},
|
|
19
|
+
blockers: {
|
|
20
|
+
parent: "createOffCyclePayroll",
|
|
21
|
+
item: {
|
|
22
|
+
id: "blockers",
|
|
23
|
+
label: "breadcrumbLabel",
|
|
24
|
+
namespace: "Payroll.PayrollBlocker"
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
};
|
|
20
|
-
function
|
|
28
|
+
function m(e) {
|
|
21
29
|
return {
|
|
22
|
-
...
|
|
23
|
-
component:
|
|
30
|
+
...t(e, { currentBreadcrumbId: "createOffCyclePayroll" }),
|
|
31
|
+
component: y,
|
|
24
32
|
payrollUuid: void 0
|
|
25
33
|
};
|
|
26
34
|
}
|
|
27
|
-
const
|
|
28
|
-
|
|
35
|
+
const n = o(
|
|
36
|
+
c.BREADCRUMB_NAVIGATE,
|
|
29
37
|
"createOffCyclePayroll",
|
|
30
38
|
f(
|
|
31
39
|
(e, r) => r.payload.key === "createOffCyclePayroll"
|
|
32
40
|
),
|
|
33
|
-
|
|
34
|
-
),
|
|
35
|
-
createOffCyclePayroll:
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
a(m)
|
|
42
|
+
), P = {
|
|
43
|
+
createOffCyclePayroll: l(
|
|
44
|
+
o(
|
|
45
|
+
c.OFF_CYCLE_CREATED,
|
|
38
46
|
"execution",
|
|
39
|
-
|
|
47
|
+
a(
|
|
40
48
|
(e, r) => ({
|
|
41
|
-
...
|
|
49
|
+
...t(e, { currentBreadcrumbId: void 0 }),
|
|
42
50
|
payrollUuid: r.payload?.payrollUuid,
|
|
43
|
-
component:
|
|
51
|
+
component: d
|
|
44
52
|
})
|
|
45
53
|
)
|
|
54
|
+
),
|
|
55
|
+
o(
|
|
56
|
+
c.OFF_CYCLE_BLOCKERS_VIEW_ALL,
|
|
57
|
+
"blockers",
|
|
58
|
+
a((e) => ({
|
|
59
|
+
...u("blockers", e),
|
|
60
|
+
component: i,
|
|
61
|
+
payrollUuid: void 0
|
|
62
|
+
}))
|
|
46
63
|
)
|
|
47
64
|
),
|
|
48
|
-
|
|
65
|
+
blockers: l(n),
|
|
66
|
+
execution: l(n)
|
|
49
67
|
};
|
|
50
68
|
export {
|
|
51
69
|
O as offCycleBreadcrumbsNodes,
|
|
52
|
-
|
|
70
|
+
P as offCycleMachine
|
|
53
71
|
};
|
|
54
72
|
//# sourceMappingURL=offCycleStateMachine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offCycleStateMachine.js","sources":["../../../../src/components/Payroll/OffCycle/offCycleStateMachine.ts"],"sourcesContent":["import { state, transition, reduce, guard } from 'robot3'\nimport {\n OffCycleCreationContextual,\n OffCycleExecutionContextual,\n type OffCycleFlowContextInterface,\n} from './OffCycleFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineTransition } from '@/types/Helpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { patchBreadcrumbsHeader } from '@/helpers/breadcrumbHelpers'\n\n/** @internal */\nexport const offCycleBreadcrumbsNodes: BreadcrumbNodes = {\n createOffCyclePayroll: {\n parent: null,\n item: {\n id: 'createOffCyclePayroll',\n label: 'createOffCyclePayroll.breadcrumbLabel',\n namespace: 'Payroll.OffCycle',\n onNavigate: ((ctx: OffCycleFlowContextInterface) => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: 'createOffCyclePayroll' }),\n component: OffCycleCreationContextual,\n payrollUuid: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n}\n\nfunction toCreationReducer(ctx: OffCycleFlowContextInterface): OffCycleFlowContextInterface {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: 'createOffCyclePayroll' }),\n component: OffCycleCreationContextual,\n payrollUuid: undefined,\n }\n}\n\nconst creationBreadcrumbTransition = transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n 'createOffCyclePayroll',\n guard(\n (_ctx: OffCycleFlowContextInterface, ev: { payload: { key: string } }) =>\n ev.payload.key === 'createOffCyclePayroll',\n ),\n reduce(toCreationReducer),\n)\n\n/** @internal */\nexport const offCycleMachine = {\n createOffCyclePayroll: state<MachineTransition>(\n transition(\n componentEvents.OFF_CYCLE_CREATED,\n 'execution',\n reduce(\n (\n ctx: OffCycleFlowContextInterface,\n ev: { payload?: { payrollUuid?: string } },\n ): OffCycleFlowContextInterface => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n payrollUuid: ev.payload?.payrollUuid,\n component: OffCycleExecutionContextual,\n }),\n ),\n ),\n ),\n\n execution: state<MachineTransition>(creationBreadcrumbTransition),\n}\n"],"names":["offCycleBreadcrumbsNodes","ctx","patchBreadcrumbsHeader","OffCycleCreationContextual","toCreationReducer","creationBreadcrumbTransition","transition","componentEvents","guard","_ctx","ev","reduce","offCycleMachine","state","OffCycleExecutionContextual"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"offCycleStateMachine.js","sources":["../../../../src/components/Payroll/OffCycle/offCycleStateMachine.ts"],"sourcesContent":["import { state, transition, reduce, guard } from 'robot3'\nimport {\n OffCycleCreationContextual,\n OffCycleExecutionContextual,\n PayrollBlockerListContextual,\n type OffCycleFlowContextInterface,\n} from './OffCycleFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineTransition } from '@/types/Helpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { patchBreadcrumbsHeader, updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\n/** @internal */\nexport const offCycleBreadcrumbsNodes: BreadcrumbNodes = {\n createOffCyclePayroll: {\n parent: null,\n item: {\n id: 'createOffCyclePayroll',\n label: 'createOffCyclePayroll.breadcrumbLabel',\n namespace: 'Payroll.OffCycle',\n onNavigate: ((ctx: OffCycleFlowContextInterface) => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: 'createOffCyclePayroll' }),\n component: OffCycleCreationContextual,\n payrollUuid: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n blockers: {\n parent: 'createOffCyclePayroll',\n item: {\n id: 'blockers',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollBlocker',\n },\n },\n}\n\nfunction toCreationReducer(ctx: OffCycleFlowContextInterface): OffCycleFlowContextInterface {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: 'createOffCyclePayroll' }),\n component: OffCycleCreationContextual,\n payrollUuid: undefined,\n }\n}\n\nconst creationBreadcrumbTransition = transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n 'createOffCyclePayroll',\n guard(\n (_ctx: OffCycleFlowContextInterface, ev: { payload: { key: string } }) =>\n ev.payload.key === 'createOffCyclePayroll',\n ),\n reduce(toCreationReducer),\n)\n\n/** @internal */\nexport const offCycleMachine = {\n createOffCyclePayroll: state<MachineTransition>(\n transition(\n componentEvents.OFF_CYCLE_CREATED,\n 'execution',\n reduce(\n (\n ctx: OffCycleFlowContextInterface,\n ev: { payload?: { payrollUuid?: string } },\n ): OffCycleFlowContextInterface => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n payrollUuid: ev.payload?.payrollUuid,\n component: OffCycleExecutionContextual,\n }),\n ),\n ),\n transition(\n componentEvents.OFF_CYCLE_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce((ctx: OffCycleFlowContextInterface): OffCycleFlowContextInterface => ({\n ...updateBreadcrumbs('blockers', ctx),\n component: PayrollBlockerListContextual,\n payrollUuid: undefined,\n })),\n ),\n ),\n\n blockers: state<MachineTransition>(creationBreadcrumbTransition),\n\n execution: state<MachineTransition>(creationBreadcrumbTransition),\n}\n"],"names":["offCycleBreadcrumbsNodes","ctx","patchBreadcrumbsHeader","OffCycleCreationContextual","toCreationReducer","creationBreadcrumbTransition","transition","componentEvents","guard","_ctx","ev","reduce","offCycleMachine","state","OffCycleExecutionContextual","updateBreadcrumbs","PayrollBlockerListContextual"],"mappings":";;;;AAaO,MAAMA,IAA4C;AAAA,EACvD,uBAAuB;AAAA,IACrB,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAuC;AAAA,QACnD,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,yBAAyB;AAAA,QAC/E,WAAWE;AAAA,QACX,aAAa;AAAA,MAAA;AAAA,IACf;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAEJ;AAEA,SAASC,EAAkBH,GAAiE;AAC1F,SAAO;AAAA,IACL,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,yBAAyB;AAAA,IAC/E,WAAWE;AAAA,IACX,aAAa;AAAA,EAAA;AAEjB;AAEA,MAAME,IAA+BC;AAAA,EACnCC,EAAgB;AAAA,EAChB;AAAA,EACAC;AAAA,IACE,CAACC,GAAoCC,MACnCA,EAAG,QAAQ,QAAQ;AAAA,EAAA;AAAA,EAEvBC,EAAOP,CAAiB;AAC1B,GAGaQ,IAAkB;AAAA,EAC7B,uBAAuBC;AAAA,IACrBP;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAI;AAAA,QACE,CACEV,GACAS,OACkC;AAAA,UAClC,GAAGR,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,UACjE,aAAaS,EAAG,SAAS;AAAA,UACzB,WAAWI;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,IAEFR;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAI,EAAO,CAACV,OAAqE;AAAA,QAC3E,GAAGc,EAAkB,YAAYd,CAAG;AAAA,QACpC,WAAWe;AAAA,QACX,aAAa;AAAA,MAAA,EACb;AAAA,IAAA;AAAA,EACJ;AAAA,EAGF,UAAUH,EAAyBR,CAA4B;AAAA,EAE/D,WAAWQ,EAAyBR,CAA4B;AAClE;"}
|
|
@@ -1,52 +1,54 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useForm as
|
|
4
|
-
import { zodResolver as
|
|
2
|
+
import { useState as F, useCallback as y, useMemo as J, useEffect as Z } from "react";
|
|
3
|
+
import { useForm as Q, FormProvider as X } from "react-hook-form";
|
|
4
|
+
import { zodResolver as $ } from "@hookform/resolvers/zod";
|
|
5
5
|
import { z as l } from "zod";
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { usePayrollsCreateOffCycleMutation as
|
|
8
|
-
import { usePayrollsGetBlockersSuspense as
|
|
9
|
-
import { WithholdingPayPeriod as
|
|
10
|
-
import { RFCDate as
|
|
11
|
-
import { useEmployeesListSuspense as
|
|
12
|
-
import { createOffCyclePayPeriodDateFormSchema as
|
|
13
|
-
import { useOffCyclePayPeriodDateValidation as
|
|
14
|
-
import { OffCycleCreationPresentation as
|
|
15
|
-
import { useCompanyPaymentSpeed as
|
|
16
|
-
import { BaseComponent as
|
|
17
|
-
import { useBase as
|
|
18
|
-
import { useComponentDictionary as
|
|
19
|
-
import { componentEvents as
|
|
20
|
-
import { SDKInternalError as
|
|
21
|
-
import { Form as
|
|
22
|
-
import { OFF_CYCLE_REASON_DEFAULTS as
|
|
23
|
-
const
|
|
24
|
-
bonus:
|
|
25
|
-
correction:
|
|
6
|
+
import { useTranslation as W } from "react-i18next";
|
|
7
|
+
import { usePayrollsCreateOffCycleMutation as ee } from "@gusto/embedded-api/react-query/payrollsCreateOffCycle";
|
|
8
|
+
import { usePayrollsGetBlockersSuspense as oe } from "@gusto/embedded-api/react-query/payrollsGetBlockers";
|
|
9
|
+
import { WithholdingPayPeriod as te, OffCycleReason as A } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
|
|
10
|
+
import { RFCDate as E } from "@gusto/embedded-api/types/rfcdate";
|
|
11
|
+
import { useEmployeesListSuspense as ne } from "@gusto/embedded-api/react-query/employeesList";
|
|
12
|
+
import { createOffCyclePayPeriodDateFormSchema as se } from "../OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js";
|
|
13
|
+
import { useOffCyclePayPeriodDateValidation as le } from "../OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js";
|
|
14
|
+
import { OffCycleCreationPresentation as ie } from "./OffCycleCreationPresentation.js";
|
|
15
|
+
import { useCompanyPaymentSpeed as re } from "../../../hooks/useCompanyPaymentSpeed.js";
|
|
16
|
+
import { BaseComponent as ae } from "../../Base/Base.js";
|
|
17
|
+
import { useBase as ce } from "../../Base/useBase.js";
|
|
18
|
+
import { useComponentDictionary as me, useI18n as a } from "../../../i18n/I18n.js";
|
|
19
|
+
import { componentEvents as T } from "../../../shared/constants.js";
|
|
20
|
+
import { SDKInternalError as de } from "../../../types/sdkError.js";
|
|
21
|
+
import { Form as ue } from "../../Common/Form/Form.js";
|
|
22
|
+
import { OFF_CYCLE_REASON_DEFAULTS as f } from "../OffCycleReasonSelection/types.js";
|
|
23
|
+
const ye = {
|
|
24
|
+
bonus: A.Bonus,
|
|
25
|
+
correction: A.Correction
|
|
26
26
|
};
|
|
27
|
-
function
|
|
28
|
-
return /* @__PURE__ */ c(
|
|
27
|
+
function Ne(m) {
|
|
28
|
+
return /* @__PURE__ */ c(ae, { ...m, children: /* @__PURE__ */ c(fe, { ...m }) });
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
const { t: v } =
|
|
33
|
-
withholdingPayPeriod:
|
|
34
|
-
withholdingRate:
|
|
35
|
-
}), [
|
|
36
|
-
|
|
37
|
-
}, []), I =
|
|
38
|
-
S(e),
|
|
39
|
-
}, []),
|
|
40
|
-
|
|
41
|
-
}, []),
|
|
30
|
+
function fe({ dictionary: m, companyId: d, payrollType: h = "bonus", className: U }) {
|
|
31
|
+
me("Payroll.OffCycleCreation", m), a("Payroll.OffCycleCreation"), a("Payroll.OffCycleReasonSelection"), a("Payroll.OffCyclePayPeriodDateForm"), a("Payroll.OffCycleDeductionsSetting"), a("Payroll.EmployeeSelection");
|
|
32
|
+
const { t: v } = W("Payroll.OffCyclePayPeriodDateForm"), { t: O } = W("Payroll.OffCycleCreation"), { onEvent: p, baseSubmitHandler: L } = ce(), { paymentSpeedDays: k } = re(d), { minCheckDate: R, maxDate: _, minPayPeriodDate: B, today: w } = le(k), { mutateAsync: N, isPending: M } = ee(), [C, S] = F({
|
|
33
|
+
withholdingPayPeriod: te.EveryOtherWeek,
|
|
34
|
+
withholdingRate: f[h].withholdingType
|
|
35
|
+
}), [V, D] = F(!1), j = y(() => {
|
|
36
|
+
D(!0);
|
|
37
|
+
}, []), I = y((e) => {
|
|
38
|
+
S(e), D(!1);
|
|
39
|
+
}, []), Y = y(() => {
|
|
40
|
+
D(!1);
|
|
41
|
+
}, []), q = y(() => {
|
|
42
|
+
p(T.OFF_CYCLE_BLOCKERS_VIEW_ALL);
|
|
43
|
+
}, [p]), { data: b } = ne({
|
|
42
44
|
companyId: d,
|
|
43
45
|
onboardedActive: !0
|
|
44
|
-
}), { data:
|
|
46
|
+
}), { data: z } = oe({
|
|
45
47
|
companyUuid: d
|
|
46
|
-
}),
|
|
48
|
+
}), K = (z.payrollBlockers ?? []).map((e) => ({
|
|
47
49
|
key: e.key,
|
|
48
50
|
message: e.message
|
|
49
|
-
})),
|
|
51
|
+
})), x = J(() => [...b.showEmployees ?? []].sort((o, t) => {
|
|
50
52
|
const n = o.lastName.localeCompare(t.lastName);
|
|
51
53
|
return n !== 0 ? n : o.firstName.localeCompare(t.firstName);
|
|
52
54
|
}).map((o) => {
|
|
@@ -56,16 +58,16 @@ function ye({ dictionary: m, companyId: d, payrollType: f = "bonus", className:
|
|
|
56
58
|
value: o.uuid,
|
|
57
59
|
description: n?.title || void 0
|
|
58
60
|
};
|
|
59
|
-
}), [
|
|
61
|
+
}), [b]), G = (e, o) => (
|
|
60
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
63
|
v(e, o)
|
|
62
|
-
), i =
|
|
64
|
+
), i = Q({
|
|
63
65
|
resolver: (e, o, t) => {
|
|
64
|
-
const n = e.isCheckOnly, r =
|
|
65
|
-
|
|
66
|
-
n ?
|
|
67
|
-
|
|
68
|
-
),
|
|
66
|
+
const n = e.isCheckOnly, r = se(
|
|
67
|
+
G,
|
|
68
|
+
n ? w : R,
|
|
69
|
+
k
|
|
70
|
+
), P = l.object({
|
|
69
71
|
reason: l.enum(["bonus", "correction"]),
|
|
70
72
|
skipRegularDeductions: l.boolean(),
|
|
71
73
|
includeAllEmployees: l.boolean(),
|
|
@@ -77,73 +79,74 @@ function ye({ dictionary: m, companyId: d, payrollType: f = "bonus", className:
|
|
|
77
79
|
message: O("errors.noEmployeesSelected")
|
|
78
80
|
});
|
|
79
81
|
});
|
|
80
|
-
return
|
|
82
|
+
return $(P)(e, o, t);
|
|
81
83
|
},
|
|
82
84
|
defaultValues: {
|
|
83
|
-
reason:
|
|
85
|
+
reason: h,
|
|
84
86
|
isCheckOnly: !1,
|
|
85
87
|
startDate: null,
|
|
86
88
|
endDate: null,
|
|
87
89
|
checkDate: null,
|
|
88
|
-
skipRegularDeductions:
|
|
90
|
+
skipRegularDeductions: f[h].skipDeductions,
|
|
89
91
|
includeAllEmployees: !1,
|
|
90
92
|
selectedEmployeeUuids: []
|
|
91
93
|
}
|
|
92
|
-
}),
|
|
93
|
-
|
|
94
|
+
}), g = i.watch("reason");
|
|
95
|
+
Z(() => {
|
|
94
96
|
i.setValue(
|
|
95
97
|
"skipRegularDeductions",
|
|
96
|
-
|
|
98
|
+
f[g].skipDeductions
|
|
97
99
|
), S((e) => ({
|
|
98
100
|
...e,
|
|
99
|
-
withholdingRate:
|
|
101
|
+
withholdingRate: f[g].withholdingType
|
|
100
102
|
}));
|
|
101
|
-
}, [
|
|
102
|
-
const
|
|
103
|
-
const o = e.reason, t = e.checkDate, n = e.startDate, r = e.endDate,
|
|
104
|
-
await
|
|
105
|
-
const s = await
|
|
103
|
+
}, [g, i]);
|
|
104
|
+
const H = async (e) => {
|
|
105
|
+
const o = e.reason, t = e.checkDate, n = e.startDate, r = e.endDate, P = e.includeAllEmployees ? x.map((s) => s.value) : e.selectedEmployeeUuids.length > 0 ? e.selectedEmployeeUuids : void 0;
|
|
106
|
+
await L(e, async () => {
|
|
107
|
+
const s = await N({
|
|
106
108
|
request: {
|
|
107
109
|
companyId: d,
|
|
108
110
|
requestBody: {
|
|
109
111
|
offCycle: !0,
|
|
110
|
-
offCycleReason:
|
|
111
|
-
startDate: new
|
|
112
|
-
endDate: new
|
|
113
|
-
checkDate: new
|
|
112
|
+
offCycleReason: ye[o],
|
|
113
|
+
startDate: new E(n),
|
|
114
|
+
endDate: new E(r),
|
|
115
|
+
checkDate: new E(t),
|
|
114
116
|
skipRegularDeductions: e.skipRegularDeductions,
|
|
115
117
|
isCheckOnlyPayroll: e.isCheckOnly,
|
|
116
|
-
employeeUuids:
|
|
117
|
-
withholdingPayPeriod:
|
|
118
|
-
fixedWithholdingRate:
|
|
118
|
+
employeeUuids: P,
|
|
119
|
+
withholdingPayPeriod: C.withholdingPayPeriod,
|
|
120
|
+
fixedWithholdingRate: C.withholdingRate === "supplemental"
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
}), u = s.payrollUnprocessed?.payrollUuid ?? s.payrollUnprocessed?.uuid;
|
|
122
124
|
if (!u)
|
|
123
|
-
throw new
|
|
124
|
-
|
|
125
|
+
throw new de(O("errors.missingPayrollId"));
|
|
126
|
+
p(T.OFF_CYCLE_CREATED, { payrollUuid: u });
|
|
125
127
|
});
|
|
126
128
|
};
|
|
127
|
-
return /* @__PURE__ */ c(
|
|
128
|
-
|
|
129
|
+
return /* @__PURE__ */ c(X, { ...i, children: /* @__PURE__ */ c(ue, { onSubmit: i.handleSubmit(H), children: /* @__PURE__ */ c(
|
|
130
|
+
ie,
|
|
129
131
|
{
|
|
130
|
-
employees:
|
|
131
|
-
blockers:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
employees: x,
|
|
133
|
+
blockers: K,
|
|
134
|
+
onViewBlockersClick: q,
|
|
135
|
+
isPending: M,
|
|
136
|
+
minCheckDate: R,
|
|
137
|
+
minCheckOnlyDate: w,
|
|
138
|
+
maxDate: _,
|
|
139
|
+
minPayPeriodDate: B,
|
|
140
|
+
taxWithholdingConfig: C,
|
|
141
|
+
isTaxWithholdingModalOpen: V,
|
|
139
142
|
onTaxWithholdingEditClick: j,
|
|
140
143
|
onTaxWithholdingModalDone: I,
|
|
141
|
-
onTaxWithholdingModalCancel:
|
|
142
|
-
className:
|
|
144
|
+
onTaxWithholdingModalCancel: Y,
|
|
145
|
+
className: U
|
|
143
146
|
}
|
|
144
147
|
) }) });
|
|
145
148
|
}
|
|
146
149
|
export {
|
|
147
|
-
|
|
150
|
+
Ne as OffCycleCreation
|
|
148
151
|
};
|
|
149
152
|
//# sourceMappingURL=OffCycleCreation.js.map
|