@gusto/embedded-react-sdk 0.42.0 → 0.44.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 +127 -0
- package/README.md +23 -5
- package/dist/assets/icons/edit-02.svg.js +10 -0
- package/dist/assets/icons/edit-02.svg.js.map +1 -0
- package/dist/assets/icons/search-lg.svg.js +10 -0
- package/dist/assets/icons/search-lg.svg.js.map +1 -0
- package/dist/components/Base/Base.js +3 -2
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +3 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +55 -45
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +16 -10
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +86 -64
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +52 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js +18 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js.map +1 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.d.ts +13 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js +12 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js.map +1 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.d.ts +21 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.js +29 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.js.map +1 -0
- package/dist/components/Common/Fields/hooks/useField.js +43 -37
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Flex/Flex.d.ts +2 -1
- package/dist/components/Common/Flex/Flex.js +14 -12
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Flex/Flex.module.scss.js +4 -4
- package/dist/components/Common/TaxInputs/TaxInputs.js +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
- package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
- package/dist/components/Common/UI/ComboBox/ComboBox.d.ts +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +26 -25
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +5 -0
- package/dist/components/Common/UI/DatePicker/DatePicker.js +4 -4
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/Dialog/Dialog.js +35 -36
- package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +18 -17
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +5 -0
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.js +9 -9
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +2 -2
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +7 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +7 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +9 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +7 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
- 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 +7 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +7 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +26 -25
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.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 +8 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +10 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +12 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +6 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +29 -27
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +59 -54
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/index.d.ts +2 -0
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +7 -3
- 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 +43 -40
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.module.scss.js +8 -0
- package/dist/components/Company/Locations/LocationsList/List.module.scss.js.map +1 -0
- 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 +7 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -5
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +7 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +4 -3
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +53 -52
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +12 -11
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -63
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +7 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +6 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +58 -26
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +7 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +3 -0
- package/dist/components/Company/exports/companyOnboarding.js +21 -15
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
- package/dist/components/Company/index.d.ts +1 -0
- package/dist/components/Company/index.js +14 -12
- package/dist/components/Company/index.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +10 -9
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +4 -4
- package/dist/components/Contractor/Address/Head.js +12 -9
- package/dist/components/Contractor/Address/Head.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +9 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +20 -19
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +42 -41
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +17 -17
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +4 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -5
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +4 -3
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +4 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +15 -13
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +4 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +9 -7
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +48 -49
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +35 -33
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +4 -3
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/Submit/SubmitDone.js +14 -12
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.d.ts +7 -4
- package/dist/components/Employee/Compensation/Compensation.js +72 -179
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.d.ts +27 -0
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +61 -0
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +14 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +128 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +17 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +224 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.d.ts +5 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +47 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.d.ts +11 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js +98 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/JobsList/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/{useCompensation.d.ts → compensationSchema.d.ts} +0 -22
- package/dist/components/Employee/Compensation/{useCompensation.js → compensationSchema.js} +9 -12
- package/dist/components/Employee/Compensation/compensationSchema.js.map +1 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.d.ts +6 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.js +73 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +62 -36
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +81 -57
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +5 -12
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +22 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +5 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +55 -13
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +216 -226
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +15 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +27 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.d.ts +19 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +29 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +43 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +37 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +13 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +26 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +56 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +180 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +15 -13
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +33 -15
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +13 -11
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +11 -9
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +21 -19
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +54 -33
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +15 -11
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +37 -33
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +26 -26
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +7 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +8 -7
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.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 +6 -5
- 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 +7 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +9 -7
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +36 -34
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js +100 -99
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +4 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +9 -7
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +42 -40
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/index.d.ts +3 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +8 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +71 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/management/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +8 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +55 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.d.ts +15 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +104 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +41 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +40 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +18 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +31 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/index.d.ts +5 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +37 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +140 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -0
- package/dist/components/Employee/Landing/Landing.js +15 -14
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +2 -2
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +7 -6
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +4 -3
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +9 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.d.ts +6 -0
- package/dist/components/Employee/Profile/management/Profile.js +122 -0
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -0
- package/dist/components/Employee/Profile/management/Profile.module.scss.js +8 -0
- package/dist/components/Employee/Profile/management/Profile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +352 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -0
- package/dist/components/Employee/Profile/{EmployeeProfile.js → onboarding/EmployeeProfile.js} +60 -66
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -0
- package/dist/components/Employee/Profile/{Profile.d.ts → onboarding/Profile.d.ts} +2 -2
- package/dist/components/Employee/Profile/{Profile.js → onboarding/Profile.js} +4 -4
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +9 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +61 -58
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +50 -49
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +47 -46
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +14 -14
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/index.d.ts +2 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +59 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/management/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +49 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.d.ts +14 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +32 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/index.d.ts +3 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +36 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +56 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js +116 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.d.ts +12 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +76 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +14 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js +23 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMeta.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +39 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +46 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js +93 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +36 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +159 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -0
- 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.js +6 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +7 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +4 -2
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +13 -12
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +4 -2
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +3 -0
- package/dist/components/Employee/exports/employeeManagement.js +16 -10
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +19 -19
- package/dist/components/Employee/index.d.ts +2 -1
- package/dist/components/Employee/index.js +37 -37
- package/dist/components/Flow/FlowHeader.js +11 -10
- package/dist/components/Flow/FlowHeader.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +56 -54
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +12 -11
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +4 -3
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +10 -8
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +23 -20
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +20 -18
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +12 -10
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +8 -6
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +4 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +13 -11
- 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/PayrollEditEmployee/TimeOffField.js +18 -16
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +4 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +14 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +4 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +7 -6
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +7 -6
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +4 -2
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +16 -12
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +11 -0
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +3 -0
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +19 -0
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +6 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +149 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +2 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +80 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +21 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +5 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionForm.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +115 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -10
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +103 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +135 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListTypes.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +70 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.module.scss.js +16 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.module.scss.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +164 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsTypes.d.ts +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +31 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +68 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -3
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +117 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js +25 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/timeOffStateMachine.d.ts +4 -2
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +487 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +158 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +230 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +6 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +143 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +103 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +41 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +216 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +12 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +64 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +56 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +5 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +251 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +10 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +143 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +52 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +7 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +9 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +6 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js +9 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +9 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.d.ts +7 -8
- package/dist/components/TimeOff/index.js +27 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +95 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +10 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +3 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +86 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +27 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +3 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.d.ts +1 -1
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.js +8 -8
- package/dist/components/TimeOff/shared/holidayHelpers.js.map +1 -0
- package/dist/components/TimeOff/shared/holidayHelpers.test.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +35 -32
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/contexts/ThemeProvider/ThemeProvider.js +26 -21
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.d.ts +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +2 -0
- package/dist/helpers/dateFormatting.js +4 -0
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/I18n.js +12 -10
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.Locations.json.js +43 -39
- package/dist/i18n/en/Company.Locations.json.js.map +1 -1
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +10 -12
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -16
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +14 -0
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +30 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +14 -14
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +46 -42
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +16 -10
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Profile.json.js +24 -20
- package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.StateTaxes.json.js +14 -6
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +12 -10
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +118 -93
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.js +18 -14
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js +41 -41
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +10 -6
- package/dist/partner-hook-utils/form/composeSubmitHandler.js +49 -26
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +30 -24
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -29
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +34 -28
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +30 -24
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +38 -32
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +28 -22
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +30 -24
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.d.ts +10 -0
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js +9 -0
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js.map +1 -0
- package/dist/partner-hook-utils/form/index.d.ts +3 -0
- package/dist/partner-hook-utils/form/resolveFieldError.js +10 -7
- package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js +10 -7
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -1
- package/dist/partner-hook-utils/form/useHookFieldResolution.d.ts +10 -3
- package/dist/partner-hook-utils/form/useHookFieldResolution.js +6 -6
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
- package/dist/partner-hook-utils/form/useHookFormInternals.d.ts +22 -0
- package/dist/partner-hook-utils/form/useHookFormInternals.js +12 -0
- package/dist/partner-hook-utils/form/useHookFormInternals.js.map +1 -0
- package/dist/partner-hook-utils/form/withOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/withOptions.js.map +1 -1
- package/dist/partner-hook-utils/types.d.ts +16 -1
- package/dist/shared/constants.d.ts +24 -0
- package/dist/shared/constants.js +42 -30
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +82 -14
- package/docs/reference/endpoint-inventory.json +453 -123
- package/package.json +22 -20
- package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +0 -8
- package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Compensation/Actions.d.ts +0 -1
- package/dist/components/Employee/Compensation/Actions.js +0 -38
- package/dist/components/Employee/Compensation/Actions.js.map +0 -1
- package/dist/components/Employee/Compensation/Edit.d.ts +0 -5
- package/dist/components/Employee/Compensation/Edit.js +0 -178
- package/dist/components/Employee/Compensation/Edit.js.map +0 -1
- package/dist/components/Employee/Compensation/Head.d.ts +0 -1
- package/dist/components/Employee/Compensation/Head.js +0 -22
- package/dist/components/Employee/Compensation/Head.js.map +0 -1
- package/dist/components/Employee/Compensation/List.d.ts +0 -1
- package/dist/components/Employee/Compensation/List.js +0 -71
- package/dist/components/Employee/Compensation/List.js.map +0 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/Actions.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +0 -13
- package/dist/components/Employee/FederalTaxes/Actions.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +0 -12
- package/dist/components/Employee/FederalTaxes/FederalForm.js +0 -109
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +0 -6
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +0 -84
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/Head.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/Head.js +0 -24
- package/dist/components/Employee/FederalTaxes/Head.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +0 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +0 -20
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +0 -1
- package/dist/components/Employee/Profile/AdminProfile.js +0 -358
- package/dist/components/Employee/Profile/AdminProfile.js.map +0 -1
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +0 -1
- package/dist/components/Employee/Profile/Profile.js.map +0 -1
- package/dist/components/Employee/Profile/index.d.ts +0 -2
- package/dist/components/Employee/StateTaxes/Actions.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/Actions.js +0 -13
- package/dist/components/Employee/StateTaxes/Actions.js.map +0 -1
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +0 -6
- package/dist/components/Employee/StateTaxes/StateForm.js +0 -34
- package/dist/components/Employee/StateTaxes/StateForm.js.map +0 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +0 -7
- package/dist/components/Employee/StateTaxes/StateTaxes.js +0 -98
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +0 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +0 -8
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +0 -20
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +0 -46
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +0 -46
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +0 -49
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +0 -107
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +0 -124
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +0 -46
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +0 -18
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +0 -166
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +0 -29
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +0 -66
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +0 -103
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +0 -290
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +0 -71
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +0 -206
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +0 -5
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +0 -5
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/index.js +0 -29
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +0 -1
- /package/dist/components/Employee/{Compensation/shared/useCompensationForm/compensationSchemaParity.test.d.ts → FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.test.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.d.ts → onboarding/AdminProfile.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js → onboarding/AdminProfile.module.scss.js} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js.map → onboarding/AdminProfile.module.scss.js.map} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.d.ts → onboarding/EmployeeProfile.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js → onboarding/EmployeeProfile.module.scss.js} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js.map → onboarding/EmployeeProfile.module.scss.js.map} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts → Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.test.d.ts} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyList.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelector.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts → TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/index.d.ts +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as i, jsxs as p, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as f, Trans as r } from "react-i18next";
|
|
3
|
+
import { BaseLayout as h } from "../../../Base/Base.js";
|
|
4
|
+
import "../../../Base/useBase.js";
|
|
5
|
+
import { Form as b } from "../../../Common/Form/Form.js";
|
|
6
|
+
import { SDKFormProvider as E } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
7
|
+
import { useComponentContext as R } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
function H({
|
|
9
|
+
federalTaxes: n,
|
|
10
|
+
onSubmit: s,
|
|
11
|
+
actions: a,
|
|
12
|
+
alert: d,
|
|
13
|
+
className: c,
|
|
14
|
+
children: u
|
|
15
|
+
}) {
|
|
16
|
+
const { t: e } = f("Employee.FederalTaxes"), o = R(), t = n.form.Fields, m = (l) => {
|
|
17
|
+
switch (l) {
|
|
18
|
+
case "Single":
|
|
19
|
+
return e("filingStatusSingle");
|
|
20
|
+
case "Married":
|
|
21
|
+
return e("filingStatusMarried");
|
|
22
|
+
case "Head of Household":
|
|
23
|
+
return e("filingStatusHeadOfHousehold");
|
|
24
|
+
case "Exempt from withholding":
|
|
25
|
+
return e("filingStatusExemptFromWithholding");
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ i("section", { className: c, children: /* @__PURE__ */ i(h, { error: n.errorHandling.errors, children: /* @__PURE__ */ i(E, { formHookResult: n, children: /* @__PURE__ */ i(b, { onSubmit: s, children: u ?? /* @__PURE__ */ p(g, { children: [
|
|
29
|
+
d,
|
|
30
|
+
/* @__PURE__ */ i(o.Heading, { as: "h1", children: e("federalTaxesTitle") }),
|
|
31
|
+
/* @__PURE__ */ i(o.Text, { children: /* @__PURE__ */ i(
|
|
32
|
+
r,
|
|
33
|
+
{
|
|
34
|
+
i18nKey: "irsCalculator",
|
|
35
|
+
t: e,
|
|
36
|
+
components: {
|
|
37
|
+
IrsCalculatorLink: /* @__PURE__ */ i(o.Link, {}),
|
|
38
|
+
HelpCenterLink: /* @__PURE__ */ i(o.Link, {})
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
) }),
|
|
42
|
+
/* @__PURE__ */ i(
|
|
43
|
+
t.FilingStatus,
|
|
44
|
+
{
|
|
45
|
+
label: e("federalFilingStatus1c"),
|
|
46
|
+
placeholder: e("federalFilingStatusPlaceholder"),
|
|
47
|
+
description: e("selectWithholdingDescription"),
|
|
48
|
+
validationMessages: { REQUIRED: e("validations.federalFilingStatus") },
|
|
49
|
+
getOptionLabel: m
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ i(
|
|
53
|
+
t.TwoJobs,
|
|
54
|
+
{
|
|
55
|
+
label: e("multipleJobs2c"),
|
|
56
|
+
description: /* @__PURE__ */ i(
|
|
57
|
+
r,
|
|
58
|
+
{
|
|
59
|
+
i18nKey: "includesSpouseExplanation",
|
|
60
|
+
t: e,
|
|
61
|
+
components: {
|
|
62
|
+
IrsLink: /* @__PURE__ */ i(o.Link, {})
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
validationMessages: { REQUIRED: e("validations.federalTwoJobs") },
|
|
67
|
+
getOptionLabel: (l) => e(l ? "twoJobYesLabel" : "twoJobNoLabel")
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ i(
|
|
71
|
+
t.DependentsAmount,
|
|
72
|
+
{
|
|
73
|
+
label: e("dependentsTotalIfApplicable"),
|
|
74
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ i(
|
|
78
|
+
t.OtherIncome,
|
|
79
|
+
{
|
|
80
|
+
label: e("otherIncome"),
|
|
81
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ i(
|
|
85
|
+
t.Deductions,
|
|
86
|
+
{
|
|
87
|
+
label: e("deductions"),
|
|
88
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ i(
|
|
92
|
+
t.ExtraWithholding,
|
|
93
|
+
{
|
|
94
|
+
label: e("extraWithholding"),
|
|
95
|
+
validationMessages: { REQUIRED: e("fieldIsRequired") }
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
a
|
|
99
|
+
] }) }) }) }) });
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
H as FederalTaxesView
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=FederalTaxesView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FederalTaxesView.js","sources":["../../../../../src/components/Employee/FederalTaxes/shared/FederalTaxesView.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { type useFederalTaxesForm, type FilingStatusValue } from './useFederalTaxesForm'\nimport { BaseLayout } from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype ReadyFederalTaxesForm = Extract<ReturnType<typeof useFederalTaxesForm>, { isLoading: false }>\n\nexport interface FederalTaxesViewProps {\n federalTaxes: ReadyFederalTaxesForm\n onSubmit: () => void | Promise<void>\n actions: ReactNode\n alert?: ReactNode\n className?: string\n children?: ReactNode\n}\n\nexport function FederalTaxesView({\n federalTaxes,\n onSubmit,\n actions,\n alert,\n className,\n children,\n}: FederalTaxesViewProps) {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n const Fields = federalTaxes.form.Fields\n\n const filingStatusLabel = (value: FilingStatusValue): string => {\n switch (value) {\n case 'Single':\n return t('filingStatusSingle')\n case 'Married':\n return t('filingStatusMarried')\n case 'Head of Household':\n return t('filingStatusHeadOfHousehold')\n case 'Exempt from withholding':\n return t('filingStatusExemptFromWithholding')\n }\n }\n\n return (\n <section className={className}>\n <BaseLayout error={federalTaxes.errorHandling.errors}>\n <SDKFormProvider formHookResult={federalTaxes}>\n <Form onSubmit={onSubmit}>\n {children ?? (\n <>\n {alert}\n\n <Components.Heading as=\"h1\">{t('federalTaxesTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey=\"irsCalculator\"\n t={t}\n components={{\n IrsCalculatorLink: <Components.Link />,\n HelpCenterLink: <Components.Link />,\n }}\n />\n </Components.Text>\n\n <Fields.FilingStatus\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n validationMessages={{ REQUIRED: t('validations.federalFilingStatus') }}\n getOptionLabel={filingStatusLabel}\n />\n <Fields.TwoJobs\n label={t('multipleJobs2c')}\n description={\n <Trans\n i18nKey=\"includesSpouseExplanation\"\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n }\n validationMessages={{ REQUIRED: t('validations.federalTwoJobs') }}\n getOptionLabel={value => (value ? t('twoJobYesLabel') : t('twoJobNoLabel'))}\n />\n <Fields.DependentsAmount\n label={t('dependentsTotalIfApplicable')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n <Fields.OtherIncome\n label={t('otherIncome')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n <Fields.Deductions\n label={t('deductions')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n <Fields.ExtraWithholding\n label={t('extraWithholding')}\n validationMessages={{ REQUIRED: t('fieldIsRequired') }}\n />\n\n {actions}\n </>\n )}\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["FederalTaxesView","federalTaxes","onSubmit","actions","alert","className","children","t","useTranslation","Components","useComponentContext","Fields","filingStatusLabel","value","jsx","BaseLayout","SDKFormProvider","Form","jsxs","Fragment","Trans"],"mappings":"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"}
|
package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
|
|
3
|
+
export declare const FederalTaxesErrorCodes: {
|
|
4
|
+
readonly REQUIRED: "REQUIRED";
|
|
5
|
+
};
|
|
6
|
+
export type FederalTaxesErrorCode = (typeof FederalTaxesErrorCodes)[keyof typeof FederalTaxesErrorCodes];
|
|
7
|
+
export declare const FILING_STATUS_VALUES: readonly ["Single", "Married", "Head of Household", "Exempt from withholding"];
|
|
8
|
+
export type FilingStatusValue = (typeof FILING_STATUS_VALUES)[number];
|
|
9
|
+
declare const fieldValidators: {
|
|
10
|
+
filingStatus: z.ZodString;
|
|
11
|
+
twoJobs: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
12
|
+
dependentsAmount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
13
|
+
otherIncome: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
14
|
+
deductions: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
15
|
+
extraWithholding: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
16
|
+
};
|
|
17
|
+
export type FederalTaxesField = keyof typeof fieldValidators;
|
|
18
|
+
export type FederalTaxesFormData = {
|
|
19
|
+
[K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
|
|
20
|
+
};
|
|
21
|
+
export type FederalTaxesFormOutputs = FederalTaxesFormData;
|
|
22
|
+
declare const requiredFieldsConfig: {
|
|
23
|
+
twoJobs: "never";
|
|
24
|
+
dependentsAmount: "never";
|
|
25
|
+
otherIncome: "never";
|
|
26
|
+
deductions: "never";
|
|
27
|
+
extraWithholding: "never";
|
|
28
|
+
};
|
|
29
|
+
export type FederalTaxesOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
|
|
30
|
+
interface FederalTaxesSchemaOptions {
|
|
31
|
+
optionalFieldsToRequire?: FederalTaxesOptionalFieldsToRequire;
|
|
32
|
+
}
|
|
33
|
+
export declare function createFederalTaxesSchema(options?: FederalTaxesSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
|
|
34
|
+
filingStatus: z.ZodString;
|
|
35
|
+
twoJobs: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
36
|
+
dependentsAmount: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
37
|
+
otherIncome: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
38
|
+
deductions: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
39
|
+
extraWithholding: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
40
|
+
}>;
|
|
41
|
+
export {};
|
package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { FilingStatus as r } from "@gusto/embedded-api/models/operations/putv1employeesemployeeidfederaltaxes";
|
|
3
|
+
import { buildFormSchema as i } from "../../../../../partner-hook-utils/form/buildFormSchema.js";
|
|
4
|
+
import { coerceNaN as o, coerceStringBoolean as s } from "../../../../../partner-hook-utils/form/preprocessors.js";
|
|
5
|
+
const d = {
|
|
6
|
+
REQUIRED: "REQUIRED"
|
|
7
|
+
}, h = [
|
|
8
|
+
r.Single,
|
|
9
|
+
r.Married,
|
|
10
|
+
r.HeadOfHousehold,
|
|
11
|
+
r.ExemptFromWithholding
|
|
12
|
+
], c = {
|
|
13
|
+
filingStatus: e.string(),
|
|
14
|
+
twoJobs: e.preprocess(s, e.boolean()),
|
|
15
|
+
dependentsAmount: e.preprocess(o(0), e.number()),
|
|
16
|
+
otherIncome: e.preprocess(o(0), e.number()),
|
|
17
|
+
deductions: e.preprocess(o(0), e.number()),
|
|
18
|
+
extraWithholding: e.preprocess(o(0), e.number())
|
|
19
|
+
}, m = {
|
|
20
|
+
twoJobs: "never",
|
|
21
|
+
dependentsAmount: "never",
|
|
22
|
+
otherIncome: "never",
|
|
23
|
+
deductions: "never",
|
|
24
|
+
extraWithholding: "never"
|
|
25
|
+
};
|
|
26
|
+
function E(n = {}) {
|
|
27
|
+
const { optionalFieldsToRequire: t } = n;
|
|
28
|
+
return i(c, {
|
|
29
|
+
requiredFieldsConfig: m,
|
|
30
|
+
requiredErrorCode: d.REQUIRED,
|
|
31
|
+
mode: "update",
|
|
32
|
+
optionalFieldsToRequire: t
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
h as FILING_STATUS_VALUES,
|
|
37
|
+
d as FederalTaxesErrorCodes,
|
|
38
|
+
E as createFederalTaxesSchema
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=federalTaxesSchema.js.map
|
package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"federalTaxesSchema.js","sources":["../../../../../../src/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport { FilingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidfederaltaxes'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceNaN, coerceStringBoolean } from '@/partner-hook-utils/form/preprocessors'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const FederalTaxesErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\nexport type FederalTaxesErrorCode =\n (typeof FederalTaxesErrorCodes)[keyof typeof FederalTaxesErrorCodes]\n\n// ── Filing status options ──────────────────────────────────────────────\n\nexport const FILING_STATUS_VALUES = [\n FilingStatus.Single,\n FilingStatus.Married,\n FilingStatus.HeadOfHousehold,\n FilingStatus.ExemptFromWithholding,\n] as const\n\nexport type FilingStatusValue = (typeof FILING_STATUS_VALUES)[number]\n\n// ── Field validators ───────────────────────────────────────────────────\n\n// `filingStatus` is typed as `string` (not `z.enum`) so the initial empty form state is valid\n// for parsing while still failing the required check via `buildFormSchema`. The actual value is\n// constrained at the UI layer via the Select's options, and cast back to `FilingStatus` at\n// submission time.\nconst fieldValidators = {\n filingStatus: z.string(),\n twoJobs: z.preprocess(coerceStringBoolean, z.boolean()),\n dependentsAmount: z.preprocess(coerceNaN(0), z.number()),\n otherIncome: z.preprocess(coerceNaN(0), z.number()),\n deductions: z.preprocess(coerceNaN(0), z.number()),\n extraWithholding: z.preprocess(coerceNaN(0), z.number()),\n}\n\nexport type FederalTaxesField = keyof typeof fieldValidators\n\nexport type FederalTaxesFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type FederalTaxesFormOutputs = FederalTaxesFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\n// Only `filingStatus` is required by the API on update. The remaining fields are\n// optional by default so partners can decide their own UX; the bundled\n// `<FederalTaxes>` component promotes them to required via `optionalFieldsToRequire`\n// to preserve the original (all-required) behavior.\nconst requiredFieldsConfig = {\n twoJobs: 'never',\n dependentsAmount: 'never',\n otherIncome: 'never',\n deductions: 'never',\n extraWithholding: 'never',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\nexport type FederalTaxesOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\ninterface FederalTaxesSchemaOptions {\n optionalFieldsToRequire?: FederalTaxesOptionalFieldsToRequire\n}\n\nexport function createFederalTaxesSchema(options: FederalTaxesSchemaOptions = {}) {\n const { optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: FederalTaxesErrorCodes.REQUIRED,\n mode: 'update',\n optionalFieldsToRequire,\n })\n}\n"],"names":["FederalTaxesErrorCodes","FILING_STATUS_VALUES","FilingStatus","fieldValidators","z","coerceStringBoolean","coerceNaN","requiredFieldsConfig","createFederalTaxesSchema","options","optionalFieldsToRequire","buildFormSchema"],"mappings":";;;;AAWO,MAAMA,IAAyB;AAAA,EACpC,UAAU;AACZ,GAOaC,IAAuB;AAAA,EAClCC,EAAa;AAAA,EACbA,EAAa;AAAA,EACbA,EAAa;AAAA,EACbA,EAAa;AACf,GAUMC,IAAkB;AAAA,EACtB,cAAcC,EAAE,OAAA;AAAA,EAChB,SAASA,EAAE,WAAWC,GAAqBD,EAAE,SAAS;AAAA,EACtD,kBAAkBA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAAA,EACvD,aAAaA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAAA,EAClD,YAAYA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAAA,EACjD,kBAAkBA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AACzD,GAeMG,IAAuB;AAAA,EAC3B,SAAS;AAAA,EACT,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,kBAAkB;AACpB;AAYO,SAASC,EAAyBC,IAAqC,IAAI;AAChF,QAAM,EAAE,yBAAAC,MAA4BD;AAEpC,SAAOE,EAAgBR,GAAiB;AAAA,IACtC,sBAAAI;AAAA,IACA,mBAAmBP,EAAuB;AAAA,IAC1C,MAAM;AAAA,IACN,yBAAAU;AAAA,EAAA,CACD;AACH;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FederalTaxesErrorCodes, FilingStatusValue } from './federalTaxesSchema';
|
|
2
|
+
import { SelectHookFieldProps } from '../../../../../partner-hook-utils/form/fields/SelectHookField';
|
|
3
|
+
import { RadioGroupHookFieldProps } from '../../../../../partner-hook-utils/form/fields/RadioGroupHookField';
|
|
4
|
+
import { NumberInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/NumberInputHookField';
|
|
5
|
+
import { HookFieldProps } from '../../../../../partner-hook-utils/types';
|
|
6
|
+
export type RequiredValidation = typeof FederalTaxesErrorCodes.REQUIRED;
|
|
7
|
+
export type FilingStatusFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, FilingStatusValue>>;
|
|
8
|
+
export declare function FilingStatusField(props: FilingStatusFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export type TwoJobsFieldProps = HookFieldProps<RadioGroupHookFieldProps<RequiredValidation, boolean>>;
|
|
10
|
+
export declare function TwoJobsField(props: TwoJobsFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type DependentsAmountFieldProps = HookFieldProps<NumberInputHookFieldProps<RequiredValidation>>;
|
|
12
|
+
export declare function DependentsAmountField(props: DependentsAmountFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export type OtherIncomeFieldProps = HookFieldProps<NumberInputHookFieldProps<RequiredValidation>>;
|
|
14
|
+
export declare function OtherIncomeField(props: OtherIncomeFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export type DeductionsFieldProps = HookFieldProps<NumberInputHookFieldProps<RequiredValidation>>;
|
|
16
|
+
export declare function DeductionsField(props: DeductionsFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export type ExtraWithholdingFieldProps = HookFieldProps<NumberInputHookFieldProps<RequiredValidation>>;
|
|
18
|
+
export declare function ExtraWithholdingField(props: ExtraWithholdingFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { NumberInputHookField as o } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
3
|
+
import { RadioGroupHookField as t } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
4
|
+
import { SelectHookField as r } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
5
|
+
function d(n) {
|
|
6
|
+
return /* @__PURE__ */ e(r, { ...n, name: "filingStatus" });
|
|
7
|
+
}
|
|
8
|
+
function a(n) {
|
|
9
|
+
return /* @__PURE__ */ e(t, { ...n, name: "twoJobs" });
|
|
10
|
+
}
|
|
11
|
+
function f(n) {
|
|
12
|
+
return /* @__PURE__ */ e(o, { ...n, name: "dependentsAmount", format: "currency", min: 0 });
|
|
13
|
+
}
|
|
14
|
+
function l(n) {
|
|
15
|
+
return /* @__PURE__ */ e(o, { ...n, name: "otherIncome", format: "currency", min: 0 });
|
|
16
|
+
}
|
|
17
|
+
function F(n) {
|
|
18
|
+
return /* @__PURE__ */ e(o, { ...n, name: "deductions", format: "currency", min: 0 });
|
|
19
|
+
}
|
|
20
|
+
function p(n) {
|
|
21
|
+
return /* @__PURE__ */ e(o, { ...n, name: "extraWithholding", format: "currency", min: 0 });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
F as DeductionsField,
|
|
25
|
+
f as DependentsAmountField,
|
|
26
|
+
p as ExtraWithholdingField,
|
|
27
|
+
d as FilingStatusField,
|
|
28
|
+
l as OtherIncomeField,
|
|
29
|
+
a as TwoJobsField
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../../src/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.tsx"],"sourcesContent":["import type { FederalTaxesErrorCodes, FilingStatusValue } from './federalTaxesSchema'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { RadioGroupHookFieldProps } from '@/partner-hook-utils/form/fields/RadioGroupHookField'\nimport type { NumberInputHookFieldProps } from '@/partner-hook-utils/form/fields/NumberInputHookField'\nimport {\n SelectHookField,\n RadioGroupHookField,\n NumberInputHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\nexport type RequiredValidation = typeof FederalTaxesErrorCodes.REQUIRED\n\nexport type FilingStatusFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, FilingStatusValue>\n>\n\nexport function FilingStatusField(props: FilingStatusFieldProps) {\n return <SelectHookField {...props} name=\"filingStatus\" />\n}\n\nexport type TwoJobsFieldProps = HookFieldProps<\n RadioGroupHookFieldProps<RequiredValidation, boolean>\n>\n\nexport function TwoJobsField(props: TwoJobsFieldProps) {\n return <RadioGroupHookField {...props} name=\"twoJobs\" />\n}\n\nexport type DependentsAmountFieldProps = HookFieldProps<\n NumberInputHookFieldProps<RequiredValidation>\n>\n\nexport function DependentsAmountField(props: DependentsAmountFieldProps) {\n return <NumberInputHookField {...props} name=\"dependentsAmount\" format=\"currency\" min={0} />\n}\n\nexport type OtherIncomeFieldProps = HookFieldProps<NumberInputHookFieldProps<RequiredValidation>>\n\nexport function OtherIncomeField(props: OtherIncomeFieldProps) {\n return <NumberInputHookField {...props} name=\"otherIncome\" format=\"currency\" min={0} />\n}\n\nexport type DeductionsFieldProps = HookFieldProps<NumberInputHookFieldProps<RequiredValidation>>\n\nexport function DeductionsField(props: DeductionsFieldProps) {\n return <NumberInputHookField {...props} name=\"deductions\" format=\"currency\" min={0} />\n}\n\nexport type ExtraWithholdingFieldProps = HookFieldProps<\n NumberInputHookFieldProps<RequiredValidation>\n>\n\nexport function ExtraWithholdingField(props: ExtraWithholdingFieldProps) {\n return <NumberInputHookField {...props} name=\"extraWithholding\" format=\"currency\" min={0} />\n}\n"],"names":["FilingStatusField","props","jsx","SelectHookField","TwoJobsField","RadioGroupHookField","DependentsAmountField","NumberInputHookField","OtherIncomeField","DeductionsField","ExtraWithholdingField"],"mappings":";;;;AAiBO,SAASA,EAAkBC,GAA+B;AAC/D,SAAO,gBAAAC,EAACC,GAAA,EAAiB,GAAGF,GAAO,MAAK,gBAAe;AACzD;AAMO,SAASG,EAAaH,GAA0B;AACrD,SAAO,gBAAAC,EAACG,GAAA,EAAqB,GAAGJ,GAAO,MAAK,WAAU;AACxD;AAMO,SAASK,EAAsBL,GAAmC;AACvE,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,oBAAmB,QAAO,YAAW,KAAK,EAAA,CAAG;AAC5F;AAIO,SAASO,EAAiBP,GAA8B;AAC7D,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,eAAc,QAAO,YAAW,KAAK,EAAA,CAAG;AACvF;AAIO,SAASQ,EAAgBR,GAA6B;AAC3D,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,cAAa,QAAO,YAAW,KAAK,EAAA,CAAG;AACtF;AAMO,SAASS,EAAsBT,GAAmC;AACvE,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,oBAAmB,QAAO,YAAW,KAAK,EAAA,CAAG;AAC5F;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { useFederalTaxesForm } from './useFederalTaxesForm';
|
|
3
|
+
export type { FederalTaxesOptionalFieldsToRequire, UseFederalTaxesFormProps, UseFederalTaxesFormResult, UseFederalTaxesFormReady, FederalTaxesFieldsMetadata, FederalTaxesFormFields, FederalTaxesFields, } from './useFederalTaxesForm';
|
|
4
|
+
export { createFederalTaxesSchema, FederalTaxesErrorCodes, FILING_STATUS_VALUES, type FederalTaxesErrorCode, type FederalTaxesFormData, type FederalTaxesFormOutputs, type FederalTaxesField, type FilingStatusValue, } from './federalTaxesSchema';
|
|
5
|
+
export type { RequiredValidation as FederalTaxesRequiredValidation, FilingStatusFieldProps, TwoJobsFieldProps, DependentsAmountFieldProps, OtherIncomeFieldProps, DeductionsFieldProps, ExtraWithholdingFieldProps, } from './fields';
|
package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UseFormProps } from 'react-hook-form';
|
|
2
|
+
import { EmployeeFederalTax } from '@gusto/embedded-api/models/components/employeefederaltax';
|
|
3
|
+
import { FederalTaxesOptionalFieldsToRequire, FederalTaxesFormData } from './federalTaxesSchema';
|
|
4
|
+
import { FilingStatusField, TwoJobsField, DependentsAmountField, OtherIncomeField, DeductionsField, ExtraWithholdingField } from './fields';
|
|
5
|
+
import { BaseFormHookReady, FieldsMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
|
|
6
|
+
export type { FederalTaxesOptionalFieldsToRequire } from './federalTaxesSchema';
|
|
7
|
+
export interface UseFederalTaxesFormProps {
|
|
8
|
+
employeeId: string;
|
|
9
|
+
optionalFieldsToRequire?: FederalTaxesOptionalFieldsToRequire;
|
|
10
|
+
defaultValues?: Partial<FederalTaxesFormData>;
|
|
11
|
+
validationMode?: UseFormProps['mode'];
|
|
12
|
+
shouldFocusError?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface FederalTaxesFields {
|
|
15
|
+
FilingStatus: typeof FilingStatusField;
|
|
16
|
+
TwoJobs: typeof TwoJobsField;
|
|
17
|
+
DependentsAmount: typeof DependentsAmountField;
|
|
18
|
+
OtherIncome: typeof OtherIncomeField;
|
|
19
|
+
Deductions: typeof DeductionsField;
|
|
20
|
+
ExtraWithholding: typeof ExtraWithholdingField;
|
|
21
|
+
}
|
|
22
|
+
export interface UseFederalTaxesFormReady extends BaseFormHookReady<FieldsMetadata, FederalTaxesFormData, FederalTaxesFields> {
|
|
23
|
+
data: {
|
|
24
|
+
employeeFederalTax: EmployeeFederalTax;
|
|
25
|
+
};
|
|
26
|
+
status: {
|
|
27
|
+
isPending: boolean;
|
|
28
|
+
mode: 'update';
|
|
29
|
+
};
|
|
30
|
+
actions: {
|
|
31
|
+
onSubmit: () => Promise<HookSubmitResult<EmployeeFederalTax> | undefined>;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare function useFederalTaxesForm({ employeeId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseFederalTaxesFormProps): HookLoadingResult | UseFederalTaxesFormReady;
|
|
35
|
+
export type UseFederalTaxesFormResult = HookLoadingResult | UseFederalTaxesFormReady;
|
|
36
|
+
export type FederalTaxesFieldsMetadata = UseFederalTaxesFormReady['form']['fieldsMetadata'];
|
|
37
|
+
export type FederalTaxesFormFields = UseFederalTaxesFormReady['form']['Fields'];
|
package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { useMemo as d } from "react";
|
|
2
|
+
import { useForm as _ } from "react-hook-form";
|
|
3
|
+
import { zodResolver as L } from "@hookform/resolvers/zod";
|
|
4
|
+
import { useEmployeeTaxSetupGetFederalTaxes as U } from "@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes";
|
|
5
|
+
import { useEmployeeTaxSetupUpdateFederalTaxesMutation as D } from "@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes";
|
|
6
|
+
import { createFederalTaxesSchema as H, FILING_STATUS_VALUES as c } from "./federalTaxesSchema.js";
|
|
7
|
+
import { ExtraWithholdingField as k, DeductionsField as G, OtherIncomeField as B, DependentsAmountField as P, TwoJobsField as R, FilingStatusField as q } from "./fields.js";
|
|
8
|
+
import { useDeriveFieldsMetadata as z } from "../../../../../partner-hook-utils/form/useDeriveFieldsMetadata.js";
|
|
9
|
+
import { useHookFormInternals as C } from "../../../../../partner-hook-utils/form/useHookFormInternals.js";
|
|
10
|
+
import { createGetFormSubmissionValues as K } from "../../../../../partner-hook-utils/form/getFormSubmissionValues.js";
|
|
11
|
+
import { withOptions as S } from "../../../../../partner-hook-utils/form/withOptions.js";
|
|
12
|
+
import { composeErrorHandler as Q } from "../../../../../partner-hook-utils/composeErrorHandler.js";
|
|
13
|
+
import { useBaseSubmit as Y } from "../../../../Base/useBaseSubmit.js";
|
|
14
|
+
import { SDKInternalError as b } from "../../../../../types/sdkError.js";
|
|
15
|
+
function j(e) {
|
|
16
|
+
return e.w4DataType === "rev_2020_w4";
|
|
17
|
+
}
|
|
18
|
+
function X(e) {
|
|
19
|
+
return e ? c.find((r) => r === e) ?? "" : "";
|
|
20
|
+
}
|
|
21
|
+
function m(e) {
|
|
22
|
+
if (e == null || e === "") return;
|
|
23
|
+
const r = Number(e);
|
|
24
|
+
return Number.isNaN(r) ? void 0 : r;
|
|
25
|
+
}
|
|
26
|
+
function ce({
|
|
27
|
+
employeeId: e,
|
|
28
|
+
optionalFieldsToRequire: r,
|
|
29
|
+
defaultValues: n,
|
|
30
|
+
validationMode: g = "onSubmit",
|
|
31
|
+
shouldFocusError: x = !0
|
|
32
|
+
}) {
|
|
33
|
+
const u = U({ employeeUuid: e }), o = u.data?.employeeFederalTax, [f, w] = d(
|
|
34
|
+
() => H({ optionalFieldsToRequire: r }),
|
|
35
|
+
[r]
|
|
36
|
+
), T = d(
|
|
37
|
+
() => c.map((t) => ({ value: t, label: t })),
|
|
38
|
+
[]
|
|
39
|
+
), v = d(
|
|
40
|
+
() => [
|
|
41
|
+
{ label: "Yes", value: "true" },
|
|
42
|
+
{ label: "No", value: "false" }
|
|
43
|
+
],
|
|
44
|
+
[]
|
|
45
|
+
), p = d(() => {
|
|
46
|
+
const t = o && j(o) ? o : void 0;
|
|
47
|
+
return {
|
|
48
|
+
filingStatus: X(t?.filingStatus) || n?.filingStatus || "",
|
|
49
|
+
twoJobs: t?.twoJobs ?? n?.twoJobs ?? !1,
|
|
50
|
+
dependentsAmount: m(t?.dependentsAmount) ?? n?.dependentsAmount ?? 0,
|
|
51
|
+
otherIncome: m(t?.otherIncome) ?? n?.otherIncome ?? 0,
|
|
52
|
+
deductions: m(t?.deductions) ?? n?.deductions ?? 0,
|
|
53
|
+
extraWithholding: m(t?.extraWithholding) ?? n?.extraWithholding ?? 0
|
|
54
|
+
};
|
|
55
|
+
}, [o, n]), a = _({
|
|
56
|
+
resolver: L(f),
|
|
57
|
+
mode: g,
|
|
58
|
+
shouldFocusError: x,
|
|
59
|
+
defaultValues: p,
|
|
60
|
+
values: p,
|
|
61
|
+
resetOptions: { keepDirtyValues: !0 }
|
|
62
|
+
}), { mutateAsync: I, isPending: A } = D(), {
|
|
63
|
+
baseSubmitHandler: y,
|
|
64
|
+
error: E,
|
|
65
|
+
setError: J
|
|
66
|
+
} = Y("FederalTaxesForm"), h = Q([u], { submitError: E, setSubmitError: J }), s = z(w, a.control), W = {
|
|
67
|
+
filingStatus: S(
|
|
68
|
+
s.filingStatus,
|
|
69
|
+
T,
|
|
70
|
+
c
|
|
71
|
+
),
|
|
72
|
+
twoJobs: S(s.twoJobs, v, [!0, !1]),
|
|
73
|
+
dependentsAmount: s.dependentsAmount,
|
|
74
|
+
otherIncome: s.otherIncome,
|
|
75
|
+
deductions: s.deductions,
|
|
76
|
+
extraWithholding: s.extraWithholding
|
|
77
|
+
}, N = async () => {
|
|
78
|
+
let t;
|
|
79
|
+
return await new Promise((l) => {
|
|
80
|
+
a.handleSubmit(
|
|
81
|
+
async (O) => {
|
|
82
|
+
await y(O, async (i) => {
|
|
83
|
+
if (!o)
|
|
84
|
+
throw new b("Federal taxes record was not loaded before submit");
|
|
85
|
+
const V = {
|
|
86
|
+
filingStatus: i.filingStatus,
|
|
87
|
+
twoJobs: i.twoJobs,
|
|
88
|
+
dependentsAmount: i.dependentsAmount,
|
|
89
|
+
otherIncome: i.otherIncome,
|
|
90
|
+
deductions: i.deductions,
|
|
91
|
+
extraWithholding: i.extraWithholding,
|
|
92
|
+
w4DataType: "rev_2020_w4",
|
|
93
|
+
version: o.version
|
|
94
|
+
}, F = await I({
|
|
95
|
+
request: {
|
|
96
|
+
employeeUuid: e,
|
|
97
|
+
requestBody: V
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
if (!F.employeeFederalTax)
|
|
101
|
+
throw new b("Federal taxes update did not return an updated record");
|
|
102
|
+
t = { mode: "update", data: F.employeeFederalTax };
|
|
103
|
+
}), l();
|
|
104
|
+
},
|
|
105
|
+
() => {
|
|
106
|
+
l();
|
|
107
|
+
}
|
|
108
|
+
)();
|
|
109
|
+
}), t;
|
|
110
|
+
}, M = C(a);
|
|
111
|
+
return u.isLoading || !o ? { isLoading: !0, errorHandling: h } : {
|
|
112
|
+
isLoading: !1,
|
|
113
|
+
data: {
|
|
114
|
+
employeeFederalTax: o
|
|
115
|
+
},
|
|
116
|
+
status: {
|
|
117
|
+
isPending: A,
|
|
118
|
+
mode: "update"
|
|
119
|
+
},
|
|
120
|
+
actions: { onSubmit: N },
|
|
121
|
+
errorHandling: h,
|
|
122
|
+
form: {
|
|
123
|
+
Fields: {
|
|
124
|
+
FilingStatus: q,
|
|
125
|
+
TwoJobs: R,
|
|
126
|
+
DependentsAmount: P,
|
|
127
|
+
OtherIncome: B,
|
|
128
|
+
Deductions: G,
|
|
129
|
+
ExtraWithholding: k
|
|
130
|
+
},
|
|
131
|
+
fieldsMetadata: W,
|
|
132
|
+
hookFormInternals: M,
|
|
133
|
+
getFormSubmissionValues: K(a, f)
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
ce as useFederalTaxesForm
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=useFederalTaxesForm.js.map
|
package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFederalTaxesForm.js","sources":["../../../../../../src/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useForm } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { EmployeeFederalTax } from '@gusto/embedded-api/models/components/employeefederaltax'\nimport type { EmployeeFederalTaxRev2020 } from '@gusto/embedded-api/models/components/employeefederaltaxrev2020'\nimport { useEmployeeTaxSetupGetFederalTaxes } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupUpdateFederalTaxesMutation } from '@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes'\nimport type {\n FilingStatus,\n PutV1EmployeesEmployeeIdFederalTaxesRequestBody,\n} from '@gusto/embedded-api/models/operations/putv1employeesemployeeidfederaltaxes'\nimport {\n createFederalTaxesSchema,\n FILING_STATUS_VALUES,\n type FederalTaxesOptionalFieldsToRequire,\n type FederalTaxesFormData,\n type FederalTaxesFormOutputs,\n type FilingStatusValue,\n} from './federalTaxesSchema'\nimport {\n FilingStatusField,\n TwoJobsField,\n DependentsAmountField,\n OtherIncomeField,\n DeductionsField,\n ExtraWithholdingField,\n} from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\n\nexport type { FederalTaxesOptionalFieldsToRequire } from './federalTaxesSchema'\n\nexport interface UseFederalTaxesFormProps {\n employeeId: string\n optionalFieldsToRequire?: FederalTaxesOptionalFieldsToRequire\n defaultValues?: Partial<FederalTaxesFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface FederalTaxesFields {\n FilingStatus: typeof FilingStatusField\n TwoJobs: typeof TwoJobsField\n DependentsAmount: typeof DependentsAmountField\n OtherIncome: typeof OtherIncomeField\n Deductions: typeof DeductionsField\n ExtraWithholding: typeof ExtraWithholdingField\n}\n\nexport interface UseFederalTaxesFormReady extends BaseFormHookReady<\n FieldsMetadata,\n FederalTaxesFormData,\n FederalTaxesFields\n> {\n data: {\n employeeFederalTax: EmployeeFederalTax\n }\n status: { isPending: boolean; mode: 'update' }\n actions: {\n onSubmit: () => Promise<HookSubmitResult<EmployeeFederalTax> | undefined>\n }\n}\n\nfunction isRev2020(federalTax: EmployeeFederalTax): federalTax is EmployeeFederalTaxRev2020 {\n return federalTax.w4DataType === 'rev_2020_w4'\n}\n\nfunction toFilingStatus(value: string | null | undefined): FilingStatusValue | '' {\n if (!value) return ''\n return FILING_STATUS_VALUES.find(allowed => allowed === value) ?? ''\n}\n\nfunction toNumber(value: string | null | undefined): number | undefined {\n if (value === null || value === undefined || value === '') return undefined\n const parsed = Number(value)\n return Number.isNaN(parsed) ? undefined : parsed\n}\n\nexport function useFederalTaxesForm({\n employeeId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseFederalTaxesFormProps): HookLoadingResult | UseFederalTaxesFormReady {\n const federalTaxesQuery = useEmployeeTaxSetupGetFederalTaxes({ employeeUuid: employeeId })\n\n const employeeFederalTax = federalTaxesQuery.data?.employeeFederalTax\n\n const [schema, metadataConfig] = useMemo(\n () => createFederalTaxesSchema({ optionalFieldsToRequire }),\n [optionalFieldsToRequire],\n )\n\n const filingStatusOptions = useMemo(\n () => FILING_STATUS_VALUES.map(value => ({ value, label: value })),\n [],\n )\n\n const twoJobsOptions = useMemo(\n () => [\n { label: 'Yes', value: 'true' },\n { label: 'No', value: 'false' },\n ],\n [],\n )\n\n const resolvedDefaults: FederalTaxesFormData = useMemo(() => {\n const rev2020Source =\n employeeFederalTax && isRev2020(employeeFederalTax) ? employeeFederalTax : undefined\n\n const fromServerFilingStatus = toFilingStatus(rev2020Source?.filingStatus)\n\n return {\n filingStatus: fromServerFilingStatus || partnerDefaults?.filingStatus || '',\n twoJobs: rev2020Source?.twoJobs ?? partnerDefaults?.twoJobs ?? false,\n dependentsAmount:\n toNumber(rev2020Source?.dependentsAmount) ?? partnerDefaults?.dependentsAmount ?? 0,\n otherIncome: toNumber(rev2020Source?.otherIncome) ?? partnerDefaults?.otherIncome ?? 0,\n deductions: toNumber(rev2020Source?.deductions) ?? partnerDefaults?.deductions ?? 0,\n extraWithholding:\n toNumber(rev2020Source?.extraWithholding) ?? partnerDefaults?.extraWithholding ?? 0,\n }\n }, [employeeFederalTax, partnerDefaults])\n\n const formMethods = useForm<FederalTaxesFormData, unknown, FederalTaxesFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const { mutateAsync: updateFederalTaxes, isPending } =\n useEmployeeTaxSetupUpdateFederalTaxesMutation()\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('FederalTaxesForm')\n\n const errorHandling = composeErrorHandler([federalTaxesQuery], { submitError, setSubmitError })\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const fieldsMetadata = {\n filingStatus: withOptions<FilingStatusValue>(\n baseMetadata.filingStatus,\n filingStatusOptions,\n FILING_STATUS_VALUES,\n ),\n twoJobs: withOptions<boolean>(baseMetadata.twoJobs, twoJobsOptions, [true, false]),\n dependentsAmount: baseMetadata.dependentsAmount,\n otherIncome: baseMetadata.otherIncome,\n deductions: baseMetadata.deductions,\n extraWithholding: baseMetadata.extraWithholding,\n }\n\n const onSubmit = async (): Promise<HookSubmitResult<EmployeeFederalTax> | undefined> => {\n let submitResult: HookSubmitResult<EmployeeFederalTax> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: FederalTaxesFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n if (!employeeFederalTax) {\n throw new SDKInternalError('Federal taxes record was not loaded before submit')\n }\n\n const requestBody: PutV1EmployeesEmployeeIdFederalTaxesRequestBody = {\n filingStatus: payload.filingStatus as FilingStatus,\n twoJobs: payload.twoJobs,\n dependentsAmount: payload.dependentsAmount,\n otherIncome: payload.otherIncome,\n deductions: payload.deductions,\n extraWithholding: payload.extraWithholding,\n w4DataType: 'rev_2020_w4',\n version: employeeFederalTax.version,\n }\n\n const response = await updateFederalTaxes({\n request: {\n employeeUuid: employeeId,\n requestBody,\n },\n })\n\n if (!response.employeeFederalTax) {\n throw new SDKInternalError('Federal taxes update did not return an updated record')\n }\n\n submitResult = { mode: 'update', data: response.employeeFederalTax }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n if (federalTaxesQuery.isLoading || !employeeFederalTax) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n employeeFederalTax,\n },\n status: {\n isPending,\n mode: 'update' as const,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n FilingStatus: FilingStatusField,\n TwoJobs: TwoJobsField,\n DependentsAmount: DependentsAmountField,\n OtherIncome: OtherIncomeField,\n Deductions: DeductionsField,\n ExtraWithholding: ExtraWithholdingField,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseFederalTaxesFormResult = HookLoadingResult | UseFederalTaxesFormReady\nexport type FederalTaxesFieldsMetadata = UseFederalTaxesFormReady['form']['fieldsMetadata']\nexport type FederalTaxesFormFields = UseFederalTaxesFormReady['form']['Fields']\n"],"names":["isRev2020","federalTax","toFilingStatus","value","FILING_STATUS_VALUES","allowed","toNumber","parsed","useFederalTaxesForm","employeeId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","federalTaxesQuery","useEmployeeTaxSetupGetFederalTaxes","employeeFederalTax","schema","metadataConfig","useMemo","createFederalTaxesSchema","filingStatusOptions","twoJobsOptions","resolvedDefaults","rev2020Source","formMethods","useForm","zodResolver","updateFederalTaxes","isPending","useEmployeeTaxSetupUpdateFederalTaxesMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","withOptions","onSubmit","submitResult","resolve","data","payload","SDKInternalError","requestBody","response","hookFormInternals","useHookFormInternals","FilingStatusField","TwoJobsField","DependentsAmountField","OtherIncomeField","DeductionsField","ExtraWithholdingField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;AA2EA,SAASA,EAAUC,GAAyE;AAC1F,SAAOA,EAAW,eAAe;AACnC;AAEA,SAASC,EAAeC,GAA0D;AAChF,SAAKA,IACEC,EAAqB,KAAK,CAAAC,MAAWA,MAAYF,CAAK,KAAK,KAD/C;AAErB;AAEA,SAASG,EAASH,GAAsD;AACtE,MAAIA,KAAU,QAA+BA,MAAU,GAAI;AAC3D,QAAMI,IAAS,OAAOJ,CAAK;AAC3B,SAAO,OAAO,MAAMI,CAAM,IAAI,SAAYA;AAC5C;AAEO,SAASC,GAAoB;AAAA,EAClC,YAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,eAAeC;AAAA,EACf,gBAAAC,IAAiB;AAAA,EACjB,kBAAAC,IAAmB;AACrB,GAA2E;AACzE,QAAMC,IAAoBC,EAAmC,EAAE,cAAcN,GAAY,GAEnFO,IAAqBF,EAAkB,MAAM,oBAE7C,CAACG,GAAQC,CAAc,IAAIC;AAAA,IAC/B,MAAMC,EAAyB,EAAE,yBAAAV,GAAyB;AAAA,IAC1D,CAACA,CAAuB;AAAA,EAAA,GAGpBW,IAAsBF;AAAA,IAC1B,MAAMf,EAAqB,IAAI,CAAAD,OAAU,EAAE,OAAAA,GAAO,OAAOA,IAAQ;AAAA,IACjE,CAAA;AAAA,EAAC,GAGGmB,IAAiBH;AAAA,IACrB,MAAM;AAAA,MACJ,EAAE,OAAO,OAAO,OAAO,OAAA;AAAA,MACvB,EAAE,OAAO,MAAM,OAAO,QAAA;AAAA,IAAQ;AAAA,IAEhC,CAAA;AAAA,EAAC,GAGGI,IAAyCJ,EAAQ,MAAM;AAC3D,UAAMK,IACJR,KAAsBhB,EAAUgB,CAAkB,IAAIA,IAAqB;AAI7E,WAAO;AAAA,MACL,cAH6Bd,EAAesB,GAAe,YAAY,KAG/Bb,GAAiB,gBAAgB;AAAA,MACzE,SAASa,GAAe,WAAWb,GAAiB,WAAW;AAAA,MAC/D,kBACEL,EAASkB,GAAe,gBAAgB,KAAKb,GAAiB,oBAAoB;AAAA,MACpF,aAAaL,EAASkB,GAAe,WAAW,KAAKb,GAAiB,eAAe;AAAA,MACrF,YAAYL,EAASkB,GAAe,UAAU,KAAKb,GAAiB,cAAc;AAAA,MAClF,kBACEL,EAASkB,GAAe,gBAAgB,KAAKb,GAAiB,oBAAoB;AAAA,IAAA;AAAA,EAExF,GAAG,CAACK,GAAoBL,CAAe,CAAC,GAElCc,IAAcC,EAAgE;AAAA,IAClF,UAAUC,EAAYV,CAAM;AAAA,IAC5B,MAAML;AAAA,IACN,kBAAAC;AAAA,IACA,eAAeU;AAAA,IACf,QAAQA;AAAA,IACR,cAAc,EAAE,iBAAiB,GAAA;AAAA,EAAK,CACvC,GAEK,EAAE,aAAaK,GAAoB,WAAAC,EAAA,IACvCC,EAAA,GAEI;AAAA,IACJ,mBAAAC;AAAA,IACA,OAAOC;AAAA,IACP,UAAUC;AAAA,EAAA,IACRC,EAAc,kBAAkB,GAE9BC,IAAgBC,EAAoB,CAACtB,CAAiB,GAAG,EAAE,aAAAkB,GAAa,gBAAAC,GAAgB,GAExFI,IAAeC,EAAwBpB,GAAgBO,EAAY,OAAO,GAC1Ec,IAAiB;AAAA,IACrB,cAAcC;AAAA,MACZH,EAAa;AAAA,MACbhB;AAAA,MACAjB;AAAA,IAAA;AAAA,IAEF,SAASoC,EAAqBH,EAAa,SAASf,GAAgB,CAAC,IAAM,EAAK,CAAC;AAAA,IACjF,kBAAkBe,EAAa;AAAA,IAC/B,aAAaA,EAAa;AAAA,IAC1B,YAAYA,EAAa;AAAA,IACzB,kBAAkBA,EAAa;AAAA,EAAA,GAG3BI,IAAW,YAAuE;AACtF,QAAIC;AAEJ,iBAAM,IAAI,QAAc,CAAAC,MAAW;AACjC,MAAKlB,EAAY;AAAA,QACf,OAAOmB,MAAkC;AACvC,gBAAMb,EAAkBa,GAAM,OAAMC,MAAW;AAC7C,gBAAI,CAAC7B;AACH,oBAAM,IAAI8B,EAAiB,mDAAmD;AAGhF,kBAAMC,IAA+D;AAAA,cACnE,cAAcF,EAAQ;AAAA,cACtB,SAASA,EAAQ;AAAA,cACjB,kBAAkBA,EAAQ;AAAA,cAC1B,aAAaA,EAAQ;AAAA,cACrB,YAAYA,EAAQ;AAAA,cACpB,kBAAkBA,EAAQ;AAAA,cAC1B,YAAY;AAAA,cACZ,SAAS7B,EAAmB;AAAA,YAAA,GAGxBgC,IAAW,MAAMpB,EAAmB;AAAA,cACxC,SAAS;AAAA,gBACP,cAAcnB;AAAA,gBACd,aAAAsC;AAAA,cAAA;AAAA,YACF,CACD;AAED,gBAAI,CAACC,EAAS;AACZ,oBAAM,IAAIF,EAAiB,uDAAuD;AAGpF,YAAAJ,IAAe,EAAE,MAAM,UAAU,MAAMM,EAAS,mBAAA;AAAA,UAClD,CAAC,GACDL,EAAA;AAAA,QACF;AAAA,QACA,MAAM;AACJ,UAAAA,EAAA;AAAA,QACF;AAAA,MAAA,EACF;AAAA,IACF,CAAC,GAEMD;AAAA,EACT,GAEMO,IAAoBC,EAAqBzB,CAAW;AAE1D,SAAIX,EAAkB,aAAa,CAACE,IAC3B,EAAE,WAAW,IAAe,eAAAmB,EAAA,IAG9B;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,oBAAAnB;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAAa;AAAA,MACA,MAAM;AAAA,IAAA;AAAA,IAER,SAAS,EAAE,UAAAY,EAAA;AAAA,IACX,eAAAN;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,cAAcgB;AAAA,QACd,SAASC;AAAA,QACT,kBAAkBC;AAAA,QAClB,aAAaC;AAAA,QACb,YAAYC;AAAA,QACZ,kBAAkBC;AAAA,MAAA;AAAA,MAEpB,gBAAAjB;AAAA,MACA,mBAAAU;AAAA,MACA,yBAAyBQ,EAA8BhC,GAAaR,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
@@ -2,34 +2,35 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as h } from "react-i18next";
|
|
3
3
|
import { useEmployeesGetSuspense as g } from "@gusto/embedded-api/react-query/employeesGet";
|
|
4
4
|
import { useCompaniesGetSuspense as y } from "@gusto/embedded-api/react-query/companiesGet";
|
|
5
|
-
import
|
|
5
|
+
import s from "dompurify";
|
|
6
6
|
import { useMemo as c } from "react";
|
|
7
7
|
import { BaseComponent as x } from "../../Base/Base.js";
|
|
8
8
|
import { useBase as E } from "../../Base/useBase.js";
|
|
9
9
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import "classnames";
|
|
11
|
+
import { componentEvents as C } from "../../../shared/constants.js";
|
|
12
|
+
import { ActionsLayout as L } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
13
|
+
import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
|
|
14
15
|
import N from "../../../assets/icons/icon-arrow-right.svg.js";
|
|
15
|
-
function
|
|
16
|
-
return
|
|
16
|
+
function w(o) {
|
|
17
|
+
return D("Employee.Landing"), I("Employee.Landing", o.dictionary), /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
|
|
17
18
|
}
|
|
18
19
|
const v = ({ employeeId: o, companyId: p, className: l }) => {
|
|
19
|
-
const { onEvent: d } = E(), t =
|
|
20
|
+
const { onEvent: d } = E(), t = S(), {
|
|
20
21
|
data: { employee: a }
|
|
21
|
-
} = g({ employeeId: o }), f = c(() =>
|
|
22
|
-
data: { company:
|
|
23
|
-
} = y({ companyId: p }), u = c(() =>
|
|
22
|
+
} = g({ employeeId: o }), f = c(() => s.sanitize(a.firstName), [a]), {
|
|
23
|
+
data: { company: m }
|
|
24
|
+
} = y({ companyId: p }), u = c(() => s.sanitize(m?.name ?? ""), [m]), { t: n } = h("Employee.Landing");
|
|
24
25
|
return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ e(
|
|
25
26
|
t.Box,
|
|
26
27
|
{
|
|
27
|
-
footer: /* @__PURE__ */ e(
|
|
28
|
+
footer: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ i(
|
|
28
29
|
t.Button,
|
|
29
30
|
{
|
|
30
31
|
variant: "secondary",
|
|
31
32
|
onClick: () => {
|
|
32
|
-
d(
|
|
33
|
+
d(C.EMPLOYEE_SELF_ONBOARDING_START);
|
|
33
34
|
},
|
|
34
35
|
children: [
|
|
35
36
|
n("getStartedCta"),
|
|
@@ -60,6 +61,6 @@ const v = ({ employeeId: o, companyId: p, className: l }) => {
|
|
|
60
61
|
) });
|
|
61
62
|
};
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
+
w as Landing
|
|
64
65
|
};
|
|
65
66
|
//# sourceMappingURL=Landing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport DOMPurify from 'dompurify'\nimport { useMemo } from 'react'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const sanitizedFirstName = useMemo(() => DOMPurify.sanitize(employee!.firstName), [employee])\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const sanitizedCompanyName = useMemo(() => DOMPurify.sanitize(company?.name ?? ''), [company])\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t('landingSubtitle', {\n firstName: sanitizedFirstName,\n companyName: sanitizedCompanyName,\n interpolation: { escapeValue: false },\n })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('landingDescription')}</Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[t('steps.personalInfo'), t('steps.taxInfo'), t('steps.bankInfo')]}\n />\n </Flex>\n </Flex>\n </Components.Box>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","sanitizedFirstName","useMemo","DOMPurify","company","useCompaniesGetSuspense","sanitizedCompanyName","t","useTranslation","ActionsLayout","jsxs","componentEvents","ArrowRightIcon","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport DOMPurify from 'dompurify'\nimport { useMemo } from 'react'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const sanitizedFirstName = useMemo(() => DOMPurify.sanitize(employee!.firstName), [employee])\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const sanitizedCompanyName = useMemo(() => DOMPurify.sanitize(company?.name ?? ''), [company])\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t('landingSubtitle', {\n firstName: sanitizedFirstName,\n companyName: sanitizedCompanyName,\n interpolation: { escapeValue: false },\n })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('landingDescription')}</Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[t('steps.personalInfo'), t('steps.taxInfo'), t('steps.bankInfo')]}\n />\n </Flex>\n </Flex>\n </Components.Box>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","sanitizedFirstName","useMemo","DOMPurify","company","useCompaniesGetSuspense","sanitizedCompanyName","t","useTranslation","ActionsLayout","jsxs","componentEvents","ArrowRightIcon","Flex"],"mappings":";;;;;;;;;;;;;;;AAuBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GAC1BC,EAAuB,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AACnE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEb;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAqBC,EAAQ,MAAMC,EAAU,SAASJ,EAAU,SAAS,GAAG,CAACA,CAAQ,CAAC,GAEtF;AAAA,IACJ,MAAM,EAAE,SAAAK,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAZ,GAAW,GACnCa,IAAuBJ,EAAQ,MAAMC,EAAU,SAASC,GAAS,QAAQ,EAAE,GAAG,CAACA,CAAO,CAAC,GAEvF,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACQ,EAAW;AAAA,IAAX;AAAA,MACC,0BACGY,GAAA,EACC,UAAA,gBAAAC;AAAA,QAACb,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQgB,EAAgB,8BAA8B;AAAA,UACxD;AAAA,UAEC,UAAA;AAAA,YAAAJ,EAAE,eAAe;AAAA,YAClB,gBAAAlB,EAACuB,GAAA,EAAe,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,GAEhC;AAAA,MAGF,4BAACC,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,IACpD,UAAA;AAAA,QAAA,gBAAAH,EAACG,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAxB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MACpB,YAAE,mBAAmB;AAAA,YACpB,WAAWI;AAAA,YACX,aAAaK;AAAA,YACb,eAAe,EAAE,aAAa,GAAA;AAAA,UAAM,CACrC,GACH;AAAA,UACA,gBAAAjB,EAACQ,EAAW,MAAX,EAAgB,SAAQ,cAAc,UAAAU,EAAE,oBAAoB,EAAA,CAAE;AAAA,QAAA,GACjE;AAAA,QACA,gBAAAG,EAACG,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAxB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAU,EAAE,eAAe,GAAE;AAAA,UAChD,gBAAAlB;AAAA,YAACQ,EAAW;AAAA,YAAX;AAAA,cACC,OAAO,CAACU,EAAE,oBAAoB,GAAGA,EAAE,eAAe,GAAGA,EAAE,gBAAgB,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1E,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaymentMethodBankAccount } from '@gusto/embedded-api/models/components/paymentmethodbankaccount';
|
|
2
|
-
import { ProfileDefaultValues } from '../Profile';
|
|
2
|
+
import { ProfileDefaultValues } from '../Profile/onboarding/Profile';
|
|
3
3
|
import { CompensationDefaultValues } from '../Compensation';
|
|
4
4
|
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
5
5
|
import { EmployeeOnboardingStatus } from '../../../shared/constants';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { FederalTaxes as p } from "../FederalTaxes/FederalTaxes.js";
|
|
3
|
-
import { StateTaxes as s } from "../StateTaxes/StateTaxes.js";
|
|
2
|
+
import { FederalTaxes as p } from "../FederalTaxes/onboarding/FederalTaxes.js";
|
|
3
|
+
import { StateTaxes as s } from "../StateTaxes/onboarding/StateTaxes.js";
|
|
4
4
|
import { EmployeeList as i } from "../EmployeeList/onboarding/EmployeeList.js";
|
|
5
5
|
import { ensureRequired as r } from "../../../helpers/ensureRequired.js";
|
|
6
6
|
import { useFlow as n } from "../../Flow/useFlow.js";
|