@gusto/embedded-react-sdk 0.36.0 → 0.37.0-rc.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 +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 -102
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.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/DataView/DataCards/DataCards.js +42 -36
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +2 -0
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +22 -19
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +5 -3
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +52 -40
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +2 -0
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +31 -28
- 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 +30 -27
- 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 +31 -28
- 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 +24 -21
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +2 -0
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -23
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
- package/dist/components/Common/Fields/hooks/useField.js +37 -33
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.js +33 -29
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
- package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +8 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +8 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +10 -11
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +8 -9
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +8 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +8 -11
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +6 -8
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +8 -11
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +11 -12
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -14
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +8 -9
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +17 -19
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +8 -9
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +8 -9
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +60 -63
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -13
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +10 -11
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +8 -9
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +8 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -7
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -8
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +10 -11
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +29 -30
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +12 -14
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +33 -32
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -22
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -14
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +61 -57
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +15 -16
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +15 -16
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +8 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +8 -9
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -9
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -8
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +16 -17
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +8 -9
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.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 -9
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -10
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +10 -11
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +8 -11
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +3 -3
- package/dist/components/Employee/Profile/HomeAddress.js +45 -44
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -13
- package/dist/components/Employee/Profile/PersonalDetailsInputs.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 -9
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -11
- package/dist/components/Employee/StateTaxes/Actions.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 -9
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -11
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -13
- package/dist/components/Employee/Taxes/FederalForm.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 -9
- 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 +89 -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 +24 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +76 -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 +8 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +177 -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 +100 -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/Flow/Flow.js +20 -23
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +34 -35
- 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/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.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 +7 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +73 -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 +50 -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.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +89 -76
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +6 -6
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +25 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +5 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +31 -24
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +78 -75
- 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 -68
- 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.js +18 -26
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +4 -4
- 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/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +174 -148
- 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 +71 -71
- 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 +5 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +256 -219
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +19 -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 +38 -40
- 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 +55 -43
- 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 -95
- 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/PayrollOverview/PayrollOverview.js +15 -15
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +59 -59
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.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 +109 -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 +6 -1
- package/dist/components/Payroll/helpers.js +100 -84
- 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 +6 -8
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- 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 +10 -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 +11 -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 +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +14 -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 +12 -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 +12 -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 +11 -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 +13 -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 +16 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -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 +8 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.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 +149 -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 +112 -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 +69 -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 -50
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.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/contexts/ThemeProvider/useTheme.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 +7 -7
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +26 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
- 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.GrossUpModal.json.js +16 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- 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.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +31 -25
- 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 +707 -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 +17 -17
- 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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z as r } from "zod";
|
|
2
|
+
function c(n, o) {
|
|
3
|
+
return r.object({
|
|
4
|
+
checkDate: r.date().nullable().refine((e) => e !== null, {
|
|
5
|
+
message: n("errors.checkDateRequired")
|
|
6
|
+
}).refine(
|
|
7
|
+
(e) => {
|
|
8
|
+
const t = new Date(e);
|
|
9
|
+
t.setHours(0, 0, 0, 0);
|
|
10
|
+
const a = new Date(o);
|
|
11
|
+
return a.setHours(0, 0, 0, 0), t >= a;
|
|
12
|
+
},
|
|
13
|
+
{ message: n("errors.checkDateAchLeadTime") }
|
|
14
|
+
),
|
|
15
|
+
skipRegularDeductions: r.boolean()
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
c as createTransitionCreationSchema
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=TransitionCreationTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionCreationTypes.js","sources":["../../../../src/components/Payroll/TransitionCreation/TransitionCreationTypes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\n\nexport interface TransitionCreationProps extends BaseComponentInterface<'Payroll.TransitionCreation'> {\n companyId: string\n startDate: string\n endDate: string\n payScheduleUuid: string\n}\n\nexport interface TransitionCreationFormData {\n checkDate: Date | null\n skipRegularDeductions: boolean\n}\n\nexport function createTransitionCreationSchema(t: (key: string) => string, minCheckDate: Date) {\n return z.object({\n checkDate: z\n .date()\n .nullable()\n .refine((val): val is Date => val !== null, {\n message: t('errors.checkDateRequired'),\n })\n .refine(\n val => {\n const normalized = new Date(val)\n normalized.setHours(0, 0, 0, 0)\n const min = new Date(minCheckDate)\n min.setHours(0, 0, 0, 0)\n return normalized >= min\n },\n { message: t('errors.checkDateAchLeadTime') },\n ),\n skipRegularDeductions: z.boolean(),\n })\n}\n\nexport interface TransitionCreationPresentationProps {\n startDate: string\n endDate: string\n payScheduleName: string | null\n isPending?: boolean\n taxWithholdingConfig: OffCycleTaxWithholdingConfig\n isTaxWithholdingModalOpen: boolean\n onTaxWithholdingEditClick: () => void\n onTaxWithholdingModalDone: (config: OffCycleTaxWithholdingConfig) => void\n onTaxWithholdingModalCancel: () => void\n}\n"],"names":["createTransitionCreationSchema","t","minCheckDate","z","val","normalized","min"],"mappings":";AAgBO,SAASA,EAA+BC,GAA4BC,GAAoB;AAC7F,SAAOC,EAAE,OAAO;AAAA,IACd,WAAWA,EACR,KAAA,EACA,SAAA,EACA,OAAO,CAACC,MAAqBA,MAAQ,MAAM;AAAA,MAC1C,SAASH,EAAE,0BAA0B;AAAA,IAAA,CACtC,EACA;AAAA,MACC,CAAAG,MAAO;AACL,cAAMC,IAAa,IAAI,KAAKD,CAAG;AAC/B,QAAAC,EAAW,SAAS,GAAG,GAAG,GAAG,CAAC;AAC9B,cAAMC,IAAM,IAAI,KAAKJ,CAAY;AACjC,eAAAI,EAAI,SAAS,GAAG,GAAG,GAAG,CAAC,GAChBD,KAAcC;AAAA,MACvB;AAAA,MACA,EAAE,SAASL,EAAE,6BAA6B,EAAA;AAAA,IAAE;AAAA,IAEhD,uBAAuBE,EAAE,QAAA;AAAA,EAAQ,CAClC;AACH;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnEventType } from '../../Base/useBase';
|
|
2
|
+
import { EventType } from '../../../shared/constants';
|
|
3
|
+
interface TransitionPayrollAlertProps {
|
|
4
|
+
companyId: string;
|
|
5
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare function TransitionPayrollAlert(props: TransitionPayrollAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useMemo as r, useCallback as i } from "react";
|
|
3
|
+
import { usePaySchedulesGetPayPeriodsSuspense as N } from "@gusto/embedded-api/react-query/paySchedulesGetPayPeriods";
|
|
4
|
+
import { usePaySchedulesGetAllSuspense as O } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
|
|
5
|
+
import { usePayrollsSkipMutation as L } from "@gusto/embedded-api/react-query/payrollsSkip";
|
|
6
|
+
import { PayrollType as _ } from "@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid";
|
|
7
|
+
import { PayrollTypes as v } from "@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods";
|
|
8
|
+
import { RFCDate as b } from "@gusto/embedded-api/types/rfcdate";
|
|
9
|
+
import { TransitionPayrollAlertPresentation as x } from "./TransitionPayrollAlertPresentation.js";
|
|
10
|
+
import { BaseComponent as B } from "../../Base/Base.js";
|
|
11
|
+
import { useBase as C } from "../../Base/useBase.js";
|
|
12
|
+
import { componentEvents as f } from "../../../shared/constants.js";
|
|
13
|
+
const M = 90;
|
|
14
|
+
function X(t) {
|
|
15
|
+
return /* @__PURE__ */ l(B, { onEvent: t.onEvent, children: /* @__PURE__ */ l(Y, { ...t }) });
|
|
16
|
+
}
|
|
17
|
+
function Y({ companyId: t }) {
|
|
18
|
+
const { onEvent: n, baseSubmitHandler: u } = C(), [P, c] = h(!1), [A, d] = h(null), T = r(() => {
|
|
19
|
+
const e = /* @__PURE__ */ new Date();
|
|
20
|
+
return e.setDate(e.getDate() + M), new b(e);
|
|
21
|
+
}, []), { data: p } = N({
|
|
22
|
+
companyId: t,
|
|
23
|
+
payrollTypes: v.Transition,
|
|
24
|
+
endDate: T
|
|
25
|
+
}), { data: k } = O({ companyId: t }), m = k.payScheduleList ?? [], { mutateAsync: S } = L(), y = r(() => (p.payPeriods ?? []).filter((s) => !s.payroll?.processed), [p]), D = r(() => {
|
|
26
|
+
const e = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const s of y) {
|
|
28
|
+
const a = s.payScheduleUuid ?? "unknown", o = e.get(a) ?? [];
|
|
29
|
+
o.push(s), e.set(a, o);
|
|
30
|
+
}
|
|
31
|
+
return Array.from(e.entries()).map(([s, a]) => {
|
|
32
|
+
const o = m.find((E) => E.uuid === s), U = o?.customName || o?.name || "Transition";
|
|
33
|
+
return { payScheduleUuid: s, payScheduleName: U, payPeriods: a };
|
|
34
|
+
});
|
|
35
|
+
}, [y, m]), R = i(
|
|
36
|
+
(e) => {
|
|
37
|
+
n(f.RUN_TRANSITION_PAYROLL, {
|
|
38
|
+
startDate: e.startDate,
|
|
39
|
+
endDate: e.endDate,
|
|
40
|
+
payScheduleUuid: e.payScheduleUuid
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
[n]
|
|
44
|
+
), g = i(
|
|
45
|
+
async (e) => {
|
|
46
|
+
d(e), await u({}, async () => {
|
|
47
|
+
await S({
|
|
48
|
+
request: {
|
|
49
|
+
companyUuid: t,
|
|
50
|
+
requestBody: {
|
|
51
|
+
payrollType: _.TransitionFromOldPaySchedule,
|
|
52
|
+
startDate: e.startDate,
|
|
53
|
+
endDate: e.endDate,
|
|
54
|
+
payScheduleUuid: e.payScheduleUuid ?? void 0
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}), c(!0), n(f.TRANSITION_PAYROLL_SKIPPED, {
|
|
58
|
+
startDate: e.startDate,
|
|
59
|
+
endDate: e.endDate,
|
|
60
|
+
payScheduleUuid: e.payScheduleUuid
|
|
61
|
+
});
|
|
62
|
+
}), d(null);
|
|
63
|
+
},
|
|
64
|
+
[t, S, n, u]
|
|
65
|
+
), w = i(() => {
|
|
66
|
+
c(!1);
|
|
67
|
+
}, []);
|
|
68
|
+
return D.length === 0 ? null : /* @__PURE__ */ l(
|
|
69
|
+
x,
|
|
70
|
+
{
|
|
71
|
+
groupedPayPeriods: D,
|
|
72
|
+
onRunPayroll: R,
|
|
73
|
+
onSkipPayroll: g,
|
|
74
|
+
showSkipSuccessAlert: P,
|
|
75
|
+
onDismissSkipSuccessAlert: w,
|
|
76
|
+
skippingPayPeriod: A
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
X as TransitionPayrollAlert
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=TransitionPayrollAlert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionPayrollAlert.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.tsx"],"sourcesContent":["import { useMemo, useState, useCallback } from 'react'\nimport { usePaySchedulesGetPayPeriodsSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetPayPeriods'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePayrollsSkipMutation } from '@gusto/embedded-api/react-query/payrollsSkip'\nimport { PayrollType } from '@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid'\nimport { PayrollTypes } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { TransitionPayrollAlertPresentation } from './TransitionPayrollAlertPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { componentEvents } from '@/shared/constants'\n\ninterface TransitionPayrollAlertProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst LOOK_AHEAD_DAYS = 90\n\nexport function TransitionPayrollAlert(props: TransitionPayrollAlertProps) {\n return (\n <BaseComponent onEvent={props.onEvent}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId }: TransitionPayrollAlertProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [showSkipSuccessAlert, setShowSkipSuccessAlert] = useState(false)\n const [skippingPayPeriod, setSkippingPayPeriod] = useState<PayPeriod | null>(null)\n\n const lookAheadEndDate = useMemo(() => {\n const date = new Date()\n date.setDate(date.getDate() + LOOK_AHEAD_DAYS)\n return new RFCDate(date)\n }, [])\n\n const { data: payPeriodsData } = usePaySchedulesGetPayPeriodsSuspense({\n companyId,\n payrollTypes: PayrollTypes.Transition,\n endDate: lookAheadEndDate,\n })\n\n const { data: paySchedulesData } = usePaySchedulesGetAllSuspense({ companyId })\n const paySchedules = paySchedulesData.payScheduleList ?? []\n\n const { mutateAsync: skipPayroll } = usePayrollsSkipMutation()\n\n const unprocessedTransitionPeriods = useMemo(() => {\n const periods = payPeriodsData.payPeriods ?? []\n return periods.filter((pp: PayPeriod) => !pp.payroll?.processed)\n }, [payPeriodsData])\n\n const groupedPayPeriods = useMemo(() => {\n const groups = new Map<string, PayPeriod[]>()\n\n for (const period of unprocessedTransitionPeriods) {\n const uuid = period.payScheduleUuid ?? 'unknown'\n const existing = groups.get(uuid) ?? []\n existing.push(period)\n groups.set(uuid, existing)\n }\n\n return Array.from(groups.entries()).map(([payScheduleUuid, payPeriods]) => {\n const schedule = paySchedules.find(s => s.uuid === payScheduleUuid)\n const payScheduleName = schedule?.customName || schedule?.name || 'Transition'\n\n return { payScheduleUuid, payScheduleName, payPeriods }\n })\n }, [unprocessedTransitionPeriods, paySchedules])\n\n const handleRunPayroll = useCallback(\n (payPeriod: PayPeriod) => {\n onEvent(componentEvents.RUN_TRANSITION_PAYROLL, {\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid,\n })\n },\n [onEvent],\n )\n\n const handleSkipPayroll = useCallback(\n async (payPeriod: PayPeriod) => {\n setSkippingPayPeriod(payPeriod)\n await baseSubmitHandler({}, async () => {\n await skipPayroll({\n request: {\n companyUuid: companyId,\n requestBody: {\n payrollType: PayrollType.TransitionFromOldPaySchedule,\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid ?? undefined,\n },\n },\n })\n setShowSkipSuccessAlert(true)\n onEvent(componentEvents.TRANSITION_PAYROLL_SKIPPED, {\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid,\n })\n })\n setSkippingPayPeriod(null)\n },\n [companyId, skipPayroll, onEvent, baseSubmitHandler],\n )\n\n const handleDismissSkipSuccessAlert = useCallback(() => {\n setShowSkipSuccessAlert(false)\n }, [])\n\n if (groupedPayPeriods.length === 0) {\n return null\n }\n\n return (\n <TransitionPayrollAlertPresentation\n groupedPayPeriods={groupedPayPeriods}\n onRunPayroll={handleRunPayroll}\n onSkipPayroll={handleSkipPayroll}\n showSkipSuccessAlert={showSkipSuccessAlert}\n onDismissSkipSuccessAlert={handleDismissSkipSuccessAlert}\n skippingPayPeriod={skippingPayPeriod}\n />\n )\n}\n"],"names":["LOOK_AHEAD_DAYS","TransitionPayrollAlert","props","jsx","BaseComponent","Root","companyId","onEvent","baseSubmitHandler","useBase","showSkipSuccessAlert","setShowSkipSuccessAlert","useState","skippingPayPeriod","setSkippingPayPeriod","lookAheadEndDate","useMemo","date","RFCDate","payPeriodsData","usePaySchedulesGetPayPeriodsSuspense","PayrollTypes","paySchedulesData","usePaySchedulesGetAllSuspense","paySchedules","skipPayroll","usePayrollsSkipMutation","unprocessedTransitionPeriods","pp","groupedPayPeriods","groups","period","uuid","existing","payScheduleUuid","payPeriods","schedule","s","payScheduleName","handleRunPayroll","useCallback","payPeriod","componentEvents","handleSkipPayroll","PayrollType","handleDismissSkipSuccessAlert","TransitionPayrollAlertPresentation"],"mappings":"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"}
|
package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PayPeriod } from '@gusto/embedded-api/models/components/payperiod';
|
|
2
|
+
interface TransitionPayPeriodGroup {
|
|
3
|
+
payScheduleUuid: string;
|
|
4
|
+
payScheduleName: string;
|
|
5
|
+
payPeriods: PayPeriod[];
|
|
6
|
+
}
|
|
7
|
+
interface TransitionPayrollAlertPresentationProps {
|
|
8
|
+
groupedPayPeriods: TransitionPayPeriodGroup[];
|
|
9
|
+
onRunPayroll: (payPeriod: PayPeriod) => void;
|
|
10
|
+
onSkipPayroll: (payPeriod: PayPeriod) => void;
|
|
11
|
+
showSkipSuccessAlert: boolean;
|
|
12
|
+
onDismissSkipSuccessAlert: () => void;
|
|
13
|
+
skippingPayPeriod: PayPeriod | null;
|
|
14
|
+
}
|
|
15
|
+
export declare function TransitionPayrollAlertPresentation({ groupedPayPeriods, onRunPayroll, onSkipPayroll, showSkipSuccessAlert, onDismissSkipSuccessAlert, skippingPayPeriod, }: TransitionPayrollAlertPresentationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P } from "react";
|
|
3
|
+
import { useTranslation as T } from "react-i18next";
|
|
4
|
+
import { useComponentContext as v } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { Flex as o } from "../../Common/Flex/Flex.js";
|
|
6
|
+
import { useI18n as R } from "../../../i18n/I18n.js";
|
|
7
|
+
import { useDateFormatter as F } from "../../../hooks/useDateFormatter.js";
|
|
8
|
+
function B({
|
|
9
|
+
groupedPayPeriods: a,
|
|
10
|
+
onRunPayroll: h,
|
|
11
|
+
onSkipPayroll: d,
|
|
12
|
+
showSkipSuccessAlert: g,
|
|
13
|
+
onDismissSkipSuccessAlert: f,
|
|
14
|
+
skippingPayPeriod: D
|
|
15
|
+
}) {
|
|
16
|
+
R("Payroll.TransitionPayrollAlert");
|
|
17
|
+
const { t } = T("Payroll.TransitionPayrollAlert"), { Alert: m, Button: u, Text: s, Dialog: k } = v(), y = F(), [l, c] = P(null);
|
|
18
|
+
if (a.length === 0)
|
|
19
|
+
return null;
|
|
20
|
+
const p = (i) => y.formatPayPeriodRange(i.startDate, i.endDate, {
|
|
21
|
+
useShortMonth: !0
|
|
22
|
+
}), x = () => {
|
|
23
|
+
l && (d(l), c(null));
|
|
24
|
+
}, C = a.length > 1;
|
|
25
|
+
return /* @__PURE__ */ r(o, { flexDirection: "column", gap: 16, children: [
|
|
26
|
+
g && /* @__PURE__ */ e(m, { status: "info", label: t("skipSuccessAlert"), onDismiss: f }),
|
|
27
|
+
/* @__PURE__ */ e(m, { status: "warning", label: t("alertTitle"), children: /* @__PURE__ */ r(o, { flexDirection: "column", gap: 16, children: [
|
|
28
|
+
/* @__PURE__ */ e(s, { children: t("alertDescription") }),
|
|
29
|
+
a.map((i, S) => /* @__PURE__ */ r(
|
|
30
|
+
o,
|
|
31
|
+
{
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
gap: 8,
|
|
34
|
+
children: [
|
|
35
|
+
C && /* @__PURE__ */ e(s, { weight: "semibold", children: i.payScheduleName }),
|
|
36
|
+
i.payPeriods.map((n) => {
|
|
37
|
+
const A = p(n), b = D === n;
|
|
38
|
+
return /* @__PURE__ */ r(
|
|
39
|
+
o,
|
|
40
|
+
{
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
gap: 8,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ e(s, { children: A }),
|
|
45
|
+
/* @__PURE__ */ r(o, { gap: 12, alignItems: "center", children: [
|
|
46
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
47
|
+
u,
|
|
48
|
+
{
|
|
49
|
+
variant: "secondary",
|
|
50
|
+
onClick: () => {
|
|
51
|
+
h(n);
|
|
52
|
+
},
|
|
53
|
+
children: t("runPayroll")
|
|
54
|
+
}
|
|
55
|
+
) }),
|
|
56
|
+
/* @__PURE__ */ e(
|
|
57
|
+
u,
|
|
58
|
+
{
|
|
59
|
+
variant: "tertiary",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
c(n);
|
|
62
|
+
},
|
|
63
|
+
isLoading: b,
|
|
64
|
+
children: t("skipPayroll")
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] })
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
`${n.payScheduleUuid}-${n.startDate}`
|
|
71
|
+
);
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
i.payScheduleUuid || `group-${S}`
|
|
76
|
+
))
|
|
77
|
+
] }) }),
|
|
78
|
+
/* @__PURE__ */ e(
|
|
79
|
+
k,
|
|
80
|
+
{
|
|
81
|
+
isOpen: l !== null,
|
|
82
|
+
onClose: () => {
|
|
83
|
+
c(null);
|
|
84
|
+
},
|
|
85
|
+
onPrimaryActionClick: x,
|
|
86
|
+
isDestructive: !0,
|
|
87
|
+
title: t("skipDialog.title", {
|
|
88
|
+
dateRange: l ? p(l) : ""
|
|
89
|
+
}),
|
|
90
|
+
primaryActionLabel: t("skipDialog.confirmCta"),
|
|
91
|
+
closeActionLabel: t("skipDialog.cancelCta"),
|
|
92
|
+
children: t("skipDialog.body")
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
B as TransitionPayrollAlertPresentation
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=TransitionPayrollAlertPresentation.js.map
|
package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionPayrollAlertPresentation.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface TransitionPayPeriodGroup {\n payScheduleUuid: string\n payScheduleName: string\n payPeriods: PayPeriod[]\n}\n\ninterface TransitionPayrollAlertPresentationProps {\n groupedPayPeriods: TransitionPayPeriodGroup[]\n onRunPayroll: (payPeriod: PayPeriod) => void\n onSkipPayroll: (payPeriod: PayPeriod) => void\n showSkipSuccessAlert: boolean\n onDismissSkipSuccessAlert: () => void\n skippingPayPeriod: PayPeriod | null\n}\n\nexport function TransitionPayrollAlertPresentation({\n groupedPayPeriods,\n onRunPayroll,\n onSkipPayroll,\n showSkipSuccessAlert,\n onDismissSkipSuccessAlert,\n skippingPayPeriod,\n}: TransitionPayrollAlertPresentationProps) {\n useI18n('Payroll.TransitionPayrollAlert')\n const { t } = useTranslation('Payroll.TransitionPayrollAlert')\n const { Alert, Button, Text, Dialog } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const [skipDialogPayPeriod, setSkipDialogPayPeriod] = useState<PayPeriod | null>(null)\n\n if (groupedPayPeriods.length === 0) {\n return null\n }\n\n const formatDateRange = (payPeriod: PayPeriod) =>\n dateFormatter.formatPayPeriodRange(payPeriod.startDate, payPeriod.endDate, {\n useShortMonth: true,\n })\n\n const handleConfirmSkip = () => {\n if (skipDialogPayPeriod) {\n onSkipPayroll(skipDialogPayPeriod)\n setSkipDialogPayPeriod(null)\n }\n }\n\n const hasMultipleGroups = groupedPayPeriods.length > 1\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {showSkipSuccessAlert && (\n <Alert status=\"info\" label={t('skipSuccessAlert')} onDismiss={onDismissSkipSuccessAlert} />\n )}\n <Alert status=\"warning\" label={t('alertTitle')}>\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('alertDescription')}</Text>\n {groupedPayPeriods.map((group, groupIndex) => (\n <Flex\n key={group.payScheduleUuid || `group-${groupIndex}`}\n flexDirection=\"column\"\n gap={8}\n >\n {hasMultipleGroups && <Text weight=\"semibold\">{group.payScheduleName}</Text>}\n {group.payPeriods.map(payPeriod => {\n const dateRange = formatDateRange(payPeriod)\n const isSkipping = skippingPayPeriod === payPeriod\n\n return (\n <Flex\n key={`${payPeriod.payScheduleUuid}-${payPeriod.startDate}`}\n flexDirection=\"column\"\n gap={8}\n >\n <Text>{dateRange}</Text>\n <Flex gap={12} alignItems=\"center\">\n <div>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onRunPayroll(payPeriod)\n }}\n >\n {t('runPayroll')}\n </Button>\n </div>\n <Button\n variant=\"tertiary\"\n onClick={() => {\n setSkipDialogPayPeriod(payPeriod)\n }}\n isLoading={isSkipping}\n >\n {t('skipPayroll')}\n </Button>\n </Flex>\n </Flex>\n )\n })}\n </Flex>\n ))}\n </Flex>\n </Alert>\n <Dialog\n isOpen={skipDialogPayPeriod !== null}\n onClose={() => {\n setSkipDialogPayPeriod(null)\n }}\n onPrimaryActionClick={handleConfirmSkip}\n isDestructive\n title={t('skipDialog.title', {\n dateRange: skipDialogPayPeriod ? formatDateRange(skipDialogPayPeriod) : '',\n })}\n primaryActionLabel={t('skipDialog.confirmCta')}\n closeActionLabel={t('skipDialog.cancelCta')}\n >\n {t('skipDialog.body')}\n </Dialog>\n </Flex>\n )\n}\n"],"names":["TransitionPayrollAlertPresentation","groupedPayPeriods","onRunPayroll","onSkipPayroll","showSkipSuccessAlert","onDismissSkipSuccessAlert","skippingPayPeriod","useI18n","useTranslation","Alert","Button","Text","Dialog","useComponentContext","dateFormatter","useDateFormatter","skipDialogPayPeriod","setSkipDialogPayPeriod","useState","formatDateRange","payPeriod","handleConfirmSkip","hasMultipleGroups","jsxs","Flex","jsx","group","groupIndex","dateRange","isSkipping"],"mappings":"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"}
|
|
@@ -5,6 +5,7 @@ import { TFunction } from 'i18next';
|
|
|
5
5
|
import { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject';
|
|
6
6
|
import { Payroll } from '@gusto/embedded-api/models/components/payroll';
|
|
7
7
|
import { PayrollType } from './PayrollList/types';
|
|
8
|
+
import { PayrollCategory } from './payrollTypes';
|
|
8
9
|
export declare const getPrimaryJob: (employee: Employee) => import('@gusto/embedded-api/models/components/job.js').Job | null;
|
|
9
10
|
export declare const formatEmployeePayRate: ({ employee, t, locale, }: {
|
|
10
11
|
employee?: Employee;
|
|
@@ -22,7 +23,7 @@ export declare const getTotalPtoHours: (compensation: PayrollEmployeeCompensatio
|
|
|
22
23
|
export declare const getAdditionalEarnings: (compensation: PayrollEmployeeCompensationsType) => number;
|
|
23
24
|
export declare const getReimbursements: (compensation: PayrollEmployeeCompensationsType) => number;
|
|
24
25
|
export declare const formatHoursDisplay: (hours: number) => string;
|
|
25
|
-
export declare const calculateGrossPay: (compensation: PayrollEmployeeCompensationsType, employee: Employee, compensationEffectiveDateString?: string, paySchedule?: PayScheduleObject,
|
|
26
|
+
export declare const calculateGrossPay: (compensation: PayrollEmployeeCompensationsType, employee: Employee, compensationEffectiveDateString?: string, paySchedule?: PayScheduleObject, payrollCategory?: PayrollCategory) => number;
|
|
26
27
|
export declare const getPayrollType: (payroll: {
|
|
27
28
|
external?: boolean;
|
|
28
29
|
offCycle?: boolean;
|
|
@@ -40,6 +41,10 @@ export declare const getAdditionalEarningsCompensations: ({ flsaStatus, existing
|
|
|
40
41
|
excludedTypes?: string[];
|
|
41
42
|
}) => FixedCompensations[];
|
|
42
43
|
export declare const getReimbursementCompensation: (fixedCompensations: FixedCompensations[], fixedCompensationTypes: PayrollFixedCompensationTypesType[], primaryJobUuid?: string) => FixedCompensations | null;
|
|
44
|
+
export declare const hasDirectDepositEmployees: (employeeCompensations?: Array<{
|
|
45
|
+
paymentMethod?: string | null;
|
|
46
|
+
excluded?: boolean;
|
|
47
|
+
}>) => boolean;
|
|
43
48
|
export declare const calculateTotalPayroll: (payrollData: Payroll) => number;
|
|
44
49
|
/**
|
|
45
50
|
* Determines if a payroll can be cancelled based on business rules.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { useCallback as v } from "react";
|
|
2
|
+
import { useTranslation as S } from "react-i18next";
|
|
3
|
+
import { PayrollCategory as M, isOffCyclePayroll as x } from "./payrollTypes.js";
|
|
4
|
+
import { formatPayRate as O } from "../../helpers/formattedStrings.js";
|
|
5
|
+
import { useLocale as L } from "../../contexts/LocaleProvider/useLocale.js";
|
|
6
|
+
import { FlsaStatus as N, COMPENSATION_NAME_REIMBURSEMENT as g } from "../../shared/constants.js";
|
|
7
|
+
import { MS_PER_HOUR as P } from "../../helpers/dateFormatting.js";
|
|
8
|
+
const j = "regular hours", p = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.[0] || null, U = (e) => Math.round(e * 1e6) / 1e6, R = (e) => Math.round(e * 100) / 100, T = (e) => e.toLowerCase() === j, A = {
|
|
8
9
|
Daily: 8,
|
|
9
10
|
"Every week": 40,
|
|
10
11
|
"Every other week": 80,
|
|
@@ -13,7 +14,7 @@ const O = "regular hours", p = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.
|
|
|
13
14
|
Quarterly: 520,
|
|
14
15
|
Semiannually: 1040,
|
|
15
16
|
Annually: 2080
|
|
16
|
-
},
|
|
17
|
+
}, W = ({
|
|
17
18
|
employee: e,
|
|
18
19
|
t,
|
|
19
20
|
locale: r = "en-US"
|
|
@@ -27,31 +28,31 @@ const O = "regular hours", p = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.
|
|
|
27
28
|
if (!o || !o.rate || parseFloat(o.rate) === 0)
|
|
28
29
|
return null;
|
|
29
30
|
const s = parseFloat(o.rate), u = o.paymentUnit || "Hour";
|
|
30
|
-
return
|
|
31
|
-
},
|
|
32
|
-
const { t: e } =
|
|
33
|
-
return
|
|
34
|
-
(r) =>
|
|
31
|
+
return O({ rate: s, paymentUnit: u, t, locale: r });
|
|
32
|
+
}, se = () => {
|
|
33
|
+
const { t: e } = S("common"), { locale: t } = L();
|
|
34
|
+
return v(
|
|
35
|
+
(r) => W({ employee: r, t: e, locale: t }),
|
|
35
36
|
[e, t]
|
|
36
37
|
);
|
|
37
|
-
},
|
|
38
|
-
function
|
|
38
|
+
}, ae = (e) => e.hourlyCompensations ? e.hourlyCompensations.filter((t) => t.name?.toLowerCase() === "regular hours").reduce((t, r) => t + parseFloat(r.hours || "0"), 0) : 0;
|
|
39
|
+
function ue(e) {
|
|
39
40
|
return !e.hourlyCompensations || e.excluded ? 0 : e.hourlyCompensations.filter((t) => Number(t.compensationMultiplier) > 1).reduce((t, r) => t + parseFloat(r.hours || "0"), 0);
|
|
40
41
|
}
|
|
41
|
-
const
|
|
42
|
+
const _ = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r.hours || "0"), 0) : 0, I = (e) => e.fixedCompensations ? e.fixedCompensations.filter((t) => {
|
|
42
43
|
const r = t.name?.toLowerCase() || "", n = parseFloat(t.amount || "0");
|
|
43
44
|
return r !== "reimbursement" && r !== "minimum wage adjustment" && n > 0;
|
|
44
|
-
}).reduce((t, r) => t + parseFloat(r.amount || "0"), 0) : 0,
|
|
45
|
+
}).reduce((t, r) => t + parseFloat(r.amount || "0"), 0) : 0, ie = (e) => {
|
|
45
46
|
if (!e.fixedCompensations)
|
|
46
47
|
return 0;
|
|
47
48
|
const t = e.fixedCompensations.find(
|
|
48
49
|
(r) => r.name?.toLowerCase() === "reimbursement"
|
|
49
50
|
);
|
|
50
51
|
return t ? parseFloat(t.amount || "0") : 0;
|
|
51
|
-
},
|
|
52
|
-
const t =
|
|
52
|
+
}, le = (e) => {
|
|
53
|
+
const t = R(e);
|
|
53
54
|
return t % 1 === 0 ? `${t}.0` : t.toString();
|
|
54
|
-
},
|
|
55
|
+
}, B = (e) => e.frequency && A[e.frequency] || 0, h = (e, t) => {
|
|
55
56
|
if (!e.length) return null;
|
|
56
57
|
const r = [...e].sort(
|
|
57
58
|
(n, o) => (n.effectiveDate ? new Date(n.effectiveDate).getTime() : 0) - (o.effectiveDate ? new Date(o.effectiveDate).getTime() : 0)
|
|
@@ -62,7 +63,7 @@ const U = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
62
63
|
return r[n] || null;
|
|
63
64
|
}
|
|
64
65
|
return r[0] || null;
|
|
65
|
-
},
|
|
66
|
+
}, k = (e, t) => {
|
|
66
67
|
if (!e.length) return null;
|
|
67
68
|
const r = [...e].sort(
|
|
68
69
|
(n, o) => (n.effectiveDate ? new Date(n.effectiveDate).getTime() : 0) - (o.effectiveDate ? new Date(o.effectiveDate).getTime() : 0)
|
|
@@ -73,10 +74,10 @@ const U = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
73
74
|
return r[n] || null;
|
|
74
75
|
}
|
|
75
76
|
return r[0] || null;
|
|
76
|
-
},
|
|
77
|
+
}, Y = (e) => e.flsaStatus === "Exempt" || e.flsaStatus === "Salaried Nonexempt", G = (e) => e.length ? e.filter((t) => {
|
|
77
78
|
const r = t.name?.toLowerCase(), n = parseFloat(t.amount || "0");
|
|
78
79
|
return (r === "paycheck tips" || r === "cash tips") && n > 0;
|
|
79
|
-
}).reduce((t, r) => t + parseFloat(r.amount || "0"), 0) : 0,
|
|
80
|
+
}).reduce((t, r) => t + parseFloat(r.amount || "0"), 0) : 0, C = (e) => {
|
|
80
81
|
const t = parseFloat(e.rate || "0");
|
|
81
82
|
switch (e.paymentUnit || "Hour") {
|
|
82
83
|
case "Hour":
|
|
@@ -94,71 +95,71 @@ const U = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
94
95
|
default:
|
|
95
96
|
return t;
|
|
96
97
|
}
|
|
97
|
-
},
|
|
98
|
+
}, J = (e, t, r) => {
|
|
98
99
|
const n = e.jobs?.find((s) => s.uuid === t);
|
|
99
100
|
if (!n?.compensations)
|
|
100
101
|
return 0;
|
|
101
102
|
const o = h(n.compensations, r);
|
|
102
|
-
return o ?
|
|
103
|
-
},
|
|
103
|
+
return o ? C(o) : 0;
|
|
104
|
+
}, w = (e, t) => {
|
|
104
105
|
const r = p(e);
|
|
105
106
|
if (!r?.compensations)
|
|
106
107
|
return 0;
|
|
107
108
|
const n = h(r.compensations, t);
|
|
108
|
-
return n ?
|
|
109
|
-
},
|
|
109
|
+
return n ? C(n) : 0;
|
|
110
|
+
}, q = (e) => e.paidTimeOff ? e.paidTimeOff.reduce(
|
|
110
111
|
(t, r) => t + parseFloat(r.finalPayoutUnusedHoursInput || "0"),
|
|
111
112
|
0
|
|
112
|
-
) : 0,
|
|
113
|
-
const o =
|
|
113
|
+
) : 0, H = (e, t, r, n) => {
|
|
114
|
+
const o = _(e);
|
|
114
115
|
if (n) {
|
|
115
|
-
const s =
|
|
116
|
+
const s = q(e);
|
|
116
117
|
return o + s;
|
|
117
118
|
}
|
|
118
119
|
return t ? Math.min(r, o) : o;
|
|
119
|
-
},
|
|
120
|
+
}, Q = (e, t, r) => {
|
|
120
121
|
if (!e.adjustForMinimumWage) return 0;
|
|
121
|
-
const n =
|
|
122
|
+
const n = k(
|
|
122
123
|
e.minimumWages || [],
|
|
123
124
|
r
|
|
124
125
|
);
|
|
125
126
|
if (!n)
|
|
126
127
|
return 0;
|
|
127
128
|
const o = t.hourlyCompensations?.reduce(
|
|
128
|
-
(f,
|
|
129
|
+
(f, l) => f + parseFloat(l.hours || "0"),
|
|
129
130
|
0
|
|
130
|
-
) || 0, s =
|
|
131
|
+
) || 0, s = C(e), u = (parseFloat(n.wage || "0") - s) * o, a = G(t.fixedCompensations || []);
|
|
131
132
|
return Math.max(0, u - a);
|
|
132
|
-
},
|
|
133
|
+
}, $ = (e, t, r, n, o, s, u) => {
|
|
133
134
|
if (!u && n)
|
|
134
|
-
return
|
|
135
|
+
return w(t, r) * (o - s);
|
|
135
136
|
if (!e.hourlyCompensations || !t.jobs)
|
|
136
137
|
return 0;
|
|
137
|
-
const a = e.hourlyCompensations.reduce((
|
|
138
|
-
const d = parseFloat(c.hours || "0"), y =
|
|
139
|
-
return
|
|
140
|
-
}, 0), f = e.hourlyCompensations.reduce((
|
|
138
|
+
const a = e.hourlyCompensations.reduce((i, c) => {
|
|
139
|
+
const d = parseFloat(c.hours || "0"), y = J(t, c.jobUuid || "", r);
|
|
140
|
+
return i + d * y;
|
|
141
|
+
}, 0), f = e.hourlyCompensations.reduce((i, c) => i + parseFloat(c.hours || "0"), 0);
|
|
141
142
|
if (f === 0) return a;
|
|
142
|
-
const
|
|
143
|
+
const l = U(a / f), m = e.hourlyCompensations.filter((i) => !T(i.name || "")).reduce((i, c) => {
|
|
143
144
|
const d = parseFloat(c.hours || "0"), y = c.compensationMultiplier || 1;
|
|
144
|
-
return
|
|
145
|
+
return i + d * l * (y - 1);
|
|
145
146
|
}, 0);
|
|
146
147
|
return a + m;
|
|
147
|
-
},
|
|
148
|
-
const u =
|
|
148
|
+
}, z = (e, t, r, n, o, s) => {
|
|
149
|
+
const u = H(
|
|
149
150
|
e,
|
|
150
151
|
n,
|
|
151
152
|
o,
|
|
152
153
|
s
|
|
153
|
-
), a =
|
|
154
|
+
), a = w(t, r);
|
|
154
155
|
return u * a;
|
|
155
|
-
},
|
|
156
|
+
}, K = (e, t, r) => {
|
|
156
157
|
if (!t) return !1;
|
|
157
158
|
const n = e.hourlyCompensations?.find(
|
|
158
159
|
(s) => T(s.name || "")
|
|
159
160
|
);
|
|
160
161
|
return n ? parseFloat(n.hours || "0") === r : !1;
|
|
161
|
-
},
|
|
162
|
+
}, ce = (e, t, r, n, o = M.Regular) => {
|
|
162
163
|
if (e.excluded)
|
|
163
164
|
return 0;
|
|
164
165
|
const s = r ? new Date(r) : /* @__PURE__ */ new Date(), u = p(t);
|
|
@@ -170,37 +171,48 @@ const U = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
170
171
|
);
|
|
171
172
|
if (!a)
|
|
172
173
|
return 0;
|
|
173
|
-
const f =
|
|
174
|
+
const f = Y(a), l = n ? B(n) : 0, m = K(
|
|
174
175
|
e,
|
|
175
176
|
f,
|
|
176
|
-
|
|
177
|
-
),
|
|
177
|
+
l
|
|
178
|
+
), i = x(o), c = H(
|
|
178
179
|
e,
|
|
179
180
|
m,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
),
|
|
181
|
+
l,
|
|
182
|
+
i
|
|
183
|
+
), d = $(
|
|
183
184
|
e,
|
|
184
185
|
t,
|
|
185
186
|
s,
|
|
186
187
|
m,
|
|
187
|
-
i,
|
|
188
188
|
l,
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
c,
|
|
190
|
+
i
|
|
191
|
+
), y = I(e), b = z(
|
|
191
192
|
e,
|
|
192
193
|
t,
|
|
193
194
|
s,
|
|
194
195
|
m,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
),
|
|
196
|
+
l,
|
|
197
|
+
i
|
|
198
|
+
), E = Q(
|
|
198
199
|
a,
|
|
199
200
|
e,
|
|
200
201
|
s
|
|
201
|
-
),
|
|
202
|
-
return
|
|
203
|
-
},
|
|
202
|
+
), F = d + y + b + E;
|
|
203
|
+
return R(F);
|
|
204
|
+
}, V = {
|
|
205
|
+
Bonus: "Bonus",
|
|
206
|
+
Correction: "Correction",
|
|
207
|
+
"Transition from old pay schedule": "Transition",
|
|
208
|
+
"Dismissed employee": "Dismissal",
|
|
209
|
+
"Hired employee": "New Hire",
|
|
210
|
+
"Benefit reversal": "Benefit Reversal",
|
|
211
|
+
"Wage correction": "Wage Correction",
|
|
212
|
+
"Tax reconciliation": "Tax Reconciliation",
|
|
213
|
+
Reversal: "Reversal",
|
|
214
|
+
"Disability insurance distribution": "Disability Insurance"
|
|
215
|
+
}, fe = (e) => e.external ? "External" : e.offCycle && e.offCycleReason ? V[e.offCycleReason] ?? e.offCycleReason : e.offCycle ? "Off-Cycle" : "Regular", me = ({
|
|
204
216
|
flsaStatus: e,
|
|
205
217
|
existingFixedCompensations: t = [],
|
|
206
218
|
primaryJobUuid: r,
|
|
@@ -208,16 +220,16 @@ const U = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
208
220
|
excludedTypes: o = []
|
|
209
221
|
}) => {
|
|
210
222
|
const s = [...t];
|
|
211
|
-
return e !==
|
|
223
|
+
return e !== N.OWNER && r && n.length > 0 && n.map((a) => a.name).filter(Boolean).forEach((a) => {
|
|
212
224
|
s.some(
|
|
213
|
-
(
|
|
225
|
+
(l) => l.name?.toLowerCase() === a.toLowerCase()
|
|
214
226
|
) || s.push({
|
|
215
227
|
name: a,
|
|
216
228
|
amount: "0.00",
|
|
217
229
|
jobUuid: r
|
|
218
230
|
});
|
|
219
231
|
}), s.filter((u) => u.name && !o.includes(u.name)).sort((u, a) => (u.name || "").localeCompare(a.name || ""));
|
|
220
|
-
},
|
|
232
|
+
}, de = (e, t, r) => {
|
|
221
233
|
const n = e.find(
|
|
222
234
|
(o) => o.name?.toLowerCase() === g.toLowerCase()
|
|
223
235
|
);
|
|
@@ -228,33 +240,37 @@ const U = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
|
|
|
228
240
|
amount: "0.00",
|
|
229
241
|
jobUuid: r
|
|
230
242
|
} : null);
|
|
231
|
-
},
|
|
243
|
+
}, ye = (e) => {
|
|
244
|
+
if (!e || e.length === 0) return !0;
|
|
245
|
+
const t = e.filter((r) => !r.excluded);
|
|
246
|
+
return t.length === 0 ? !0 : t.some((r) => r.paymentMethod === "Direct Deposit");
|
|
247
|
+
}, ge = (e) => e.totals ? Number(e.totals.grossPay ?? 0) + Number(e.totals.employerTaxes ?? 0) + Number(e.totals.reimbursements ?? 0) + Number(e.totals.benefits ?? 0) : 0, D = (e) => {
|
|
232
248
|
const t = e.getFullYear(), r = new Date(t, 2, 1);
|
|
233
249
|
r.setDate(1 + (7 - r.getDay()) + 7);
|
|
234
250
|
const n = new Date(t, 10, 1);
|
|
235
251
|
return n.setDate(1 + (7 - n.getDay()) % 7), e >= r && e < n ? -7 : -8;
|
|
236
|
-
},
|
|
252
|
+
}, pe = (e) => {
|
|
237
253
|
if (e.payrollStatusMeta?.cancellable === !1 || !e.processed || !e.payrollDeadline)
|
|
238
254
|
return !1;
|
|
239
|
-
const t = /* @__PURE__ */ new Date(), r = new Date(e.payrollDeadline), n = new Date(t.getTime() + D(t) *
|
|
255
|
+
const t = /* @__PURE__ */ new Date(), r = new Date(e.payrollDeadline), n = new Date(t.getTime() + D(t) * P), o = new Date(r.getTime() + D(r) * P), s = new Date(o);
|
|
240
256
|
return s.setUTCHours(16, 0, 0, 0), !(n >= s);
|
|
241
257
|
};
|
|
242
258
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
ue as getPayrollTypeLabel,
|
|
259
|
+
ce as calculateGrossPay,
|
|
260
|
+
ge as calculateTotalPayroll,
|
|
261
|
+
pe as canCancelPayroll,
|
|
262
|
+
W as formatEmployeePayRate,
|
|
263
|
+
le as formatHoursDisplay,
|
|
264
|
+
I as getAdditionalEarnings,
|
|
265
|
+
me as getAdditionalEarningsCompensations,
|
|
266
|
+
ue as getOvertimeHours,
|
|
267
|
+
fe as getPayrollTypeLabel,
|
|
253
268
|
p as getPrimaryJob,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
269
|
+
ae as getRegularHours,
|
|
270
|
+
de as getReimbursementCompensation,
|
|
271
|
+
ie as getReimbursements,
|
|
272
|
+
_ as getTotalPtoHours,
|
|
273
|
+
ye as hasDirectDepositEmployees,
|
|
274
|
+
se as useFormatEmployeePayRate
|
|
259
275
|
};
|
|
260
276
|
//# sourceMappingURL=helpers.js.map
|