@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
package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PayrollOption } from '../types';
|
|
2
|
+
import { BaseComponentInterface } from '../../../Base/Base';
|
|
3
|
+
export interface TerminationSummaryProps extends BaseComponentInterface<'Employee.Terminations.TerminationSummary'> {
|
|
4
|
+
employeeId: string;
|
|
5
|
+
companyId: string;
|
|
6
|
+
payrollOption?: PayrollOption;
|
|
7
|
+
payrollUuid?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function TerminationSummary(props: TerminationSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I } from "react";
|
|
3
|
+
import { useQueryClient as b } from "@tanstack/react-query";
|
|
4
|
+
import { useEmployeesGetSuspense as B } from "@gusto/embedded-api/react-query/employeesGet";
|
|
5
|
+
import { useEmployeeEmploymentsGetTerminationsSuspense as G, invalidateAllEmployeeEmploymentsGetTerminations as j } from "@gusto/embedded-api/react-query/employeeEmploymentsGetTerminations";
|
|
6
|
+
import { useEmployeeEmploymentsDeleteTerminationMutation as k } from "@gusto/embedded-api/react-query/employeeEmploymentsDeleteTermination";
|
|
7
|
+
import { invalidateAllEmployeesList as q } from "@gusto/embedded-api/react-query/employeesList";
|
|
8
|
+
import { TerminationSummaryPresentation as x } from "./TerminationSummaryPresentation.js";
|
|
9
|
+
import { normalizeToDate as F } from "../../../../helpers/dateFormatting.js";
|
|
10
|
+
import { BaseComponent as U } from "../../../Base/Base.js";
|
|
11
|
+
import { useBase as z } from "../../../Base/useBase.js";
|
|
12
|
+
import { componentEvents as o } from "../../../../shared/constants.js";
|
|
13
|
+
import { useComponentDictionary as H, useI18n as Q } from "../../../../i18n/I18n.js";
|
|
14
|
+
function ln(n) {
|
|
15
|
+
return /* @__PURE__ */ r(U, { ...n, children: /* @__PURE__ */ r(W, { ...n, children: n.children }) });
|
|
16
|
+
}
|
|
17
|
+
const W = ({
|
|
18
|
+
employeeId: n,
|
|
19
|
+
companyId: l,
|
|
20
|
+
payrollOption: i,
|
|
21
|
+
payrollUuid: C,
|
|
22
|
+
dictionary: D
|
|
23
|
+
}) => {
|
|
24
|
+
H("Employee.Terminations.TerminationSummary", D), Q("Employee.Terminations.TerminationSummary");
|
|
25
|
+
const m = b(), { onEvent: t, baseSubmitHandler: d } = z(), [T, a] = I(!1), {
|
|
26
|
+
data: { employee: s }
|
|
27
|
+
} = B({ employeeId: n }), { data: p } = G({ employeeId: n }), { mutateAsync: P, isPending: c } = k(), L = [s?.firstName, s?.lastName].filter(Boolean).join(" "), u = p.terminationList ?? [], e = u.find((Y) => Y.active) ?? u[0], f = e?.effectiveDate, R = e?.cancelable === !0, E = F(f), h = new Date((/* @__PURE__ */ new Date()).toDateString()), N = !s?.terminated && E ? E >= h : !1, y = i === "anotherWay", O = !y && (e?.runTerminationPayroll === !0 || i === "dismissalPayroll"), _ = i !== void 0, g = () => {
|
|
28
|
+
a(!0);
|
|
29
|
+
}, A = () => {
|
|
30
|
+
a(!1);
|
|
31
|
+
}, M = async () => {
|
|
32
|
+
e && await d({ terminationId: e.uuid }, async () => {
|
|
33
|
+
await P({
|
|
34
|
+
request: {
|
|
35
|
+
employeeId: n
|
|
36
|
+
}
|
|
37
|
+
}), await j(m), await q(m), a(!1), t(o.EMPLOYEE_TERMINATION_CANCELLED, {
|
|
38
|
+
employeeId: n,
|
|
39
|
+
termination: e
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}, S = () => {
|
|
43
|
+
t(o.EMPLOYEE_TERMINATION_EDIT, {
|
|
44
|
+
employeeId: n,
|
|
45
|
+
termination: e
|
|
46
|
+
});
|
|
47
|
+
}, v = () => {
|
|
48
|
+
t(o.EMPLOYEE_TERMINATION_RUN_PAYROLL, {
|
|
49
|
+
employeeId: n,
|
|
50
|
+
companyId: l,
|
|
51
|
+
payrollUuid: C,
|
|
52
|
+
termination: e
|
|
53
|
+
});
|
|
54
|
+
}, w = () => {
|
|
55
|
+
t(o.EMPLOYEE_TERMINATION_RUN_OFF_CYCLE_PAYROLL, {
|
|
56
|
+
employeeId: n,
|
|
57
|
+
companyId: l,
|
|
58
|
+
termination: e
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
return e ? /* @__PURE__ */ r(
|
|
62
|
+
x,
|
|
63
|
+
{
|
|
64
|
+
employeeName: L,
|
|
65
|
+
effectiveDate: f,
|
|
66
|
+
canCancel: R,
|
|
67
|
+
canEdit: N,
|
|
68
|
+
showRunPayroll: O,
|
|
69
|
+
showRunOffCyclePayroll: y,
|
|
70
|
+
showSuccessAlert: _,
|
|
71
|
+
onCancelClick: g,
|
|
72
|
+
onEditDismissal: S,
|
|
73
|
+
onRunDismissalPayroll: v,
|
|
74
|
+
onRunOffCyclePayroll: w,
|
|
75
|
+
isLoading: c,
|
|
76
|
+
isCancelDialogOpen: T,
|
|
77
|
+
onDialogClose: A,
|
|
78
|
+
onDialogConfirm: M,
|
|
79
|
+
isCancelling: c
|
|
80
|
+
}
|
|
81
|
+
) : null;
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
ln as TerminationSummary
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=TerminationSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TerminationSummary.js","sources":["../../../../../src/components/Employee/Terminations/TerminationSummary/TerminationSummary.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeeEmploymentsGetTerminationsSuspense,\n invalidateAllEmployeeEmploymentsGetTerminations,\n} from '@gusto/embedded-api/react-query/employeeEmploymentsGetTerminations'\nimport { useEmployeeEmploymentsDeleteTerminationMutation } from '@gusto/embedded-api/react-query/employeeEmploymentsDeleteTermination'\nimport { invalidateAllEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { PayrollOption } from '../types'\nimport { TerminationSummaryPresentation } from './TerminationSummaryPresentation'\nimport { normalizeToDate } from '@/helpers/dateFormatting'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\n\nexport interface TerminationSummaryProps extends BaseComponentInterface<'Employee.Terminations.TerminationSummary'> {\n employeeId: string\n companyId: string\n payrollOption?: PayrollOption\n payrollUuid?: string\n}\n\nexport function TerminationSummary(props: TerminationSummaryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n employeeId,\n companyId,\n payrollOption,\n payrollUuid,\n dictionary,\n}: TerminationSummaryProps) => {\n useComponentDictionary('Employee.Terminations.TerminationSummary', dictionary)\n useI18n('Employee.Terminations.TerminationSummary')\n\n const queryClient = useQueryClient()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [isCancelDialogOpen, setIsCancelDialogOpen] = useState(false)\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n const { data: terminationsData } = useEmployeeEmploymentsGetTerminationsSuspense({ employeeId })\n\n const { mutateAsync: deleteTermination, isPending: isDeleting } =\n useEmployeeEmploymentsDeleteTerminationMutation()\n\n const employeeName = [employee?.firstName, employee?.lastName].filter(Boolean).join(' ')\n\n const terminations = terminationsData.terminationList ?? []\n const termination = terminations.find(t => t.active) ?? terminations[0]\n\n const effectiveDate = termination?.effectiveDate\n const canCancel = termination?.cancelable === true\n const effectiveDateLocal = normalizeToDate(effectiveDate)\n const todayMidnight = new Date(new Date().toDateString())\n const canEdit =\n !employee?.terminated && effectiveDateLocal ? effectiveDateLocal >= todayMidnight : false\n\n const showRunOffCyclePayroll = payrollOption === 'anotherWay'\n const showRunPayroll =\n !showRunOffCyclePayroll &&\n (termination?.runTerminationPayroll === true || payrollOption === 'dismissalPayroll')\n\n // Only show success alert if payrollOption is provided (meaning we just completed the termination)\n // Don't show it if we're just viewing an existing termination (employee already terminated)\n const showSuccessAlert = payrollOption !== undefined\n\n const handleCancelClick = () => {\n setIsCancelDialogOpen(true)\n }\n\n const handleDialogClose = () => {\n setIsCancelDialogOpen(false)\n }\n\n const handleConfirmCancel = async () => {\n if (!termination) return\n\n await baseSubmitHandler({ terminationId: termination.uuid }, async () => {\n await deleteTermination({\n request: {\n employeeId,\n },\n })\n\n await invalidateAllEmployeeEmploymentsGetTerminations(queryClient)\n await invalidateAllEmployeesList(queryClient)\n\n setIsCancelDialogOpen(false)\n\n onEvent(componentEvents.EMPLOYEE_TERMINATION_CANCELLED, {\n employeeId,\n termination,\n })\n })\n }\n\n const handleEditDismissal = () => {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_EDIT, {\n employeeId,\n termination,\n })\n }\n\n const handleRunDismissalPayroll = () => {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_RUN_PAYROLL, {\n employeeId,\n companyId,\n payrollUuid,\n termination,\n })\n }\n\n const handleRunOffCyclePayroll = () => {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_RUN_OFF_CYCLE_PAYROLL, {\n employeeId,\n companyId,\n termination,\n })\n }\n\n if (!termination) {\n return null\n }\n\n return (\n <TerminationSummaryPresentation\n employeeName={employeeName}\n effectiveDate={effectiveDate}\n canCancel={canCancel}\n canEdit={canEdit}\n showRunPayroll={showRunPayroll}\n showRunOffCyclePayroll={showRunOffCyclePayroll}\n showSuccessAlert={showSuccessAlert}\n onCancelClick={handleCancelClick}\n onEditDismissal={handleEditDismissal}\n onRunDismissalPayroll={handleRunDismissalPayroll}\n onRunOffCyclePayroll={handleRunOffCyclePayroll}\n isLoading={isDeleting}\n isCancelDialogOpen={isCancelDialogOpen}\n onDialogClose={handleDialogClose}\n onDialogConfirm={handleConfirmCancel}\n isCancelling={isDeleting}\n />\n )\n}\n"],"names":["TerminationSummary","props","jsx","BaseComponent","Root","employeeId","companyId","payrollOption","payrollUuid","dictionary","useComponentDictionary","useI18n","queryClient","useQueryClient","onEvent","baseSubmitHandler","useBase","isCancelDialogOpen","setIsCancelDialogOpen","useState","employee","useEmployeesGetSuspense","terminationsData","useEmployeeEmploymentsGetTerminationsSuspense","deleteTermination","isDeleting","useEmployeeEmploymentsDeleteTerminationMutation","employeeName","terminations","termination","t","effectiveDate","canCancel","effectiveDateLocal","normalizeToDate","todayMidnight","canEdit","showRunOffCyclePayroll","showRunPayroll","showSuccessAlert","handleCancelClick","handleDialogClose","handleConfirmCancel","invalidateAllEmployeeEmploymentsGetTerminations","invalidateAllEmployeesList","componentEvents","handleEditDismissal","handleRunDismissalPayroll","handleRunOffCyclePayroll","TerminationSummaryPresentation"],"mappings":"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"}
|
package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface TerminationSummaryPresentationProps {
|
|
2
|
+
employeeName: string;
|
|
3
|
+
effectiveDate: string | undefined;
|
|
4
|
+
canCancel: boolean;
|
|
5
|
+
canEdit: boolean;
|
|
6
|
+
showRunPayroll: boolean;
|
|
7
|
+
showRunOffCyclePayroll: boolean;
|
|
8
|
+
showSuccessAlert: boolean;
|
|
9
|
+
onCancelClick: () => void;
|
|
10
|
+
onEditDismissal: () => void;
|
|
11
|
+
onRunDismissalPayroll: () => void;
|
|
12
|
+
onRunOffCyclePayroll: () => void;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
isCancelDialogOpen: boolean;
|
|
15
|
+
onDialogClose: () => void;
|
|
16
|
+
onDialogConfirm: () => void;
|
|
17
|
+
isCancelling: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function TerminationSummaryPresentation({ employeeName, effectiveDate, canCancel, canEdit, showRunPayroll, showRunOffCyclePayroll, showSuccessAlert, onCancelClick, onEditDismissal, onRunDismissalPayroll, onRunOffCyclePayroll, isLoading, isCancelDialogOpen, onDialogClose, onDialogConfirm, isCancelling, }: TerminationSummaryPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as I, Trans as O } from "react-i18next";
|
|
3
|
+
import { Flex as t } from "../../../Common/Flex/Flex.js";
|
|
4
|
+
import { ActionsLayout as W } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import { useComponentContext as q } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import { useDateFormatter as B } from "../../../../hooks/useDateFormatter.js";
|
|
7
|
+
import { useI18n as E } from "../../../../i18n/I18n.js";
|
|
8
|
+
function N({
|
|
9
|
+
employeeName: l,
|
|
10
|
+
effectiveDate: u,
|
|
11
|
+
canCancel: s,
|
|
12
|
+
canEdit: m,
|
|
13
|
+
showRunPayroll: d,
|
|
14
|
+
showRunOffCyclePayroll: f,
|
|
15
|
+
showSuccessAlert: h,
|
|
16
|
+
onCancelClick: D,
|
|
17
|
+
onEditDismissal: g,
|
|
18
|
+
onRunDismissalPayroll: y,
|
|
19
|
+
onRunOffCyclePayroll: b,
|
|
20
|
+
isLoading: a,
|
|
21
|
+
isCancelDialogOpen: x,
|
|
22
|
+
onDialogClose: A,
|
|
23
|
+
onDialogConfirm: T,
|
|
24
|
+
isCancelling: k
|
|
25
|
+
}) {
|
|
26
|
+
const { Alert: C, Heading: r, Text: o, Button: c, DescriptionList: v, Dialog: P, Link: L } = q(), { formatLongWithYear: F } = B();
|
|
27
|
+
E("Employee.Terminations.TerminationSummary");
|
|
28
|
+
const { t: i } = I("Employee.Terminations.TerminationSummary"), p = F(u) || "N/A", S = [
|
|
29
|
+
{
|
|
30
|
+
term: i("dates.today"),
|
|
31
|
+
description: i("dates.dismissed", { employeeName: l })
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
term: p,
|
|
35
|
+
description: i("dates.lastDayOfWork")
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
term: p,
|
|
39
|
+
description: i("dates.lastPayDay")
|
|
40
|
+
}
|
|
41
|
+
], j = s || m || d || f;
|
|
42
|
+
return /* @__PURE__ */ e(t, { flexDirection: "column", gap: 24, children: [
|
|
43
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 4, children: [
|
|
44
|
+
h && /* @__PURE__ */ n(C, { status: "success", label: i("alert.success.label", { employeeName: l }) }),
|
|
45
|
+
/* @__PURE__ */ n(r, { as: "h2", children: i("title") }),
|
|
46
|
+
/* @__PURE__ */ n(o, { variant: "supporting", children: i("subtitle") })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ n(v, { items: S }),
|
|
49
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 16, children: [
|
|
50
|
+
/* @__PURE__ */ n(r, { as: "h3", children: i("offboarding.title") }),
|
|
51
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 16, children: [
|
|
52
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 8, children: [
|
|
53
|
+
/* @__PURE__ */ n(r, { as: "h4", children: i("offboarding.runPayroll.title") }),
|
|
54
|
+
/* @__PURE__ */ n(o, { children: /* @__PURE__ */ n(
|
|
55
|
+
O,
|
|
56
|
+
{
|
|
57
|
+
i18nKey: "offboarding.runPayroll.description",
|
|
58
|
+
t: i,
|
|
59
|
+
components: {
|
|
60
|
+
StateRequirementsLink: /* @__PURE__ */ n(L, {})
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
) })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 8, children: [
|
|
66
|
+
/* @__PURE__ */ n(r, { as: "h4", children: i("offboarding.taxForms.title") }),
|
|
67
|
+
/* @__PURE__ */ n(o, { children: i("offboarding.taxForms.description") })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ e(t, { flexDirection: "column", gap: 8, children: [
|
|
70
|
+
/* @__PURE__ */ n(r, { as: "h4", children: i("offboarding.disconnectAccounts.title") }),
|
|
71
|
+
/* @__PURE__ */ n(o, { children: i("offboarding.disconnectAccounts.description") })
|
|
72
|
+
] })
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
j && /* @__PURE__ */ e(W, { children: [
|
|
76
|
+
s && /* @__PURE__ */ n(c, { variant: "error", onClick: D, isDisabled: a, children: i("actions.cancelTermination") }),
|
|
77
|
+
m && /* @__PURE__ */ n(c, { variant: "secondary", onClick: g, isDisabled: a, children: i("actions.editDismissal") }),
|
|
78
|
+
d && /* @__PURE__ */ n(c, { variant: "primary", onClick: y, isDisabled: a, children: i("actions.runDismissalPayroll") }),
|
|
79
|
+
f && /* @__PURE__ */ n(c, { variant: "primary", onClick: b, isDisabled: a, children: i("actions.runOffCyclePayroll") })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ n(
|
|
82
|
+
P,
|
|
83
|
+
{
|
|
84
|
+
isOpen: x,
|
|
85
|
+
onClose: A,
|
|
86
|
+
onPrimaryActionClick: T,
|
|
87
|
+
isDestructive: !0,
|
|
88
|
+
isPrimaryActionLoading: k,
|
|
89
|
+
primaryActionLabel: i("cancelDialog.confirm"),
|
|
90
|
+
closeActionLabel: i("cancelDialog.cancel"),
|
|
91
|
+
title: i("cancelDialog.title"),
|
|
92
|
+
children: /* @__PURE__ */ n(o, { children: i("cancelDialog.body") })
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
N as TerminationSummaryPresentation
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=TerminationSummaryPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TerminationSummaryPresentation.js","sources":["../../../../../src/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { useI18n } from '@/i18n'\n\ninterface TerminationSummaryPresentationProps {\n employeeName: string\n effectiveDate: string | undefined\n canCancel: boolean\n canEdit: boolean\n showRunPayroll: boolean\n showRunOffCyclePayroll: boolean\n showSuccessAlert: boolean\n onCancelClick: () => void\n onEditDismissal: () => void\n onRunDismissalPayroll: () => void\n onRunOffCyclePayroll: () => void\n isLoading: boolean\n isCancelDialogOpen: boolean\n onDialogClose: () => void\n onDialogConfirm: () => void\n isCancelling: boolean\n}\n\nexport function TerminationSummaryPresentation({\n employeeName,\n effectiveDate,\n canCancel,\n canEdit,\n showRunPayroll,\n showRunOffCyclePayroll,\n showSuccessAlert,\n onCancelClick,\n onEditDismissal,\n onRunDismissalPayroll,\n onRunOffCyclePayroll,\n isLoading,\n isCancelDialogOpen,\n onDialogClose,\n onDialogConfirm,\n isCancelling,\n}: TerminationSummaryPresentationProps) {\n const { Alert, Heading, Text, Button, DescriptionList, Dialog, Link } = useComponentContext()\n const { formatLongWithYear } = useDateFormatter()\n useI18n('Employee.Terminations.TerminationSummary')\n const { t } = useTranslation('Employee.Terminations.TerminationSummary')\n\n const formattedDate = formatLongWithYear(effectiveDate) || 'N/A'\n\n const dateItems = [\n {\n term: t('dates.today'),\n description: t('dates.dismissed', { employeeName }),\n },\n {\n term: formattedDate,\n description: t('dates.lastDayOfWork'),\n },\n {\n term: formattedDate,\n description: t('dates.lastPayDay'),\n },\n ]\n\n const hasActions = canCancel || canEdit || showRunPayroll || showRunOffCyclePayroll\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Flex flexDirection=\"column\" gap={4}>\n {showSuccessAlert && (\n <Alert status=\"success\" label={t('alert.success.label', { employeeName })} />\n )}\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">{t('subtitle')}</Text>\n </Flex>\n\n <DescriptionList items={dateItems} />\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h3\">{t('offboarding.title')}</Heading>\n\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h4\">{t('offboarding.runPayroll.title')}</Heading>\n <Text>\n <Trans\n i18nKey=\"offboarding.runPayroll.description\"\n t={t}\n components={{\n StateRequirementsLink: <Link />,\n }}\n />\n </Text>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h4\">{t('offboarding.taxForms.title')}</Heading>\n <Text>{t('offboarding.taxForms.description')}</Text>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h4\">{t('offboarding.disconnectAccounts.title')}</Heading>\n <Text>{t('offboarding.disconnectAccounts.description')}</Text>\n </Flex>\n </Flex>\n </Flex>\n\n {hasActions && (\n <ActionsLayout>\n {canCancel && (\n <Button variant=\"error\" onClick={onCancelClick} isDisabled={isLoading}>\n {t('actions.cancelTermination')}\n </Button>\n )}\n {canEdit && (\n <Button variant=\"secondary\" onClick={onEditDismissal} isDisabled={isLoading}>\n {t('actions.editDismissal')}\n </Button>\n )}\n {showRunPayroll && (\n <Button variant=\"primary\" onClick={onRunDismissalPayroll} isDisabled={isLoading}>\n {t('actions.runDismissalPayroll')}\n </Button>\n )}\n {showRunOffCyclePayroll && (\n <Button variant=\"primary\" onClick={onRunOffCyclePayroll} isDisabled={isLoading}>\n {t('actions.runOffCyclePayroll')}\n </Button>\n )}\n </ActionsLayout>\n )}\n\n <Dialog\n isOpen={isCancelDialogOpen}\n onClose={onDialogClose}\n onPrimaryActionClick={onDialogConfirm}\n isDestructive\n isPrimaryActionLoading={isCancelling}\n primaryActionLabel={t('cancelDialog.confirm')}\n closeActionLabel={t('cancelDialog.cancel')}\n title={t('cancelDialog.title')}\n >\n <Text>{t('cancelDialog.body')}</Text>\n </Dialog>\n </Flex>\n )\n}\n"],"names":["TerminationSummaryPresentation","employeeName","effectiveDate","canCancel","canEdit","showRunPayroll","showRunOffCyclePayroll","showSuccessAlert","onCancelClick","onEditDismissal","onRunDismissalPayroll","onRunOffCyclePayroll","isLoading","isCancelDialogOpen","onDialogClose","onDialogConfirm","isCancelling","Alert","Heading","Text","Button","DescriptionList","Dialog","Link","useComponentContext","formatLongWithYear","useDateFormatter","useI18n","t","useTranslation","formattedDate","dateItems","hasActions","jsxs","Flex","jsx","Trans","ActionsLayout"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { TerminateEmployee } from './TerminateEmployee/TerminateEmployee';
|
|
3
|
+
export type { TerminateEmployeeProps } from './TerminateEmployee/TerminateEmployee';
|
|
4
|
+
export { TerminationSummary } from './TerminationSummary/TerminationSummary';
|
|
5
|
+
export type { TerminationSummaryProps } from './TerminationSummary/TerminationSummary';
|
|
6
|
+
export { TerminationFlow } from './TerminationFlow/TerminationFlow';
|
|
7
|
+
export type { TerminationFlowProps } from './TerminationFlow/TerminationFlowComponents';
|
|
8
|
+
export type { PayrollOption } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PayrollOption = 'dismissalPayroll' | 'regularPayroll' | 'anotherWay';
|
|
@@ -14,4 +14,11 @@ export { SelfOnboardingFlow } from './SelfOnboardingFlow/SelfOnboardingFlow';
|
|
|
14
14
|
export { EmployeeDocuments } from './EmployeeDocuments';
|
|
15
15
|
export { EmploymentEligibility } from './DocumentSigner/EmploymentEligibility';
|
|
16
16
|
export type { EmploymentEligibilityProps } from './DocumentSigner/EmploymentEligibility';
|
|
17
|
+
export { TerminateEmployee } from './Terminations/TerminateEmployee/TerminateEmployee';
|
|
18
|
+
export type { TerminateEmployeeProps } from './Terminations/TerminateEmployee/TerminateEmployee';
|
|
19
|
+
export { TerminationSummary } from './Terminations/TerminationSummary/TerminationSummary';
|
|
20
|
+
export type { TerminationSummaryProps } from './Terminations/TerminationSummary/TerminationSummary';
|
|
21
|
+
export { TerminationFlow } from './Terminations/TerminationFlow/TerminationFlow';
|
|
22
|
+
export type { TerminationFlowProps } from './Terminations/TerminationFlow/TerminationFlowComponents';
|
|
23
|
+
export type { PayrollOption } from './Terminations/types';
|
|
17
24
|
export { Taxes } from './Taxes';
|
|
@@ -1,33 +1,39 @@
|
|
|
1
1
|
import { EmployeeList as e } from "./EmployeeList/EmployeeList.js";
|
|
2
|
-
import { OnboardingFlow as
|
|
3
|
-
import { SelfOnboardingFlow as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
2
|
+
import { OnboardingFlow as t } from "./OnboardingFlow/OnboardingFlow.js";
|
|
3
|
+
import { SelfOnboardingFlow as n } from "./SelfOnboardingFlow/SelfOnboardingFlow.js";
|
|
4
|
+
import { TerminateEmployee as f } from "./Terminations/TerminateEmployee/TerminateEmployee.js";
|
|
5
|
+
import { TerminationSummary as a } from "./Terminations/TerminationSummary/TerminationSummary.js";
|
|
6
|
+
import { TerminationFlow as y } from "./Terminations/TerminationFlow/TerminationFlow.js";
|
|
7
|
+
import { Compensation as s } from "./Compensation/Compensation.js";
|
|
8
|
+
import { Deductions as T } from "./Deductions/Deductions.js";
|
|
9
|
+
import { DocumentSigner as E } from "./DocumentSigner/DocumentSigner.js";
|
|
10
|
+
import { EmployeeDocuments as b } from "./EmployeeDocuments/EmployeeDocuments.js";
|
|
11
|
+
import { EmploymentEligibility as c } from "./DocumentSigner/EmploymentEligibility/EmploymentEligibility.js";
|
|
12
|
+
import { FederalTaxes as D } from "./FederalTaxes/FederalTaxes.js";
|
|
13
|
+
import { Landing as L } from "./Landing/Landing.js";
|
|
14
|
+
import { OnboardingSummary as h } from "./OnboardingSummary/OnboardingSummary.js";
|
|
15
|
+
import { PaymentMethod as M } from "./PaymentMethod/PaymentMethod.js";
|
|
16
|
+
import { Profile as k } from "./Profile/Profile.js";
|
|
17
|
+
import { StateTaxes as v } from "./StateTaxes/StateTaxes.js";
|
|
18
|
+
import { Taxes as A } from "./Taxes/Taxes.js";
|
|
16
19
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
s as Compensation,
|
|
21
|
+
T as Deductions,
|
|
22
|
+
E as DocumentSigner,
|
|
23
|
+
b as EmployeeDocuments,
|
|
21
24
|
e as EmployeeList,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
c as EmploymentEligibility,
|
|
26
|
+
D as FederalTaxes,
|
|
27
|
+
L as Landing,
|
|
28
|
+
t as OnboardingFlow,
|
|
29
|
+
h as OnboardingSummary,
|
|
30
|
+
M as PaymentMethod,
|
|
31
|
+
k as Profile,
|
|
32
|
+
n as SelfOnboardingFlow,
|
|
33
|
+
v as StateTaxes,
|
|
34
|
+
A as Taxes,
|
|
35
|
+
f as TerminateEmployee,
|
|
36
|
+
y as TerminationFlow,
|
|
37
|
+
a as TerminationSummary
|
|
32
38
|
};
|
|
33
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,43 +3,40 @@ import { useMachine as v } from "react-robot";
|
|
|
3
3
|
import { useTranslation as w } from "react-i18next";
|
|
4
4
|
import { FlowBreadcrumbs as F } from "../Common/FlowBreadcrumbs/FlowBreadcrumbs.js";
|
|
5
5
|
import { Flex as s, FlexItem as d } from "../Common/Flex/Flex.js";
|
|
6
|
-
import "
|
|
7
|
-
import "../../
|
|
8
|
-
|
|
9
|
-
import "react";
|
|
10
|
-
import { FlowContext as E } from "./useFlow.js";
|
|
11
|
-
const q = ({
|
|
6
|
+
import { FlowContext as j } from "./useFlow.js";
|
|
7
|
+
import { useComponentContext as E } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
const L = ({
|
|
12
9
|
onEvent: x,
|
|
13
10
|
machine: f
|
|
14
11
|
}) => {
|
|
15
|
-
const b =
|
|
16
|
-
onEvent:
|
|
12
|
+
const b = E(), { t: g } = w(), [r, h, c] = v(f, {
|
|
13
|
+
onEvent: a,
|
|
17
14
|
component: null,
|
|
18
15
|
progressBarCta: null
|
|
19
16
|
}), {
|
|
20
17
|
progressBarType: l = null,
|
|
21
|
-
totalSteps:
|
|
22
|
-
currentStep:
|
|
23
|
-
currentBreadcrumbId:
|
|
18
|
+
totalSteps: n = null,
|
|
19
|
+
currentStep: o = null,
|
|
20
|
+
currentBreadcrumbId: t,
|
|
24
21
|
breadcrumbs: B = {}
|
|
25
22
|
} = r.context;
|
|
26
|
-
function i
|
|
27
|
-
const p = { type:
|
|
28
|
-
c.child ? c.child.send(p) : C(p), x(
|
|
23
|
+
function a(i, m) {
|
|
24
|
+
const p = { type: i, payload: m }, C = h;
|
|
25
|
+
c.child ? c.child.send(p) : C(p), x(i, m);
|
|
29
26
|
}
|
|
30
27
|
return /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(
|
|
31
|
-
|
|
28
|
+
j.Provider,
|
|
32
29
|
{
|
|
33
30
|
value: {
|
|
34
31
|
...r.context
|
|
35
32
|
},
|
|
36
33
|
children: /* @__PURE__ */ u(s, { flexDirection: "column", gap: 32, children: [
|
|
37
|
-
l === "progress" &&
|
|
34
|
+
l === "progress" && o && n && /* @__PURE__ */ e(
|
|
38
35
|
b.ProgressBar,
|
|
39
36
|
{
|
|
40
|
-
totalSteps:
|
|
41
|
-
currentStep:
|
|
42
|
-
label: g("progressBarLabel", { totalSteps:
|
|
37
|
+
totalSteps: n,
|
|
38
|
+
currentStep: o,
|
|
39
|
+
label: g("progressBarLabel", { totalSteps: n, currentStep: o }),
|
|
43
40
|
cta: r.context.progressBarCta
|
|
44
41
|
}
|
|
45
42
|
),
|
|
@@ -47,9 +44,9 @@ const q = ({
|
|
|
47
44
|
/* @__PURE__ */ e(d, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
48
45
|
F,
|
|
49
46
|
{
|
|
50
|
-
breadcrumbs:
|
|
51
|
-
currentBreadcrumbId:
|
|
52
|
-
onEvent:
|
|
47
|
+
breadcrumbs: t ? B[t] ?? [] : [],
|
|
48
|
+
currentBreadcrumbId: t,
|
|
49
|
+
onEvent: a
|
|
53
50
|
}
|
|
54
51
|
) }),
|
|
55
52
|
/* @__PURE__ */ e(d, { children: r.context.progressBarCta && /* @__PURE__ */ e(r.context.progressBarCta, {}) })
|
|
@@ -60,6 +57,6 @@ const q = ({
|
|
|
60
57
|
) });
|
|
61
58
|
};
|
|
62
59
|
export {
|
|
63
|
-
|
|
60
|
+
L as Flow
|
|
64
61
|
};
|
|
65
62
|
//# sourceMappingURL=Flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":";;;;;;;AAiBO,MAAMA,IAAO,CAAkD;AAAA,EACpE,SAAAC;AAAA,EACA,SAAAC;AACF,MAAoB;AAClB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,CACjB,GAEK;AAAA,IACJ,iBAAAC,IAAkB;AAAA,IAClB,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,qBAAAC;AAAA,IACA,aAAAC,IAAc,CAAA;AAAA,EAAC,IACbT,EAAQ;AAEZ,WAASI,EAAYM,GAAiBC,GAAqB;AACzD,UAAMC,IAAQ,EAAE,MAAAF,GAAM,SAASC,EAAA,GACzBE,IAASZ;AAEf,IAAIC,EAAQ,QACRA,EAAQ,MAAM,KAA8BU,CAAK,IAEnDC,EAAOD,CAAK,GAGdlB,EAAQgB,GAAMC,CAAI;AAAA,EACpB;AAEA,2BACGG,GAAA,EACC,UAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGhB,EAAQ;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAiB,EAACH,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,QAAAT,MAAoB,cAAcE,KAAeD,KAChD,gBAAAS;AAAA,UAACnB,EAAW;AAAA,UAAX;AAAA,YACC,YAAAU;AAAA,YACA,aAAAC;AAAA,YACA,OAAOT,EAAE,oBAAoB,EAAE,YAAAQ,GAAY,aAAAC,GAAa;AAAA,YACxD,KAAKP,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGxBK,MAAoB,iBACnB,gBAAAY,EAACH,GAAA,EAAK,eAAc,OAAM,gBAAe,iBAAgB,YAAW,UAClE,UAAA;AAAA,UAAA,gBAAAC,EAACG,GAAA,EAAS,UAAU,GAClB,UAAA,gBAAAH;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,aAAaX,IAAuBC,EAAYD,CAAmB,KAAK,CAAA,IAAM,CAAA;AAAA,cAC9E,qBAAAA;AAAA,cACA,SAASJ;AAAA,YAAA;AAAA,UAAA,GAEb;AAAA,UACA,gBAAAW,EAACG,GAAA,EACE,UAAAlB,EAAQ,QAAQ,oCAAmBA,EAAQ,QAAQ,gBAAhB,CAAA,CAA+B,EAAA,CACrE;AAAA,QAAA,GACF;AAAA,QAEDA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js
CHANGED
|
@@ -13,15 +13,13 @@ import r from "./InformationRequestForm.module.scss.js";
|
|
|
13
13
|
import { BaseComponent as $ } from "../../Base/Base.js";
|
|
14
14
|
import { useBase as J } from "../../Base/useBase.js";
|
|
15
15
|
import { Flex as y } from "../../Common/Flex/Flex.js";
|
|
16
|
-
import "
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import "
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { useComponentDictionary as ne, useI18n as C } from "../../../i18n/I18n.js";
|
|
24
|
-
import { useFlow as te } from "../../Flow/useFlow.js";
|
|
16
|
+
import { FileInputField as X } from "../../Common/Fields/FileInputField/FileInputField.js";
|
|
17
|
+
import { Form as Z } from "../../Common/Form/Form.js";
|
|
18
|
+
import { useComponentContext as _ } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
19
|
+
import { useComponentDictionary as ee, useI18n as A } from "../../../i18n/I18n.js";
|
|
20
|
+
import { informationRequestEvents as C } from "../../../shared/constants.js";
|
|
21
|
+
import { useFlow as ne } from "../../Flow/useFlow.js";
|
|
22
|
+
import { TextInputField as te } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
25
23
|
const M = "gusto-sdk-information-request-form", oe = ["image/jpeg", "image/png", "application/pdf"], se = {
|
|
26
24
|
ALLOWED_TAGS: ["a", "b", "strong"],
|
|
27
25
|
ALLOWED_ATTR: ["target", "href", "rel"]
|
|
@@ -47,8 +45,8 @@ function ce(o) {
|
|
|
47
45
|
return o.some((s) => s.responseType === u.Persona);
|
|
48
46
|
}
|
|
49
47
|
function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
50
|
-
|
|
51
|
-
const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: T, Heading: q, Text: c } =
|
|
48
|
+
ee("InformationRequests.InformationRequestForm", i), A("InformationRequests.InformationRequestForm");
|
|
49
|
+
const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: T, Heading: q, Text: c } = _(), { onEvent: I, baseSubmitHandler: g } = J(), { data: x } = P({
|
|
52
50
|
companyUuid: o
|
|
53
51
|
}), l = x.informationRequestList?.find((t) => t.uuid === s), a = l?.requiredQuestions ?? [], F = l?.blockingPayroll ?? !1, w = O(a), E = ce(a), { mutateAsync: L } = V(), v = {}, U = [];
|
|
54
52
|
a.forEach((t) => {
|
|
@@ -87,7 +85,7 @@ function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
});
|
|
90
|
-
I(
|
|
88
|
+
I(C.INFORMATION_REQUEST_FORM_DONE, b.informationRequest);
|
|
91
89
|
});
|
|
92
90
|
}, k = (t) => {
|
|
93
91
|
if (!t.questionUuid || !t.responseType) return null;
|
|
@@ -106,7 +104,7 @@ function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
|
106
104
|
] }),
|
|
107
105
|
/* @__PURE__ */ e("hr", { className: r.divider }),
|
|
108
106
|
b && /* @__PURE__ */ e("div", { className: r.textInputWrapper, children: /* @__PURE__ */ e(
|
|
109
|
-
|
|
107
|
+
te,
|
|
110
108
|
{
|
|
111
109
|
name: R,
|
|
112
110
|
label: n("fields.textAnswer.label"),
|
|
@@ -116,7 +114,7 @@ function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
|
116
114
|
}
|
|
117
115
|
) }),
|
|
118
116
|
h && /* @__PURE__ */ e("div", { className: r.fileInputWrapper, children: /* @__PURE__ */ e(
|
|
119
|
-
|
|
117
|
+
X,
|
|
120
118
|
{
|
|
121
119
|
name: R,
|
|
122
120
|
label: n("fields.fileUpload.label"),
|
|
@@ -139,19 +137,19 @@ function me({ companyId: o, requestId: s, dictionary: i }) {
|
|
|
139
137
|
return /* @__PURE__ */ e("div", { className: r.root, children: /* @__PURE__ */ m(y, { flexDirection: "column", gap: 16, children: [
|
|
140
138
|
/* @__PURE__ */ e(q, { as: "h2", children: n("title") }),
|
|
141
139
|
F && /* @__PURE__ */ e(T, { status: "error", label: n("blockingAlert.title"), disableScrollIntoView: !0, children: n("blockingAlert.description") }),
|
|
142
|
-
w ? j : /* @__PURE__ */ e(H, { ...N, children: /* @__PURE__ */ e(
|
|
140
|
+
w ? j : /* @__PURE__ */ e(H, { ...N, children: /* @__PURE__ */ e(Z, { id: M, onSubmit: N.handleSubmit(Q), children: /* @__PURE__ */ e(y, { flexDirection: "column", gap: 16, children: a.map(k) }) }) })
|
|
143
141
|
] }) });
|
|
144
142
|
}
|
|
145
143
|
const le = ({ onEvent: o }) => {
|
|
146
|
-
|
|
147
|
-
const { t: s } = D("InformationRequests.InformationRequestForm"), { Button: i } =
|
|
144
|
+
A("InformationRequests.InformationRequestForm");
|
|
145
|
+
const { t: s } = D("InformationRequests.InformationRequestForm"), { Button: i } = _(), { companyId: n, selectedRequestId: T } = ne(), { data: q } = P({
|
|
148
146
|
companyUuid: n
|
|
149
147
|
}), I = q.informationRequestList?.find(
|
|
150
148
|
(F) => F.uuid === T
|
|
151
149
|
)?.requiredQuestions ?? [], g = O(I), l = K({
|
|
152
150
|
mutationKey: Y()
|
|
153
151
|
}) > 0, a = () => {
|
|
154
|
-
o(
|
|
152
|
+
o(C.INFORMATION_REQUEST_FORM_CANCEL);
|
|
155
153
|
};
|
|
156
154
|
return g ? /* @__PURE__ */ e(y, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(i, { variant: "secondary", onClick: a, children: s("cta.close") }) }) : /* @__PURE__ */ m(y, { justifyContent: "flex-end", gap: 12, children: [
|
|
157
155
|
/* @__PURE__ */ e(i, { variant: "secondary", onClick: a, isDisabled: l, children: s("cta.cancel") }),
|