@gusto/embedded-react-sdk 0.48.3 → 0.50.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 +71 -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/createCompoundContext.d.ts +1 -1
- package/dist/components/Base/createCompoundContext.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/CalendarPreview/CalendarLegend.d.ts +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarLegend.js.map +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/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 +5 -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 +5 -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 +7 -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 +5 -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 +5 -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/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +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 +10 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +8 -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 +5 -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 +5 -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 +5 -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/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +1 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.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 +5 -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 +5 -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 +60 -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 +150 -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 +60 -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 +22 -10
- 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 +6 -6
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +105 -108
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.module.scss.js +8 -0
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.module.scss.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/index.d.ts +2 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.d.ts +93 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +22 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/index.d.ts +5 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.d.ts +127 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js +109 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +83 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.js +42 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +58 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js +21 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.d.ts +20 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.js +9 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/index.d.ts +5 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +117 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js +91 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/types.d.ts +0 -5
- 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 +13 -4
- 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 +126 -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 +196 -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/compensationSchema.d.ts +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.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/childSupportGarnishmentFormSchema.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.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 +5 -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/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.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 +10 -4
- 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/useFederalTaxesForm/federalTaxesSchema.d.ts +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +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 +20 -6
- 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 +34 -14
- 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/useBankForm/useBankForm.d.ts +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +7 -6
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +2 -2
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.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 +3 -2
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +11 -12
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +2 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +36 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +31 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.d.ts +1 -0
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +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 +20 -6
- 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 +37 -19
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +113 -13
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +2 -7
- 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/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 +27 -2
- 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 +4 -3
- 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/helpers/validations.d.ts +12 -0
- package/dist/helpers/validations.js +6 -4
- package/dist/helpers/validations.js.map +1 -1
- 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 +23 -3
- package/dist/index.js +250 -206
- package/dist/index.js.map +1 -1
- package/dist/models/external.d.ts +299 -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/dist/types/sdkError.js +13 -6
- package/dist/types/sdkError.js.map +1 -1
- package/docs/{reference → guides}/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/PaymentMethod/BankAccountForm.d.ts +0 -3
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +0 -56
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +0 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +0 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +0 -33
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.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
|
@@ -4,12 +4,12 @@ import { BaseComponentInterface } from '../../Base';
|
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export interface DashboardFlowProps extends BaseComponentInterface {
|
|
7
|
+
export interface DashboardFlowProps extends BaseComponentInterface<never> {
|
|
8
8
|
/** The associated employee identifier. */
|
|
9
9
|
employeeId: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Hub for viewing and managing a single employee's profile, pay, and documents.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Renders a tabbed view of an employee's profile (Basic details, Job and pay,
|
|
@@ -20,17 +20,7 @@ export interface DashboardFlowProps extends BaseComponentInterface {
|
|
|
20
20
|
*
|
|
21
21
|
* Every tab section of the dashboard is also exported as a self-contained
|
|
22
22
|
* block that can be dropped into a custom layout without the surrounding
|
|
23
|
-
* dashboard chrome
|
|
24
|
-
*
|
|
25
|
-
* - {@link Compensation} — Job & Pay tab (jobs, pay type, wage, effective date)
|
|
26
|
-
* - {@link Profile} — Basic details tab (name, start date, SSN, DOB, email)
|
|
27
|
-
* - {@link FederalTaxes} — Taxes tab, federal withholding settings
|
|
28
|
-
* - {@link StateTaxes} — Taxes tab, state withholding settings
|
|
29
|
-
* - {@link PaymentMethod} — direct-deposit bank accounts and split-paycheck configuration
|
|
30
|
-
* - {@link Deductions} — post-tax deductions (garnishments)
|
|
31
|
-
* - {@link HomeAddress} — home address management
|
|
32
|
-
* - {@link WorkAddress} — work address management
|
|
33
|
-
* - {@link Documents} — documents and forms (read-only viewer)
|
|
23
|
+
* dashboard chrome (see the blocks below).
|
|
34
24
|
*
|
|
35
25
|
* Each block wraps its read-only card, its edit form, and the card↔form
|
|
36
26
|
* transitions as a single drop-in. For cases where that built-in orchestration
|
|
@@ -47,6 +37,7 @@ export interface DashboardFlowProps extends BaseComponentInterface {
|
|
|
47
37
|
* complete, current set of events observable from `DashboardFlow`, grouped by
|
|
48
38
|
* the tab that emits them.
|
|
49
39
|
*
|
|
40
|
+
* @events
|
|
50
41
|
* | Event | Description | Data |
|
|
51
42
|
* | ----- | ----------- | ---- |
|
|
52
43
|
* | `employee/management/profile/editRequested` | Fired when "Edit" is clicked on the Basic details (Profile) card | `{ employeeId: string }` |
|
|
@@ -99,13 +90,28 @@ export interface DashboardFlowProps extends BaseComponentInterface {
|
|
|
99
90
|
* | `employee/dashboard/tabChange` | Fired when the user switches dashboard tabs | `{ tab: 'basicDetails' \| 'jobAndPay' \| 'taxes' \| 'documents' }` |
|
|
100
91
|
* | `employee/dismiss` | Fired when the user dismisses a top-of-dashboard success alert | — |
|
|
101
92
|
*
|
|
93
|
+
* @components
|
|
94
|
+
* - {@link Dashboard}
|
|
95
|
+
* - {@link ProfileEditForm}
|
|
96
|
+
* - {@link HomeAddressEditForm}
|
|
97
|
+
* - {@link WorkAddressEditForm}
|
|
98
|
+
* - {@link FederalTaxesEditForm}
|
|
99
|
+
* - {@link StateTaxesEditForm}
|
|
100
|
+
* - {@link PaymentMethodBankForm}
|
|
101
|
+
* - {@link PaymentMethodSplitForm}
|
|
102
|
+
* - {@link CompensationAddJobForm}
|
|
103
|
+
* - {@link CompensationEditForm}
|
|
104
|
+
* - {@link CompensationAddAnotherJobForm}
|
|
105
|
+
* - {@link DeductionsEditForm}
|
|
106
|
+
* - {@link DocumentManager}
|
|
107
|
+
*
|
|
102
108
|
* @param props - See {@link DashboardFlowProps}.
|
|
103
109
|
* @returns The tabbed dashboard with internal navigation between cards and edit screens.
|
|
104
110
|
* @public
|
|
105
111
|
* @group Flow Components
|
|
106
112
|
*
|
|
107
113
|
* @example
|
|
108
|
-
* ```tsx
|
|
114
|
+
* ```tsx title="App.tsx"
|
|
109
115
|
* import { EmployeeManagement } from '@gusto/embedded-react-sdk'
|
|
110
116
|
*
|
|
111
117
|
* function MyApp() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardFlow.js","sources":["../../../../src/components/Employee/Dashboard/DashboardFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { dashboardStateMachine } from './dashboardStateMachine'\nimport { type DashboardContextInterface, DashboardViewContextual } from './DashboardComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\n\n/**\n * Props for {@link DashboardFlow}.\n *\n * @public\n */\nexport interface DashboardFlowProps extends BaseComponentInterface {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * The main entry point for the employee dashboard.\n *\n * @remarks\n * Renders a tabbed view of an employee's profile (Basic details, Job and pay,\n * Taxes, Documents), wires the card surfaces to their corresponding edit\n * screens via an internal state machine, and surfaces success alerts at the\n * top of the dashboard after each successful edit. Wraps the dashboard in\n * error and suspense boundaries.\n *\n * Every tab section of the dashboard is also exported as a self-contained\n * block that can be dropped into a custom layout without the surrounding\n * dashboard chrome:\n *\n * - {@link Compensation} — Job & Pay tab (jobs, pay type, wage, effective date)\n * - {@link Profile} — Basic details tab (name, start date, SSN, DOB, email)\n * - {@link FederalTaxes} — Taxes tab, federal withholding settings\n * - {@link StateTaxes} — Taxes tab, state withholding settings\n * - {@link PaymentMethod} — direct-deposit bank accounts and split-paycheck configuration\n * - {@link Deductions} — post-tax deductions (garnishments)\n * - {@link HomeAddress} — home address management\n * - {@link WorkAddress} — work address management\n * - {@link Documents} — documents and forms (read-only viewer)\n *\n * Each block wraps its read-only card, its edit form, and the card↔form\n * transitions as a single drop-in. For cases where that built-in orchestration\n * doesn't fit — rendering a form in a modal, driving navigation via a router,\n * or showing a card read-only — each block's card and form are also exported\n * individually (e.g. {@link CompensationCard}, {@link CompensationEditForm}).\n * Using the individual pieces means owning the swap, any success alerts, and\n * cross-component state yourself.\n *\n * The dashboard composes self-fetching cards and their edit forms and forwards\n * every event they emit to the partner via `onEvent`; its internal state\n * machine also reacts to a subset of these events to swap between the cards\n * and edit screens and to surface success alerts. The table below is the\n * complete, current set of events observable from `DashboardFlow`, grouped by\n * the tab that emits them.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/profile/editRequested` | Fired when \"Edit\" is clicked on the Basic details (Profile) card | `{ employeeId: string }` |\n * | `employee/management/profile/updated` | Fired after the basic-details edit form is saved; the dashboard returns to the cards and surfaces the \"Profile updated\" alert | Updated `Employee` entity |\n * | `employee/management/profile/editCancelled` | Fired when the user clicks Cancel on the basic-details edit form; the dashboard returns to the cards | — |\n * | `employee/management/homeAddress/editRequested` | Fired when \"Manage\" is clicked on the Home address card | `{ employeeId: string }` |\n * | `employee/management/homeAddress/created` | Fired after a new home address is created on the manage screen; the manage screen stays open | Created `EmployeeAddress` entity |\n * | `employee/management/homeAddress/updated` | Fired after a home address is updated on the manage screen; the manage screen stays open | Updated `EmployeeAddress` entity |\n * | `employee/management/homeAddress/deleted` | Fired after a non-active home address is deleted on the manage screen; the manage screen stays open | Deleted `EmployeeAddress` entity |\n * | `employee/management/homeAddress/editCancelled` | Fired when the user clicks Back on the manage screen; the dashboard returns to the cards | — |\n * | `employee/management/workAddress/editRequested` | Fired when \"Manage\" is clicked on the Work address card | `{ employeeId: string }` |\n * | `employee/management/workAddress/created` | Fired after a new work address is created on the manage screen; the manage screen stays open | Created `EmployeeWorkAddress` entity |\n * | `employee/management/workAddress/updated` | Fired after a work address is updated on the manage screen; the manage screen stays open | Updated `EmployeeWorkAddress` entity |\n * | `employee/management/workAddress/deleted` | Fired after a work address is deleted on the manage screen; the manage screen stays open | Deleted `EmployeeWorkAddress` entity |\n * | `employee/management/workAddress/editCancelled` | Fired when the user clicks Back on the manage screen; the dashboard returns to the cards | — |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job on the Compensation card | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when \"Add job\" is clicked from the Compensation card's empty state | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when \"Add another job\" is clicked on the Compensation card | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card | `{ employeeId: string, compensationId: string }` |\n * | `employee/management/compensation/editForm/submitted` | Fired after an edit-compensation save completes; the dashboard returns to the cards | Updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user cancels the edit-compensation form; the dashboard returns to the cards | — |\n * | `employee/management/compensation/addJobForm/submitted` | Fired after the first job and compensation are saved; the dashboard returns to the cards and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addJobForm/cancelled` | Fired when the user cancels the add-job form; the dashboard returns to the cards | — |\n * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after a secondary job and compensation are saved; the dashboard returns to the cards and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addAnotherJobForm/cancelled` | Fired when the user cancels the add-another-job form; the dashboard returns to the cards | — |\n * | `employee/management/paymentMethod/card/addRequested` | Fired when \"Add bank account\" / \"Add another bank account\" is clicked on the Payment card | — |\n * | `employee/management/paymentMethod/card/splitRequested` | Fired when \"Split paycheck\" is clicked on the Payment card | — |\n * | `employee/management/paymentMethod/card/bankAccountDeleted` | Fired after a bank account is deleted from the card; the dashboard surfaces the \"Bank account deleted\" alert | Response from the Delete a bank account endpoint |\n * | `employee/management/paymentMethod/bankForm/submitted` | Fired after a new bank account is saved; the dashboard returns to the cards and surfaces the \"Bank account added\" alert | Created `EmployeeBankAccount` entity |\n * | `employee/management/paymentMethod/bankForm/cancelled` | Fired when the user cancels the add-bank-account screen; the dashboard returns to the cards | — |\n * | `employee/management/paymentMethod/splitForm/submitted` | Fired after the split configuration is saved; the dashboard returns to the cards and surfaces the \"Split updated\" alert | Updated `EmployeePaymentMethod` entity |\n * | `employee/management/paymentMethod/splitForm/cancelled` | Fired when the user cancels the split-paycheck screen; the dashboard returns to the cards | — |\n * | `employee/management/deductions/card/addRequested` | Fired when \"Add deduction\" is clicked on the Deductions card | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when a row's \"Edit\" menu item is chosen on the Deductions card | The `Garnishment` row being edited |\n * | `employee/management/deductions/card/deleted` | Fired after the soft-delete dialog is confirmed; the dashboard surfaces the \"Deduction deleted\" alert | The now-inactive `Garnishment` |\n * | `employee/management/deductions/editForm/created` | Fired after a new deduction is created; the dashboard returns to the cards and surfaces the \"Deduction added\" alert | The created `Garnishment` |\n * | `employee/management/deductions/editForm/updated` | Fired after a deduction is updated; the dashboard returns to the cards and surfaces the \"Deduction updated\" alert | The updated `Garnishment` |\n * | `employee/management/deductions/editForm/cancelled` | Fired when the user cancels the add/edit deduction form; the dashboard returns to the cards | — |\n * | `employee/management/paystubs/card/downloadRequested` | Fired when a paystub row's download button is clicked, before the PDF is fetched | `{ employeeId: string, payrollUuid: string }` |\n * | `employee/management/paystubs/card/downloaded` | Fired after the paystub PDF is fetched and opened in a new tab | `{ employeeId: string, payrollUuid: string }` |\n * | `employee/management/federalTaxes/card/editRequested` | Fired when \"Edit\" is clicked on the Federal taxes card | `{ employeeId: string }` |\n * | `employee/management/federalTaxes/editForm/submitted` | Fired after a federal-taxes save succeeds; the dashboard returns to the cards and surfaces the \"Federal taxes updated\" alert | Updated `EmployeeFederalTax` entity |\n * | `employee/management/federalTaxes/editForm/cancelled` | Fired when the user cancels the federal-taxes edit form; the dashboard returns to the cards | — |\n * | `employee/management/stateTaxes/editRequested` | Fired when \"Edit\" is clicked on the State taxes card | `{ employeeId: string }` |\n * | `employee/management/stateTaxes/updated` | Fired after a state-taxes save succeeds; the dashboard returns to the cards and surfaces the \"State taxes updated\" alert | `{ employeeStateTaxesList: EmployeeStateTaxesList[] }` |\n * | `employee/management/stateTaxes/editCancelled` | Fired when the user cancels the state-taxes edit form; the dashboard returns to the cards | — |\n * | `employee/management/documents/card/viewRequested` | Fired when a document row's \"View\" CTA is clicked; the dashboard swaps to the read-only document viewer | `{ employeeId: string, formId: string }` |\n * | `CANCEL` | Fired when the user clicks Back in the document viewer; the dashboard returns to the cards | — |\n * | `employee/dashboard/tabChange` | Fired when the user switches dashboard tabs | `{ tab: 'basicDetails' \\| 'jobAndPay' \\| 'taxes' \\| 'documents' }` |\n * | `employee/dismiss` | Fired when the user dismisses a top-of-dashboard success alert | — |\n *\n * @param props - See {@link DashboardFlowProps}.\n * @returns The tabbed dashboard with internal navigation between cards and edit screens.\n * @public\n * @group Flow Components\n *\n * @example\n * ```tsx\n * import { EmployeeManagement } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <EmployeeManagement.DashboardFlow\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport const DashboardFlow = ({ employeeId, onEvent }: DashboardFlowProps) => {\n const dashboardMachine = useMemo(\n () =>\n createMachine(\n 'index',\n dashboardStateMachine,\n (initialContext: DashboardContextInterface) => ({\n ...initialContext,\n component: DashboardViewContextual,\n employeeId,\n }),\n ),\n [employeeId],\n )\n\n return <Flow machine={dashboardMachine} onEvent={onEvent} />\n}\n"],"names":["DashboardFlow","employeeId","onEvent","dashboardMachine","useMemo","createMachine","dashboardStateMachine","initialContext","DashboardViewContextual","jsx","Flow"],"mappings":";;;;;;AA+HO,MAAMA,IAAgB,CAAC,EAAE,YAAAC,GAAY,SAAAC,QAAkC;AAC5E,QAAMC,IAAmBC;AAAA,IACvB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAA+C;AAAA,QAC9C,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,YAAAP;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAQ,EAACC,GAAA,EAAK,SAASP,GAAkB,SAAAD,EAAA,CAAkB;AAC5D;"}
|
|
1
|
+
{"version":3,"file":"DashboardFlow.js","sources":["../../../../src/components/Employee/Dashboard/DashboardFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { dashboardStateMachine } from './dashboardStateMachine'\nimport { type DashboardContextInterface, DashboardViewContextual } from './DashboardComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\n\n/**\n * Props for {@link DashboardFlow}.\n *\n * @public\n */\nexport interface DashboardFlowProps extends BaseComponentInterface<never> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Hub for viewing and managing a single employee's profile, pay, and documents.\n *\n * @remarks\n * Renders a tabbed view of an employee's profile (Basic details, Job and pay,\n * Taxes, Documents), wires the card surfaces to their corresponding edit\n * screens via an internal state machine, and surfaces success alerts at the\n * top of the dashboard after each successful edit. Wraps the dashboard in\n * error and suspense boundaries.\n *\n * Every tab section of the dashboard is also exported as a self-contained\n * block that can be dropped into a custom layout without the surrounding\n * dashboard chrome (see the blocks below).\n *\n * Each block wraps its read-only card, its edit form, and the card↔form\n * transitions as a single drop-in. For cases where that built-in orchestration\n * doesn't fit — rendering a form in a modal, driving navigation via a router,\n * or showing a card read-only — each block's card and form are also exported\n * individually (e.g. {@link CompensationCard}, {@link CompensationEditForm}).\n * Using the individual pieces means owning the swap, any success alerts, and\n * cross-component state yourself.\n *\n * The dashboard composes self-fetching cards and their edit forms and forwards\n * every event they emit to the partner via `onEvent`; its internal state\n * machine also reacts to a subset of these events to swap between the cards\n * and edit screens and to surface success alerts. The table below is the\n * complete, current set of events observable from `DashboardFlow`, grouped by\n * the tab that emits them.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/profile/editRequested` | Fired when \"Edit\" is clicked on the Basic details (Profile) card | `{ employeeId: string }` |\n * | `employee/management/profile/updated` | Fired after the basic-details edit form is saved; the dashboard returns to the cards and surfaces the \"Profile updated\" alert | Updated `Employee` entity |\n * | `employee/management/profile/editCancelled` | Fired when the user clicks Cancel on the basic-details edit form; the dashboard returns to the cards | — |\n * | `employee/management/homeAddress/editRequested` | Fired when \"Manage\" is clicked on the Home address card | `{ employeeId: string }` |\n * | `employee/management/homeAddress/created` | Fired after a new home address is created on the manage screen; the manage screen stays open | Created `EmployeeAddress` entity |\n * | `employee/management/homeAddress/updated` | Fired after a home address is updated on the manage screen; the manage screen stays open | Updated `EmployeeAddress` entity |\n * | `employee/management/homeAddress/deleted` | Fired after a non-active home address is deleted on the manage screen; the manage screen stays open | Deleted `EmployeeAddress` entity |\n * | `employee/management/homeAddress/editCancelled` | Fired when the user clicks Back on the manage screen; the dashboard returns to the cards | — |\n * | `employee/management/workAddress/editRequested` | Fired when \"Manage\" is clicked on the Work address card | `{ employeeId: string }` |\n * | `employee/management/workAddress/created` | Fired after a new work address is created on the manage screen; the manage screen stays open | Created `EmployeeWorkAddress` entity |\n * | `employee/management/workAddress/updated` | Fired after a work address is updated on the manage screen; the manage screen stays open | Updated `EmployeeWorkAddress` entity |\n * | `employee/management/workAddress/deleted` | Fired after a work address is deleted on the manage screen; the manage screen stays open | Deleted `EmployeeWorkAddress` entity |\n * | `employee/management/workAddress/editCancelled` | Fired when the user clicks Back on the manage screen; the dashboard returns to the cards | — |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job on the Compensation card | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when \"Add job\" is clicked from the Compensation card's empty state | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when \"Add another job\" is clicked on the Compensation card | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card | `{ employeeId: string, compensationId: string }` |\n * | `employee/management/compensation/editForm/submitted` | Fired after an edit-compensation save completes; the dashboard returns to the cards | Updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user cancels the edit-compensation form; the dashboard returns to the cards | — |\n * | `employee/management/compensation/addJobForm/submitted` | Fired after the first job and compensation are saved; the dashboard returns to the cards and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addJobForm/cancelled` | Fired when the user cancels the add-job form; the dashboard returns to the cards | — |\n * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after a secondary job and compensation are saved; the dashboard returns to the cards and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addAnotherJobForm/cancelled` | Fired when the user cancels the add-another-job form; the dashboard returns to the cards | — |\n * | `employee/management/paymentMethod/card/addRequested` | Fired when \"Add bank account\" / \"Add another bank account\" is clicked on the Payment card | — |\n * | `employee/management/paymentMethod/card/splitRequested` | Fired when \"Split paycheck\" is clicked on the Payment card | — |\n * | `employee/management/paymentMethod/card/bankAccountDeleted` | Fired after a bank account is deleted from the card; the dashboard surfaces the \"Bank account deleted\" alert | Response from the Delete a bank account endpoint |\n * | `employee/management/paymentMethod/bankForm/submitted` | Fired after a new bank account is saved; the dashboard returns to the cards and surfaces the \"Bank account added\" alert | Created `EmployeeBankAccount` entity |\n * | `employee/management/paymentMethod/bankForm/cancelled` | Fired when the user cancels the add-bank-account screen; the dashboard returns to the cards | — |\n * | `employee/management/paymentMethod/splitForm/submitted` | Fired after the split configuration is saved; the dashboard returns to the cards and surfaces the \"Split updated\" alert | Updated `EmployeePaymentMethod` entity |\n * | `employee/management/paymentMethod/splitForm/cancelled` | Fired when the user cancels the split-paycheck screen; the dashboard returns to the cards | — |\n * | `employee/management/deductions/card/addRequested` | Fired when \"Add deduction\" is clicked on the Deductions card | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when a row's \"Edit\" menu item is chosen on the Deductions card | The `Garnishment` row being edited |\n * | `employee/management/deductions/card/deleted` | Fired after the soft-delete dialog is confirmed; the dashboard surfaces the \"Deduction deleted\" alert | The now-inactive `Garnishment` |\n * | `employee/management/deductions/editForm/created` | Fired after a new deduction is created; the dashboard returns to the cards and surfaces the \"Deduction added\" alert | The created `Garnishment` |\n * | `employee/management/deductions/editForm/updated` | Fired after a deduction is updated; the dashboard returns to the cards and surfaces the \"Deduction updated\" alert | The updated `Garnishment` |\n * | `employee/management/deductions/editForm/cancelled` | Fired when the user cancels the add/edit deduction form; the dashboard returns to the cards | — |\n * | `employee/management/paystubs/card/downloadRequested` | Fired when a paystub row's download button is clicked, before the PDF is fetched | `{ employeeId: string, payrollUuid: string }` |\n * | `employee/management/paystubs/card/downloaded` | Fired after the paystub PDF is fetched and opened in a new tab | `{ employeeId: string, payrollUuid: string }` |\n * | `employee/management/federalTaxes/card/editRequested` | Fired when \"Edit\" is clicked on the Federal taxes card | `{ employeeId: string }` |\n * | `employee/management/federalTaxes/editForm/submitted` | Fired after a federal-taxes save succeeds; the dashboard returns to the cards and surfaces the \"Federal taxes updated\" alert | Updated `EmployeeFederalTax` entity |\n * | `employee/management/federalTaxes/editForm/cancelled` | Fired when the user cancels the federal-taxes edit form; the dashboard returns to the cards | — |\n * | `employee/management/stateTaxes/editRequested` | Fired when \"Edit\" is clicked on the State taxes card | `{ employeeId: string }` |\n * | `employee/management/stateTaxes/updated` | Fired after a state-taxes save succeeds; the dashboard returns to the cards and surfaces the \"State taxes updated\" alert | `{ employeeStateTaxesList: EmployeeStateTaxesList[] }` |\n * | `employee/management/stateTaxes/editCancelled` | Fired when the user cancels the state-taxes edit form; the dashboard returns to the cards | — |\n * | `employee/management/documents/card/viewRequested` | Fired when a document row's \"View\" CTA is clicked; the dashboard swaps to the read-only document viewer | `{ employeeId: string, formId: string }` |\n * | `CANCEL` | Fired when the user clicks Back in the document viewer; the dashboard returns to the cards | — |\n * | `employee/dashboard/tabChange` | Fired when the user switches dashboard tabs | `{ tab: 'basicDetails' \\| 'jobAndPay' \\| 'taxes' \\| 'documents' }` |\n * | `employee/dismiss` | Fired when the user dismisses a top-of-dashboard success alert | — |\n *\n * @components\n * - {@link Dashboard}\n * - {@link ProfileEditForm}\n * - {@link HomeAddressEditForm}\n * - {@link WorkAddressEditForm}\n * - {@link FederalTaxesEditForm}\n * - {@link StateTaxesEditForm}\n * - {@link PaymentMethodBankForm}\n * - {@link PaymentMethodSplitForm}\n * - {@link CompensationAddJobForm}\n * - {@link CompensationEditForm}\n * - {@link CompensationAddAnotherJobForm}\n * - {@link DeductionsEditForm}\n * - {@link DocumentManager}\n *\n * @param props - See {@link DashboardFlowProps}.\n * @returns The tabbed dashboard with internal navigation between cards and edit screens.\n * @public\n * @group Flow Components\n *\n * @example\n * ```tsx title=\"App.tsx\"\n * import { EmployeeManagement } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <EmployeeManagement.DashboardFlow\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport const DashboardFlow = ({ employeeId, onEvent }: DashboardFlowProps) => {\n const dashboardMachine = useMemo(\n () =>\n createMachine(\n 'index',\n dashboardStateMachine,\n (initialContext: DashboardContextInterface) => ({\n ...initialContext,\n component: DashboardViewContextual,\n employeeId,\n }),\n ),\n [employeeId],\n )\n\n return <Flow machine={dashboardMachine} onEvent={onEvent} />\n}\n"],"names":["DashboardFlow","employeeId","onEvent","dashboardMachine","useMemo","createMachine","dashboardStateMachine","initialContext","DashboardViewContextual","jsx","Flow"],"mappings":";;;;;;AAqIO,MAAMA,IAAgB,CAAC,EAAE,YAAAC,GAAY,SAAAC,QAAkC;AAC5E,QAAMC,IAAmBC;AAAA,IACvB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAA+C;AAAA,QAC9C,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,YAAAP;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAQ,EAACC,GAAA,EAAK,SAASP,GAAkB,SAAAD,EAAA,CAAkB;AAC5D;"}
|
|
@@ -1,100 +1,82 @@
|
|
|
1
1
|
import { state as M, transition as E, reduce as A } from "robot3";
|
|
2
2
|
import { ProfileContextual as N, HomeAddressContextual as o, WorkAddressContextual as O, FederalTaxesContextual as l, StateTaxesContextual as s, PaymentBankFormContextual as c, PaymentSplitViewContextual as a, DocumentManagerContextual as u, AddJobContextual as r, EditCompensationContextual as L, AddAnotherJobContextual as i, DeductionsEditFormContextual as D, DashboardViewContextual as d } from "./DashboardComponents.js";
|
|
3
3
|
import { componentEvents as e } from "../../../shared/constants.js";
|
|
4
|
-
const n = A(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
currentJobId: null,
|
|
18
|
-
successAlert: _
|
|
19
|
-
})
|
|
20
|
-
), I = {
|
|
4
|
+
const n = A((_) => ({
|
|
5
|
+
..._,
|
|
6
|
+
component: d,
|
|
7
|
+
header: null,
|
|
8
|
+
currentJobId: null,
|
|
9
|
+
successAlert: null
|
|
10
|
+
})), t = (_) => A((T) => ({
|
|
11
|
+
...T,
|
|
12
|
+
component: d,
|
|
13
|
+
header: null,
|
|
14
|
+
currentJobId: null,
|
|
15
|
+
successAlert: _
|
|
16
|
+
})), I = {
|
|
21
17
|
index: M(
|
|
22
18
|
E(
|
|
23
19
|
e.EMPLOYEE_MANAGEMENT_PROFILE_EDIT_REQUESTED,
|
|
24
20
|
"profile",
|
|
25
|
-
A(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
)
|
|
21
|
+
A((_) => ({
|
|
22
|
+
..._,
|
|
23
|
+
component: N,
|
|
24
|
+
successAlert: null
|
|
25
|
+
}))
|
|
32
26
|
),
|
|
33
27
|
E(
|
|
34
28
|
e.EMPLOYEE_MANAGEMENT_HOME_ADDRESS_EDIT_REQUESTED,
|
|
35
29
|
"homeAddress",
|
|
36
|
-
A(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
)
|
|
30
|
+
A((_) => ({
|
|
31
|
+
..._,
|
|
32
|
+
component: o,
|
|
33
|
+
successAlert: null
|
|
34
|
+
}))
|
|
43
35
|
),
|
|
44
36
|
E(
|
|
45
37
|
e.EMPLOYEE_MANAGEMENT_WORK_ADDRESS_EDIT_REQUESTED,
|
|
46
38
|
"workAddress",
|
|
47
|
-
A(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})
|
|
53
|
-
)
|
|
39
|
+
A((_) => ({
|
|
40
|
+
..._,
|
|
41
|
+
component: O,
|
|
42
|
+
successAlert: null
|
|
43
|
+
}))
|
|
54
44
|
),
|
|
55
45
|
E(
|
|
56
46
|
e.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_CARD_EDIT_REQUESTED,
|
|
57
47
|
"federalTaxes",
|
|
58
|
-
A(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})
|
|
64
|
-
)
|
|
48
|
+
A((_) => ({
|
|
49
|
+
..._,
|
|
50
|
+
component: l,
|
|
51
|
+
successAlert: null
|
|
52
|
+
}))
|
|
65
53
|
),
|
|
66
54
|
E(
|
|
67
55
|
e.EMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_REQUESTED,
|
|
68
56
|
"stateTaxes",
|
|
69
|
-
A(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})
|
|
75
|
-
)
|
|
57
|
+
A((_) => ({
|
|
58
|
+
..._,
|
|
59
|
+
component: s,
|
|
60
|
+
successAlert: null
|
|
61
|
+
}))
|
|
76
62
|
),
|
|
77
63
|
E(
|
|
78
64
|
e.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_ADD_REQUESTED,
|
|
79
65
|
"paymentBankForm",
|
|
80
|
-
A(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})
|
|
86
|
-
)
|
|
66
|
+
A((_) => ({
|
|
67
|
+
..._,
|
|
68
|
+
component: c,
|
|
69
|
+
successAlert: null
|
|
70
|
+
}))
|
|
87
71
|
),
|
|
88
72
|
E(
|
|
89
73
|
e.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_SPLIT_REQUESTED,
|
|
90
74
|
"paymentSplitView",
|
|
91
|
-
A(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
)
|
|
75
|
+
A((_) => ({
|
|
76
|
+
..._,
|
|
77
|
+
component: a,
|
|
78
|
+
successAlert: null
|
|
79
|
+
}))
|
|
98
80
|
),
|
|
99
81
|
E(
|
|
100
82
|
e.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED,
|
|
@@ -111,14 +93,12 @@ const n = A(
|
|
|
111
93
|
E(
|
|
112
94
|
e.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED,
|
|
113
95
|
"addJob",
|
|
114
|
-
A(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
121
|
-
)
|
|
96
|
+
A((_) => ({
|
|
97
|
+
..._,
|
|
98
|
+
component: r,
|
|
99
|
+
currentJobId: null,
|
|
100
|
+
successAlert: null
|
|
101
|
+
}))
|
|
122
102
|
),
|
|
123
103
|
E(
|
|
124
104
|
e.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED,
|
|
@@ -135,36 +115,30 @@ const n = A(
|
|
|
135
115
|
E(
|
|
136
116
|
e.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED,
|
|
137
117
|
"addAnotherJob",
|
|
138
|
-
A(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
})
|
|
145
|
-
)
|
|
118
|
+
A((_) => ({
|
|
119
|
+
..._,
|
|
120
|
+
component: i,
|
|
121
|
+
currentJobId: null,
|
|
122
|
+
successAlert: null
|
|
123
|
+
}))
|
|
146
124
|
),
|
|
147
125
|
E(
|
|
148
126
|
e.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_BANK_ACCOUNT_DELETED,
|
|
149
127
|
"index",
|
|
150
|
-
A(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
})
|
|
155
|
-
)
|
|
128
|
+
A((_) => ({
|
|
129
|
+
..._,
|
|
130
|
+
successAlert: "bankAccountDeleted"
|
|
131
|
+
}))
|
|
156
132
|
),
|
|
157
133
|
E(
|
|
158
134
|
e.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED,
|
|
159
135
|
"editDeduction",
|
|
160
|
-
A(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
})
|
|
167
|
-
)
|
|
136
|
+
A((_) => ({
|
|
137
|
+
..._,
|
|
138
|
+
component: D,
|
|
139
|
+
successAlert: null,
|
|
140
|
+
editingDeductionId: void 0
|
|
141
|
+
}))
|
|
168
142
|
),
|
|
169
143
|
E(
|
|
170
144
|
e.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED,
|
|
@@ -181,22 +155,18 @@ const n = A(
|
|
|
181
155
|
E(
|
|
182
156
|
e.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED,
|
|
183
157
|
"index",
|
|
184
|
-
A(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
})
|
|
189
|
-
)
|
|
158
|
+
A((_) => ({
|
|
159
|
+
..._,
|
|
160
|
+
successAlert: "deductionDeleted"
|
|
161
|
+
}))
|
|
190
162
|
),
|
|
191
163
|
E(
|
|
192
164
|
e.EMPLOYEE_DISMISS,
|
|
193
165
|
"index",
|
|
194
|
-
A(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
})
|
|
199
|
-
)
|
|
166
|
+
A((_) => ({
|
|
167
|
+
..._,
|
|
168
|
+
successAlert: null
|
|
169
|
+
}))
|
|
200
170
|
),
|
|
201
171
|
E(
|
|
202
172
|
e.EMPLOYEE_DASHBOARD_TAB_CHANGE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardStateMachine.js","sources":["../../../../src/components/Employee/Dashboard/dashboardStateMachine.ts"],"sourcesContent":["import { transition, reduce, state } from 'robot3'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { DashboardTab } from './Dashboard'\nimport {\n DashboardViewContextual,\n HomeAddressContextual,\n WorkAddressContextual,\n FederalTaxesContextual,\n StateTaxesContextual,\n ProfileContextual,\n PaymentBankFormContextual,\n PaymentSplitViewContextual,\n DocumentManagerContextual,\n DeductionsEditFormContextual,\n AddJobContextual,\n EditCompensationContextual,\n AddAnotherJobContextual,\n type DashboardContextInterface,\n} from './DashboardComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED]: {\n employeeId: string\n formId: string\n }\n [componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED]: Garnishment\n [componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED]: {\n employeeId: string\n jobId: string\n }\n [componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE]: { tab: DashboardTab }\n}\n\nconst returnToIndex = reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: DashboardViewContextual,\n header: null,\n currentJobId: null,\n successAlert: null,\n }),\n)\n\nconst returnToIndexWithAlert = (alert: DashboardContextInterface['successAlert']) =>\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: DashboardViewContextual,\n header: null,\n currentJobId: null,\n successAlert: alert,\n }),\n )\n\n/** @internal */\nexport const dashboardStateMachine = {\n index: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PROFILE_EDIT_REQUESTED,\n 'profile',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: ProfileContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_HOME_ADDRESS_EDIT_REQUESTED,\n 'homeAddress',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: HomeAddressContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_WORK_ADDRESS_EDIT_REQUESTED,\n 'workAddress',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: WorkAddressContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_CARD_EDIT_REQUESTED,\n 'federalTaxes',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: FederalTaxesContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_REQUESTED,\n 'stateTaxes',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: StateTaxesContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_ADD_REQUESTED,\n 'paymentBankForm',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: PaymentBankFormContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_SPLIT_REQUESTED,\n 'paymentSplitView',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: PaymentSplitViewContextual,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED,\n 'documentManager',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED\n >,\n ): DashboardContextInterface => ({\n ...ctx,\n component: DocumentManagerContextual,\n formId: ev.payload.formId,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED,\n 'addJob',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: AddJobContextual,\n currentJobId: null,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED,\n 'editCompensation',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED\n >,\n ): DashboardContextInterface => ({\n ...ctx,\n component: EditCompensationContextual,\n currentJobId: ev.payload.jobId,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED,\n 'addAnotherJob',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: AddAnotherJobContextual,\n currentJobId: null,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_BANK_ACCOUNT_DELETED,\n 'index',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n successAlert: 'bankAccountDeleted',\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED,\n 'editDeduction',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: DeductionsEditFormContextual,\n successAlert: null,\n editingDeductionId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED,\n 'editDeduction',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED\n >,\n ): DashboardContextInterface => ({\n ...ctx,\n component: DeductionsEditFormContextual,\n successAlert: null,\n editingDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED,\n 'index',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n successAlert: 'deductionDeleted',\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DISMISS,\n 'index',\n reduce(\n (ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE,\n 'index',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE>,\n ): DashboardContextInterface => ({\n ...ctx,\n selectedTab: ev.payload.tab,\n }),\n ),\n ),\n ),\n homeAddress: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_HOME_ADDRESS_EDIT_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n workAddress: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_WORK_ADDRESS_EDIT_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n federalTaxes: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('federalTaxesUpdated'),\n ),\n ),\n stateTaxes: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_STATE_TAXES_UPDATED,\n 'index',\n returnToIndexWithAlert('stateTaxesUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n profile: state<MachineTransition>(\n transition(componentEvents.EMPLOYEE_MANAGEMENT_PROFILE_EDIT_CANCELLED, 'index', returnToIndex),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PROFILE_UPDATED,\n 'index',\n returnToIndexWithAlert('profileUpdated'),\n ),\n ),\n paymentBankForm: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_BANK_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('bankAccountAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_BANK_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n paymentSplitView: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_SPLIT_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('splitUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_SPLIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n documentManager: state<MachineTransition>(\n // Admin-facing dashboard: documents are read-only here, so the viewer only\n // returns to the dashboard on Back. Signing happens in the employee\n // onboarding DocumentSigner flow, not from this surface.\n transition(componentEvents.CANCEL, 'index', returnToIndex),\n ),\n editDeduction: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CREATED,\n 'index',\n returnToIndexWithAlert('deductionAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_UPDATED,\n 'index',\n returnToIndexWithAlert('deductionUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n addJob: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('jobAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n editCompensation: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_SUBMITTED,\n 'index',\n returnToIndex,\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n addAnotherJob: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('jobAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n}\n"],"names":["returnToIndex","reduce","ctx","DashboardViewContextual","returnToIndexWithAlert","alert","dashboardStateMachine","state","transition","componentEvents","ProfileContextual","HomeAddressContextual","WorkAddressContextual","FederalTaxesContextual","StateTaxesContextual","PaymentBankFormContextual","PaymentSplitViewContextual","ev","DocumentManagerContextual","AddJobContextual","EditCompensationContextual","AddAnotherJobContextual","DeductionsEditFormContextual"],"mappings":";;;AAmCA,MAAMA,IAAgBC;AAAA,EACpB,CAACC,OAA+D;AAAA,IAC9D,GAAGA;AAAA,IACH,WAAWC;AAAA,IACX,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,cAAc;AAAA,EAAA;AAElB,GAEMC,IAAyB,CAACC,MAC9BJ;AAAA,EACE,CAACC,OAA+D;AAAA,IAC9D,GAAGA;AAAA,IACH,WAAWC;AAAA,IACX,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,cAAcE;AAAA,EAAA;AAElB,GAGWC,IAAwB;AAAA,EACnC,OAAOC;AAAA,IACLC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR;AAAA,QACE,CAACC,OAA+D;AAAA,UAC9D,GAAGA;AAAA,UACH,WAAWQ;AAAA,UACX,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,IAEFF;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR;AAAA,QACE,CAACC,OAA+D;AAAA,UAC9D,GAAGA;AAAA,UACH,WAAWS;AAAA,UACX,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,IAEFH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR;AAAA,QACE,CAACC,OAA+D;AAAA,UAC9D,GAAGA;AAAA,UACH,WAAWU;AAAA,UACX,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,IAEFJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR;AAAA,QACE,CAACC,OAA+D;AAAA,UAC9D,GAAGA;AAAA,UACH,WAAWW;AAAA,UACX,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR;AAAA,QACE,CAACC,OAA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;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,QAAQO;AAAA,IACNC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAuB,UAAU;AAAA,IAAA;AAAA,IAEnCI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,kBAAkBO;AAAA,IAChBC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,IAEFQ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,eAAeO;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAuB,UAAU;AAAA,IAAA;AAAA,IAEnCI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"dashboardStateMachine.js","sources":["../../../../src/components/Employee/Dashboard/dashboardStateMachine.ts"],"sourcesContent":["import { transition, reduce, state } from 'robot3'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { DashboardTab } from './Dashboard'\nimport {\n DashboardViewContextual,\n HomeAddressContextual,\n WorkAddressContextual,\n FederalTaxesContextual,\n StateTaxesContextual,\n ProfileContextual,\n PaymentBankFormContextual,\n PaymentSplitViewContextual,\n DocumentManagerContextual,\n DeductionsEditFormContextual,\n AddJobContextual,\n EditCompensationContextual,\n AddAnotherJobContextual,\n type DashboardContextInterface,\n} from './DashboardComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED]: {\n employeeId: string\n formId: string\n }\n [componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED]: Garnishment\n [componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED]: {\n employeeId: string\n jobId: string\n }\n [componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE]: { tab: DashboardTab }\n}\n\nconst returnToIndex = reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: DashboardViewContextual,\n header: null,\n currentJobId: null,\n successAlert: null,\n}))\n\nconst returnToIndexWithAlert = (alert: DashboardContextInterface['successAlert']) =>\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: DashboardViewContextual,\n header: null,\n currentJobId: null,\n successAlert: alert,\n }))\n\n/** @internal */\nexport const dashboardStateMachine = {\n index: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PROFILE_EDIT_REQUESTED,\n 'profile',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: ProfileContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_HOME_ADDRESS_EDIT_REQUESTED,\n 'homeAddress',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: HomeAddressContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_WORK_ADDRESS_EDIT_REQUESTED,\n 'workAddress',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: WorkAddressContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_CARD_EDIT_REQUESTED,\n 'federalTaxes',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: FederalTaxesContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_REQUESTED,\n 'stateTaxes',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: StateTaxesContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_ADD_REQUESTED,\n 'paymentBankForm',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: PaymentBankFormContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_SPLIT_REQUESTED,\n 'paymentSplitView',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: PaymentSplitViewContextual,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED,\n 'documentManager',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED\n >,\n ): DashboardContextInterface => ({\n ...ctx,\n component: DocumentManagerContextual,\n formId: ev.payload.formId,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED,\n 'addJob',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: AddJobContextual,\n currentJobId: null,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED,\n 'editCompensation',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED\n >,\n ): DashboardContextInterface => ({\n ...ctx,\n component: EditCompensationContextual,\n currentJobId: ev.payload.jobId,\n successAlert: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED,\n 'addAnotherJob',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: AddAnotherJobContextual,\n currentJobId: null,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_CARD_BANK_ACCOUNT_DELETED,\n 'index',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n successAlert: 'bankAccountDeleted',\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED,\n 'editDeduction',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n component: DeductionsEditFormContextual,\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: DashboardContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED\n >,\n ): DashboardContextInterface => ({\n ...ctx,\n component: DeductionsEditFormContextual,\n successAlert: null,\n editingDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED,\n 'index',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n successAlert: 'deductionDeleted',\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_DISMISS,\n 'index',\n reduce((ctx: DashboardContextInterface): DashboardContextInterface => ({\n ...ctx,\n successAlert: null,\n })),\n ),\n transition(\n componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE,\n 'index',\n reduce(\n (\n ctx: DashboardContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE>,\n ): DashboardContextInterface => ({\n ...ctx,\n selectedTab: ev.payload.tab,\n }),\n ),\n ),\n ),\n homeAddress: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_HOME_ADDRESS_EDIT_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n workAddress: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_WORK_ADDRESS_EDIT_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n federalTaxes: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('federalTaxesUpdated'),\n ),\n ),\n stateTaxes: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_STATE_TAXES_UPDATED,\n 'index',\n returnToIndexWithAlert('stateTaxesUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n profile: state<MachineTransition>(\n transition(componentEvents.EMPLOYEE_MANAGEMENT_PROFILE_EDIT_CANCELLED, 'index', returnToIndex),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PROFILE_UPDATED,\n 'index',\n returnToIndexWithAlert('profileUpdated'),\n ),\n ),\n paymentBankForm: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_BANK_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('bankAccountAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_BANK_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n paymentSplitView: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_SPLIT_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('splitUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_PAYMENT_METHOD_SPLIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n documentManager: state<MachineTransition>(\n // Admin-facing dashboard: documents are read-only here, so the viewer only\n // returns to the dashboard on Back. Signing happens in the employee\n // onboarding DocumentSigner flow, not from this surface.\n transition(componentEvents.CANCEL, 'index', returnToIndex),\n ),\n editDeduction: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CREATED,\n 'index',\n returnToIndexWithAlert('deductionAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_UPDATED,\n 'index',\n returnToIndexWithAlert('deductionUpdated'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_EDIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n addJob: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('jobAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n editCompensation: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_SUBMITTED,\n 'index',\n returnToIndex,\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_EDIT_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n addAnotherJob: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_SUBMITTED,\n 'index',\n returnToIndexWithAlert('jobAdded'),\n ),\n transition(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_CANCELLED,\n 'index',\n returnToIndex,\n ),\n ),\n}\n"],"names":["returnToIndex","reduce","ctx","DashboardViewContextual","returnToIndexWithAlert","alert","dashboardStateMachine","state","transition","componentEvents","ProfileContextual","HomeAddressContextual","WorkAddressContextual","FederalTaxesContextual","StateTaxesContextual","PaymentBankFormContextual","PaymentSplitViewContextual","ev","DocumentManagerContextual","AddJobContextual","EditCompensationContextual","AddAnotherJobContextual","DeductionsEditFormContextual"],"mappings":";;;AAmCA,MAAMA,IAAgBC,EAAO,CAACC,OAA+D;AAAA,EAC3F,GAAGA;AAAA,EACH,WAAWC;AAAA,EACX,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,cAAc;AAChB,EAAE,GAEIC,IAAyB,CAACC,MAC9BJ,EAAO,CAACC,OAA+D;AAAA,EACrE,GAAGA;AAAA,EACH,WAAWC;AAAA,EACX,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,cAAcE;AAChB,EAAE,GAGSC,IAAwB;AAAA,EACnC,OAAOC;AAAA,IACLC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR,EAAO,CAACC,OAA+D;AAAA,QACrE,GAAGA;AAAA,QACH,WAAWQ;AAAA,QACX,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,IAEJF;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR,EAAO,CAACC,OAA+D;AAAA,QACrE,GAAGA;AAAA,QACH,WAAWS;AAAA,QACX,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,IAEJH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR,EAAO,CAACC,OAA+D;AAAA,QACrE,GAAGA;AAAA,QACH,WAAWU;AAAA,QACX,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,IAEJJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAR,EAAO,CAACC,OAA+D;AAAA,QACrE,GAAGA;AAAA,QACH,WAAWW;AAAA,QACX,cAAc;AAAA,MAAA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;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,QAAQO;AAAA,IACNC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAuB,UAAU;AAAA,IAAA;AAAA,IAEnCI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,kBAAkBO;AAAA,IAChBC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,IAEFQ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,eAAeO;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAL,EAAuB,UAAU;AAAA,IAAA;AAAA,IAEnCI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAT;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { BaseComponentInterface
|
|
2
|
-
import { EventType } from '../../../../shared/constants';
|
|
3
|
-
import { OnEventType } from '../../../Base/useBase';
|
|
1
|
+
import { BaseComponentInterface } from '../../../Base';
|
|
4
2
|
/**
|
|
5
3
|
* Props for {@link Deductions}.
|
|
6
4
|
*
|
|
7
5
|
* @public
|
|
8
6
|
*/
|
|
9
|
-
export interface DeductionsProps extends
|
|
7
|
+
export interface DeductionsProps extends BaseComponentInterface<'Employee.Management.Deductions'> {
|
|
10
8
|
/** The associated employee identifier. */
|
|
11
9
|
employeeId: string;
|
|
12
|
-
/** Callback invoked when the block emits an event. See the events table on {@link Deductions} for the available event types and payloads. */
|
|
13
|
-
onEvent: OnEventType<EventType, unknown>;
|
|
14
10
|
}
|
|
15
11
|
/**
|
|
16
12
|
* Self-contained block for viewing and managing an employee's post-tax deductions — the same experience the dashboard surfaces, but as a drop-in component that doesn't require the surrounding dashboard chrome.
|
|
@@ -20,6 +16,7 @@ export interface DeductionsProps extends CommonComponentInterface<'Employee.Mana
|
|
|
20
16
|
*
|
|
21
17
|
* The card and form surfaces ({@link DeductionsCard}, {@link DeductionsEditForm}) are also exported individually for cases where that orchestration is the wrong fit — for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router. Using them directly means owning the swap, the alert, and any cross-component state yourself.
|
|
22
18
|
*
|
|
19
|
+
* @events
|
|
23
20
|
* | Event | Description | Data |
|
|
24
21
|
* | ----- | ----------- | ---- |
|
|
25
22
|
* | `employee/management/deductions/card/addRequested` | Fired when the "Add deduction" CTA is clicked from the card; the block opens the edit form in add mode | `{ employeeId: string }` |
|
|
@@ -35,4 +32,4 @@ export interface DeductionsProps extends CommonComponentInterface<'Employee.Mana
|
|
|
35
32
|
* @public
|
|
36
33
|
* @group Block Components
|
|
37
34
|
*/
|
|
38
|
-
export declare function Deductions({ dictionary, FallbackComponent, ...props }: DeductionsProps
|
|
35
|
+
export declare function Deductions({ dictionary, FallbackComponent, ...props }: DeductionsProps): import("react").JSX.Element;
|
|
@@ -20,11 +20,7 @@ function f({ employeeId: o, onEvent: e }) {
|
|
|
20
20
|
);
|
|
21
21
|
return /* @__PURE__ */ t(u, { machine: n, onEvent: e });
|
|
22
22
|
}
|
|
23
|
-
function w({
|
|
24
|
-
dictionary: o,
|
|
25
|
-
FallbackComponent: e,
|
|
26
|
-
...n
|
|
27
|
-
}) {
|
|
23
|
+
function w({ dictionary: o, FallbackComponent: e, ...n }) {
|
|
28
24
|
return p("Employee.Management.Deductions", o), /* @__PURE__ */ t(
|
|
29
25
|
s,
|
|
30
26
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deductions.js","sources":["../../../../../src/components/Employee/Deductions/management/Deductions.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { DeductionsCardContextual, type DeductionsContextInterface } from './DeductionsComponents'\nimport { deductionsStateMachine } from './deductionsStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport {
|
|
1
|
+
{"version":3,"file":"Deductions.js","sources":["../../../../../src/components/Employee/Deductions/management/Deductions.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { DeductionsCardContextual, type DeductionsContextInterface } from './DeductionsComponents'\nimport { deductionsStateMachine } from './deductionsStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { useI18n } from '@/i18n'\n\n/**\n * Props for {@link Deductions}.\n *\n * @public\n */\nexport interface DeductionsProps extends BaseComponentInterface<'Employee.Management.Deductions'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\nfunction DeductionsFlow({ employeeId, onEvent }: DeductionsProps) {\n useI18n('Employee.Management.Deductions')\n\n const machine = useMemo(\n () =>\n createMachine('card', deductionsStateMachine, (ctx: DeductionsContextInterface) => ({\n ...ctx,\n component: DeductionsCardContextual,\n employeeId,\n successAlert: null,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n\n/**\n * Self-contained block for viewing and managing an employee's post-tax deductions — the same experience the dashboard surfaces, but as a drop-in component that doesn't require the surrounding dashboard chrome.\n *\n * @remarks\n * Renders a card listing the employee's active deductions with affordances to add a new deduction, edit an existing one, or delete one via a confirm dialog. Choosing to add or edit swaps the card for the deduction form; a successful save returns to the card and emits the corresponding event, and cancelling returns without saving. Wraps everything in error and suspense boundaries.\n *\n * The card and form surfaces ({@link DeductionsCard}, {@link DeductionsEditForm}) are also exported individually for cases where that orchestration is the wrong fit — for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router. Using them directly means owning the swap, the alert, and any cross-component state yourself.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/deductions/card/addRequested` | Fired when the \"Add deduction\" CTA is clicked from the card; the block opens the edit form in add mode | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a deduction; the block opens the edit form pre-populated with that deduction | The matching `Garnishment` |\n * | `employee/management/deductions/card/deleted` | Fired after a deduction is deleted via the confirm dialog; the block stays on the card | The deleted `Garnishment` |\n * | `employee/management/deductions/editForm/created` | Fired after a new deduction is saved from the edit form; the block returns to the card view | The created `Garnishment` |\n * | `employee/management/deductions/editForm/updated` | Fired after an existing deduction is updated from the edit form; the block returns to the card view | The updated `Garnishment` |\n * | `employee/management/deductions/editForm/cancelled` | Fired when the user cancels the edit form; the block returns to the card view | — |\n * | `employee/management/deductions/alertDismissed` | Fired when the user dismisses a success alert above the card | `null` |\n *\n * @param props - See {@link DeductionsProps}.\n * @returns The rendered deductions block.\n * @public\n * @group Block Components\n */\nexport function Deductions({ dictionary, FallbackComponent, ...props }: DeductionsProps) {\n useComponentDictionary('Employee.Management.Deductions', dictionary)\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Deductions\"\n FallbackComponent={FallbackComponent}\n >\n <DeductionsFlow {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["DeductionsFlow","employeeId","onEvent","useI18n","machine","useMemo","createMachine","deductionsStateMachine","ctx","DeductionsCardContextual","jsx","Flow","Deductions","dictionary","FallbackComponent","props","useComponentDictionary","BaseBoundaries"],"mappings":";;;;;;;;;AAmBA,SAASA,EAAe,EAAE,YAAAC,GAAY,SAAAC,KAA4B;AAChE,EAAAC,EAAQ,gCAAgC;AAExC,QAAMC,IAAUC;AAAA,IACd,MACEC,EAAc,QAAQC,GAAwB,CAACC,OAAqC;AAAA,MAClF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,MACA,cAAc;AAAA,IAAA,EACd;AAAA,IACJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAAAP,GAAkB,SAAAF,EAAA,CAAkB;AACnD;AA0BO,SAASU,EAAW,EAAE,YAAAC,GAAY,mBAAAC,GAAmB,GAAGC,KAA0B;AACvF,SAAAC,EAAuB,kCAAkCH,CAAU,GAEjE,gBAAAH;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAH;AAAA,MAEA,UAAA,gBAAAJ,EAACV,GAAA,EAAgB,GAAGe,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGjC;"}
|
|
@@ -17,6 +17,7 @@ export interface DeductionsCardProps {
|
|
|
17
17
|
* @remarks
|
|
18
18
|
* 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.
|
|
19
19
|
*
|
|
20
|
+
* @events
|
|
20
21
|
* | Event | Description | Data |
|
|
21
22
|
* | ----- | ----------- | ---- |
|
|
22
23
|
* | `employee/management/deductions/card/addRequested` | Fired when the "Add deduction" CTA is clicked | `{ employeeId: string }` |
|
|
@@ -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,gBAA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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;"}
|
|
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","EmptyData","jsxs","BaseLayout","PlusCircleIcon","Loading","DataView","DeleteDeductionDialog"],"mappings":";;;;;;;;;;;;;;;;;;;AA+CO,SAASA,GAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,eAAc,kCAC5B,4BAACC,GAAA,EAAuB,GAAGH,GAAO,EAAA,CACpC;AAEJ;AAEA,SAASG,EAAsB,EAAE,YAAAC,GAAY,SAAAC,KAAgC;AAC3E,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvDC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5CE,IAAiBC,EAAkB,EAAE,YAAAX,GAAY,GAEjD;AAAA,IACJ,wBAAAY;AAAA,IACA,2BAAAC;AAAA,IACA,qBAAqBC;AAAA,EAAA,IACnBC,EAAmB,OAAMC,MAAe;AAC1C,QAAIN,EAAe,UAAW;AAC9B,UAAMO,IAAS,MAAMP,EAAe,QAAQ,SAASM,CAAW;AAChE,IAAIC,KACFhB,EAAQiB,EAAgB,6CAA6CD,EAAO,KAAK,WAAW;AAAA,EAEhG,CAAC,GAMKE,IACJT,EAAe,aAAaA,EAAe,cAAc,OAAO,WAAW,GAEvEU,IAAaV,EAAe,YAAY,CAAA,IAAKA,EAAe,KAAK,YACjEW,IAA0BX,EAAe,YAC3C,SACAA,EAAe,OAAO,yBAEpBY,IAAY,MAAM;AACtB,IAAArB,EAAQiB,EAAgB,mDAAmD,EAAE,YAAAlB,EAAA,CAAY;AAAA,EAC3F,GACMuB,IAAa,CAACP,MAA6B;AAC/C,IAAAf,EAAQiB,EAAgB,oDAAoDF,CAAW;AAAA,EACzF,GAEMQ,IAAsB;AAAA,IAC1B;AAAA,MACE,KAAK;AAAA,MACL,OAAOrB,EAAE,mBAAmB;AAAA,MAC5B,QAAQ,CAACa,MAA6B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