@gusto/embedded-react-sdk 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +6 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +50 -6
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/components/Base/Base.d.ts +8 -9
- package/dist/components/Base/Base.js +123 -101
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Base/useBase.d.ts +3 -7
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +3 -5
- package/dist/components/Base/useBaseSubmit.js +27 -50
- package/dist/components/Base/useBaseSubmit.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +2 -0
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +17 -16
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +5 -3
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +46 -36
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +2 -0
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +21 -20
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +3 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +20 -19
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +3 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +19 -18
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +2 -0
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +19 -18
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +2 -0
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +10 -9
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
- 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 +8 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +8 -7
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +10 -9
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +8 -7
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +8 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +13 -12
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +11 -10
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +8 -7
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +8 -7
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +8 -7
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +60 -60
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +10 -9
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +8 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +8 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +10 -9
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +41 -38
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +7 -6
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +14 -13
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +7 -6
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +8 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +8 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +8 -7
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +42 -42
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +8 -7
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +10 -9
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +3 -3
- package/dist/components/Employee/Profile/HomeAddress.js +38 -36
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +30 -29
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +8 -7
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.js +50 -50
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +8 -7
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +53 -53
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +8 -7
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +11 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +123 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +11 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +92 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +2 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +30 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +23 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +72 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/index.d.ts +3 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +7 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +165 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +9 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +86 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +20 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +103 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationsData.d.ts +6 -0
- package/dist/components/Employee/Terminations/index.d.ts +8 -0
- package/dist/components/Employee/Terminations/types.d.ts +1 -0
- package/dist/components/Employee/index.d.ts +7 -0
- package/dist/components/Employee/index.js +34 -28
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +31 -31
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +41 -41
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +2 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +32 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +16 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +52 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +6 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +69 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +9 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +53 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +3 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +6 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +51 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.test.d.ts +1 -0
- package/dist/components/Payroll/Dismissal/index.d.ts +3 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +18 -15
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +19 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +3 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +32 -24
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +45 -45
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +75 -66
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +2 -2
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +186 -159
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +69 -69
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +3 -2
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +8 -8
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -3
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +76 -70
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -42
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -196
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +12 -0
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +21 -0
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +95 -64
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +53 -47
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +8 -8
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +25 -23
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +40 -32
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +110 -93
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +12 -8
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +2 -0
- package/dist/components/Payroll/Transition/TransitionFlow.js +38 -0
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +19 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +54 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -0
- package/dist/components/Payroll/Transition/index.d.ts +3 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +6 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.js +58 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.test.d.ts +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +2 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +92 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +2 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +111 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +28 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +21 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/index.d.ts +3 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +8 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +83 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +16 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +100 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -0
- package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +2 -0
- package/dist/components/Payroll/helpers.d.ts +2 -1
- package/dist/components/Payroll/helpers.js +98 -87
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +6 -0
- package/dist/components/Payroll/index.js +32 -26
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/payrollTypes.d.ts +21 -0
- package/dist/components/Payroll/payrollTypes.js +27 -0
- package/dist/components/Payroll/payrollTypes.js.map +1 -0
- package/dist/components/Payroll/usePreparedPayrollData.js +4 -4
- package/dist/components/UNSTABLE_Hooks/collectErrors.d.ts +6 -0
- package/dist/components/UNSTABLE_Hooks/collectErrors.js +9 -0
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +8 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js +24 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +26 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.d.ts +53 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +29 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +12 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +38 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/index.d.ts +15 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +2 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js +8 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.d.ts +18 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js +10 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +14 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +6 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +27 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +2 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +9 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js +7 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +151 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +97 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +121 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +34 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js +50 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +104 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +259 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +114 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +39 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +45 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +46 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +77 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +153 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +71 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +68 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +129 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +25 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/index.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/types.d.ts +49 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js +12 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +11 -11
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +43 -47
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/index.d.ts +1 -1
- package/dist/contexts/ObservabilityProvider/sanitization.d.ts +0 -14
- package/dist/contexts/ObservabilityProvider/sanitization.js +51 -51
- package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +0 -3
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -1
- package/dist/helpers/requiredIf.d.ts +13 -0
- package/dist/helpers/requiredIf.js +8 -0
- package/dist/helpers/requiredIf.js.map +1 -0
- package/dist/i18n/I18n.js +13 -13
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js +18 -0
- package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js.map +1 -0
- package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js +12 -0
- package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js.map +1 -0
- package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js +20 -0
- package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js.map +1 -0
- package/dist/i18n/en/Payroll.Dismissal.json.js +22 -0
- package/dist/i18n/en/Payroll.Dismissal.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +15 -11
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -18
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +20 -18
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.Transition.json.js +8 -0
- package/dist/i18n/en/Payroll.Transition.json.js.map +1 -0
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +26 -0
- package/dist/i18n/en/Payroll.TransitionCreation.json.js.map +1 -0
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +18 -0
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +58 -0
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +34 -0
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +24 -0
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +2 -1
- package/dist/i18n/en/common.json.js +9 -9
- package/dist/index.d.ts +3 -2
- package/dist/index.js +14 -13
- package/dist/models/WA_RISK_CODES.d.ts +5 -2866
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/shared/constants.d.ts +32 -0
- package/dist/shared/constants.js +83 -65
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +279 -1
- package/dist/types/observability.d.ts +31 -65
- package/dist/types/sdkError.d.ts +97 -0
- package/dist/types/sdkError.js +95 -0
- package/dist/types/sdkError.js.map +1 -0
- package/dist/types/sdkError.test.d.ts +1 -0
- package/docs/reference/endpoint-inventory.json +212 -14
- package/package.json +16 -16
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +0 -6
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +0 -70
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +0 -7
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +0 -6
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +0 -9
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +0 -40
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +0 -5
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +0 -2
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +0 -12
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +0 -2
- package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +0 -5
- package/dist/contexts/ObservabilityProvider/observabilityUtils.js +0 -45
- package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +0 -1
|
@@ -1,296 +1,335 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { PayrollEmployeeCompensationsTypePaymentMethod as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { z as
|
|
7
|
-
import { zodResolver as
|
|
8
|
-
import
|
|
9
|
-
import { TimeOffField as
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { Grid as
|
|
12
|
-
import { RadioGroupField as
|
|
13
|
-
import { TextInputField as
|
|
14
|
-
import { NumberInputField as
|
|
15
|
-
import { useComponentContext as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { Form as
|
|
18
|
-
import { firstLastName as
|
|
19
|
-
import { getAdditionalEarningsCompensations as
|
|
20
|
-
import {
|
|
1
|
+
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useForm as Z, useWatch as J, FormProvider as ee } from "react-hook-form";
|
|
3
|
+
import { useRef as ne, useMemo as te } from "react";
|
|
4
|
+
import { PayrollEmployeeCompensationsTypePaymentMethod as _ } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype";
|
|
5
|
+
import { useTranslation as se } from "react-i18next";
|
|
6
|
+
import { z as i } from "zod";
|
|
7
|
+
import { zodResolver as oe } from "@hookform/resolvers/zod";
|
|
8
|
+
import l from "./PayrollEditEmployeePresentation.module.scss.js";
|
|
9
|
+
import { TimeOffField as ie } from "./TimeOffField.js";
|
|
10
|
+
import { Flex as A } from "../../Common/Flex/Flex.js";
|
|
11
|
+
import { Grid as S } from "../../Common/Grid/Grid.js";
|
|
12
|
+
import { RadioGroupField as ae } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
13
|
+
import { TextInputField as k } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
14
|
+
import { NumberInputField as w } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
15
|
+
import { useComponentContext as re } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
|
+
import { useI18n as me } from "../../../i18n/I18n.js";
|
|
17
|
+
import { Form as ue } from "../../Common/Form/Form.js";
|
|
18
|
+
import { firstLastName as le, formatNumberAsCurrency as de } from "../../../helpers/formattedStrings.js";
|
|
19
|
+
import { getAdditionalEarningsCompensations as ce, getReimbursementCompensation as pe, calculateGrossPay as $ } from "../helpers.js";
|
|
20
|
+
import { PayrollCategory as I } from "../payrollTypes.js";
|
|
21
|
+
import { HOURS_COMPENSATION_NAMES as q, EXCLUDED_ADDITIONAL_EARNINGS as fe, COMPENSATION_NAME_DOUBLE_OVERTIME as he, COMPENSATION_NAME_OVERTIME as Ce, COMPENSATION_NAME_REGULAR_HOURS as Ne, COMPENSATION_NAME_REIMBURSEMENT as ge, COMPENSATION_NAME_CASH_TIPS as be, COMPENSATION_NAME_COMMISSION as Ee, COMPENSATION_NAME_CORRECTION_PAYMENT as Pe, COMPENSATION_NAME_PAYCHECK_TIPS as Me, COMPENSATION_NAME_BONUS as ye } from "../../../shared/constants.js";
|
|
21
22
|
import Oe from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
22
|
-
const Te =
|
|
23
|
-
hourlyCompensations:
|
|
24
|
-
timeOffCompensations:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const Te = i.object({
|
|
24
|
+
hourlyCompensations: i.record(i.string(), i.record(i.string(), i.string().optional())),
|
|
25
|
+
timeOffCompensations: i.record(i.string(), i.string().optional()),
|
|
26
|
+
finalPayoutCompensations: i.record(i.string(), i.string().optional()),
|
|
27
|
+
fixedCompensations: i.record(i.string(), i.number().optional()),
|
|
28
|
+
paymentMethod: i.enum(_).optional()
|
|
29
|
+
}), B = (h, T, d, a, R = I.Regular) => {
|
|
28
30
|
const g = {
|
|
29
|
-
...
|
|
30
|
-
paymentMethod:
|
|
31
|
+
...T,
|
|
32
|
+
paymentMethod: h.paymentMethod
|
|
31
33
|
};
|
|
32
|
-
g.hourlyCompensations =
|
|
34
|
+
g.hourlyCompensations = T?.hourlyCompensations?.map(
|
|
33
35
|
(o) => {
|
|
34
|
-
const
|
|
35
|
-
return
|
|
36
|
+
const r = o.jobUuid && o.name ? h.hourlyCompensations[o.jobUuid]?.[o.name] : void 0;
|
|
37
|
+
return r ? {
|
|
36
38
|
...o,
|
|
37
|
-
hours:
|
|
39
|
+
hours: r
|
|
38
40
|
} : o;
|
|
39
41
|
}
|
|
40
|
-
), g.paidTimeOff =
|
|
41
|
-
...o
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
), g.paidTimeOff = d.map((o) => {
|
|
43
|
+
const r = R === I.Dismissal, { finalPayoutUnusedHoursInput: y, ...C } = o;
|
|
44
|
+
if (r) {
|
|
45
|
+
const x = h.finalPayoutCompensations[o.name] ?? o.finalPayoutUnusedHoursInput;
|
|
46
|
+
return {
|
|
47
|
+
...o,
|
|
48
|
+
hours: h.timeOffCompensations[o.name],
|
|
49
|
+
...x != null ? { finalPayoutUnusedHoursInput: x } : {}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
...C,
|
|
54
|
+
hours: h.timeOffCompensations[o.name]
|
|
55
|
+
};
|
|
56
|
+
});
|
|
44
57
|
const b = [];
|
|
45
|
-
return Object.entries(
|
|
46
|
-
const
|
|
47
|
-
(
|
|
58
|
+
return Object.entries(h.fixedCompensations).forEach(([o, r]) => {
|
|
59
|
+
const y = T?.fixedCompensations?.find(
|
|
60
|
+
(C) => C.name?.toLowerCase() === o.toLowerCase()
|
|
48
61
|
);
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
name:
|
|
53
|
-
jobUuid:
|
|
54
|
-
amount:
|
|
55
|
-
}) :
|
|
62
|
+
if (r !== void 0) {
|
|
63
|
+
const C = r.toString();
|
|
64
|
+
y ? b.push({
|
|
65
|
+
name: y.name,
|
|
66
|
+
jobUuid: y.jobUuid,
|
|
67
|
+
amount: C
|
|
68
|
+
}) : r !== 0 && b.push({
|
|
56
69
|
name: o,
|
|
57
|
-
jobUuid:
|
|
58
|
-
amount:
|
|
70
|
+
jobUuid: a,
|
|
71
|
+
amount: C
|
|
59
72
|
});
|
|
60
73
|
}
|
|
61
74
|
}), g.fixedCompensations = b, g;
|
|
62
|
-
},
|
|
63
|
-
onSave:
|
|
64
|
-
onCancel:
|
|
65
|
-
employee:
|
|
66
|
-
employeeCompensation:
|
|
67
|
-
isPending:
|
|
68
|
-
fixedCompensationTypes:
|
|
69
|
-
payPeriodStartDate:
|
|
70
|
-
paySchedule:
|
|
71
|
-
|
|
72
|
-
withReimbursements:
|
|
73
|
-
hasDirectDepositSetup:
|
|
75
|
+
}, Ke = ({
|
|
76
|
+
onSave: h,
|
|
77
|
+
onCancel: T,
|
|
78
|
+
employee: d,
|
|
79
|
+
employeeCompensation: a,
|
|
80
|
+
isPending: R = !1,
|
|
81
|
+
fixedCompensationTypes: g,
|
|
82
|
+
payPeriodStartDate: b,
|
|
83
|
+
paySchedule: o,
|
|
84
|
+
payrollCategory: r = I.Regular,
|
|
85
|
+
withReimbursements: y = !0,
|
|
86
|
+
hasDirectDepositSetup: C = !0
|
|
74
87
|
}) => {
|
|
75
|
-
const { Button:
|
|
76
|
-
|
|
77
|
-
const
|
|
88
|
+
const { Button: x, Heading: c, Text: V } = re(), { t } = se("Payroll.PayrollEditEmployee");
|
|
89
|
+
me("Payroll.PayrollEditEmployee");
|
|
90
|
+
const p = d.jobs?.find((e) => e.primary), W = a?.hourlyCompensations?.some(
|
|
91
|
+
(e) => e.jobUuid === p?.uuid
|
|
92
|
+
), O = p && W ? [p] : [], F = ne(null), f = Oe({
|
|
78
93
|
ref: F
|
|
79
94
|
}).includes("small");
|
|
80
|
-
|
|
81
|
-
const n =
|
|
82
|
-
n && !O.find((
|
|
95
|
+
a?.hourlyCompensations?.forEach((e) => {
|
|
96
|
+
const n = d.jobs?.find((u) => u.uuid === e.jobUuid);
|
|
97
|
+
n && !O.find((u) => u.uuid === n.uuid) && O.push(n);
|
|
83
98
|
});
|
|
84
|
-
const
|
|
85
|
-
flsaStatus:
|
|
86
|
-
existingFixedCompensations:
|
|
87
|
-
primaryJobUuid:
|
|
88
|
-
fixedCompensationTypes:
|
|
89
|
-
excludedTypes:
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
) : null,
|
|
95
|
-
(
|
|
96
|
-
),
|
|
99
|
+
const E = (a?.paidTimeOff || []).filter((e) => e.name), v = ce({
|
|
100
|
+
flsaStatus: p?.compensations?.[0]?.flsaStatus,
|
|
101
|
+
existingFixedCompensations: a?.fixedCompensations || [],
|
|
102
|
+
primaryJobUuid: p?.uuid,
|
|
103
|
+
fixedCompensationTypes: g,
|
|
104
|
+
excludedTypes: fe
|
|
105
|
+
}), P = y ? pe(
|
|
106
|
+
a?.fixedCompensations || [],
|
|
107
|
+
g,
|
|
108
|
+
p?.uuid
|
|
109
|
+
) : null, j = (e, n) => a?.hourlyCompensations?.find(
|
|
110
|
+
(u) => u.jobUuid === e && u.name?.toLowerCase() === n.toLowerCase()
|
|
111
|
+
), z = (e) => {
|
|
97
112
|
switch (e) {
|
|
98
|
-
case
|
|
113
|
+
case Ne:
|
|
99
114
|
return t("compensationNames.regularHours");
|
|
100
|
-
case
|
|
115
|
+
case Ce:
|
|
101
116
|
return t("compensationNames.overtime");
|
|
102
|
-
case
|
|
117
|
+
case he:
|
|
103
118
|
return t("compensationNames.doubleOvertime");
|
|
104
119
|
default:
|
|
105
120
|
return e;
|
|
106
121
|
}
|
|
107
|
-
},
|
|
122
|
+
}, L = (e) => {
|
|
108
123
|
switch (e) {
|
|
109
|
-
case
|
|
124
|
+
case ye:
|
|
110
125
|
return t("fixedCompensationNames.bonus");
|
|
111
|
-
case
|
|
126
|
+
case Me:
|
|
112
127
|
return t("fixedCompensationNames.paycheckTips");
|
|
113
|
-
case
|
|
128
|
+
case Pe:
|
|
114
129
|
return t("fixedCompensationNames.correctionPayment");
|
|
115
130
|
case Ee:
|
|
116
131
|
return t("fixedCompensationNames.commission");
|
|
117
|
-
case
|
|
132
|
+
case be:
|
|
118
133
|
return t("fixedCompensationNames.cashTips");
|
|
119
|
-
case
|
|
134
|
+
case ge:
|
|
120
135
|
return t("fixedCompensationNames.reimbursement");
|
|
121
136
|
default:
|
|
122
137
|
return e;
|
|
123
138
|
}
|
|
124
|
-
},
|
|
139
|
+
}, Y = {
|
|
125
140
|
hourlyCompensations: (() => {
|
|
126
141
|
const e = {};
|
|
127
142
|
return O.forEach((n) => {
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
143
|
+
q.forEach((u) => {
|
|
144
|
+
const N = j(n.uuid, u);
|
|
145
|
+
N && (e[n.uuid] || (e[n.uuid] = {}), e[n.uuid][N.name] = N.hours ? parseFloat(N.hours).toString() : "");
|
|
131
146
|
});
|
|
132
147
|
}), e;
|
|
133
148
|
})(),
|
|
134
149
|
timeOffCompensations: (() => {
|
|
135
150
|
const e = {};
|
|
136
|
-
return
|
|
151
|
+
return E.forEach((n) => {
|
|
137
152
|
e[n.name] = n.hours ? parseFloat(n.hours).toString() : "";
|
|
138
153
|
}), e;
|
|
139
154
|
})(),
|
|
155
|
+
finalPayoutCompensations: (() => {
|
|
156
|
+
const e = {};
|
|
157
|
+
return E.forEach((n) => {
|
|
158
|
+
e[n.name] = n.finalPayoutUnusedHoursInput ?? "0";
|
|
159
|
+
}), e;
|
|
160
|
+
})(),
|
|
140
161
|
fixedCompensations: (() => {
|
|
141
162
|
const e = {};
|
|
142
|
-
return
|
|
163
|
+
return v.forEach((n) => {
|
|
143
164
|
e[n.name] = n.amount ? parseFloat(n.amount) : void 0;
|
|
144
|
-
}),
|
|
165
|
+
}), P && (e[P.name] = P.amount ? parseFloat(P.amount) : void 0), e;
|
|
145
166
|
})(),
|
|
146
|
-
paymentMethod:
|
|
147
|
-
},
|
|
148
|
-
resolver:
|
|
149
|
-
defaultValues:
|
|
150
|
-
}),
|
|
151
|
-
control:
|
|
152
|
-
}),
|
|
167
|
+
paymentMethod: a?.paymentMethod || _.DirectDeposit
|
|
168
|
+
}, U = Z({
|
|
169
|
+
resolver: oe(Te),
|
|
170
|
+
defaultValues: Y
|
|
171
|
+
}), M = J({
|
|
172
|
+
control: U.control
|
|
173
|
+
}), K = te(() => {
|
|
153
174
|
try {
|
|
154
175
|
const e = {};
|
|
155
|
-
|
|
156
|
-
|
|
176
|
+
M.hourlyCompensations && Object.entries(M.hourlyCompensations).forEach(([N, G]) => {
|
|
177
|
+
G && (e[N] = G);
|
|
157
178
|
});
|
|
158
179
|
const n = {
|
|
159
180
|
hourlyCompensations: e,
|
|
160
|
-
timeOffCompensations:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
181
|
+
timeOffCompensations: M.timeOffCompensations || {},
|
|
182
|
+
finalPayoutCompensations: M.finalPayoutCompensations || {},
|
|
183
|
+
fixedCompensations: M.fixedCompensations || {},
|
|
184
|
+
paymentMethod: M.paymentMethod
|
|
185
|
+
}, u = B(
|
|
164
186
|
n,
|
|
165
|
-
|
|
166
|
-
(
|
|
167
|
-
|
|
187
|
+
a,
|
|
188
|
+
(a?.paidTimeOff || []).filter((N) => N.name),
|
|
189
|
+
p?.uuid,
|
|
190
|
+
r
|
|
168
191
|
);
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
l,
|
|
172
|
-
o,
|
|
192
|
+
return $(
|
|
193
|
+
u,
|
|
173
194
|
d,
|
|
174
|
-
|
|
195
|
+
b,
|
|
196
|
+
o,
|
|
197
|
+
r
|
|
175
198
|
);
|
|
176
199
|
} catch {
|
|
177
|
-
return
|
|
178
|
-
|
|
179
|
-
l,
|
|
180
|
-
o,
|
|
200
|
+
return a ? $(
|
|
201
|
+
a,
|
|
181
202
|
d,
|
|
182
|
-
|
|
203
|
+
b,
|
|
204
|
+
o,
|
|
205
|
+
r
|
|
183
206
|
) : 0;
|
|
184
207
|
}
|
|
185
208
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
l,
|
|
190
|
-
o,
|
|
209
|
+
M,
|
|
210
|
+
a,
|
|
211
|
+
p?.uuid,
|
|
191
212
|
d,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
213
|
+
b,
|
|
214
|
+
o,
|
|
215
|
+
r
|
|
216
|
+
]), X = le({
|
|
217
|
+
first_name: d.firstName,
|
|
218
|
+
last_name: d.lastName
|
|
219
|
+
}), Q = (e) => {
|
|
220
|
+
const n = B(
|
|
198
221
|
e,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
222
|
+
a,
|
|
223
|
+
E,
|
|
224
|
+
p?.uuid,
|
|
225
|
+
r
|
|
202
226
|
);
|
|
203
|
-
|
|
204
|
-
},
|
|
205
|
-
|
|
227
|
+
h(n);
|
|
228
|
+
}, D = de(K || 0), H = /* @__PURE__ */ m(
|
|
229
|
+
A,
|
|
206
230
|
{
|
|
207
|
-
flexDirection:
|
|
208
|
-
justifyContent:
|
|
209
|
-
alignItems:
|
|
231
|
+
flexDirection: f ? "row" : "column",
|
|
232
|
+
justifyContent: f ? "flex-end" : "normal",
|
|
233
|
+
alignItems: f ? "flex-start" : "stretch",
|
|
210
234
|
gap: 12,
|
|
211
235
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
|
|
236
|
+
/* @__PURE__ */ s(x, { variant: "secondary", onClick: T, title: t("cancelCta"), children: t("cancelCta") }),
|
|
237
|
+
/* @__PURE__ */ s(
|
|
238
|
+
x,
|
|
215
239
|
{
|
|
216
|
-
onClick:
|
|
240
|
+
onClick: U.handleSubmit(Q),
|
|
217
241
|
title: t("saveCta"),
|
|
218
|
-
isLoading:
|
|
242
|
+
isLoading: R,
|
|
219
243
|
children: t("saveCta")
|
|
220
244
|
}
|
|
221
245
|
)
|
|
222
246
|
]
|
|
223
247
|
}
|
|
224
248
|
);
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ m("div", { ref: F, className: l.container, children: [
|
|
250
|
+
/* @__PURE__ */ s(
|
|
227
251
|
"div",
|
|
228
252
|
{
|
|
229
|
-
className: `${
|
|
230
|
-
children: /* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
] }) : /* @__PURE__ */
|
|
253
|
+
className: `${l.headerSection} ${f ? "" : l.headerSectionSticky}`,
|
|
254
|
+
children: /* @__PURE__ */ m(A, { justifyContent: "space-between", children: [
|
|
255
|
+
/* @__PURE__ */ m(A, { flexDirection: "column", gap: f ? 8 : 2, children: [
|
|
256
|
+
/* @__PURE__ */ s(c, { as: "h1", styledAs: f ? "h2" : "h4", children: t("pageTitle", { employeeName: X }) }),
|
|
257
|
+
f ? /* @__PURE__ */ m(A, { flexDirection: "column", gap: 6, children: [
|
|
258
|
+
/* @__PURE__ */ s(c, { as: "h2", styledAs: "h3", children: D }),
|
|
259
|
+
/* @__PURE__ */ s(V, { className: l.grossPayLabel, children: t("grossPayLabel") })
|
|
260
|
+
] }) : /* @__PURE__ */ s(c, { as: "h2", styledAs: "h6", className: l.grossPayLabel, children: t("grossPayLabelMobile", { grossPay: D }) })
|
|
237
261
|
] }),
|
|
238
|
-
|
|
262
|
+
f && H
|
|
239
263
|
] })
|
|
240
264
|
}
|
|
241
265
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
O.length > 0 && /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
O.map((e) => /* @__PURE__ */
|
|
247
|
-
O.length > 1 && /* @__PURE__ */
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
const
|
|
266
|
+
/* @__PURE__ */ m(ee, { ...U, children: [
|
|
267
|
+
/* @__PURE__ */ m(ue, { children: [
|
|
268
|
+
O.length > 0 && /* @__PURE__ */ m("div", { className: l.fieldGroup, children: [
|
|
269
|
+
/* @__PURE__ */ s(c, { as: "h3", children: t("regularHoursTitle") }),
|
|
270
|
+
O.map((e) => /* @__PURE__ */ m(A, { flexDirection: "column", gap: 8, children: [
|
|
271
|
+
O.length > 1 && /* @__PURE__ */ s(c, { as: "h4", children: e.title }),
|
|
272
|
+
/* @__PURE__ */ s(S, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: q.map((n) => {
|
|
273
|
+
const u = j(
|
|
250
274
|
e.uuid,
|
|
251
275
|
n
|
|
252
276
|
);
|
|
253
|
-
if (
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
|
|
277
|
+
if (u)
|
|
278
|
+
return /* @__PURE__ */ s(
|
|
279
|
+
k,
|
|
256
280
|
{
|
|
257
281
|
type: "number",
|
|
258
282
|
min: 0,
|
|
259
283
|
adornmentEnd: t("hoursUnit"),
|
|
260
284
|
isRequired: !0,
|
|
261
|
-
label:
|
|
262
|
-
name: `hourlyCompensations.${e.uuid}.${
|
|
285
|
+
label: z(n),
|
|
286
|
+
name: `hourlyCompensations.${e.uuid}.${u.name}`
|
|
263
287
|
},
|
|
264
288
|
n
|
|
265
289
|
);
|
|
266
290
|
}) })
|
|
267
291
|
] }, e.uuid))
|
|
268
292
|
] }),
|
|
269
|
-
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
|
|
293
|
+
E.length > 0 && /* @__PURE__ */ m("div", { className: l.fieldGroup, children: [
|
|
294
|
+
/* @__PURE__ */ s(c, { as: "h4", children: t("timeOffTitle") }),
|
|
295
|
+
/* @__PURE__ */ s(S, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: E.map((e) => /* @__PURE__ */ s(
|
|
296
|
+
ie,
|
|
273
297
|
{
|
|
274
298
|
timeOff: e,
|
|
275
|
-
employee:
|
|
299
|
+
employee: d
|
|
276
300
|
},
|
|
277
301
|
e.name
|
|
278
302
|
)) })
|
|
279
303
|
] }),
|
|
280
|
-
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
-
|
|
304
|
+
r === I.Dismissal && E.length > 0 && /* @__PURE__ */ m("div", { className: l.fieldGroup, children: [
|
|
305
|
+
/* @__PURE__ */ s(c, { as: "h4", children: t("finalPayoutTitle") }),
|
|
306
|
+
/* @__PURE__ */ s(S, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: E.map((e) => /* @__PURE__ */ s(
|
|
307
|
+
k,
|
|
308
|
+
{
|
|
309
|
+
name: `finalPayoutCompensations.${e.name}`,
|
|
310
|
+
type: "number",
|
|
311
|
+
min: 0,
|
|
312
|
+
adornmentEnd: t("hoursUnit"),
|
|
313
|
+
isRequired: !0,
|
|
314
|
+
label: e.name
|
|
315
|
+
},
|
|
316
|
+
`payout-${e.name}`
|
|
317
|
+
)) })
|
|
318
|
+
] }),
|
|
319
|
+
v.length > 0 && /* @__PURE__ */ m("div", { className: l.fieldGroup, children: [
|
|
320
|
+
/* @__PURE__ */ s(c, { as: "h4", children: t("additionalEarningsTitle") }),
|
|
321
|
+
/* @__PURE__ */ s(
|
|
322
|
+
S,
|
|
284
323
|
{
|
|
285
324
|
gridTemplateColumns: { base: "1fr", small: [320, 320], large: [320, 320, 320] },
|
|
286
325
|
gap: 20,
|
|
287
|
-
children:
|
|
288
|
-
|
|
326
|
+
children: v.map((e) => /* @__PURE__ */ s(
|
|
327
|
+
w,
|
|
289
328
|
{
|
|
290
329
|
format: "currency",
|
|
291
330
|
min: 0,
|
|
292
331
|
isRequired: !0,
|
|
293
|
-
label:
|
|
332
|
+
label: L(e.name),
|
|
294
333
|
name: `fixedCompensations.${e.name}`
|
|
295
334
|
},
|
|
296
335
|
e.name
|
|
@@ -298,23 +337,23 @@ const Te = m.object({
|
|
|
298
337
|
}
|
|
299
338
|
)
|
|
300
339
|
] }),
|
|
301
|
-
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
|
|
340
|
+
P && /* @__PURE__ */ m("div", { className: l.fieldGroup, children: [
|
|
341
|
+
/* @__PURE__ */ s(c, { as: "h4", children: t("reimbursementTitle") }),
|
|
342
|
+
/* @__PURE__ */ s(S, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ s(
|
|
343
|
+
w,
|
|
305
344
|
{
|
|
306
345
|
format: "currency",
|
|
307
346
|
min: 0,
|
|
308
347
|
isRequired: !0,
|
|
309
|
-
label:
|
|
310
|
-
name: `fixedCompensations.${
|
|
348
|
+
label: L(P.name),
|
|
349
|
+
name: `fixedCompensations.${P.name}`
|
|
311
350
|
}
|
|
312
351
|
) })
|
|
313
352
|
] }),
|
|
314
|
-
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
|
|
353
|
+
C && /* @__PURE__ */ m("div", { className: l.fieldGroup, children: [
|
|
354
|
+
/* @__PURE__ */ s(c, { as: "h4", children: t("paymentMethodTitle") }),
|
|
355
|
+
/* @__PURE__ */ s(
|
|
356
|
+
ae,
|
|
318
357
|
{
|
|
319
358
|
name: "paymentMethod",
|
|
320
359
|
isRequired: !0,
|
|
@@ -322,11 +361,11 @@ const Te = m.object({
|
|
|
322
361
|
description: t("paymentMethodDescription"),
|
|
323
362
|
options: [
|
|
324
363
|
{
|
|
325
|
-
value:
|
|
364
|
+
value: _.DirectDeposit,
|
|
326
365
|
label: t("paymentMethodOptions.directDeposit")
|
|
327
366
|
},
|
|
328
367
|
{
|
|
329
|
-
value:
|
|
368
|
+
value: _.Check,
|
|
330
369
|
label: t("paymentMethodOptions.check")
|
|
331
370
|
}
|
|
332
371
|
]
|
|
@@ -334,12 +373,12 @@ const Te = m.object({
|
|
|
334
373
|
)
|
|
335
374
|
] })
|
|
336
375
|
] }),
|
|
337
|
-
!
|
|
376
|
+
!f && H
|
|
338
377
|
] })
|
|
339
378
|
] });
|
|
340
379
|
};
|
|
341
380
|
export {
|
|
342
381
|
Te as PayrollEditEmployeeFormSchema,
|
|
343
|
-
|
|
382
|
+
Ke as PayrollEditEmployeePresentation
|
|
344
383
|
};
|
|
345
384
|
//# sourceMappingURL=PayrollEditEmployeePresentation.js.map
|