@gusto/embedded-react-sdk 0.48.3 → 0.49.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 +45 -0
- package/README.md +8 -8
- package/dist/components/Base/Base.d.ts +11 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +21 -21
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +16 -15
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +1 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.js +9 -8
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js +104 -102
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
- package/dist/components/Common/UI/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +87 -80
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +4 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Select/Select.js +28 -28
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +3 -2
- package/dist/components/Common/UI/Tabs/Tabs.js +9 -8
- package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +4 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +9 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.d.ts +3 -2
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +3 -3
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +3 -3
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +3 -3
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -2
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/index.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +6 -5
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js +4 -6
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/index.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.js +12 -18
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +15 -6
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +23 -21
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/index.d.ts +2 -0
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +10 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Industry.d.ts +5 -7
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +11 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/index.d.ts +1 -0
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.d.ts +1 -0
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +20 -20
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.module.scss.js +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +2 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.js +4 -6
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +38 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +14 -3
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +30 -23
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +10 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +4 -3
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +6 -4
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +10 -14
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +29 -25
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +11 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +55 -54
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +10 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js +11 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.test.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +7 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +5 -7
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +11 -11
- package/dist/components/Contractor/Address/Address.d.ts +14 -8
- package/dist/components/Contractor/Address/Address.js +83 -64
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Address.module.scss.js +8 -0
- package/dist/components/Contractor/Address/Address.module.scss.js.map +1 -0
- package/dist/components/Contractor/Address/index.d.ts +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +59 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js +32 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js.map +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +111 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js +26 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js.map +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/index.d.ts +6 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +112 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +133 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -0
- package/dist/components/Contractor/Address/types.d.ts +8 -0
- package/dist/components/Contractor/ContractorList/index.d.ts +4 -4
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.d.ts +29 -0
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +71 -0
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -0
- package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +3 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/index.d.ts +2 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +59 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +20 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -0
- package/dist/components/Contractor/Landing/Landing.d.ts +19 -0
- package/dist/components/Contractor/Landing/Landing.js +73 -0
- package/dist/components/Contractor/Landing/Landing.js.map +1 -0
- package/dist/components/Contractor/Landing/index.d.ts +2 -0
- package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +1 -0
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +7 -7
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +20 -8
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +4 -4
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.d.ts +23 -0
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +36 -0
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -0
- package/dist/components/Contractor/OnboardingSummary/index.d.ts +2 -0
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +11 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +59 -53
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +70 -91
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +62 -56
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +11 -2
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +7 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +54 -51
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +20 -22
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +109 -102
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +86 -65
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.d.ts +8 -0
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +79 -0
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/ContractorProfile.d.ts +52 -10
- package/dist/components/Contractor/Profile/ContractorProfile.js +205 -31
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js +8 -0
- package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js.map +1 -0
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.d.ts +8 -0
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +96 -0
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.d.ts +22 -0
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +40 -0
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/index.d.ts +1 -1
- package/dist/components/Contractor/Profile/shared/index.d.ts +2 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +125 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +73 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.test.d.ts +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +312 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +87 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js.map +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/index.d.ts +6 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +151 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +188 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -0
- package/dist/components/Contractor/Submit/Submit.d.ts +4 -4
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +6 -3
- package/dist/components/Contractor/exports/contractorOnboarding.js +14 -8
- package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -1
- package/dist/components/Employee/Compensation/management/Compensation.d.ts +4 -7
- package/dist/components/Employee/Compensation/management/Compensation.js +1 -5
- package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +13 -10
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/management/compensationStateMachine.js +23 -31
- package/dist/components/Employee/Compensation/management/compensationStateMachine.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +1 -0
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +3 -3
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js +20 -28
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +13 -10
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +29 -4
- package/dist/components/Employee/Dashboard/Dashboard.js +1 -4
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +20 -14
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +78 -108
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/management/Deductions.d.ts +4 -7
- package/dist/components/Employee/Deductions/management/Deductions.js +1 -5
- package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.d.ts +1 -0
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts +4 -3
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +1 -4
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js +17 -23
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -0
- package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js +25 -35
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +40 -37
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +1 -0
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.d.ts +19 -4
- package/dist/components/Employee/Documents/management/DocumentManager.js +4 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/management/Documents.d.ts +4 -7
- package/dist/components/Employee/Documents/management/Documents.js +1 -5
- package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
- package/dist/components/Employee/Documents/management/documentsStateMachine.js +5 -7
- package/dist/components/Employee/Documents/management/documentsStateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +2 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +8 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +3 -2
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.d.ts +1 -4
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +3 -2
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.d.ts +5 -8
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.d.ts +18 -3
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +21 -18
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +2 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +47 -46
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +8 -2
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +5 -7
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +4 -7
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +1 -5
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +4 -5
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +1 -4
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js +14 -20
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +4 -3
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +1 -4
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +7 -11
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +1 -5
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.d.ts +1 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.d.ts +7 -9
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +1 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +2 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js +8 -12
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.d.ts +10 -4
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +19 -5
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +32 -12
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +19 -17
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +23 -16
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +11 -15
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +10 -4
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +3 -7
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +1 -5
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +15 -21
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +4 -7
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +1 -5
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +24 -36
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.d.ts +5 -8
- package/dist/components/Employee/Profile/management/Profile.js +1 -5
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.d.ts +1 -0
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.d.ts +5 -6
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -4
- package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
- package/dist/components/Employee/Profile/management/profileStateMachine.js +14 -20
- package/dist/components/Employee/Profile/management/profileStateMachine.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +55 -54
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js +3 -5
- package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/Profile.d.ts +11 -12
- package/dist/components/Employee/Profile/onboarding/Profile.js +1 -5
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +19 -5
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +12 -18
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +4 -9
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +1 -5
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.d.ts +1 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.d.ts +5 -8
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +1 -4
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js +14 -20
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +5 -8
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +1 -4
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +29 -29
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +16 -5
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +5 -7
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +7 -11
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +1 -5
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.d.ts +1 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.d.ts +7 -9
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +1 -4
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +97 -95
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js +8 -12
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js.map +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +1 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +1 -0
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.d.ts +26 -1
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/InformationRequests/informationRequestsStateMachine.js +10 -14
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +3 -4
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +2 -11
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +11 -17
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +1 -3
- package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +25 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +18 -4
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -0
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +1 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +21 -20
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +2 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +28 -3
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -46
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +25 -24
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +13 -3
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +34 -44
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +12 -2
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +8 -10
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.d.ts +2 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +112 -112
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +4 -6
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +2 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +5 -9
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +10 -14
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +27 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +2 -2
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +2 -1
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +2 -2
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +2 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +1 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +28 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +128 -174
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +9 -7
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +2 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +2 -1
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +2 -2
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +2 -2
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/contexts/ThemeProvider/types.d.ts +19 -0
- package/dist/i18n/I18n.js +5 -2
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.AssignSignatory.json.js +1 -1
- package/dist/i18n/en/Company.FederalTaxes.json.js +27 -23
- package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +1 -1
- package/dist/i18n/en/Contractor.Address.json.js +13 -13
- package/dist/i18n/en/Contractor.DocumentsList.json.js +28 -0
- package/dist/i18n/en/Contractor.DocumentsList.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Landing.json.js +18 -0
- package/dist/i18n/en/Contractor.Landing.json.js.map +1 -0
- package/dist/i18n/en/Contractor.NewHireReport.json.js +12 -10
- package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
- package/dist/i18n/en/Contractor.OnboardingSummary.json.js +12 -0
- package/dist/i18n/en/Contractor.OnboardingSummary.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +13 -13
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +10 -6
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +8 -6
- package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +56 -50
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.DeductionsForm.json.js +8 -8
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js +1 -1
- package/dist/i18n/en/Employee.Management.Compensation.json.js +48 -42
- package/dist/i18n/en/Employee.Management.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Management.HomeAddress.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +40 -38
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +1 -0
- package/dist/i18n/en/common.json.js +34 -32
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +239 -205
- package/dist/index.js.map +1 -1
- package/dist/models/external.d.ts +293 -0
- package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js +3 -3
- package/dist/partner-hook-utils/form/buildFormSchema.d.ts +14 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js +41 -40
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +10 -1
- package/dist/shared/constants.js +9 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +19 -2
- package/dist/types/i18next.d.ts +66 -5
- package/docs/{reference → appendix}/endpoint-inventory.json +27 -0
- package/package.json +21 -22
- package/dist/components/Contractor/Address/Actions.d.ts +0 -2
- package/dist/components/Contractor/Address/Actions.js +0 -13
- package/dist/components/Contractor/Address/Actions.js.map +0 -1
- package/dist/components/Contractor/Address/Form.d.ts +0 -2
- package/dist/components/Contractor/Address/Form.js +0 -51
- package/dist/components/Contractor/Address/Form.js.map +0 -1
- package/dist/components/Contractor/Address/Head.d.ts +0 -2
- package/dist/components/Contractor/Address/Head.js +0 -17
- package/dist/components/Contractor/Address/Head.js.map +0 -1
- package/dist/components/Contractor/Address/useAddress.d.ts +0 -28
- package/dist/components/Contractor/Address/useAddress.js +0 -31
- package/dist/components/Contractor/Address/useAddress.js.map +0 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +0 -9
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +0 -143
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +0 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +0 -205
- package/dist/components/Contractor/Profile/useContractorProfile.js +0 -237
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeductionsCard.js","sources":["../../../../../../src/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport { useDeductionsList } from '../../shared/useDeductionsList'\nimport { useDeleteDeduction } from '../../shared/useDeleteDeduction'\nimport { DeleteDeductionDialog } from '../../shared/DeleteDeductionDialog'\nimport { formatDeductionAmount } from '../../shared/formatDeductionAmount'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\n/**\n * Props for {@link DeductionsCard}.\n *\n * @public\n */\nexport interface DeductionsCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link DeductionsCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone read-only card listing an employee's active deductions, with affordances to add, edit, or delete a deduction.\n *\n * @remarks\n * Fetches its own data and owns the delete confirm dialog. Has no alert API — alert rendering is the consumer's responsibility. Add and edit affordances do not open a form themselves; emit-then-route is the contract, so the consumer listens for the `addRequested` / `editRequested` events and renders {@link DeductionsEditForm} (or its own equivalent) accordingly. For an orchestrated card-plus-form flow, use {@link Deductions} instead.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/deductions/card/addRequested` | Fired when the \"Add deduction\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a deduction | The matching `Garnishment` |\n * | `employee/management/deductions/card/deleted` | Fired after a deduction is deleted via the confirm dialog | The deleted `Garnishment` |\n *\n * @param props - See {@link DeductionsCardProps}.\n * @returns The rendered deductions card.\n * @public\n */\nexport function DeductionsCard(props: DeductionsCardProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Management.Deductions\">\n <DeductionsCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsCardContent({ employeeId, onEvent }: DeductionsCardProps) {\n useI18n('Employee.Management.Deductions')\n const { t } = useTranslation('Employee.Management.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const deductionsList = useDeductionsList({ employeeId })\n\n const {\n pendingDeleteDeduction,\n setPendingDeleteDeduction,\n handleConfirmDelete: handleConfirmDeleteDeduction,\n } = useDeleteDeduction(async garnishment => {\n if (deductionsList.isLoading) return\n const result = await deductionsList.actions.onDelete(garnishment)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED, result.data.garnishment)\n }\n })\n\n // `useDeductionsList` returns `isLoading: true` even when the query has\n // errored and `data` is missing. Treat those rows as \"not loading\" so the\n // section doesn't show a perpetual skeleton while BaseLayout already\n // renders the error alert.\n const isDeductionsLoading =\n deductionsList.isLoading && deductionsList.errorHandling.errors.length === 0\n\n const deductions = deductionsList.isLoading ? [] : deductionsList.data.deductions\n const deletingGarnishmentUuid = deductionsList.isLoading\n ? undefined\n : deductionsList.status.deletingGarnishmentUuid\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleEdit = (garnishment: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED, garnishment)\n }\n\n const garnishmentsColumns = [\n {\n key: 'description',\n title: t('columns.deduction'),\n render: (garnishment: Garnishment) => garnishment.description || '-',\n },\n {\n key: 'frequency',\n title: t('columns.frequency'),\n render: (garnishment: Garnishment) => (garnishment.recurring ? t('recurring') : t('oneTime')),\n },\n {\n key: 'amount',\n title: t('columns.withhold'),\n render: (garnishment: Garnishment) =>\n formatDeductionAmount(garnishment, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('amountPerPaycheck', { value }),\n }),\n },\n ]\n\n const garnishmentsDataView = useDataView({\n data: deductions,\n columns: garnishmentsColumns,\n itemMenu: (garnishment: Garnishment) => (\n <HamburgerMenu\n isLoading={deletingGarnishmentUuid === garnishment.uuid}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(garnishment)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n setPendingDeleteDeduction(garnishment)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n />\n ),\n emptyState: () => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n ),\n })\n\n return (\n <BaseLayout error={deductionsList.errorHandling.errors}>\n <Components.Box\n withPadding={false}\n header={\n <Components.BoxHeader\n title={t('title')}\n action={\n <Components.Button variant=\"secondary\" onClick={handleAdd} icon={<PlusCircleIcon />}>\n {t('addDeductionCta')}\n </Components.Button>\n }\n />\n }\n >\n {isDeductionsLoading ? (\n <Loading />\n ) : (\n <DataView label={t('listLabel')} isWithinBox {...garnishmentsDataView} />\n )}\n </Components.Box>\n\n <DeleteDeductionDialog\n pendingDeleteDeduction={pendingDeleteDeduction}\n isPrimaryActionLoading={deletingGarnishmentUuid === pendingDeleteDeduction?.uuid}\n onClose={() => {\n setPendingDeleteDeduction(null)\n }}\n onConfirm={() => {\n void handleConfirmDeleteDeduction()\n }}\n title={t('deleteDeductionDialog.title')}\n description={t('deleteDeductionDialog.description', {\n deduction: pendingDeleteDeduction?.description ?? '',\n })}\n confirmLabel={t('deleteDeductionDialog.confirmCta')}\n cancelLabel={t('deleteDeductionDialog.cancelCta')}\n />\n </BaseLayout>\n )\n}\n"],"names":["DeductionsCard","props","jsx","BaseBoundaries","DeductionsCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","deductionsList","useDeductionsList","pendingDeleteDeduction","setPendingDeleteDeduction","handleConfirmDeleteDeduction","useDeleteDeduction","garnishment","result","componentEvents","isDeductionsLoading","deductions","deletingGarnishmentUuid","handleAdd","handleEdit","garnishmentsColumns","formatDeductionAmount","value","garnishmentsDataView","useDataView","HamburgerMenu","PencilSvg","TrashCanSvg","EmptyData","jsxs","BaseLayout","PlusCircleIcon","Loading","DataView","DeleteDeductionDialog"],"mappings":";;;;;;;;;;;;;;;;;;;AA8CO,SAASA,GAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,eAAc,kCAC5B,4BAACC,GAAA,EAAuB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Q,aAAY,SAASiB,GAAW,MAAM,gBAAAzB,EAACsC,GAAA,CAAA,CAAe,GAC9E,UAAAhC,EAAE,iBAAiB,EAAA,CACtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAKL,UAAAgB,IACC,gBAAAtB,EAACuC,GAAA,CAAA,CAAQ,IAET,gBAAAvC,EAACwC,GAAA,EAAS,OAAOlC,EAAE,WAAW,GAAG,aAAW,IAAE,GAAGwB,EAAA,CAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,IAI3E,gBAAA9B;AAAA,MAACyC;AAAA,MAAA;AAAA,QACC,wBAAA1B;AAAA,QACA,wBAAwBS,MAA4BT,GAAwB;AAAA,QAC5E,SAAS,MAAM;AACb,UAAAC,EAA0B,IAAI;AAAA,QAChC;AAAA,QACA,WAAW,MAAM;AACf,UAAKC,EAAA;AAAA,QACP;AAAA,QACA,OAAOX,EAAE,6BAA6B;AAAA,QACtC,aAAaA,EAAE,qCAAqC;AAAA,UAClD,WAAWS,GAAwB,eAAe;AAAA,QAAA,CACnD;AAAA,QACD,cAAcT,EAAE,kCAAkC;AAAA,QAClD,aAAaA,EAAE,iCAAiC;AAAA,MAAA;AAAA,IAAA;AAAA,EAClD,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"DeductionsCard.js","sources":["../../../../../../src/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport { useDeductionsList } from '../../shared/useDeductionsList'\nimport { useDeleteDeduction } from '../../shared/useDeleteDeduction'\nimport { DeleteDeductionDialog } from '../../shared/DeleteDeductionDialog'\nimport { formatDeductionAmount } from '../../shared/formatDeductionAmount'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\n/**\n * Props for {@link DeductionsCard}.\n *\n * @public\n */\nexport interface DeductionsCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link DeductionsCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone read-only card listing an employee's active deductions, with affordances to add, edit, or delete a deduction.\n *\n * @remarks\n * Fetches its own data and owns the delete confirm dialog. Has no alert API — alert rendering is the consumer's responsibility. Add and edit affordances do not open a form themselves; emit-then-route is the contract, so the consumer listens for the `addRequested` / `editRequested` events and renders {@link DeductionsEditForm} (or its own equivalent) accordingly. For an orchestrated card-plus-form flow, use {@link Deductions} instead.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/deductions/card/addRequested` | Fired when the \"Add deduction\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a deduction | The matching `Garnishment` |\n * | `employee/management/deductions/card/deleted` | Fired after a deduction is deleted via the confirm dialog | The deleted `Garnishment` |\n *\n * @param props - See {@link DeductionsCardProps}.\n * @returns The rendered deductions card.\n * @public\n */\nexport function DeductionsCard(props: DeductionsCardProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Management.Deductions\">\n <DeductionsCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsCardContent({ employeeId, onEvent }: DeductionsCardProps) {\n useI18n('Employee.Management.Deductions')\n const { t } = useTranslation('Employee.Management.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const deductionsList = useDeductionsList({ employeeId })\n\n const {\n pendingDeleteDeduction,\n setPendingDeleteDeduction,\n handleConfirmDelete: handleConfirmDeleteDeduction,\n } = useDeleteDeduction(async garnishment => {\n if (deductionsList.isLoading) return\n const result = await deductionsList.actions.onDelete(garnishment)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED, result.data.garnishment)\n }\n })\n\n // `useDeductionsList` returns `isLoading: true` even when the query has\n // errored and `data` is missing. Treat those rows as \"not loading\" so the\n // section doesn't show a perpetual skeleton while BaseLayout already\n // renders the error alert.\n const isDeductionsLoading =\n deductionsList.isLoading && deductionsList.errorHandling.errors.length === 0\n\n const deductions = deductionsList.isLoading ? [] : deductionsList.data.deductions\n const deletingGarnishmentUuid = deductionsList.isLoading\n ? undefined\n : deductionsList.status.deletingGarnishmentUuid\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleEdit = (garnishment: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED, garnishment)\n }\n\n const garnishmentsColumns = [\n {\n key: 'description',\n title: t('columns.deduction'),\n render: (garnishment: Garnishment) => garnishment.description || '-',\n },\n {\n key: 'frequency',\n title: t('columns.frequency'),\n render: (garnishment: Garnishment) => (garnishment.recurring ? t('recurring') : t('oneTime')),\n },\n {\n key: 'amount',\n title: t('columns.withhold'),\n render: (garnishment: Garnishment) =>\n formatDeductionAmount(garnishment, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('amountPerPaycheck', { value }),\n }),\n },\n ]\n\n const garnishmentsDataView = useDataView({\n data: deductions,\n columns: garnishmentsColumns,\n itemMenu: (garnishment: Garnishment) => (\n <HamburgerMenu\n isLoading={deletingGarnishmentUuid === garnishment.uuid}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(garnishment)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n setPendingDeleteDeduction(garnishment)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n />\n ),\n emptyState: () => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n ),\n })\n\n return (\n <BaseLayout error={deductionsList.errorHandling.errors}>\n <Components.Box\n withPadding={false}\n header={\n <Components.BoxHeader\n title={t('title')}\n action={\n <Components.Button variant=\"secondary\" onClick={handleAdd} icon={<PlusCircleIcon />}>\n {t('addDeductionCta')}\n </Components.Button>\n }\n />\n }\n >\n {isDeductionsLoading ? (\n <Loading />\n ) : (\n <DataView label={t('listLabel')} isWithinBox {...garnishmentsDataView} />\n )}\n </Components.Box>\n\n <DeleteDeductionDialog\n pendingDeleteDeduction={pendingDeleteDeduction}\n isPrimaryActionLoading={deletingGarnishmentUuid === pendingDeleteDeduction?.uuid}\n onClose={() => {\n setPendingDeleteDeduction(null)\n }}\n onConfirm={() => {\n void handleConfirmDeleteDeduction()\n }}\n title={t('deleteDeductionDialog.title')}\n description={t('deleteDeductionDialog.description', {\n deduction: pendingDeleteDeduction?.description ?? '',\n })}\n confirmLabel={t('deleteDeductionDialog.confirmCta')}\n cancelLabel={t('deleteDeductionDialog.cancelCta')}\n />\n </BaseLayout>\n )\n}\n"],"names":["DeductionsCard","props","jsx","BaseBoundaries","DeductionsCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","deductionsList","useDeductionsList","pendingDeleteDeduction","setPendingDeleteDeduction","handleConfirmDeleteDeduction","useDeleteDeduction","garnishment","result","componentEvents","isDeductionsLoading","deductions","deletingGarnishmentUuid","handleAdd","handleEdit","garnishmentsColumns","formatDeductionAmount","value","garnishmentsDataView","useDataView","HamburgerMenu","PencilSvg","TrashCanSvg","Empt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,EAAW;AAAA,MAAX;AAAA,QACC,aAAa;AAAA,QACb,QACE,gBAAAR;AAAA,UAACQ,EAAW;AAAA,UAAX;AAAA,YACC,OAAOF,EAAE,OAAO;AAAA,YAChB,QACE,gBAAAN,EAACQ,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASiB,GAAW,MAAM,gBAAAzB,EAACsC,GAAA,CAAA,CAAe,GAC9E,UAAAhC,EAAE,iBAAiB,EAAA,CACtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAKL,UAAAgB,IACC,gBAAAtB,EAACuC,GAAA,CAAA,CAAQ,IAET,gBAAAvC,EAACwC,GAAA,EAAS,OAAOlC,EAAE,WAAW,GAAG,aAAW,IAAE,GAAGwB,EAAA,CAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,IAI3E,gBAAA9B;AAAA,MAACyC;AAAA,MAAA;AAAA,QACC,wBAAA1B;AAAA,QACA,wBAAwBS,MAA4BT,GAAwB;AAAA,QAC5E,SAAS,MAAM;AACb,UAAAC,EAA0B,IAAI;AAAA,QAChC;AAAA,QACA,WAAW,MAAM;AACf,UAAKC,EAAA;AAAA,QACP;AAAA,QACA,OAAOX,EAAE,6BAA6B;AAAA,QACtC,aAAaA,EAAE,qCAAqC;AAAA,UAClD,WAAWS,GAAwB,eAAe;AAAA,QAAA,CACnD;AAAA,QACD,cAAcT,EAAE,kCAAkC;AAAA,QAClD,aAAaA,EAAE,iCAAiC;AAAA,MAAA;AAAA,IAAA;AAAA,EAClD,GACF;AAEJ;"}
|
package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseComponentInterface
|
|
1
|
+
import { BaseComponentInterface } from '../../../../Base';
|
|
2
2
|
/**
|
|
3
3
|
* Props for {@link DeductionsEditForm}.
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export interface DeductionsEditFormProps extends
|
|
7
|
+
export interface DeductionsEditFormProps extends BaseComponentInterface<'Employee.Management.Deductions'> {
|
|
8
8
|
/** The associated employee identifier. */
|
|
9
9
|
employeeId: string;
|
|
10
10
|
/** When provided, the form opens in edit mode pre-populated with the
|
|
@@ -19,6 +19,7 @@ export interface DeductionsEditFormProps extends CommonComponentInterface<'Emplo
|
|
|
19
19
|
* @remarks
|
|
20
20
|
* Renders the inline form for a post-tax custom deduction or court-ordered garnishment. Looks up the row to edit by `editingDeductionId`; omit it to open in add mode. Resolves its text against the `Employee.Management.Deductions` translation namespace so partner overrides on that namespace flow into the form. For an orchestrated card-plus-form flow, use {@link Deductions}.
|
|
21
21
|
*
|
|
22
|
+
* @events
|
|
22
23
|
* | Event | Description | Data |
|
|
23
24
|
* | ----- | ----------- | ---- |
|
|
24
25
|
* | `employee/management/deductions/editForm/created` | Fired after a new deduction is saved | The created `Garnishment` |
|
|
@@ -29,4 +30,4 @@ export interface DeductionsEditFormProps extends CommonComponentInterface<'Emplo
|
|
|
29
30
|
* @returns The rendered add/edit form.
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
32
|
-
export declare function DeductionsEditForm({ FallbackComponent, ...props }: DeductionsEditFormProps
|
|
33
|
+
export declare function DeductionsEditForm({ FallbackComponent, ...props }: DeductionsEditFormProps): import("react").JSX.Element;
|
package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js
CHANGED
|
@@ -6,10 +6,7 @@ import "../../../../Base/useBase.js";
|
|
|
6
6
|
import { useI18n as _, useComponentDictionary as p } from "../../../../../i18n/I18n.js";
|
|
7
7
|
import { componentEvents as i } from "../../../../../shared/constants.js";
|
|
8
8
|
import { DeductionsForm as f } from "../../shared/DeductionsForm/DeductionsForm.js";
|
|
9
|
-
function F({
|
|
10
|
-
FallbackComponent: r,
|
|
11
|
-
...n
|
|
12
|
-
}) {
|
|
9
|
+
function F({ FallbackComponent: r, ...n }) {
|
|
13
10
|
return /* @__PURE__ */ o(
|
|
14
11
|
M,
|
|
15
12
|
{
|
package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeductionsEditForm.js","sources":["../../../../../../src/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.tsx"],"sourcesContent":["import { DeductionsForm } from '../../shared/DeductionsForm'\nimport { useDeductionsList } from '../../shared/useDeductionsList'\nimport { useManagementDeductionsFormDictionary } from './useFormDictionary'\nimport {
|
|
1
|
+
{"version":3,"file":"DeductionsEditForm.js","sources":["../../../../../../src/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.tsx"],"sourcesContent":["import { DeductionsForm } from '../../shared/DeductionsForm'\nimport { useDeductionsList } from '../../shared/useDeductionsList'\nimport { useManagementDeductionsFormDictionary } from './useFormDictionary'\nimport { BaseBoundaries, BaseLayout, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\n/**\n * Props for {@link DeductionsEditForm}.\n *\n * @public\n */\nexport interface DeductionsEditFormProps extends BaseComponentInterface<'Employee.Management.Deductions'> {\n /** The associated employee identifier. */\n employeeId: string\n /** When provided, the form opens in edit mode pre-populated with the\n * matching active deduction. Omit to open in add mode. */\n editingDeductionId?: string\n /** Callback invoked when the form emits an event. See the events table on {@link DeductionsEditForm} for the available event types and payloads. */\n onEvent: BaseComponentInterface['onEvent']\n}\n\n/**\n * Standalone add/edit surface for a single employee deduction.\n *\n * @remarks\n * Renders the inline form for a post-tax custom deduction or court-ordered garnishment. Looks up the row to edit by `editingDeductionId`; omit it to open in add mode. Resolves its text against the `Employee.Management.Deductions` translation namespace so partner overrides on that namespace flow into the form. For an orchestrated card-plus-form flow, use {@link Deductions}.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/deductions/editForm/created` | Fired after a new deduction is saved | The created `Garnishment` |\n * | `employee/management/deductions/editForm/updated` | Fired after an existing deduction is updated | The updated `Garnishment` |\n * | `employee/management/deductions/editForm/cancelled` | Fired when the user cancels the form | — |\n *\n * @param input - See {@link DeductionsEditFormProps}, plus a `FallbackComponent` override for the error boundary.\n * @returns The rendered add/edit form.\n * @public\n */\nexport function DeductionsEditForm({ FallbackComponent, ...props }: DeductionsEditFormProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Deductions\"\n FallbackComponent={FallbackComponent}\n >\n <DeductionsEditFormRoot {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsEditFormRoot({\n employeeId,\n editingDeductionId,\n dictionary,\n onEvent,\n}: DeductionsEditFormProps) {\n useI18n('Employee.Management.Deductions')\n useComponentDictionary('Employee.Management.Deductions', dictionary)\n\n // React Query dedupes against any sibling consumer of this list, so this\n // is just a typed handle on the loaded row used to seed edit mode.\n const list = useDeductionsList({ employeeId })\n const formDictionary = useManagementDeductionsFormDictionary()\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const deduction = editingDeductionId\n ? (list.data.deductions.find(d => d.uuid === editingDeductionId) ?? null)\n : null\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsForm\n employeeId={employeeId}\n deduction={deduction}\n dictionary={formDictionary}\n onSaved={(saved, mode) => {\n onEvent(\n mode === 'create'\n ? componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CREATED\n : componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_UPDATED,\n saved,\n )\n }}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CANCELLED)\n }}\n />\n </BaseLayout>\n )\n}\n"],"names":["DeductionsEditForm","FallbackComponent","props","jsx","BaseBoundaries","DeductionsEditFormRoot","employeeId","editingDeductionId","dictionary","onEvent","useI18n","useComponentDictionary","list","useDeductionsList","formDictionary","useManagementDeductionsFormDictionary","BaseLayout","deduction","d","DeductionsForm","saved","mode","componentEvents"],"mappings":";;;;;;;;AAuCO,SAASA,EAAmB,EAAE,mBAAAC,GAAmB,GAAGC,KAAkC;AAC3F,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAH;AAAA,MAEA,UAAA,gBAAAE,EAACE,GAAA,EAAwB,GAAGH,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGzC;AAEA,SAASG,EAAuB;AAAA,EAC9B,YAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AACF,GAA4B;AAC1B,EAAAC,EAAQ,gCAAgC,GACxCC,EAAuB,kCAAkCH,CAAU;AAInE,QAAMI,IAAOC,EAAkB,EAAE,YAAAP,GAAY,GACvCQ,IAAiBC,EAAA;AAEvB,MAAIH,EAAK;AACP,6BAAQI,GAAA,EAAW,WAAS,IAAC,OAAOJ,EAAK,cAAc,QAAQ;AAGjE,QAAMK,IAAYV,IACbK,EAAK,KAAK,WAAW,KAAK,CAAAM,MAAKA,EAAE,SAASX,CAAkB,KAAK,OAClE;AAEJ,SACE,gBAAAJ,EAACa,GAAA,EAAW,OAAOJ,EAAK,cAAc,QACpC,UAAA,gBAAAT;AAAA,IAACgB;AAAA,IAAA;AAAA,MACC,YAAAb;AAAA,MACA,WAAAW;AAAA,MACA,YAAYH;AAAA,MACZ,SAAS,CAACM,GAAOC,MAAS;AACxB,QAAAZ;AAAA,UACEY,MAAS,WACLC,EAAgB,mDAChBA,EAAgB;AAAA,UACpBF;AAAA,QAAA;AAAA,MAEJ;AAAA,MACA,UAAU,MAAM;AACd,QAAAX,EAAQa,EAAgB,kDAAkD;AAAA,MAC5E;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,33 +1,27 @@
|
|
|
1
1
|
import { state as n, transition as t, reduce as e } from "robot3";
|
|
2
2
|
import { DeductionsEditFormContextual as c, DeductionsCardContextual as _ } from "./DeductionsComponents.js";
|
|
3
3
|
import { componentEvents as d } from "../../../../shared/constants.js";
|
|
4
|
-
const i = e(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
successAlert: E,
|
|
16
|
-
editingDeductionId: void 0
|
|
17
|
-
})
|
|
18
|
-
), M = {
|
|
4
|
+
const i = e((E) => ({
|
|
5
|
+
...E,
|
|
6
|
+
component: _,
|
|
7
|
+
successAlert: null,
|
|
8
|
+
editingDeductionId: void 0
|
|
9
|
+
})), D = (E) => e((o) => ({
|
|
10
|
+
...o,
|
|
11
|
+
component: _,
|
|
12
|
+
successAlert: E,
|
|
13
|
+
editingDeductionId: void 0
|
|
14
|
+
})), M = {
|
|
19
15
|
card: n(
|
|
20
16
|
t(
|
|
21
17
|
d.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED,
|
|
22
18
|
"editDeduction",
|
|
23
|
-
e(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
30
|
-
)
|
|
19
|
+
e((E) => ({
|
|
20
|
+
...E,
|
|
21
|
+
component: c,
|
|
22
|
+
successAlert: null,
|
|
23
|
+
editingDeductionId: void 0
|
|
24
|
+
}))
|
|
31
25
|
),
|
|
32
26
|
t(
|
|
33
27
|
d.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deductionsStateMachine.js","sources":["../../../../../src/components/Employee/Deductions/management/deductionsStateMachine.ts"],"sourcesContent":["import { reduce, state, transition } from 'robot3'\nimport type { ComponentType } from 'react'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { DeductionsContextInterface } from './DeductionsComponents'\nimport { DeductionsCardContextual, DeductionsEditFormContextual } from './DeductionsComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED]: Garnishment\n}\n\nconst returnToCard = reduce(
|
|
1
|
+
{"version":3,"file":"deductionsStateMachine.js","sources":["../../../../../src/components/Employee/Deductions/management/deductionsStateMachine.ts"],"sourcesContent":["import { reduce, state, transition } from 'robot3'\nimport type { ComponentType } from 'react'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { DeductionsContextInterface } from './DeductionsComponents'\nimport { DeductionsCardContextual, DeductionsEditFormContextual } from './DeductionsComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED]: Garnishment\n}\n\nconst returnToCard = reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsCardContextual as ComponentType,\n successAlert: null,\n editingDeductionId: undefined,\n}))\n\nconst returnToCardWithAlert = (alert: DeductionsContextInterface['successAlert']) =>\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsCardContextual as ComponentType,\n successAlert: alert,\n editingDeductionId: undefined,\n }))\n\n/** @internal */\nexport const deductionsStateMachine = {\n card: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED,\n 'editDeduction',\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsEditFormContextual as ComponentType,\n successAlert: null,\n editingDeductionId: undefined,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED,\n 'editDeduction',\n reduce(\n (\n ctx: DeductionsContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED\n >,\n ): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsEditFormContextual as ComponentType,\n successAlert: null,\n editingDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED,\n 'card',\n returnToCardWithAlert('deductionDeleted'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_ALERT_DISMISSED,\n 'card',\n returnToCard,\n ),\n ),\n editDeduction: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CREATED,\n 'card',\n returnToCardWithAlert('deductionAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_UPDATED,\n 'card',\n returnToCardWithAlert('deductionUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CANCELLED,\n 'card',\n returnToCard,\n ),\n ),\n}\n"],"names":["returnToCard","reduce","ctx","DeductionsCardContextual","returnToCardWithAlert","alert","deductionsStateMachine","state","transition","componentEvents","DeductionsEditFormContextual","ev"],"mappings":";;;AAYA,MAAMA,IAAeC,EAAO,CAACC,OAAiE;AAAA,EAC5F,GAAGA;AAAA,EACH,WAAWC;AAAA,EACX,cAAc;AAAA,EACd,oBAAoB;AACtB,EAAE,GAEIC,IAAwB,CAACC,MAC7BJ,EAAO,CAACC,OAAiE;AAAA,EACvE,GAAGA;AAAA,EACH,WAAWC;AAAA,EACX,cAAcE;AAAA,EACd,oBAAoB;AACtB,EAAE,GAGSC,IAAyB;AAAA,EACpC,MAAMC;AAAA,IACJC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR,EAAO,CAACC,OAAiE;AAAA,QACvE,GAAGA;AAAA,QACH,WAAWQ;AAAA,QACX,cAAc;AAAA,QACd,oBAAoB;AAAA,MAAA,EACpB;AAAA,IAAA;AAAA,IAEJF;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR;AAAA,QACE,CACEC,GACAS,OAIgC;AAAA,UAChC,GAAGT;AAAA,UACH,WAAWQ;AAAA,UACX,cAAc;AAAA,UACd,oBAAoBC,EAAG,QAAQ;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,IAEFH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAsB,kBAAkB;AAAA,IAAA;AAAA,IAE1CI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,eAAeO;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAsB,gBAAgB;AAAA,IAAA;AAAA,IAExCI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAsB,kBAAkB;AAAA,IAAA;AAAA,IAE1CI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -14,6 +14,7 @@ export interface DeductionsProps extends BaseComponentInterface<'Employee.Deduct
|
|
|
14
14
|
* @remarks
|
|
15
15
|
* Renders the employee's current deductions as a list, with an empty state when none exist. Users add or edit deductions inline — post-tax custom deductions or court-ordered garnishments — and can complete the step with or without any active deductions.
|
|
16
16
|
*
|
|
17
|
+
* @events
|
|
17
18
|
* | Event | Description | Data |
|
|
18
19
|
* | ----- | ----------- | ---- |
|
|
19
20
|
* | `employee/deductions/add` | Fired when the user opens the form to add a new deduction | — |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deductions.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/Deductions.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n DeductionsListContextual,\n type DeductionsContextInterface,\n} from './deductionsContextualComponents'\nimport { deductionsMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\n\n/**\n * Props for {@link Deductions}.\n *\n * @public\n */\nexport interface DeductionsProps extends BaseComponentInterface<'Employee.Deductions'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for collecting an employee's post-tax deductions and court-ordered garnishments.\n *\n * @remarks\n * Renders the employee's current deductions as a list, with an empty state when none exist. Users add or edit deductions inline — post-tax custom deductions or court-ordered garnishments — and can complete the step with or without any active deductions.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/deductions/add` | Fired when the user opens the form to add a new deduction | — |\n * | `employee/deductions/edit` | Fired when the user opens the form to edit an existing deduction | The matching `Garnishment` |\n * | `employee/deductions/created` | Fired after a new deduction is saved | The created `Garnishment` |\n * | `employee/deductions/updated` | Fired after an existing deduction is updated | The updated `Garnishment` |\n * | `employee/deductions/deleted` | Fired after a deduction is deleted and others remain | The deleted `Garnishment` |\n * | `employee/deductions/deletedEmpty` | Fired after the last deduction is deleted, leaving none | — |\n * | `employee/deductions/cancel` | Fired when the user cancels the form while other deductions exist | — |\n * | `employee/deductions/cancelEmpty` | Fired when the user cancels the form and no deductions remain | — |\n * | `employee/deductions/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - See {@link DeductionsProps}.\n * @returns The deductions onboarding step.\n * @public\n * @group Block Components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Deductions\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Deductions({ employeeId, dictionary, onEvent }: DeductionsProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Deductions\">\n <DeductionsRoot employeeId={employeeId} dictionary={dictionary} onEvent={onEvent} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsRoot({ employeeId, dictionary, onEvent }: DeductionsProps) {\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const machine = useMemo(\n () =>\n createMachine('list', deductionsMachine, (initialContext: DeductionsContextInterface) => ({\n ...initialContext,\n component: DeductionsListContextual,\n employeeId,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["Deductions","employeeId","dictionary","onEvent","jsx","BaseBoundaries","DeductionsRoot","useComponentDictionary","useI18n","machine","useMemo","createMachine","deductionsMachine","initialContext","DeductionsListContextual","Flow"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"Deductions.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/Deductions.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n DeductionsListContextual,\n type DeductionsContextInterface,\n} from './deductionsContextualComponents'\nimport { deductionsMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\n\n/**\n * Props for {@link Deductions}.\n *\n * @public\n */\nexport interface DeductionsProps extends BaseComponentInterface<'Employee.Deductions'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for collecting an employee's post-tax deductions and court-ordered garnishments.\n *\n * @remarks\n * Renders the employee's current deductions as a list, with an empty state when none exist. Users add or edit deductions inline — post-tax custom deductions or court-ordered garnishments — and can complete the step with or without any active deductions.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/deductions/add` | Fired when the user opens the form to add a new deduction | — |\n * | `employee/deductions/edit` | Fired when the user opens the form to edit an existing deduction | The matching `Garnishment` |\n * | `employee/deductions/created` | Fired after a new deduction is saved | The created `Garnishment` |\n * | `employee/deductions/updated` | Fired after an existing deduction is updated | The updated `Garnishment` |\n * | `employee/deductions/deleted` | Fired after a deduction is deleted and others remain | The deleted `Garnishment` |\n * | `employee/deductions/deletedEmpty` | Fired after the last deduction is deleted, leaving none | — |\n * | `employee/deductions/cancel` | Fired when the user cancels the form while other deductions exist | — |\n * | `employee/deductions/cancelEmpty` | Fired when the user cancels the form and no deductions remain | — |\n * | `employee/deductions/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - See {@link DeductionsProps}.\n * @returns The deductions onboarding step.\n * @public\n * @group Block Components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Deductions\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Deductions({ employeeId, dictionary, onEvent }: DeductionsProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Deductions\">\n <DeductionsRoot employeeId={employeeId} dictionary={dictionary} onEvent={onEvent} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsRoot({ employeeId, dictionary, onEvent }: DeductionsProps) {\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const machine = useMemo(\n () =>\n createMachine('list', deductionsMachine, (initialContext: DeductionsContextInterface) => ({\n ...initialContext,\n component: DeductionsListContextual,\n employeeId,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["Deductions","employeeId","dictionary","onEvent","jsx","BaseBoundaries","DeductionsRoot","useComponentDictionary","useI18n","machine","useMemo","createMachine","deductionsMachine","initialContext","DeductionsListContextual","Flow"],"mappings":";;;;;;;;AA2DO,SAASA,EAAW,EAAE,YAAAC,GAAY,YAAAC,GAAY,SAAAC,KAA4B;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,uBAC5B,4BAACC,GAAA,EAAe,YAAAL,GAAwB,YAAAC,GAAwB,SAAAC,EAAA,CAAkB,EAAA,CACpF;AAEJ;AAEA,SAASG,EAAe,EAAE,YAAAL,GAAY,YAAAC,GAAY,SAAAC,KAA4B;AAC5E,EAAAI,EAAuB,uBAAuBL,CAAU,GACxDM,EAAQ,qBAAqB;AAE7B,QAAMC,IAAUC;AAAA,IACd,MACEC,EAAc,QAAQC,GAAmB,CAACC,OAAgD;AAAA,MACxF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAb;AAAA,IAAA,EACA;AAAA,IACJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAG,EAACW,GAAA,EAAK,SAAAN,GAAkB,SAAAN,EAAA,CAAkB;AACnD;"}
|
|
@@ -6,13 +6,11 @@ const _ = {
|
|
|
6
6
|
t(
|
|
7
7
|
i.EMPLOYEE_DEDUCTION_ADD,
|
|
8
8
|
"form",
|
|
9
|
-
n(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
)
|
|
9
|
+
n((o) => ({
|
|
10
|
+
...o,
|
|
11
|
+
component: e,
|
|
12
|
+
editingDeductionId: void 0
|
|
13
|
+
}))
|
|
16
14
|
),
|
|
17
15
|
t(
|
|
18
16
|
i.EMPLOYEE_DEDUCTION_EDIT,
|
|
@@ -31,46 +29,38 @@ const _ = {
|
|
|
31
29
|
t(
|
|
32
30
|
i.EMPLOYEE_DEDUCTION_CREATED,
|
|
33
31
|
"list",
|
|
34
|
-
n(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
})
|
|
40
|
-
)
|
|
32
|
+
n((o) => ({
|
|
33
|
+
...o,
|
|
34
|
+
component: E,
|
|
35
|
+
editingDeductionId: void 0
|
|
36
|
+
}))
|
|
41
37
|
),
|
|
42
38
|
t(
|
|
43
39
|
i.EMPLOYEE_DEDUCTION_UPDATED,
|
|
44
40
|
"list",
|
|
45
|
-
n(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
51
|
-
)
|
|
41
|
+
n((o) => ({
|
|
42
|
+
...o,
|
|
43
|
+
component: E,
|
|
44
|
+
editingDeductionId: void 0
|
|
45
|
+
}))
|
|
52
46
|
),
|
|
53
47
|
t(
|
|
54
48
|
i.EMPLOYEE_DEDUCTION_CANCEL,
|
|
55
49
|
"list",
|
|
56
|
-
n(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
)
|
|
50
|
+
n((o) => ({
|
|
51
|
+
...o,
|
|
52
|
+
component: E,
|
|
53
|
+
editingDeductionId: void 0
|
|
54
|
+
}))
|
|
63
55
|
),
|
|
64
56
|
t(
|
|
65
57
|
i.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,
|
|
66
58
|
"list",
|
|
67
|
-
n(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
)
|
|
59
|
+
n((o) => ({
|
|
60
|
+
...o,
|
|
61
|
+
component: E,
|
|
62
|
+
editingDeductionId: void 0
|
|
63
|
+
}))
|
|
74
64
|
)
|
|
75
65
|
),
|
|
76
66
|
done: d()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateMachine.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DeductionsContextInterface, EventPayloads } from './deductionsContextualComponents'\nimport {\n DeductionsListContextual,\n DeductionsFormContextual,\n} from './deductionsContextualComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\n/** @internal */\nexport const deductionsMachine = {\n list: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_ADD,\n 'form',\n reduce(
|
|
1
|
+
{"version":3,"file":"stateMachine.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DeductionsContextInterface, EventPayloads } from './deductionsContextualComponents'\nimport {\n DeductionsListContextual,\n DeductionsFormContextual,\n} from './deductionsContextualComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\n/** @internal */\nexport const deductionsMachine = {\n list: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_ADD,\n 'form',\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsFormContextual,\n editingDeductionId: undefined,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_EDIT,\n 'form',\n reduce(\n (\n ctx: DeductionsContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_DEDUCTION_EDIT>,\n ): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsFormContextual,\n editingDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_DEDUCTION_DONE, 'done'),\n ),\n form: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CREATED,\n 'list',\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n 'list',\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL,\n 'list',\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,\n 'list',\n reduce((ctx: DeductionsContextInterface): DeductionsContextInterface => ({\n ...ctx,\n component: DeductionsListContextual,\n editingDeductionId: undefined,\n })),\n ),\n ),\n done: final(),\n}\n"],"names":["deductionsMachine","state","transition","componentEvents","reduce","ctx","DeductionsFormContextual","ev","DeductionsListContextual","final"],"mappings":";;;AAUO,MAAMA,IAAoB;AAAA,EAC/B,MAAMC;AAAA,IACJC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACC,OAAiE;AAAA,QACvE,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,oBAAoB;AAAA,MAAA,EACpB;AAAA,IAAA;AAAA,IAEJJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OACgC;AAAA,UAChC,GAAGF;AAAA,UACH,WAAWC;AAAA,UACX,oBAAoBC,EAAG,QAAQ;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,IAEFL,EAAWC,EAAgB,yBAAyB,MAAM;AAAA,EAAA;AAAA,EAE5D,MAAMF;AAAA,IACJC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACC,OAAiE;AAAA,QACvE,GAAGA;AAAA,QACH,WAAWG;AAAA,QACX,oBAAoB;AAAA,MAAA,EACpB;AAAA,IAAA;AAAA,IAEJN;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACC,OAAiE;AAAA,QACvE,GAAGA;AAAA,QACH,WAAWG;AAAA,QACX,oBAAoB;AAAA,MAAA,EACpB;AAAA,IAAA;AAAA,IAEJN;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACC,OAAiE;AAAA,QACvE,GAAGA;AAAA,QACH,WAAWG;AAAA,QACX,oBAAoB;AAAA,MAAA,EACpB;AAAA,IAAA;AAAA,IAEJN;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACC,OAAiE;AAAA,QACvE,GAAGA;AAAA,QACH,WAAWG;AAAA,QACX,oBAAoB;AAAA,MAAA,EACpB;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,MAAMC,EAAA;AACR;"}
|
|
@@ -1,85 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useChildSupportGarnishmentForm as
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as S } from "react-i18next";
|
|
3
|
+
import { useChildSupportGarnishmentForm as b } from "../useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js";
|
|
4
4
|
import { Form as g } from "../../../../Common/Form/Form.js";
|
|
5
|
-
import { Flex as
|
|
5
|
+
import { Flex as d } from "../../../../Common/Flex/Flex.js";
|
|
6
6
|
import { ActionsLayout as R } from "../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
-
import { useComponentContext as
|
|
7
|
+
import { useComponentContext as P } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import { BaseLayout as h } from "../../../../Base/Base.js";
|
|
10
|
-
import { SDKFormProvider as
|
|
10
|
+
import { SDKFormProvider as f } from "../../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
11
11
|
function F({
|
|
12
12
|
employeeId: n,
|
|
13
13
|
deduction: a,
|
|
14
|
-
onSaved:
|
|
15
|
-
onCancel:
|
|
14
|
+
onSaved: s,
|
|
15
|
+
onCancel: p
|
|
16
16
|
}) {
|
|
17
|
-
const { t: e } =
|
|
17
|
+
const { t: e } = S("Employee.DeductionsForm"), c = P(), t = b({
|
|
18
18
|
employeeId: n,
|
|
19
19
|
garnishmentId: a?.uuid
|
|
20
20
|
});
|
|
21
|
-
if (
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
const { Fields: i } =
|
|
24
|
-
const o = await
|
|
25
|
-
o &&
|
|
21
|
+
if (t.isLoading)
|
|
22
|
+
return /* @__PURE__ */ r(h, { isLoading: !0, error: t.errorHandling.errors });
|
|
23
|
+
const { Fields: i } = t.form, m = t.status.selectedAgency !== null, y = async () => {
|
|
24
|
+
const o = await t.actions.onSubmit();
|
|
25
|
+
o && s(o.data, o.mode);
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ r(h, { error: t.errorHandling.errors, children: /* @__PURE__ */ r(f, { formHookResult: t, children: /* @__PURE__ */ r(g, { onSubmit: y, children: /* @__PURE__ */ l(d, { flexDirection: "column", gap: 32, children: [
|
|
28
|
+
/* @__PURE__ */ r(c.Heading, { as: "h3", children: e("types.childSupport") }),
|
|
29
|
+
/* @__PURE__ */ l(d, { flexDirection: "column", gap: 20, children: [
|
|
30
|
+
/* @__PURE__ */ r(
|
|
31
31
|
i.State,
|
|
32
32
|
{
|
|
33
33
|
label: e("childSupport.agencyLabel"),
|
|
34
|
+
placeholder: e("childSupport.agencyPlaceholder"),
|
|
34
35
|
description: e("childSupport.agencyDescription"),
|
|
35
36
|
getOptionLabel: (o) => o.name,
|
|
36
37
|
validationMessages: { REQUIRED: e("childSupport.agencyRequired") }
|
|
37
38
|
}
|
|
38
39
|
),
|
|
39
|
-
|
|
40
|
+
t.status.isManualPaymentRequired && /* @__PURE__ */ r(
|
|
40
41
|
c.Alert,
|
|
41
42
|
{
|
|
42
43
|
status: "warning",
|
|
43
44
|
label: e("childSupport.manualPaymentRequired")
|
|
44
45
|
}
|
|
45
46
|
),
|
|
46
|
-
m && /* @__PURE__ */
|
|
47
|
-
i.FipsCode && /* @__PURE__ */
|
|
47
|
+
m && /* @__PURE__ */ l(d, { flexDirection: "column", gap: 20, children: [
|
|
48
|
+
i.FipsCode && /* @__PURE__ */ r(
|
|
48
49
|
i.FipsCode,
|
|
49
50
|
{
|
|
50
51
|
label: e("childSupport.countyLabel"),
|
|
52
|
+
placeholder: e("childSupport.countyPlaceholder"),
|
|
51
53
|
description: e("childSupport.countyDescription"),
|
|
52
54
|
getOptionLabel: (o) => o.county ?? e("childSupport.allCounties"),
|
|
53
55
|
validationMessages: { REQUIRED: e("childSupport.countyRequired") }
|
|
54
56
|
}
|
|
55
57
|
),
|
|
56
|
-
i.CaseNumber && /* @__PURE__ */
|
|
58
|
+
i.CaseNumber && /* @__PURE__ */ r(
|
|
57
59
|
i.CaseNumber,
|
|
58
60
|
{
|
|
59
|
-
label:
|
|
61
|
+
label: u(t.status.selectedAgency, "case_number"),
|
|
60
62
|
description: e("childSupport.caseNumberDescription"),
|
|
61
63
|
validationMessages: { REQUIRED: e("childSupport.caseNumberRequired") }
|
|
62
64
|
}
|
|
63
65
|
),
|
|
64
|
-
i.OrderNumber && /* @__PURE__ */
|
|
66
|
+
i.OrderNumber && /* @__PURE__ */ r(
|
|
65
67
|
i.OrderNumber,
|
|
66
68
|
{
|
|
67
|
-
label:
|
|
69
|
+
label: u(t.status.selectedAgency, "order_number"),
|
|
68
70
|
description: e("childSupport.orderNumberDescription"),
|
|
69
71
|
validationMessages: { REQUIRED: e("childSupport.orderNumberRequired") }
|
|
70
72
|
}
|
|
71
73
|
),
|
|
72
|
-
i.RemittanceNumber && /* @__PURE__ */
|
|
74
|
+
i.RemittanceNumber && /* @__PURE__ */ r(
|
|
73
75
|
i.RemittanceNumber,
|
|
74
76
|
{
|
|
75
|
-
label:
|
|
77
|
+
label: u(t.status.selectedAgency, "remittance_number"),
|
|
76
78
|
description: e("childSupport.remittanceNumberDescription"),
|
|
77
79
|
validationMessages: {
|
|
78
80
|
REQUIRED: e("childSupport.remittanceNumberRequired")
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
),
|
|
82
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ r(
|
|
83
85
|
i.PayPeriodMaximum,
|
|
84
86
|
{
|
|
85
87
|
label: e("childSupport.totalAmountWithheld"),
|
|
@@ -92,7 +94,7 @@ function F({
|
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
96
|
),
|
|
95
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ r(
|
|
96
98
|
i.Amount,
|
|
97
99
|
{
|
|
98
100
|
label: e("childSupport.maxPaycheckPercentage"),
|
|
@@ -106,27 +108,28 @@ function F({
|
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
),
|
|
109
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ r(
|
|
110
112
|
i.PaymentPeriod,
|
|
111
113
|
{
|
|
112
114
|
label: e("childSupport.paymentPeriodLabel"),
|
|
115
|
+
placeholder: e("childSupport.paymentPeriodPlaceholder"),
|
|
113
116
|
description: e("childSupport.paymentPeriodDescription"),
|
|
114
|
-
getOptionLabel: (o) =>
|
|
117
|
+
getOptionLabel: (o) => E(e, o),
|
|
115
118
|
validationMessages: { REQUIRED: e("childSupport.paymentPeriodRequired") }
|
|
116
119
|
}
|
|
117
120
|
)
|
|
118
121
|
] })
|
|
119
122
|
] }),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
m && /* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ l(R, { children: [
|
|
124
|
+
/* @__PURE__ */ r(c.Button, { variant: "secondary", type: "button", onClick: p, children: e("actions.cancel") }),
|
|
125
|
+
m && /* @__PURE__ */ r(c.Button, { type: "submit", isLoading: t.status.isPending, children: e("actions.save") })
|
|
123
126
|
] })
|
|
124
127
|
] }) }) }) });
|
|
125
128
|
}
|
|
126
|
-
function
|
|
127
|
-
return n?.requiredAttributes?.find((
|
|
129
|
+
function u(n, a) {
|
|
130
|
+
return n?.requiredAttributes?.find((p) => p.key === a)?.label ?? a;
|
|
128
131
|
}
|
|
129
|
-
function
|
|
132
|
+
function E(n, a) {
|
|
130
133
|
switch (a) {
|
|
131
134
|
case "Every week":
|
|
132
135
|
return n("childSupport.paymentPeriod.everyWeek");
|
package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildSupportFormView.js","sources":["../../../../../../src/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { PaymentPeriod } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishmentchildsupport'\nimport { useChildSupportGarnishmentForm } from '../useChildSupportGarnishmentForm'\nimport type { StateFieldEntry, CountyEntry } from '../useChildSupportGarnishmentForm'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ChildSupportFormViewProps {\n employeeId: string\n deduction: Garnishment | null\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}\n\n/** @internal */\nexport function ChildSupportFormView({\n employeeId,\n deduction,\n onSaved,\n onCancel,\n}: ChildSupportFormViewProps) {\n const { t } = useTranslation('Employee.DeductionsForm')\n const Components = useComponentContext()\n\n const form = useChildSupportGarnishmentForm({\n employeeId,\n garnishmentId: deduction?.uuid,\n })\n\n if (form.isLoading) {\n return <BaseLayout isLoading error={form.errorHandling.errors} />\n }\n\n const { Fields } = form.form\n const hasSelection = form.status.selectedAgency !== null\n\n const handleSubmit = async () => {\n const result = await form.actions.onSubmit()\n if (result) onSaved(result.data, result.mode)\n }\n\n return (\n <BaseLayout error={form.errorHandling.errors}>\n <SDKFormProvider formHookResult={form}>\n <Form onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{t('types.childSupport')}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.State\n label={t('childSupport.agencyLabel')}\n description={t('childSupport.agencyDescription')}\n getOptionLabel={(entry: StateFieldEntry) => entry.name}\n validationMessages={{ REQUIRED: t('childSupport.agencyRequired') }}\n />\n\n {form.status.isManualPaymentRequired && (\n <Components.Alert\n status=\"warning\"\n label={t('childSupport.manualPaymentRequired')}\n />\n )}\n\n {hasSelection && (\n <Flex flexDirection=\"column\" gap={20}>\n {Fields.FipsCode && (\n <Fields.FipsCode\n label={t('childSupport.countyLabel')}\n description={t('childSupport.countyDescription')}\n getOptionLabel={(entry: CountyEntry) =>\n entry.county ?? t('childSupport.allCounties')\n }\n validationMessages={{ REQUIRED: t('childSupport.countyRequired') }}\n />\n )}\n {Fields.CaseNumber && (\n <Fields.CaseNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'case_number')}\n description={t('childSupport.caseNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.caseNumberRequired') }}\n />\n )}\n {Fields.OrderNumber && (\n <Fields.OrderNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'order_number')}\n description={t('childSupport.orderNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.orderNumberRequired') }}\n />\n )}\n {Fields.RemittanceNumber && (\n <Fields.RemittanceNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'remittance_number')}\n description={t('childSupport.remittanceNumberDescription')}\n validationMessages={{\n REQUIRED: t('childSupport.remittanceNumberRequired'),\n }}\n />\n )}\n <Fields.PayPeriodMaximum\n label={t('childSupport.totalAmountWithheld')}\n description={t('childSupport.totalAmountWithheldDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n REQUIRED: t('childSupport.payPeriodMaximumRequired'),\n NEGATIVE_AMOUNT: t('childSupport.amountNonNegative'),\n }}\n />\n <Fields.Amount\n label={t('childSupport.maxPaycheckPercentage')}\n description={t('childSupport.maxPaycheckPercentageDescription')}\n format=\"percent\"\n min={0}\n max={100}\n validationMessages={{\n REQUIRED: t('childSupport.amountRequired'),\n PERCENT_OUT_OF_RANGE: t('childSupport.percentOutOfRange'),\n }}\n />\n <Fields.PaymentPeriod\n label={t('childSupport.paymentPeriodLabel')}\n description={t('childSupport.paymentPeriodDescription')}\n getOptionLabel={(value: PaymentPeriod) => paymentPeriodLabel(t, value)}\n validationMessages={{ REQUIRED: t('childSupport.paymentPeriodRequired') }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('actions.cancel')}\n </Components.Button>\n {hasSelection && (\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n )}\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\nfunction requiredAttrLabel(\n selectedAgency: { requiredAttributes?: Array<{ key?: string; label?: string }> } | null,\n key: 'case_number' | 'order_number' | 'remittance_number',\n): string {\n const match = selectedAgency?.requiredAttributes?.find(a => a.key === key)\n return match?.label ?? key\n}\n\nfunction paymentPeriodLabel(\n t: ReturnType<typeof useTranslation<'Employee.DeductionsForm'>>['t'],\n value: PaymentPeriod,\n): string {\n switch (value) {\n case 'Every week':\n return t('childSupport.paymentPeriod.everyWeek')\n case 'Every other week':\n return t('childSupport.paymentPeriod.everyOtherWeek')\n case 'Twice per month':\n return t('childSupport.paymentPeriod.twicePerMonth')\n case 'Monthly':\n return t('childSupport.paymentPeriod.monthly')\n }\n}\n"],"names":["ChildSupportFormView","employeeId","deduction","onSaved","onCancel","t","useTranslation","Components","useComponentContext","form","useChildSupportGarnishmentForm","BaseLayout","Fields","hasSelection","handleSubmit","result","SDKFormProvider","jsx","Form","jsxs","Flex","entry","requiredAttrLabel","value","paymentPeriodLabel","ActionsLayout","selectedAgency","key","a"],"mappings":";;;;;;;;;;AAoBO,SAASA,EAAqB;AAAA,EACnC,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAA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,KAAK;AACH,aAAOA,EAAE,2CAA2C;AAAA,IACtD,KAAK;AACH,aAAOA,EAAE,0CAA0C;AAAA,IACrD,KAAK;AACH,aAAOA,EAAE,oCAAoC;AAAA,EAAA;AAEnD;"}
|
|
1
|
+
{"version":3,"file":"ChildSupportFormView.js","sources":["../../../../../../src/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { PaymentPeriod } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishmentchildsupport'\nimport { useChildSupportGarnishmentForm } from '../useChildSupportGarnishmentForm'\nimport type { StateFieldEntry, CountyEntry } from '../useChildSupportGarnishmentForm'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ChildSupportFormViewProps {\n employeeId: string\n deduction: Garnishment | null\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}\n\n/** @internal */\nexport function ChildSupportFormView({\n employeeId,\n deduction,\n onSaved,\n onCancel,\n}: ChildSupportFormViewProps) {\n const { t } = useTranslation('Employee.DeductionsForm')\n const Components = useComponentContext()\n\n const form = useChildSupportGarnishmentForm({\n employeeId,\n garnishmentId: deduction?.uuid,\n })\n\n if (form.isLoading) {\n return <BaseLayout isLoading error={form.errorHandling.errors} />\n }\n\n const { Fields } = form.form\n const hasSelection = form.status.selectedAgency !== null\n\n const handleSubmit = async () => {\n const result = await form.actions.onSubmit()\n if (result) onSaved(result.data, result.mode)\n }\n\n return (\n <BaseLayout error={form.errorHandling.errors}>\n <SDKFormProvider formHookResult={form}>\n <Form onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{t('types.childSupport')}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.State\n label={t('childSupport.agencyLabel')}\n placeholder={t('childSupport.agencyPlaceholder')}\n description={t('childSupport.agencyDescription')}\n getOptionLabel={(entry: StateFieldEntry) => entry.name}\n validationMessages={{ REQUIRED: t('childSupport.agencyRequired') }}\n />\n\n {form.status.isManualPaymentRequired && (\n <Components.Alert\n status=\"warning\"\n label={t('childSupport.manualPaymentRequired')}\n />\n )}\n\n {hasSelection && (\n <Flex flexDirection=\"column\" gap={20}>\n {Fields.FipsCode && (\n <Fields.FipsCode\n label={t('childSupport.countyLabel')}\n placeholder={t('childSupport.countyPlaceholder')}\n description={t('childSupport.countyDescription')}\n getOptionLabel={(entry: CountyEntry) =>\n entry.county ?? t('childSupport.allCounties')\n }\n validationMessages={{ REQUIRED: t('childSupport.countyRequired') }}\n />\n )}\n {Fields.CaseNumber && (\n <Fields.CaseNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'case_number')}\n description={t('childSupport.caseNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.caseNumberRequired') }}\n />\n )}\n {Fields.OrderNumber && (\n <Fields.OrderNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'order_number')}\n description={t('childSupport.orderNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.orderNumberRequired') }}\n />\n )}\n {Fields.RemittanceNumber && (\n <Fields.RemittanceNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'remittance_number')}\n description={t('childSupport.remittanceNumberDescription')}\n validationMessages={{\n REQUIRED: t('childSupport.remittanceNumberRequired'),\n }}\n />\n )}\n <Fields.PayPeriodMaximum\n label={t('childSupport.totalAmountWithheld')}\n description={t('childSupport.totalAmountWithheldDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n REQUIRED: t('childSupport.payPeriodMaximumRequired'),\n NEGATIVE_AMOUNT: t('childSupport.amountNonNegative'),\n }}\n />\n <Fields.Amount\n label={t('childSupport.maxPaycheckPercentage')}\n description={t('childSupport.maxPaycheckPercentageDescription')}\n format=\"percent\"\n min={0}\n max={100}\n validationMessages={{\n REQUIRED: t('childSupport.amountRequired'),\n PERCENT_OUT_OF_RANGE: t('childSupport.percentOutOfRange'),\n }}\n />\n <Fields.PaymentPeriod\n label={t('childSupport.paymentPeriodLabel')}\n placeholder={t('childSupport.paymentPeriodPlaceholder')}\n description={t('childSupport.paymentPeriodDescription')}\n getOptionLabel={(value: PaymentPeriod) => paymentPeriodLabel(t, value)}\n validationMessages={{ REQUIRED: t('childSupport.paymentPeriodRequired') }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('actions.cancel')}\n </Components.Button>\n {hasSelection && (\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n )}\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\nfunction requiredAttrLabel(\n selectedAgency: { requiredAttributes?: Array<{ key?: string; label?: string }> } | null,\n key: 'case_number' | 'order_number' | 'remittance_number',\n): string {\n const match = selectedAgency?.requiredAttributes?.find(a => a.key === key)\n return match?.label ?? key\n}\n\nfunction paymentPeriodLabel(\n t: ReturnType<typeof useTranslation<'Employee.DeductionsForm'>>['t'],\n value: PaymentPeriod,\n): string {\n switch (value) {\n case 'Every week':\n return t('childSupport.paymentPeriod.everyWeek')\n case 'Every other week':\n return t('childSupport.paymentPeriod.everyOtherWeek')\n case 'Twice per month':\n return t('childSupport.paymentPeriod.twicePerMonth')\n case 'Monthly':\n return t('childSupport.paymentPeriod.monthly')\n }\n}\n"],"names":["ChildSupportFormView","employeeId","deduction","onSaved","onCancel","t","useTranslation","Components","useComponentContext","form","useChildSupportGarnishmentForm","BaseLayout","Fields","hasSelection","handleSubmit","result","SDKFormProvider","jsx","Form","jsxs","Flex","entry","requi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