@gusto/embedded-react-sdk 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/README.md +32 -17
- package/dist/UNSTABLE_Hooks.d.ts +1 -0
- package/dist/UNSTABLE_Hooks.js +9 -0
- package/dist/UNSTABLE_Hooks.js.map +1 -0
- package/dist/assets/icons/coins-hand.svg.js +10 -0
- package/dist/assets/icons/coins-hand.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-outline.svg.js +10 -0
- package/dist/assets/icons/icon-file-outline.svg.js.map +1 -0
- package/dist/assets/icons/icon-receipt-outline.svg.js +10 -0
- package/dist/assets/icons/icon-receipt-outline.svg.js.map +1 -0
- package/dist/components/Base/Base.d.ts +19 -4
- package/dist/components/Base/Base.js +67 -61
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Base/useBase.d.ts +1 -1
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +10 -0
- package/dist/components/Base/useBaseSubmit.js +33 -0
- package/dist/components/Base/useBaseSubmit.js.map +1 -0
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
- package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +14 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -0
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +1 -0
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -2
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +8 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -11
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +23 -22
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
- package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +7 -7
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.d.ts +1 -1
- package/dist/components/Common/UI/Select/Select.js +27 -26
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
- package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
- package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -5
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +11 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +6 -4
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +4 -2
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +9 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +7 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +6 -4
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -8
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +16 -15
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -2
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +10 -9
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +8 -6
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +3 -2
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +8 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +5 -3
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +11 -9
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +4 -4
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +7 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +48 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +14 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +109 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.d.ts +7 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.js +34 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.js.map +1 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.d.ts +6 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js +84 -0
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/Overview/Overview.d.ts +7 -0
- package/dist/components/Contractor/Payments/Overview/Overview.js +72 -0
- package/dist/components/Contractor/Payments/Overview/Overview.js.map +1 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js +131 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +26 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +15 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +30 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/index.d.ts +3 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +158 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +7 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +29 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +108 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +10 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/types.d.ts +4 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +26 -26
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -19
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/index.d.ts +1 -0
- package/dist/components/Contractor/index.js +4 -2
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +14 -13
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/Deductions.js +10 -10
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +220 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +163 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +121 -125
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +56 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +158 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +55 -55
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +54 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.js +49 -29
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +4 -2
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +8 -6
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -2
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +6 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +14 -14
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +22 -7
- package/dist/components/Employee/FederalTaxes/FederalForm.js +85 -29
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +62 -46
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +3 -2
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -3
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +5 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +9 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +9 -8
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +26 -23
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +10 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.d.ts +22 -7
- package/dist/components/Employee/Taxes/FederalForm.js +85 -29
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +97 -81
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +14 -13
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +63 -34
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js +8 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +152 -23
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +194 -22
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +44 -30
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +7 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +15 -15
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +32 -40
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +104 -101
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +77 -69
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +127 -103
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +254 -185
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
- package/dist/components/Payroll/helpers.d.ts +0 -5
- package/dist/components/Payroll/helpers.js +106 -112
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +7 -5
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +9 -0
- package/dist/helpers/dateFormatting.js +65 -52
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/I18n.js +3 -3
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +34 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.EditPayment.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.EditPayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.Overview.json.js +34 -0
- package/dist/i18n/en/Contractor.Payments.Overview.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +34 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
- package/dist/i18n/en/Employee.Deductions.json.js +58 -46
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +49 -41
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +53 -45
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.Common.json.js +8 -0
- package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +34 -30
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/shared/constants.d.ts +18 -0
- package/dist/shared/constants.js +66 -55
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +236 -15
- package/package.json +19 -15
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
- package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -49
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
|
@@ -3,16 +3,16 @@ import { useTranslation as A } from "react-i18next";
|
|
|
3
3
|
import { useState as T } from "react";
|
|
4
4
|
import B from "./List.module.scss.js";
|
|
5
5
|
import { useEmployeeList as M } from "./useEmployeeList.js";
|
|
6
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as y } from "../../../shared/constants.js";
|
|
6
7
|
import "classnames";
|
|
7
|
-
import { EmptyData as
|
|
8
|
+
import { EmptyData as G } from "../../Common/EmptyData/EmptyData.js";
|
|
8
9
|
import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
10
|
+
import { HamburgerMenu as R } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
11
|
+
import { useComponentContext as F } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { EmployeeOnboardingStatusBadge as x } from "../../Common/OnboardingStatusBadge/index.js";
|
|
11
13
|
import s from "../../../assets/icons/pencil.svg.js";
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import { firstLastName as V } from "../../../helpers/formattedStrings.js";
|
|
15
|
-
import { HamburgerMenu as j } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
14
|
+
import V from "../../../assets/icons/trashcan.svg.js";
|
|
15
|
+
import { firstLastName as j } from "../../../helpers/formattedStrings.js";
|
|
16
16
|
import { useDataView as W } from "../../Common/DataView/useDataView.js";
|
|
17
17
|
import { DataView as Y } from "../../Common/DataView/DataView.js";
|
|
18
18
|
const st = () => {
|
|
@@ -33,13 +33,13 @@ const st = () => {
|
|
|
33
33
|
itemsPerPage: D,
|
|
34
34
|
handleSkip: I,
|
|
35
35
|
isFetching: _
|
|
36
|
-
} = M(), r =
|
|
36
|
+
} = M(), r = F(), { t: a } = A("Employee.EmployeeList"), [v, u] = T(/* @__PURE__ */ new Set()), { ...k } = W({
|
|
37
37
|
data: d,
|
|
38
38
|
columns: [
|
|
39
39
|
{
|
|
40
40
|
key: "name",
|
|
41
41
|
title: a("nameLabel"),
|
|
42
|
-
render: (t) =>
|
|
42
|
+
render: (t) => j({
|
|
43
43
|
first_name: t.firstName,
|
|
44
44
|
last_name: t.lastName
|
|
45
45
|
})
|
|
@@ -48,7 +48,7 @@ const st = () => {
|
|
|
48
48
|
key: "status",
|
|
49
49
|
title: a("statusLabel"),
|
|
50
50
|
render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ e(
|
|
51
|
-
|
|
51
|
+
x,
|
|
52
52
|
{
|
|
53
53
|
onboarded: t,
|
|
54
54
|
onboardingStatus: n
|
|
@@ -64,7 +64,7 @@ const st = () => {
|
|
|
64
64
|
p(t.uuid, t.onboardingStatus ?? void 0);
|
|
65
65
|
},
|
|
66
66
|
icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
|
|
67
|
-
}),
|
|
67
|
+
}), y.has(t.onboardingStatus ?? "") && n.push({
|
|
68
68
|
label: a("cancelSelfOnboardingCta"),
|
|
69
69
|
onClick: async () => {
|
|
70
70
|
await b(t.uuid);
|
|
@@ -86,9 +86,9 @@ const st = () => {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
},
|
|
89
|
-
icon: /* @__PURE__ */ e(
|
|
89
|
+
icon: /* @__PURE__ */ e(V, { "aria-hidden": !0 })
|
|
90
90
|
}), /* @__PURE__ */ e(
|
|
91
|
-
|
|
91
|
+
R,
|
|
92
92
|
{
|
|
93
93
|
items: n,
|
|
94
94
|
triggerLabel: a("hamburgerTitle"),
|
|
@@ -107,7 +107,7 @@ const st = () => {
|
|
|
107
107
|
totalPages: P,
|
|
108
108
|
itemsPerPage: D
|
|
109
109
|
},
|
|
110
|
-
emptyState: () => /* @__PURE__ */ e(
|
|
110
|
+
emptyState: () => /* @__PURE__ */ e(G, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
|
|
111
111
|
/* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: I, children: a("skipCta") }),
|
|
112
112
|
/* @__PURE__ */ e(r.Button, { variant: "primary", onClick: l, children: a("addEmployeeCta") })
|
|
113
113
|
] }) })
|
|
@@ -4,7 +4,6 @@ import "react-error-boundary";
|
|
|
4
4
|
import "react-i18next";
|
|
5
5
|
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
6
|
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
7
|
import "@tanstack/react-query";
|
|
9
8
|
import "../../Base/useBase.js";
|
|
10
9
|
import "../../../shared/constants.js";
|
|
@@ -12,9 +11,9 @@ import "classnames";
|
|
|
12
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
12
|
import "dompurify";
|
|
14
13
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
14
|
+
const [L, c] = o("EmployeeListContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
c as EmployeeListProvider,
|
|
17
|
+
L as useEmployeeList
|
|
19
18
|
};
|
|
20
19
|
//# sourceMappingURL=useEmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAyBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
2
|
+
import { useTranslation as e } from "react-i18next";
|
|
3
3
|
import { useFederalTaxes as i } from "./useFederalTaxes.js";
|
|
4
|
+
import "../../../shared/constants.js";
|
|
4
5
|
import "classnames";
|
|
5
|
-
import { ActionsLayout as
|
|
6
|
-
import { useComponentContext as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import "react";
|
|
9
|
+
function C() {
|
|
10
|
+
const { t } = e("Employee.FederalTaxes"), { isPending: n } = i(), r = s();
|
|
11
|
+
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(r.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
|
|
10
12
|
}
|
|
11
13
|
export {
|
|
12
|
-
|
|
14
|
+
C as Actions
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
|
|
@@ -1,29 +1,44 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const FederalFormSchema: z.ZodObject<{
|
|
2
|
+
export declare const FederalFormSchema: z.ZodDiscriminatedUnion<"w4DataType", [z.ZodObject<{
|
|
3
|
+
w4DataType: z.ZodLiteral<"rev_2020_w4">;
|
|
3
4
|
filingStatus: z.ZodString;
|
|
4
5
|
twoJobs: z.ZodString;
|
|
5
6
|
dependentsAmount: z.ZodEffects<z.ZodNumber, string, number>;
|
|
6
7
|
otherIncome: z.ZodEffects<z.ZodNumber, string, number>;
|
|
7
8
|
deductions: z.ZodEffects<z.ZodNumber, string, number>;
|
|
8
9
|
extraWithholding: z.ZodEffects<z.ZodNumber, string, number>;
|
|
9
|
-
w4DataType: z.ZodEnum<["pre_2020_w4", "rev_2020_w4"]>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
deductions: string;
|
|
12
12
|
extraWithholding: string;
|
|
13
|
-
otherIncome: string;
|
|
14
13
|
filingStatus: string;
|
|
14
|
+
otherIncome: string;
|
|
15
|
+
w4DataType: "rev_2020_w4";
|
|
15
16
|
twoJobs: string;
|
|
16
17
|
dependentsAmount: string;
|
|
17
|
-
w4DataType: "pre_2020_w4" | "rev_2020_w4";
|
|
18
18
|
}, {
|
|
19
19
|
deductions: number;
|
|
20
20
|
extraWithholding: number;
|
|
21
|
-
otherIncome: number;
|
|
22
21
|
filingStatus: string;
|
|
22
|
+
otherIncome: number;
|
|
23
|
+
w4DataType: "rev_2020_w4";
|
|
23
24
|
twoJobs: string;
|
|
24
25
|
dependentsAmount: number;
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
}>, z.ZodObject<{
|
|
27
|
+
w4DataType: z.ZodLiteral<"pre_2020_w4">;
|
|
28
|
+
filingStatus: z.ZodString;
|
|
29
|
+
federalWithholdingAllowance: z.ZodNumber;
|
|
30
|
+
additionalWithholding: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
additionalWithholding: string;
|
|
33
|
+
federalWithholdingAllowance: number;
|
|
34
|
+
filingStatus: string;
|
|
35
|
+
w4DataType: "pre_2020_w4";
|
|
36
|
+
}, {
|
|
37
|
+
additionalWithholding: string;
|
|
38
|
+
federalWithholdingAllowance: number;
|
|
39
|
+
filingStatus: string;
|
|
40
|
+
w4DataType: "pre_2020_w4";
|
|
41
|
+
}>]>;
|
|
27
42
|
export type FederalFormInputs = z.input<typeof FederalFormSchema>;
|
|
28
43
|
export type FederalFormPayload = z.output<typeof FederalFormSchema>;
|
|
29
44
|
export declare function FederalForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,54 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as t, jsxs as n, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as o, Trans as u } from "react-i18next";
|
|
3
|
+
import { useFormContext as m } from "react-hook-form";
|
|
3
4
|
import { z as i } from "zod";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
4
6
|
import "classnames";
|
|
5
|
-
import { useComponentContext as
|
|
6
|
-
import
|
|
7
|
+
import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import { SelectField as s } from "../../Common/Fields/SelectField/SelectField.js";
|
|
7
10
|
import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
8
|
-
import { NumberInputField as
|
|
9
|
-
|
|
11
|
+
import { NumberInputField as r } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
12
|
+
import { TextInputField as c } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
13
|
+
const p = i.object({
|
|
14
|
+
w4DataType: i.literal("rev_2020_w4"),
|
|
10
15
|
filingStatus: i.string().min(1),
|
|
11
16
|
twoJobs: i.string().min(1),
|
|
12
17
|
dependentsAmount: i.number().transform(String),
|
|
13
18
|
otherIncome: i.number().transform(String),
|
|
14
19
|
deductions: i.number().transform(String),
|
|
15
|
-
extraWithholding: i.number().transform(String)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
extraWithholding: i.number().transform(String)
|
|
21
|
+
}), h = i.object({
|
|
22
|
+
w4DataType: i.literal("pre_2020_w4"),
|
|
23
|
+
filingStatus: i.string().min(1),
|
|
24
|
+
federalWithholdingAllowance: i.number().int(),
|
|
25
|
+
additionalWithholding: i.string()
|
|
26
|
+
}), H = i.discriminatedUnion("w4DataType", [p, h]);
|
|
27
|
+
function A() {
|
|
28
|
+
const { watch: e } = m();
|
|
29
|
+
return e("w4DataType") === "rev_2020_w4" ? /* @__PURE__ */ t(b, {}) : /* @__PURE__ */ t(S, {});
|
|
30
|
+
}
|
|
31
|
+
function b() {
|
|
32
|
+
const { t: e } = o("Employee.FederalTaxes"), l = g(), d = [
|
|
20
33
|
{ value: "Single", label: e("filingStatusSingle") },
|
|
21
34
|
{ value: "Married", label: e("filingStatusMarried") },
|
|
22
35
|
{ value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
|
|
23
36
|
{ value: "Exempt from withholding", label: e("filingStatusExemptFromWithholding") }
|
|
24
37
|
];
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
38
|
+
return /* @__PURE__ */ n(a, { children: [
|
|
39
|
+
/* @__PURE__ */ t(
|
|
40
|
+
s,
|
|
28
41
|
{
|
|
29
42
|
name: "filingStatus",
|
|
30
43
|
label: e("federalFilingStatus1c"),
|
|
31
|
-
placeholder: e("
|
|
44
|
+
placeholder: e("federalFilingStatusPlaceholder"),
|
|
32
45
|
description: e("selectWithholdingDescription"),
|
|
33
|
-
options:
|
|
46
|
+
options: d,
|
|
34
47
|
isRequired: !0,
|
|
35
48
|
errorMessage: e("validations.federalFilingStatus")
|
|
36
49
|
}
|
|
37
50
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ t(
|
|
39
52
|
f,
|
|
40
53
|
{
|
|
41
54
|
name: "twoJobs",
|
|
42
55
|
isRequired: !0,
|
|
43
56
|
label: e("multipleJobs2c"),
|
|
44
57
|
errorMessage: e("validations.federalTwoJobs"),
|
|
45
|
-
description: /* @__PURE__ */
|
|
58
|
+
description: /* @__PURE__ */ t(
|
|
46
59
|
u,
|
|
47
60
|
{
|
|
48
61
|
i18nKey: "includesSpouseExplanation",
|
|
49
62
|
t: e,
|
|
50
63
|
components: {
|
|
51
|
-
IrsLink: /* @__PURE__ */
|
|
64
|
+
IrsLink: /* @__PURE__ */ t(l.Link, {})
|
|
52
65
|
}
|
|
53
66
|
}
|
|
54
67
|
),
|
|
@@ -58,8 +71,8 @@ function q() {
|
|
|
58
71
|
]
|
|
59
72
|
}
|
|
60
73
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
|
+
r,
|
|
63
76
|
{
|
|
64
77
|
name: "dependentsAmount",
|
|
65
78
|
isRequired: !0,
|
|
@@ -67,8 +80,8 @@ function q() {
|
|
|
67
80
|
errorMessage: e("fieldIsRequired")
|
|
68
81
|
}
|
|
69
82
|
),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
|
|
83
|
+
/* @__PURE__ */ t(
|
|
84
|
+
r,
|
|
72
85
|
{
|
|
73
86
|
name: "otherIncome",
|
|
74
87
|
isRequired: !0,
|
|
@@ -78,8 +91,8 @@ function q() {
|
|
|
78
91
|
errorMessage: e("fieldIsRequired")
|
|
79
92
|
}
|
|
80
93
|
),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
94
|
+
/* @__PURE__ */ t(
|
|
95
|
+
r,
|
|
83
96
|
{
|
|
84
97
|
name: "deductions",
|
|
85
98
|
isRequired: !0,
|
|
@@ -89,8 +102,8 @@ function q() {
|
|
|
89
102
|
errorMessage: e("fieldIsRequired")
|
|
90
103
|
}
|
|
91
104
|
),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
|
|
105
|
+
/* @__PURE__ */ t(
|
|
106
|
+
r,
|
|
94
107
|
{
|
|
95
108
|
name: "extraWithholding",
|
|
96
109
|
isRequired: !0,
|
|
@@ -102,8 +115,51 @@ function q() {
|
|
|
102
115
|
)
|
|
103
116
|
] });
|
|
104
117
|
}
|
|
118
|
+
function S() {
|
|
119
|
+
const { t: e } = o("Employee.FederalTaxes"), l = [
|
|
120
|
+
{ value: "Single", label: e("filingStatusSingle") },
|
|
121
|
+
{ value: "Married", label: e("filingStatusMarried") },
|
|
122
|
+
{ value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
|
|
123
|
+
{ value: "Exempt from withholding", label: e("filingStatusExemptFromWithholding") },
|
|
124
|
+
{ value: "Married, but withhold as Single", label: e("filingStatusMarriedWithholdAsSingle") }
|
|
125
|
+
];
|
|
126
|
+
return /* @__PURE__ */ n(a, { children: [
|
|
127
|
+
/* @__PURE__ */ t(
|
|
128
|
+
r,
|
|
129
|
+
{
|
|
130
|
+
name: "federalWithholdingAllowance",
|
|
131
|
+
isRequired: !0,
|
|
132
|
+
label: e("federalWithholdingAllowance"),
|
|
133
|
+
min: 0,
|
|
134
|
+
maximumFractionDigits: 0,
|
|
135
|
+
errorMessage: e("fieldIsRequired")
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ t(
|
|
139
|
+
s,
|
|
140
|
+
{
|
|
141
|
+
name: "filingStatus",
|
|
142
|
+
label: e("filingStatus"),
|
|
143
|
+
placeholder: e("federalFilingStatusPlaceholder"),
|
|
144
|
+
description: e("selectWithholdingDescription"),
|
|
145
|
+
options: l,
|
|
146
|
+
isRequired: !0,
|
|
147
|
+
errorMessage: e("validations.federalFilingStatus")
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ t(
|
|
151
|
+
c,
|
|
152
|
+
{
|
|
153
|
+
name: "additionalWithholding",
|
|
154
|
+
label: e("additionalWithholding"),
|
|
155
|
+
type: "number",
|
|
156
|
+
errorMessage: e("fieldIsRequired")
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
105
161
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
162
|
+
A as FederalForm,
|
|
163
|
+
H as FederalFormSchema
|
|
108
164
|
};
|
|
109
165
|
//# sourceMappingURL=FederalForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\
|
|
1
|
+
{"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useFormContext } from 'react-hook-form'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n w4DataType: z.literal('rev_2020_w4'),\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n})\n\nconst Pre2020Schema = z.object({\n w4DataType: z.literal('pre_2020_w4'),\n filingStatus: z.string().min(1),\n federalWithholdingAllowance: z.number().int(),\n additionalWithholding: z.string(),\n})\n\nexport const FederalFormSchema = z.discriminatedUnion('w4DataType', [Rev2020Schema, Pre2020Schema])\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { watch } = useFormContext<FederalFormInputs>()\n const w4DataType = watch('w4DataType')\n\n if (w4DataType === 'rev_2020_w4') {\n return <Rev2020Form />\n }\n\n return <Pre2020Form />\n}\n\nfunction Rev2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n\nfunction Pre2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n { value: 'Married, but withhold as Single', label: t('filingStatusMarriedWithholdAsSingle') },\n ]\n\n return (\n <>\n <NumberInputField\n name=\"federalWithholdingAllowance\"\n isRequired\n label={t('federalWithholdingAllowance')}\n min={0}\n maximumFractionDigits={0}\n errorMessage={t('fieldIsRequired')}\n />\n <SelectField\n name=\"filingStatus\"\n label={t('filingStatus')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <TextInputField\n name=\"additionalWithholding\"\n label={t('additionalWithholding')}\n type=\"number\"\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","Pre2020Schema","FederalFormSchema","FederalForm","watch","useFormContext","Rev2020Form","Pre2020Form","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField","TextInputField"],"mappings":";;;;;;;;;;;;AAMA,MAAMA,IAAgBC,EAAE,OAAO;AAAA,EAC7B,YAAYA,EAAE,QAAQ,aAAa;AAAA,EACnC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAA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2
|
-
import { zodResolver as
|
|
3
|
-
import { useForm as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { useEmployeeTaxSetupGetFederalTaxesSuspense as
|
|
6
|
-
import { useEmployeeTaxSetupUpdateFederalTaxesMutation as
|
|
7
|
-
import { FederalFormSchema as
|
|
8
|
-
import { Head as
|
|
9
|
-
import { Actions as
|
|
1
|
+
import { jsx as o, jsxs as S, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver as A } from "@hookform/resolvers/zod";
|
|
3
|
+
import { useForm as y, FormProvider as D } from "react-hook-form";
|
|
4
|
+
import { useEffect as _ } from "react";
|
|
5
|
+
import { useEmployeeTaxSetupGetFederalTaxesSuspense as b } from "@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes";
|
|
6
|
+
import { useEmployeeTaxSetupUpdateFederalTaxesMutation as W } from "@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes";
|
|
7
|
+
import { FederalFormSchema as I, FederalForm as R } from "./FederalForm.js";
|
|
8
|
+
import { Head as N } from "./Head.js";
|
|
9
|
+
import { Actions as P } from "./Actions.js";
|
|
10
10
|
import { FederalTaxesProvider as J } from "./useFederalTaxes.js";
|
|
11
11
|
import { BaseComponent as L } from "../../Base/Base.js";
|
|
12
12
|
import { useBase as M } from "../../Base/useBase.js";
|
|
13
13
|
import { useI18n as U, useComponentDictionary as B } from "../../../i18n/I18n.js";
|
|
14
14
|
import { componentEvents as u } from "../../../shared/constants.js";
|
|
15
|
-
import { Form as
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ o(L, { ...r, children: /* @__PURE__ */ o(
|
|
15
|
+
import { Form as q } from "../../Common/Form/Form.js";
|
|
16
|
+
function ne(r) {
|
|
17
|
+
return /* @__PURE__ */ o(L, { ...r, children: /* @__PURE__ */ o(C, { ...r }) });
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
const { employeeId:
|
|
21
|
-
U("Employee.FederalTaxes"), B("Employee.FederalTaxes",
|
|
22
|
-
const { data:
|
|
23
|
-
employeeUuid:
|
|
24
|
-
}), e =
|
|
25
|
-
|
|
19
|
+
const C = (r) => {
|
|
20
|
+
const { employeeId: s, className: c, children: a, dictionary: h } = r, { onEvent: m, fieldErrors: n, baseSubmitHandler: f } = M();
|
|
21
|
+
U("Employee.FederalTaxes"), B("Employee.FederalTaxes", h);
|
|
22
|
+
const { data: p } = b({
|
|
23
|
+
employeeUuid: s
|
|
24
|
+
}), e = p.employeeFederalTax, { mutateAsync: g, isPending: E } = W(), T = e.w4DataType === "rev_2020_w4" ? {
|
|
25
|
+
w4DataType: "rev_2020_w4",
|
|
26
|
+
filingStatus: e.filingStatus ?? "",
|
|
26
27
|
twoJobs: e.twoJobs ? "true" : "false",
|
|
27
28
|
deductions: e.deductions ? Number(e.deductions) : 0,
|
|
28
29
|
dependentsAmount: e.dependentsAmount ? Number(e.dependentsAmount) : 0,
|
|
29
30
|
otherIncome: e.otherIncome ? Number(e.otherIncome) : 0,
|
|
30
|
-
extraWithholding: e.extraWithholding ? Number(e.extraWithholding) : 0
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
extraWithholding: e.extraWithholding ? Number(e.extraWithholding) : 0
|
|
32
|
+
} : {
|
|
33
|
+
w4DataType: "pre_2020_w4",
|
|
34
|
+
filingStatus: e.filingStatus ?? "",
|
|
35
|
+
federalWithholdingAllowance: e.federalWithholdingAllowance ?? 0,
|
|
36
|
+
additionalWithholding: e.additionalWithholding
|
|
37
|
+
}, d = y({
|
|
38
|
+
resolver: A(I),
|
|
39
|
+
defaultValues: T
|
|
40
|
+
}), { handleSubmit: w, setError: l } = d;
|
|
41
|
+
return _(() => {
|
|
42
|
+
n && n.length > 0 && n.forEach((i) => {
|
|
43
|
+
const t = i.errorKey.replace(".value", "");
|
|
44
|
+
l(t, { type: "custom", message: i.message });
|
|
40
45
|
});
|
|
41
|
-
}, [
|
|
46
|
+
}, [n, l]), /* @__PURE__ */ o("section", { className: c, children: /* @__PURE__ */ o(
|
|
42
47
|
J,
|
|
43
48
|
{
|
|
44
49
|
value: {
|
|
45
|
-
isPending:
|
|
50
|
+
isPending: E
|
|
46
51
|
},
|
|
47
|
-
children: /* @__PURE__ */ o(
|
|
48
|
-
await f(
|
|
49
|
-
const
|
|
52
|
+
children: /* @__PURE__ */ o(D, { ...d, children: /* @__PURE__ */ o(q, { onSubmit: w(async (i) => {
|
|
53
|
+
await f(i, async (t) => {
|
|
54
|
+
const x = t.w4DataType === "rev_2020_w4" ? {
|
|
55
|
+
filingStatus: t.filingStatus,
|
|
56
|
+
twoJobs: t.twoJobs === "true",
|
|
57
|
+
dependentsAmount: t.dependentsAmount,
|
|
58
|
+
otherIncome: t.otherIncome,
|
|
59
|
+
deductions: t.deductions,
|
|
60
|
+
extraWithholding: t.extraWithholding,
|
|
61
|
+
w4DataType: t.w4DataType,
|
|
62
|
+
version: e.version
|
|
63
|
+
} : {
|
|
64
|
+
filingStatus: t.filingStatus,
|
|
65
|
+
federalWithholdingAllowance: t.federalWithholdingAllowance,
|
|
66
|
+
additionalWithholding: t.additionalWithholding,
|
|
67
|
+
w4DataType: t.w4DataType,
|
|
68
|
+
version: e.version
|
|
69
|
+
}, F = await g({
|
|
50
70
|
request: {
|
|
51
|
-
employeeUuid:
|
|
52
|
-
requestBody:
|
|
53
|
-
...s,
|
|
54
|
-
twoJobs: s.twoJobs === "true",
|
|
55
|
-
version: e.version
|
|
56
|
-
}
|
|
71
|
+
employeeUuid: s,
|
|
72
|
+
requestBody: x
|
|
57
73
|
}
|
|
58
74
|
});
|
|
59
|
-
|
|
75
|
+
m(u.EMPLOYEE_FEDERAL_TAXES_UPDATED, F), m(u.EMPLOYEE_FEDERAL_TAXES_DONE);
|
|
60
76
|
});
|
|
61
|
-
}), children: a || /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */ o(
|
|
63
|
-
/* @__PURE__ */ o(
|
|
64
|
-
/* @__PURE__ */ o(
|
|
77
|
+
}), children: a || /* @__PURE__ */ S(v, { children: [
|
|
78
|
+
/* @__PURE__ */ o(N, {}),
|
|
79
|
+
/* @__PURE__ */ o(R, {}),
|
|
80
|
+
/* @__PURE__ */ o(P, {})
|
|
65
81
|
] }) }) })
|
|
66
82
|
}
|
|
67
83
|
) });
|
|
68
84
|
};
|
|
69
85
|
export {
|
|
70
|
-
|
|
86
|
+
ne as FederalTaxes
|
|
71
87
|
};
|
|
72
88
|
//# sourceMappingURL=FederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { zodResolver } from '@hookform/resolvers/zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { useEffect } from 'react'\nimport { useEmployeeTaxSetupGetFederalTaxesSuspense } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupUpdateFederalTaxesMutation } from '@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes'\nimport { FederalForm } from './FederalForm'\nimport { FederalFormSchema, type FederalFormInputs, type FederalFormPayload } from './FederalForm'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { FederalTaxesProvider } from './useFederalTaxes'\nimport {\n useBase,\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Employee.FederalTaxes'> {\n employeeId: string\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent<'Employee.FederalTaxes'> {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = (props: FederalTaxesProps) => {\n const { employeeId, className, children, dictionary } = props\n const { onEvent, fieldErrors, baseSubmitHandler } = useBase()\n useI18n('Employee.FederalTaxes')\n useComponentDictionary('Employee.FederalTaxes', dictionary)\n\n const { data: fedData } = useEmployeeTaxSetupGetFederalTaxesSuspense({\n employeeUuid: employeeId,\n })\n const employeeFederalTax = fedData.employeeFederalTax!\n\n const { mutateAsync: updateFederalTaxes, isPending } =\n useEmployeeTaxSetupUpdateFederalTaxesMutation()\n\n const defaultValues = {\n
|
|
1
|
+
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { zodResolver } from '@hookform/resolvers/zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { useEffect } from 'react'\nimport { useEmployeeTaxSetupGetFederalTaxesSuspense } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupUpdateFederalTaxesMutation } from '@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes'\nimport { FederalForm } from './FederalForm'\nimport { FederalFormSchema, type FederalFormInputs, type FederalFormPayload } from './FederalForm'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { FederalTaxesProvider } from './useFederalTaxes'\nimport {\n useBase,\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Employee.FederalTaxes'> {\n employeeId: string\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent<'Employee.FederalTaxes'> {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = (props: FederalTaxesProps) => {\n const { employeeId, className, children, dictionary } = props\n const { onEvent, fieldErrors, baseSubmitHandler } = useBase()\n useI18n('Employee.FederalTaxes')\n useComponentDictionary('Employee.FederalTaxes', dictionary)\n\n const { data: fedData } = useEmployeeTaxSetupGetFederalTaxesSuspense({\n employeeUuid: employeeId,\n })\n const employeeFederalTax = fedData.employeeFederalTax!\n\n const { mutateAsync: updateFederalTaxes, isPending } =\n useEmployeeTaxSetupUpdateFederalTaxesMutation()\n\n const isRev2020 = employeeFederalTax.w4DataType === 'rev_2020_w4'\n\n const defaultValues: FederalFormInputs = isRev2020\n ? {\n w4DataType: 'rev_2020_w4',\n filingStatus: employeeFederalTax.filingStatus ?? '',\n twoJobs: employeeFederalTax.twoJobs ? 'true' : 'false',\n deductions: employeeFederalTax.deductions ? Number(employeeFederalTax.deductions) : 0,\n dependentsAmount: employeeFederalTax.dependentsAmount\n ? Number(employeeFederalTax.dependentsAmount)\n : 0,\n otherIncome: employeeFederalTax.otherIncome ? Number(employeeFederalTax.otherIncome) : 0,\n extraWithholding: employeeFederalTax.extraWithholding\n ? Number(employeeFederalTax.extraWithholding)\n : 0,\n }\n : {\n w4DataType: 'pre_2020_w4',\n filingStatus: employeeFederalTax.filingStatus ?? '',\n federalWithholdingAllowance: employeeFederalTax.federalWithholdingAllowance ?? 0,\n additionalWithholding: employeeFederalTax.additionalWithholding,\n }\n\n const formMethods = useForm<FederalFormInputs, unknown, FederalFormPayload>({\n resolver: zodResolver(FederalFormSchema),\n defaultValues,\n })\n const { handleSubmit, setError: _setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(msgObject => {\n const key = msgObject.errorKey.replace('.value', '')\n _setError(key as keyof FederalFormInputs, { type: 'custom', message: msgObject.message })\n })\n }\n }, [fieldErrors, _setError])\n\n const onSubmit: SubmitHandler<FederalFormPayload> = async data => {\n await baseSubmitHandler(data, async payload => {\n const requestBody =\n payload.w4DataType === 'rev_2020_w4'\n ? {\n filingStatus: payload.filingStatus,\n twoJobs: payload.twoJobs === 'true',\n dependentsAmount: payload.dependentsAmount,\n otherIncome: payload.otherIncome,\n deductions: payload.deductions,\n extraWithholding: payload.extraWithholding,\n w4DataType: payload.w4DataType,\n version: employeeFederalTax.version,\n }\n : {\n filingStatus: payload.filingStatus,\n federalWithholdingAllowance: payload.federalWithholdingAllowance,\n additionalWithholding: payload.additionalWithholding,\n w4DataType: payload.w4DataType,\n version: employeeFederalTax.version,\n }\n\n const federalTaxesResponse = await updateFederalTaxes({\n request: {\n employeeUuid: employeeId,\n requestBody,\n },\n })\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_UPDATED, federalTaxesResponse)\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n }}\n >\n <FormProvider {...formMethods}>\n <Form onSubmit={handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <FederalForm />\n <Actions />\n </>\n )}\n </Form>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","employeeId","className","children","dictionary","onEvent","fieldErrors","baseSubmitHandler","useBase","useI18n","useComponentDictionary","fedData","useEmployeeTaxSetupGetFederalTaxesSuspense","employeeFederalTax","updateFederalTaxes","isPending","useEmployeeTaxSetupUpdateFederalTaxesMutation","defaultValues","formMethods","useForm","zodResolver","FederalFormSchema","handleSubmit","_setError","useEffect","msgObject","key","FederalTaxesProvider","FormProvider","Form","data","payload","requestBody","federalTaxesResponse","componentEvents","jsxs","Fragment","Head","FederalForm","Actions"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAASA,GAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAwC,GAAGF,GAC1C,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAACH,MAA6B;AACzC,QAAM,EAAE,YAAAI,GAAY,WAAAC,GAAW,UAAAC,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@@ -4,7 +4,6 @@ import "react-error-boundary";
|
|
|
4
4
|
import "react-i18next";
|
|
5
5
|
import "@gusto/embedded-api/models/errors/apierror";
|
|
6
6
|
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
7
|
-
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
7
|
import "@tanstack/react-query";
|
|
9
8
|
import "../../Base/useBase.js";
|
|
10
9
|
import "../../../shared/constants.js";
|
|
@@ -12,9 +11,9 @@ import "classnames";
|
|
|
12
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
12
|
import "dompurify";
|
|
14
13
|
import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
14
|
+
const [F, T] = o("FederalTaxesContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
T as FederalTaxesProvider,
|
|
17
|
+
F as useFederalTaxes
|
|
19
18
|
};
|
|
20
19
|
//# sourceMappingURL=useFederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|