@gusto/embedded-react-sdk 0.48.2 → 0.48.3
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 +15 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +33 -2
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +23 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +2 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +10 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +24 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +3 -0
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +2 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +6 -0
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/SignatoryForm.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/SignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/index.d.ts +2 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.d.ts +9 -0
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.d.ts +26 -0
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +8 -0
- package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +3 -0
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +3 -0
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Head.d.ts +1 -0
- package/dist/components/Company/BankAccount/BankAccountVerify/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/stateMachine.d.ts +1 -0
- package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +21 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Head.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/List.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +37 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +31 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +4 -0
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +41 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +40 -10
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +111 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/useDocumentSigner.d.ts +1 -0
- package/dist/components/Company/FederalTaxes/Actions.d.ts +1 -0
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +13 -0
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.d.ts +1 -0
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.d.ts +1 -0
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +3 -0
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.d.ts +1 -0
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.d.ts +3 -0
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Industry/Head.d.ts +1 -0
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/Industry.d.ts +21 -0
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.d.ts +1 -0
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Industry/index.d.ts +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.d.ts +1 -0
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +3 -0
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.d.ts +1 -0
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +16 -0
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.d.ts +26 -0
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.d.ts +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +23 -2
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/Locations/locationsStateMachine.d.ts +4 -0
- package/dist/components/Company/Locations/locationsStateMachine.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.d.ts +1 -1
- package/dist/components/Company/Locations/stateMachine.js +0 -1
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +25 -0
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +19 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.d.ts +1 -0
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.d.ts +1 -0
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +18 -0
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +36 -3
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +3 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +1 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +136 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +48 -26
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +134 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +25 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +6 -0
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +16 -18
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Head.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/Head.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +31 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Head.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/Head.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +16 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +1 -0
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +7 -6
- package/dist/components/Company/exports/companyOnboarding.js +18 -16
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
- package/dist/components/Company/index.d.ts +1 -17
- package/dist/components/Contractor/Address/Actions.d.ts +1 -0
- package/dist/components/Contractor/Address/Actions.js.map +1 -1
- package/dist/components/Contractor/Address/Address.d.ts +36 -1
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.d.ts +1 -0
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/Head.d.ts +1 -0
- package/dist/components/Contractor/Address/Head.js.map +1 -1
- package/dist/components/Contractor/Address/index.d.ts +1 -1
- package/dist/components/Contractor/Address/useAddress.d.ts +8 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.d.ts +22 -9
- package/dist/components/Contractor/ContractorList/index.js +1 -3
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -5
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +33 -9
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/types.d.ts +7 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +58 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +28 -2
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +33 -16
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +1 -9
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +11 -15
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/types.d.ts +7 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +40 -3
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +1 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +4 -18
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +0 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +40 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +13 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +30 -3
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +15 -3
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +1 -2
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +25 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +1 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +28 -3
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +1 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/types.d.ts +8 -4
- package/dist/components/Contractor/Profile/ContractorProfile.d.ts +30 -6
- package/dist/components/Contractor/Profile/ContractorProfile.js +5 -9
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +2 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/index.d.ts +1 -2
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +16 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js +28 -26
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +21 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -2
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/Submit/SubmitDone.d.ts +1 -0
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Contractor/exports/contractorManagement.d.ts +6 -6
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +9 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +29 -61
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +19 -23
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +5 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -3
- package/dist/components/Employee/Deductions/onboarding/Deductions.js +21 -26
- package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js +55 -50
- package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +0 -4
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js +33 -43
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/stateMachine.d.ts +0 -1
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js +36 -60
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +63 -61
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +1 -18
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -25
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +4 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -4
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -48
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +22 -14
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +3 -20
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +3 -15
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +3 -12
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +2 -11
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +3 -22
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +3 -17
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.d.ts +3 -10
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -18
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +144 -131
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +167 -167
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -35
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +3 -4
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +90 -82
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/buildFormSchema.d.ts +27 -4
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/shared/constants.d.ts +0 -4
- package/dist/shared/constants.js +0 -2
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/docs/reference/endpoint-inventory.json +11 -4
- package/package.json +6 -6
- package/dist/components/Contractor/index.d.ts +0 -14
- package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.d.ts +0 -8
- package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.js +0 -44
- package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.js.map +0 -1
- package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.module.scss.js +0 -12
- package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.module.scss.js.map +0 -1
|
@@ -28,13 +28,6 @@ export declare const JobErrorCodes: {
|
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
30
30
|
export type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes];
|
|
31
|
-
declare const fieldValidators: {
|
|
32
|
-
title: z.ZodString;
|
|
33
|
-
hireDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
34
|
-
twoPercentShareholder: z.ZodBoolean;
|
|
35
|
-
stateWcCovered: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
36
|
-
stateWcClassCode: z.ZodString;
|
|
37
|
-
};
|
|
38
31
|
/**
|
|
39
32
|
* Shape of the form values managed by {@link useJobForm}.
|
|
40
33
|
*
|
|
@@ -46,10 +39,20 @@ declare const fieldValidators: {
|
|
|
46
39
|
* input (the schema preprocessor coerces them).
|
|
47
40
|
*
|
|
48
41
|
* @public
|
|
42
|
+
* @interface
|
|
49
43
|
*/
|
|
50
44
|
export type JobFormData = {
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
/** The employee's job title (e.g. `"Software Engineer"`). */
|
|
46
|
+
title: string
|
|
47
|
+
/** The employee's hire date as an ISO 8601 string (`YYYY-MM-DD`), or `null` if unknown. */
|
|
48
|
+
hireDate: string | null
|
|
49
|
+
/** Whether the employee owns 2 % or more of an S-corporation. Affects benefit-deduction tax treatment. */
|
|
50
|
+
twoPercentShareholder: boolean
|
|
51
|
+
/** Whether the employee is covered under Washington state workers' compensation insurance. */
|
|
52
|
+
stateWcCovered: boolean
|
|
53
|
+
/** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */
|
|
54
|
+
stateWcClassCode: string
|
|
55
|
+
};
|
|
53
56
|
/**
|
|
54
57
|
* Validated submission shape produced by the {@link useJobForm} schema.
|
|
55
58
|
*
|
|
@@ -60,19 +63,6 @@ export type JobFormData = {
|
|
|
60
63
|
* @public
|
|
61
64
|
*/
|
|
62
65
|
export type JobFormOutputs = JobFormData;
|
|
63
|
-
declare const requiredFieldsConfig: {
|
|
64
|
-
title: "create";
|
|
65
|
-
hireDate: "create";
|
|
66
|
-
twoPercentShareholder: "never";
|
|
67
|
-
stateWcCovered: "never";
|
|
68
|
-
stateWcClassCode: (data: {
|
|
69
|
-
title: string;
|
|
70
|
-
hireDate: string | null;
|
|
71
|
-
twoPercentShareholder: boolean;
|
|
72
|
-
stateWcCovered: boolean;
|
|
73
|
-
stateWcClassCode: string;
|
|
74
|
-
}) => boolean;
|
|
75
|
-
};
|
|
76
66
|
/**
|
|
77
67
|
* Override which fields are required on a given submission mode of {@link useJobForm}.
|
|
78
68
|
*
|
|
@@ -90,6 +80,7 @@ declare const requiredFieldsConfig: {
|
|
|
90
80
|
* | `stateWcClassCode` | When WC is covered | When WC is covered | No (auto) |
|
|
91
81
|
*
|
|
92
82
|
* @public
|
|
83
|
+
* @interface
|
|
93
84
|
*
|
|
94
85
|
* @example
|
|
95
86
|
* ```tsx
|
|
@@ -102,7 +93,7 @@ declare const requiredFieldsConfig: {
|
|
|
102
93
|
* })
|
|
103
94
|
* ```
|
|
104
95
|
*/
|
|
105
|
-
export type JobOptionalFieldsToRequire =
|
|
96
|
+
export type JobOptionalFieldsToRequire = { create?: ("twoPercentShareholder" | "stateWcCovered")[] | undefined; update?: ("title" | "hireDate" | "twoPercentShareholder" | "stateWcCovered")[] | undefined; };
|
|
106
97
|
interface JobSchemaOptions {
|
|
107
98
|
mode?: 'create' | 'update';
|
|
108
99
|
optionalFieldsToRequire?: JobOptionalFieldsToRequire;
|
|
@@ -125,10 +116,15 @@ interface JobSchemaOptions {
|
|
|
125
116
|
}
|
|
126
117
|
/** @internal */
|
|
127
118
|
export declare function createJobSchema(options?: JobSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
|
|
119
|
+
/** The employee's job title (e.g. `"Software Engineer"`). */
|
|
128
120
|
title: z.ZodString;
|
|
121
|
+
/** The employee's hire date as an ISO 8601 string (`YYYY-MM-DD`), or `null` if unknown. */
|
|
129
122
|
hireDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
123
|
+
/** Whether the employee owns 2 % or more of an S-corporation. Affects benefit-deduction tax treatment. */
|
|
130
124
|
twoPercentShareholder: z.ZodBoolean;
|
|
125
|
+
/** Whether the employee is covered under Washington state workers' compensation insurance. */
|
|
131
126
|
stateWcCovered: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
127
|
+
/** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */
|
|
132
128
|
stateWcClassCode: z.ZodString;
|
|
133
129
|
}>;
|
|
134
130
|
export {};
|
|
@@ -4,11 +4,16 @@ import { coerceStringBoolean as l, coerceToISODate as d } from "../../../../../p
|
|
|
4
4
|
const n = {
|
|
5
5
|
REQUIRED: "REQUIRED"
|
|
6
6
|
}, h = {
|
|
7
|
+
/** The employee's job title (e.g. `"Software Engineer"`). */
|
|
7
8
|
title: e.string(),
|
|
9
|
+
/** The employee's hire date as an ISO 8601 string (`YYYY-MM-DD`), or `null` if unknown. */
|
|
8
10
|
hireDate: e.preprocess(d, e.iso.date().nullable()),
|
|
11
|
+
/** Whether the employee owns 2 % or more of an S-corporation. Affects benefit-deduction tax treatment. */
|
|
9
12
|
twoPercentShareholder: e.boolean(),
|
|
10
13
|
// Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.
|
|
14
|
+
/** Whether the employee is covered under Washington state workers' compensation insurance. */
|
|
11
15
|
stateWcCovered: e.preprocess(l, e.boolean()),
|
|
16
|
+
/** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */
|
|
12
17
|
stateWcClassCode: e.string()
|
|
13
18
|
}, u = {
|
|
14
19
|
title: "create",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobSchema.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/jobSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceToISODate, coerceStringBoolean } from '@/partner-hook-utils/form/preprocessors'\n\n/**\n * Validation error codes produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Use these constants as the keys in a field's `validationMessages` prop to\n * map an error code to a user-facing message.\n *\n * @public\n *\n * @example\n * ```tsx\n * import { JobErrorCodes } from '@gusto/embedded-react-sdk'\n *\n * <Fields.Title\n * label=\"Job title\"\n * validationMessages={{ [JobErrorCodes.REQUIRED]: 'Job title is required' }}\n * />\n * ```\n */\nexport const JobErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\n/**\n * Union of every error code produced by the {@link useJobForm} schema.\n *\n * @public\n */\nexport type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes]\n\nconst fieldValidators = {\n title: z.string(),\n hireDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n twoPercentShareholder: z.boolean(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n stateWcClassCode: z.string(),\n}\n\n/**\n * Shape of the form values managed by {@link useJobForm}.\n *\n * @remarks\n * Accepted as `defaultValues` on `useJobForm` and returned by\n * `form.getFormSubmissionValues()` once the form has validated. `hireDate` is\n * an ISO date string (`YYYY-MM-DD`) or `null`; `stateWcCovered` is a boolean\n * even though the radio group surfaces `'true'` / `'false'` strings during\n * input (the schema preprocessor coerces them).\n *\n * @public\n */\nexport type JobFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\n/**\n * Validated submission shape produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Identical to {@link JobFormData} — exposed as a separate alias so the input\n * vs. output sides of the schema remain distinguishable in advanced usages.\n *\n * @public\n */\nexport type JobFormOutputs = JobFormData\n\nconst requiredFieldsConfig = {\n title: 'create',\n hireDate: 'create',\n twoPercentShareholder: 'never',\n stateWcCovered: 'never',\n // stateWcClassCode is gated by stateWcCovered === true. The predicate also\n // depends implicitly on the work-address state being WA — partners enforce\n // that gate by passing `optionalFieldsToRequire` only for WA employees, or\n // by simply never sending stateWcCovered=true outside WA.\n stateWcClassCode: data => String(data.stateWcCovered) === 'true',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * Override which fields are required on a given submission mode of {@link useJobForm}.\n *\n * @remarks\n * Each mode key lists the fields that are optional by default for that mode\n * but should be promoted to required. `stateWcClassCode` is automatically\n * required when `stateWcCovered` is `true` and is not configurable here.\n *\n * | Field | Required on create | Required on update | Configurable? |\n * | ----- | ------------------ | ------------------ | ------------- |\n * | `title` | Yes | No | Yes (on update) |\n * | `hireDate` | Yes | No | Yes (on update) |\n * | `twoPercentShareholder` | No | No | Yes (either mode) |\n * | `stateWcCovered` | No | No | Yes (either mode) |\n * | `stateWcClassCode` | When WC is covered | When WC is covered | No (auto) |\n *\n * @public\n *\n * @example\n * ```tsx\n * const job = useJobForm({\n * employeeId,\n * jobId,\n * optionalFieldsToRequire: {\n * update: ['title', 'hireDate'],\n * },\n * })\n * ```\n */\nexport type JobOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>\n\ninterface JobSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: JobOptionalFieldsToRequire\n /**\n * When `false`, drops `hireDate` from the validated shape entirely — the\n * field becomes hook-managed rather than user-facing (e.g. an onboarding\n * screen that derives hireDate from the employee's `startDate`). Partners\n * supply the value at submit time via `JobSubmitOptions.hireDate`.\n * Defaults to `true`.\n */\n withHireDateField?: boolean\n /**\n * When `false`, drops `title` from the validated shape entirely and the\n * hook stops sending it on PUT `/v1/jobs/:id`. Use this when title is\n * being driven via the compensation form instead (steady-state edits,\n * where title is effective-dated alongside rate/unit/FLSA on a future\n * compensation row). Defaults to `true`.\n */\n withTitleField?: boolean\n}\n\n/** @internal */\nexport function createJobSchema(options: JobSchemaOptions = {}) {\n const {\n mode = 'create',\n optionalFieldsToRequire,\n withHireDateField = true,\n withTitleField = true,\n } = options\n\n const excludeFields: Array<keyof typeof fieldValidators> = []\n if (!withHireDateField) excludeFields.push('hireDate')\n if (!withTitleField) excludeFields.push('title')\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: JobErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields,\n })\n}\n"],"names":["JobErrorCodes","fieldValidators","z","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","createJobSchema","options","mode","optionalFieldsToRequire","withHireDateField","withTitleField","excludeFields","buildFormSchema"],"mappings":";;;AA2BO,MAAMA,IAAgB;AAAA,EAC3B,UAAU;AACZ,GASMC,IAAkB;AAAA,
|
|
1
|
+
{"version":3,"file":"jobSchema.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/jobSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceToISODate, coerceStringBoolean } from '@/partner-hook-utils/form/preprocessors'\n\n/**\n * Validation error codes produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Use these constants as the keys in a field's `validationMessages` prop to\n * map an error code to a user-facing message.\n *\n * @public\n *\n * @example\n * ```tsx\n * import { JobErrorCodes } from '@gusto/embedded-react-sdk'\n *\n * <Fields.Title\n * label=\"Job title\"\n * validationMessages={{ [JobErrorCodes.REQUIRED]: 'Job title is required' }}\n * />\n * ```\n */\nexport const JobErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\n/**\n * Union of every error code produced by the {@link useJobForm} schema.\n *\n * @public\n */\nexport type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes]\n\nconst fieldValidators = {\n /** The employee's job title (e.g. `\"Software Engineer\"`). */\n title: z.string(),\n /** The employee's hire date as an ISO 8601 string (`YYYY-MM-DD`), or `null` if unknown. */\n hireDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n /** Whether the employee owns 2 % or more of an S-corporation. Affects benefit-deduction tax treatment. */\n twoPercentShareholder: z.boolean(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.\n /** Whether the employee is covered under Washington state workers' compensation insurance. */\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n /** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */\n stateWcClassCode: z.string(),\n}\n\n/**\n * Shape of the form values managed by {@link useJobForm}.\n *\n * @remarks\n * Accepted as `defaultValues` on `useJobForm` and returned by\n * `form.getFormSubmissionValues()` once the form has validated. `hireDate` is\n * an ISO date string (`YYYY-MM-DD`) or `null`; `stateWcCovered` is a boolean\n * even though the radio group surfaces `'true'` / `'false'` strings during\n * input (the schema preprocessor coerces them).\n *\n * @public\n * @interface\n */\nexport type JobFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\n/**\n * Validated submission shape produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Identical to {@link JobFormData} — exposed as a separate alias so the input\n * vs. output sides of the schema remain distinguishable in advanced usages.\n *\n * @public\n */\nexport type JobFormOutputs = JobFormData\n\nconst requiredFieldsConfig = {\n title: 'create',\n hireDate: 'create',\n twoPercentShareholder: 'never',\n stateWcCovered: 'never',\n // stateWcClassCode is gated by stateWcCovered === true. The predicate also\n // depends implicitly on the work-address state being WA — partners enforce\n // that gate by passing `optionalFieldsToRequire` only for WA employees, or\n // by simply never sending stateWcCovered=true outside WA.\n stateWcClassCode: data => String(data.stateWcCovered) === 'true',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * Override which fields are required on a given submission mode of {@link useJobForm}.\n *\n * @remarks\n * Each mode key lists the fields that are optional by default for that mode\n * but should be promoted to required. `stateWcClassCode` is automatically\n * required when `stateWcCovered` is `true` and is not configurable here.\n *\n * | Field | Required on create | Required on update | Configurable? |\n * | ----- | ------------------ | ------------------ | ------------- |\n * | `title` | Yes | No | Yes (on update) |\n * | `hireDate` | Yes | No | Yes (on update) |\n * | `twoPercentShareholder` | No | No | Yes (either mode) |\n * | `stateWcCovered` | No | No | Yes (either mode) |\n * | `stateWcClassCode` | When WC is covered | When WC is covered | No (auto) |\n *\n * @public\n * @interface\n *\n * @example\n * ```tsx\n * const job = useJobForm({\n * employeeId,\n * jobId,\n * optionalFieldsToRequire: {\n * update: ['title', 'hireDate'],\n * },\n * })\n * ```\n */\nexport type JobOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>\n\ninterface JobSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: JobOptionalFieldsToRequire\n /**\n * When `false`, drops `hireDate` from the validated shape entirely — the\n * field becomes hook-managed rather than user-facing (e.g. an onboarding\n * screen that derives hireDate from the employee's `startDate`). Partners\n * supply the value at submit time via `JobSubmitOptions.hireDate`.\n * Defaults to `true`.\n */\n withHireDateField?: boolean\n /**\n * When `false`, drops `title` from the validated shape entirely and the\n * hook stops sending it on PUT `/v1/jobs/:id`. Use this when title is\n * being driven via the compensation form instead (steady-state edits,\n * where title is effective-dated alongside rate/unit/FLSA on a future\n * compensation row). Defaults to `true`.\n */\n withTitleField?: boolean\n}\n\n/** @internal */\nexport function createJobSchema(options: JobSchemaOptions = {}) {\n const {\n mode = 'create',\n optionalFieldsToRequire,\n withHireDateField = true,\n withTitleField = true,\n } = options\n\n const excludeFields: Array<keyof typeof fieldValidators> = []\n if (!withHireDateField) excludeFields.push('hireDate')\n if (!withTitleField) excludeFields.push('title')\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: JobErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields,\n })\n}\n"],"names":["JobErrorCodes","fieldValidators","z","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","createJobSchema","options","mode","optionalFieldsToRequire","withHireDateField","withTitleField","excludeFields","buildFormSchema"],"mappings":";;;AA2BO,MAAMA,IAAgB;AAAA,EAC3B,UAAU;AACZ,GASMC,IAAkB;AAAA;AAAA,EAEtB,OAAOC,EAAE,OAAA;AAAA;AAAA,EAET,UAAUA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA;AAAA,EAE/D,uBAAuBA,EAAE,QAAA;AAAA;AAAA;AAAA,EAGzB,gBAAgBA,EAAE,WAAWE,GAAqBF,EAAE,SAAS;AAAA;AAAA,EAE7D,kBAAkBA,EAAE,OAAA;AACtB,GA8BMG,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,uBAAuB;AAAA,EACvB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhB,kBAAkB,CAAAC,MAAQ,OAAOA,EAAK,cAAc,MAAM;AAC5D;AAwDO,SAASC,EAAgBC,IAA4B,IAAI;AAC9D,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,yBAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,gBAAAC,IAAiB;AAAA,EAAA,IACfJ,GAEEK,IAAqD,CAAA;AAC3D,SAAKF,KAAmBE,EAAc,KAAK,UAAU,GAChDD,KAAgBC,EAAc,KAAK,OAAO,GAExCC,EAAgBb,GAAiB;AAAA,IACtC,sBAAAI;AAAA,IACA,mBAAmBL,EAAc;AAAA,IACjC,MAAAS;AAAA,IACA,yBAAAC;AAAA,IACA,eAAAG;AAAA,EAAA,CACD;AACH;"}
|
|
@@ -12,12 +12,10 @@ export interface DeductionsProps extends BaseComponentInterface<'Employee.Deduct
|
|
|
12
12
|
* Onboarding step for collecting an employee's post-tax deductions and court-ordered garnishments.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
15
|
+
* Renders the employee's current deductions as a list, with an empty state when none exist. Users add or edit deductions inline — post-tax custom deductions or court-ordered garnishments — and can complete the step with or without any active deductions.
|
|
16
16
|
*
|
|
17
17
|
* | Event | Description | Data |
|
|
18
18
|
* | ----- | ----------- | ---- |
|
|
19
|
-
* | `employee/deductions/include/yes` | Fired when the user chooses to add deductions from the include prompt | — |
|
|
20
|
-
* | `employee/deductions/include/no` | Fired when the user chooses to skip deductions from the include prompt | — |
|
|
21
19
|
* | `employee/deductions/add` | Fired when the user opens the form to add a new deduction | — |
|
|
22
20
|
* | `employee/deductions/edit` | Fired when the user opens the form to edit an existing deduction | The matching `Garnishment` |
|
|
23
21
|
* | `employee/deductions/created` | Fired after a new deduction is saved | The created `Garnishment` |
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createMachine as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return /* @__PURE__ */ s(l, { componentName: "Employee.Deductions", children: /* @__PURE__ */ s(C, { employeeId: o, dictionary: t, onEvent: e }) });
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as m } from "robot3";
|
|
3
|
+
import { useMemo as c } from "react";
|
|
4
|
+
import { DeductionsListContextual as s } from "./deductionsContextualComponents.js";
|
|
5
|
+
import { deductionsMachine as u } from "./stateMachine.js";
|
|
6
|
+
import { Flow as p } from "../../../Flow/Flow.js";
|
|
7
|
+
import { BaseBoundaries as f } from "../../../Base/Base.js";
|
|
8
|
+
import { useComponentDictionary as a, useI18n as d } from "../../../../i18n/I18n.js";
|
|
9
|
+
function j({ employeeId: o, dictionary: t, onEvent: e }) {
|
|
10
|
+
return /* @__PURE__ */ n(f, { componentName: "Employee.Deductions", children: /* @__PURE__ */ n(D, { employeeId: o, dictionary: t, onEvent: e }) });
|
|
12
11
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
() =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
employeeId: o
|
|
23
|
-
})
|
|
24
|
-
),
|
|
25
|
-
[o, n]
|
|
12
|
+
function D({ employeeId: o, dictionary: t, onEvent: e }) {
|
|
13
|
+
a("Employee.Deductions", t), d("Employee.Deductions");
|
|
14
|
+
const i = c(
|
|
15
|
+
() => m("list", u, (r) => ({
|
|
16
|
+
...r,
|
|
17
|
+
component: s,
|
|
18
|
+
employeeId: o
|
|
19
|
+
})),
|
|
20
|
+
[o]
|
|
26
21
|
);
|
|
27
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ n(p, { machine: i, onEvent: e });
|
|
28
23
|
}
|
|
29
24
|
export {
|
|
30
|
-
|
|
25
|
+
j as Deductions
|
|
31
26
|
};
|
|
32
27
|
//# sourceMappingURL=Deductions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deductions.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/Deductions.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"Deductions.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/Deductions.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n DeductionsListContextual,\n type DeductionsContextInterface,\n} from './deductionsContextualComponents'\nimport { deductionsMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\n\n/**\n * Props for {@link Deductions}.\n *\n * @public\n */\nexport interface DeductionsProps extends BaseComponentInterface<'Employee.Deductions'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for collecting an employee's post-tax deductions and court-ordered garnishments.\n *\n * @remarks\n * Renders the employee's current deductions as a list, with an empty state when none exist. Users add or edit deductions inline — post-tax custom deductions or court-ordered garnishments — and can complete the step with or without any active deductions.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/deductions/add` | Fired when the user opens the form to add a new deduction | — |\n * | `employee/deductions/edit` | Fired when the user opens the form to edit an existing deduction | The matching `Garnishment` |\n * | `employee/deductions/created` | Fired after a new deduction is saved | The created `Garnishment` |\n * | `employee/deductions/updated` | Fired after an existing deduction is updated | The updated `Garnishment` |\n * | `employee/deductions/deleted` | Fired after a deduction is deleted and others remain | The deleted `Garnishment` |\n * | `employee/deductions/deletedEmpty` | Fired after the last deduction is deleted, leaving none | — |\n * | `employee/deductions/cancel` | Fired when the user cancels the form while other deductions exist | — |\n * | `employee/deductions/cancelEmpty` | Fired when the user cancels the form and no deductions remain | — |\n * | `employee/deductions/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - See {@link DeductionsProps}.\n * @returns The deductions onboarding step.\n * @public\n * @group Block Components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Deductions\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Deductions({ employeeId, dictionary, onEvent }: DeductionsProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Deductions\">\n <DeductionsRoot employeeId={employeeId} dictionary={dictionary} onEvent={onEvent} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsRoot({ employeeId, dictionary, onEvent }: DeductionsProps) {\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const machine = useMemo(\n () =>\n createMachine('list', deductionsMachine, (initialContext: DeductionsContextInterface) => ({\n ...initialContext,\n component: DeductionsListContextual,\n employeeId,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["Deductions","employeeId","dictionary","onEvent","jsx","BaseBoundaries","DeductionsRoot","useComponentDictionary","useI18n","machine","useMemo","createMachine","deductionsMachine","initialContext","DeductionsListContextual","Flow"],"mappings":";;;;;;;;AA0DO,SAASA,EAAW,EAAE,YAAAC,GAAY,YAAAC,GAAY,SAAAC,KAA4B;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,uBAC5B,4BAACC,GAAA,EAAe,YAAAL,GAAwB,YAAAC,GAAwB,SAAAC,EAAA,CAAkB,EAAA,CACpF;AAEJ;AAEA,SAASG,EAAe,EAAE,YAAAL,GAAY,YAAAC,GAAY,SAAAC,KAA4B;AAC5E,EAAAI,EAAuB,uBAAuBL,CAAU,GACxDM,EAAQ,qBAAqB;AAE7B,QAAMC,IAAUC;AAAA,IACd,MACEC,EAAc,QAAQC,GAAmB,CAACC,OAAgD;AAAA,MACxF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAb;AAAA,IAAA,EACA;AAAA,IACJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAG,EAACW,GAAA,EAAK,SAAAN,GAAkB,SAAAN,EAAA,CAAkB;AACnD;"}
|
|
@@ -1,87 +1,92 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { formatDeductionAmount as
|
|
4
|
-
import { Flex as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as k } from "react-i18next";
|
|
3
|
+
import { formatDeductionAmount as b } from "../../shared/formatDeductionAmount.js";
|
|
4
|
+
import { Flex as m } from "../../../../Common/Flex/Flex.js";
|
|
5
|
+
import { EmptyData as P } from "../../../../Common/EmptyData/EmptyData.js";
|
|
6
|
+
import { ActionsLayout as T } from "../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
|
+
import { HamburgerMenu as v } from "../../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
8
|
+
import u from "../../../../../hooks/useNumberFormatter.js";
|
|
9
|
+
import E from "../../../../../assets/icons/pencil.svg.js";
|
|
10
|
+
import S from "../../../../../assets/icons/trashcan.svg.js";
|
|
11
|
+
import { useComponentContext as w } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { useI18n as B } from "../../../../../i18n/I18n.js";
|
|
13
|
+
import l from "../../../../../assets/icons/plus-circle.svg.js";
|
|
13
14
|
import { useDataView as V } from "../../../../Common/DataView/useDataView.js";
|
|
14
|
-
import { DataView as
|
|
15
|
-
function
|
|
16
|
-
className:
|
|
15
|
+
import { DataView as A } from "../../../../Common/DataView/DataView.js";
|
|
16
|
+
function U({
|
|
17
|
+
className: s,
|
|
17
18
|
deductionsList: i,
|
|
18
|
-
onAdd:
|
|
19
|
-
onEdit:
|
|
20
|
-
onDelete:
|
|
21
|
-
onContinue:
|
|
19
|
+
onAdd: c,
|
|
20
|
+
onEdit: d,
|
|
21
|
+
onDelete: p,
|
|
22
|
+
onContinue: f
|
|
22
23
|
}) {
|
|
23
|
-
|
|
24
|
-
const { t
|
|
25
|
-
data:
|
|
24
|
+
B("Employee.Deductions");
|
|
25
|
+
const { t } = k("Employee.Deductions"), r = w(), g = u("currency"), h = u("percent"), { deductions: a } = i.data, y = i.status.isPending, C = a.length === 0, { ...D } = V({
|
|
26
|
+
data: a,
|
|
26
27
|
columns: [
|
|
27
28
|
{
|
|
28
29
|
key: "description",
|
|
29
|
-
title:
|
|
30
|
+
title: t("nameColumn")
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
33
|
key: "recurring",
|
|
33
|
-
title:
|
|
34
|
-
render: (n) => n.recurring ?
|
|
34
|
+
title: t("frequencyColumn"),
|
|
35
|
+
render: (n) => n.recurring ? t("recurringText") : t("nonRecurringText")
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
38
|
key: "amount",
|
|
38
|
-
title:
|
|
39
|
-
render: (n) =>
|
|
40
|
-
formatCurrency:
|
|
41
|
-
formatPercent:
|
|
42
|
-
formatPerPaycheck: (
|
|
39
|
+
title: t("withheldColumn"),
|
|
40
|
+
render: (n) => b(n, {
|
|
41
|
+
formatCurrency: g,
|
|
42
|
+
formatPercent: h,
|
|
43
|
+
formatPerPaycheck: (x) => t("recurringAmount", { value: x })
|
|
43
44
|
})
|
|
44
45
|
}
|
|
45
46
|
],
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
emptyState: () => /* @__PURE__ */ e(P, { title: t("includeDeductionsEmptyState"), children: /* @__PURE__ */ o(r.Button, { type: "button", variant: "secondary", onClick: c, children: [
|
|
48
|
+
/* @__PURE__ */ e(l, {}),
|
|
49
|
+
t("addDeductionButtonCta")
|
|
50
|
+
] }) }),
|
|
51
|
+
itemMenu: (n) => /* @__PURE__ */ e(
|
|
52
|
+
v,
|
|
48
53
|
{
|
|
49
|
-
isLoading:
|
|
54
|
+
isLoading: y,
|
|
50
55
|
items: [
|
|
51
56
|
{
|
|
52
|
-
label:
|
|
57
|
+
label: t("editCta"),
|
|
53
58
|
onClick: () => {
|
|
54
|
-
|
|
59
|
+
d(n);
|
|
55
60
|
},
|
|
56
|
-
icon: /* @__PURE__ */
|
|
61
|
+
icon: /* @__PURE__ */ e(E, { "aria-hidden": !0 })
|
|
57
62
|
},
|
|
58
63
|
{
|
|
59
|
-
label:
|
|
64
|
+
label: t("deleteCta"),
|
|
60
65
|
onClick: () => {
|
|
61
|
-
|
|
66
|
+
p(n);
|
|
62
67
|
},
|
|
63
|
-
icon: /* @__PURE__ */
|
|
68
|
+
icon: /* @__PURE__ */ e(S, { "aria-hidden": !0 })
|
|
64
69
|
}
|
|
65
70
|
]
|
|
66
71
|
}
|
|
67
72
|
)
|
|
68
73
|
});
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ o(
|
|
71
|
-
/* @__PURE__ */ r
|
|
72
|
-
/* @__PURE__ */ r
|
|
74
|
+
return /* @__PURE__ */ e("section", { className: s, children: /* @__PURE__ */ o(m, { flexDirection: "column", gap: 32, children: [
|
|
75
|
+
/* @__PURE__ */ o(m, { flexDirection: "column", gap: 2, children: [
|
|
76
|
+
/* @__PURE__ */ e(r.Heading, { as: "h2", children: t("pageTitle") }),
|
|
77
|
+
/* @__PURE__ */ e(r.Text, { variant: "supporting", children: t("includeDeductionsDescriptionV2") })
|
|
73
78
|
] }),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */ o(
|
|
76
|
-
/* @__PURE__ */ o(
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
79
|
+
/* @__PURE__ */ e(A, { label: t("deductionsTableLabel"), ...D }),
|
|
80
|
+
/* @__PURE__ */ o(T, { children: [
|
|
81
|
+
!C && /* @__PURE__ */ o(r.Button, { variant: "secondary", onClick: c, children: [
|
|
82
|
+
/* @__PURE__ */ e(l, {}),
|
|
83
|
+
t("addDeductionCta")
|
|
79
84
|
] }),
|
|
80
|
-
/* @__PURE__ */ r
|
|
85
|
+
/* @__PURE__ */ e(r.Button, { onClick: f, children: t("continueCta") })
|
|
81
86
|
] })
|
|
82
87
|
] }) });
|
|
83
88
|
}
|
|
84
89
|
export {
|
|
85
|
-
|
|
90
|
+
U as DeductionsList
|
|
86
91
|
};
|
|
87
92
|
//# sourceMappingURL=DeductionsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeductionsList.js","sources":["../../../../../../src/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { UseDeductionsListReady } from '../../shared/useDeductionsList'\nimport { formatDeductionAmount } from '../../shared/formatDeductionAmount'\nimport { useDataView, DataView } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\n/** @internal */\nexport interface DeductionsListProps {\n className?: string\n deductionsList: UseDeductionsListReady\n onAdd: () => void\n onEdit: (deduction: Garnishment) => void\n onDelete: (deduction: Garnishment) => void\n onContinue: () => void\n}\n\n/** @internal */\nexport function DeductionsList({\n className,\n deductionsList,\n onAdd,\n onEdit,\n onDelete,\n onContinue,\n}: DeductionsListProps) {\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const { deductions } = deductionsList.data\n const isPendingAny = deductionsList.status.isPending\n\n const { ...dataViewProps } = useDataView({\n data: deductions,\n columns: [\n {\n key: 'description',\n title: t('nameColumn'),\n },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction =>\n formatDeductionAmount(deduction, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('recurringAmount', { value }),\n }),\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPendingAny}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n onEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n onDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n </Flex>\n\n <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={onAdd}>\n
|
|
1
|
+
{"version":3,"file":"DeductionsList.js","sources":["../../../../../../src/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport type { UseDeductionsListReady } from '../../shared/useDeductionsList'\nimport { formatDeductionAmount } from '../../shared/formatDeductionAmount'\nimport { useDataView, DataView } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { EmptyData } from '@/components/Common/EmptyData/EmptyData'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\n/** @internal */\nexport interface DeductionsListProps {\n className?: string\n deductionsList: UseDeductionsListReady\n onAdd: () => void\n onEdit: (deduction: Garnishment) => void\n onDelete: (deduction: Garnishment) => void\n onContinue: () => void\n}\n\n/** @internal */\nexport function DeductionsList({\n className,\n deductionsList,\n onAdd,\n onEdit,\n onDelete,\n onContinue,\n}: DeductionsListProps) {\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const { deductions } = deductionsList.data\n const isPendingAny = deductionsList.status.isPending\n const isEmpty = deductions.length === 0\n\n const { ...dataViewProps } = useDataView({\n data: deductions,\n columns: [\n {\n key: 'description',\n title: t('nameColumn'),\n },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction =>\n formatDeductionAmount(deduction, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('recurringAmount', { value }),\n }),\n },\n ],\n emptyState: () => (\n <EmptyData title={t('includeDeductionsEmptyState')}>\n <Components.Button type=\"button\" variant=\"secondary\" onClick={onAdd}>\n <PlusCircleIcon />\n {t('addDeductionButtonCta')}\n </Components.Button>\n </EmptyData>\n ),\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPendingAny}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n onEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n onDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n </Flex>\n\n <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n <ActionsLayout>\n {!isEmpty && (\n <Components.Button variant=\"secondary\" onClick={onAdd}>\n <PlusCircleIcon />\n {t('addDeductionCta')}\n </Components.Button>\n )}\n <Components.Button onClick={onContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </Flex>\n </section>\n )\n}\n"],"names":["DeductionsList","className","deductionsList","onAdd","onEdit","onDelete","onContinue","useI18n","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","deductions","isPendingAny","isEmpty","dataViewProps","useDataView","deduction","formatDeductionAmount","value","jsx","EmptyData","jsxs","PlusCircleIcon","HamburgerMenu","PencilSvg","TrashCanSvg","Flex","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;AA2BO,SAASA,EAAe;AAAA,EAC7B,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAwB;AACtB,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5C,EAAE,YAAAE,MAAeZ,EAAe,MAChCa,IAAeb,EAAe,OAAO,WACrCc,IAAUF,EAAW,WAAW,GAEhC,EAAE,GAAGG,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMJ;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,YAAY;AAAA,MAAA;AAAA,MAEvB;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,iBAAiB;AAAA,QAC1B,QAAQ,CAAAK,MACCA,EAAU,YAAY,EAAE,eAAe,IAAI,EAAE,kBAAkB;AAAA,MACxE;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAAA,MACNC,EAAsBD,GAAW;AAAA,UAC/B,gBAAAR;AAAA,UACA,eAAAE;AAAA,UACA,mBAAmB,CAACQ,MAAkB,EAAE,mBAAmB,EAAE,OAAAA,GAAO;AAAA,QAAA,CACrE;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,6BAA6B,GAC/C,UAAA,gBAAAC,EAACf,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,aAAY,SAASN,GAC5D,UAAA;AAAA,MAAA,gBAAAmB,EAACG,GAAA,EAAe;AAAA,MACf,EAAE,uBAAuB;AAAA,IAAA,EAAA,CAC5B,EAAA,CACF;AAAA,IAEF,UAAU,CAAAN,MAEN,gBAAAG;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,WAAWX;AAAA,QACX,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAX,EAAOe,CAAS;AAAA,YAClB;AAAA,YACA,MAAM,gBAAAG,EAACK,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,UAE/B;AAAA,YACE,OAAO,EAAE,WAAW;AAAA,YACpB,SAAS,MAAM;AACb,cAAAtB,EAASc,CAAS;AAAA,YACpB;AAAA,YACA,MAAM,gBAAAG,EAACM,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SACE,gBAAAN,EAAC,aAAQ,WAAArB,GACP,UAAA,gBAAAuB,EAACK,KAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAL,EAACK,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAP,EAACb,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,WAAW,GAAE;AAAA,MAC5C,gBAAAa,EAACb,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAA,EAAE,gCAAgC,EAAA,CACrC;AAAA,IAAA,GACF;AAAA,sBAECqB,GAAA,EAAS,OAAO,EAAE,sBAAsB,GAAI,GAAGb,GAAe;AAAA,sBAC9Dc,GAAA,EACE,UAAA;AAAA,MAAA,CAACf,uBACCP,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAC9C,UAAA;AAAA,QAAA,gBAAAmB,EAACG,GAAA,EAAe;AAAA,QACf,EAAE,iBAAiB;AAAA,MAAA,GACtB;AAAA,MAEF,gBAAAH,EAACb,EAAW,QAAX,EAAkB,SAASH,GAAa,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,EAAA,CAC5D;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -3,8 +3,6 @@ import { FlowContextInterface } from '../../../Flow/useFlow';
|
|
|
3
3
|
import { componentEvents } from '../../../../shared/constants';
|
|
4
4
|
/** @internal */
|
|
5
5
|
export type EventPayloads = {
|
|
6
|
-
[componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES]: undefined;
|
|
7
|
-
[componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO]: undefined;
|
|
8
6
|
[componentEvents.EMPLOYEE_DEDUCTION_ADD]: undefined;
|
|
9
7
|
[componentEvents.EMPLOYEE_DEDUCTION_EDIT]: Garnishment;
|
|
10
8
|
[componentEvents.EMPLOYEE_DEDUCTION_CANCEL]: undefined;
|
|
@@ -22,8 +20,6 @@ export interface DeductionsContextInterface extends FlowContextInterface {
|
|
|
22
20
|
editingDeductionId?: string;
|
|
23
21
|
}
|
|
24
22
|
/** @internal */
|
|
25
|
-
export declare function IncludeDeductionsContextual(): import("react").JSX.Element;
|
|
26
|
-
/** @internal */
|
|
27
23
|
export declare function DeductionsListContextual(): import("react").JSX.Element;
|
|
28
24
|
/** @internal */
|
|
29
25
|
export declare function DeductionsFormContextual(): import("react").JSX.Element;
|
|
@@ -1,76 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useDeductionsList as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useFlow as l } from "../../../Flow/useFlow.js";
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useDeductionsList as l } from "../shared/useDeductionsList.js";
|
|
3
|
+
import { DeductionsList as _ } from "./DeductionsList/DeductionsList.js";
|
|
4
|
+
import { useOnboardingDeductionsFormDictionary as C } from "./useFormDictionary.js";
|
|
5
|
+
import { BaseLayout as d } from "../../../Base/Base.js";
|
|
6
|
+
import { useFlow as L } from "../../../Flow/useFlow.js";
|
|
8
7
|
import { componentEvents as o } from "../../../../shared/constants.js";
|
|
9
8
|
import { ensureRequired as m } from "../../../../helpers/ensureRequired.js";
|
|
10
9
|
import { DeductionsForm as f } from "../shared/DeductionsForm/DeductionsForm.js";
|
|
11
|
-
function
|
|
12
|
-
const { onEvent:
|
|
13
|
-
return /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(C, { onAdd: () => {
|
|
14
|
-
t(o.EMPLOYEE_DEDUCTION_INCLUDE_YES);
|
|
15
|
-
}, onContinue: () => {
|
|
16
|
-
t(o.EMPLOYEE_DEDUCTION_INCLUDE_NO), t(o.EMPLOYEE_DEDUCTION_DONE);
|
|
17
|
-
} }) });
|
|
18
|
-
}
|
|
19
|
-
function h() {
|
|
20
|
-
const { employeeId: t, onEvent: n } = l(), e = O({ employeeId: m(t) });
|
|
10
|
+
function U() {
|
|
11
|
+
const { employeeId: s, onEvent: n } = L(), e = l({ employeeId: m(s) });
|
|
21
12
|
if (e.isLoading)
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
const
|
|
13
|
+
return /* @__PURE__ */ i(d, { isLoading: !0, error: e.errorHandling.errors });
|
|
14
|
+
const r = () => {
|
|
24
15
|
n(o.EMPLOYEE_DEDUCTION_ADD);
|
|
25
|
-
}, D = (
|
|
26
|
-
n(o.EMPLOYEE_DEDUCTION_EDIT,
|
|
16
|
+
}, D = (t) => {
|
|
17
|
+
n(o.EMPLOYEE_DEDUCTION_EDIT, t);
|
|
27
18
|
}, c = () => {
|
|
28
19
|
n(o.EMPLOYEE_DEDUCTION_DONE);
|
|
29
|
-
}, u = async (
|
|
30
|
-
const
|
|
31
|
-
|
|
20
|
+
}, u = async (t) => {
|
|
21
|
+
const E = await e.actions.onDelete(t);
|
|
22
|
+
E && (E.data.remainingActiveCount === 0 ? n(o.EMPLOYEE_DEDUCTION_DELETED_EMPTY) : n(o.EMPLOYEE_DEDUCTION_DELETED, E.data.garnishment));
|
|
32
23
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
24
|
+
return /* @__PURE__ */ i(d, { error: e.errorHandling.errors, children: /* @__PURE__ */ i(
|
|
25
|
+
_,
|
|
35
26
|
{
|
|
36
27
|
deductionsList: e,
|
|
37
|
-
onAdd:
|
|
28
|
+
onAdd: r,
|
|
38
29
|
onEdit: D,
|
|
39
|
-
onDelete: (
|
|
40
|
-
u(
|
|
30
|
+
onDelete: (t) => {
|
|
31
|
+
u(t);
|
|
41
32
|
},
|
|
42
33
|
onContinue: c
|
|
43
34
|
}
|
|
44
35
|
) });
|
|
45
36
|
}
|
|
46
|
-
function
|
|
47
|
-
const { employeeId:
|
|
48
|
-
if (
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
const c = n ?
|
|
37
|
+
function A() {
|
|
38
|
+
const { employeeId: s, editingDeductionId: n, onEvent: e } = L(), r = l({ employeeId: m(s) }), D = C();
|
|
39
|
+
if (r.isLoading)
|
|
40
|
+
return /* @__PURE__ */ i(d, { isLoading: !0, error: r.errorHandling.errors });
|
|
41
|
+
const c = n ? r.data.deductions.find((a) => a.uuid === n) ?? null : null, u = r.data.deductions.length > 0, t = (a, O) => {
|
|
51
42
|
e(
|
|
52
|
-
|
|
43
|
+
O === "create" ? o.EMPLOYEE_DEDUCTION_CREATED : o.EMPLOYEE_DEDUCTION_UPDATED,
|
|
53
44
|
a
|
|
54
45
|
);
|
|
55
|
-
},
|
|
46
|
+
}, E = () => {
|
|
56
47
|
e(
|
|
57
48
|
u ? o.EMPLOYEE_DEDUCTION_CANCEL : o.EMPLOYEE_DEDUCTION_CANCEL_EMPTY
|
|
58
49
|
);
|
|
59
50
|
};
|
|
60
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ i(d, { error: r.errorHandling.errors, children: /* @__PURE__ */ i(
|
|
61
52
|
f,
|
|
62
53
|
{
|
|
63
|
-
employeeId: m(
|
|
54
|
+
employeeId: m(s),
|
|
64
55
|
deduction: c,
|
|
65
56
|
dictionary: D,
|
|
66
|
-
onSaved:
|
|
67
|
-
onCancel:
|
|
57
|
+
onSaved: t,
|
|
58
|
+
onCancel: E
|
|
68
59
|
}
|
|
69
60
|
) });
|
|
70
61
|
}
|
|
71
62
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
v as IncludeDeductionsContextual
|
|
63
|
+
A as DeductionsFormContextual,
|
|
64
|
+
U as DeductionsListContextual
|
|
75
65
|
};
|
|
76
66
|
//# sourceMappingURL=deductionsContextualComponents.js.map
|
package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deductionsContextualComponents.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/deductionsContextualComponents.tsx"],"sourcesContent":["import { type Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport { useDeductionsList } from '../shared/useDeductionsList'\nimport { DeductionsForm } from '../shared/DeductionsForm'\nimport {
|
|
1
|
+
{"version":3,"file":"deductionsContextualComponents.js","sources":["../../../../../src/components/Employee/Deductions/onboarding/deductionsContextualComponents.tsx"],"sourcesContent":["import { type Garnishment } from '@gusto/embedded-api-v-2025-11-15/models/components/garnishment'\nimport { useDeductionsList } from '../shared/useDeductionsList'\nimport { DeductionsForm } from '../shared/DeductionsForm'\nimport { DeductionsList } from './DeductionsList/DeductionsList'\nimport { useOnboardingDeductionsFormDictionary } from './useFormDictionary'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/** @internal */\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_DEDUCTION_ADD]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_EDIT]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_CANCEL]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_CREATED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_UPDATED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_DELETED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_DONE]: undefined\n}\n\n/** @internal */\nexport interface DeductionsContextInterface extends FlowContextInterface {\n employeeId: string\n /** Set by the EDIT transition; consumed by the form-mode contextual. */\n editingDeductionId?: string\n}\n\n/** @internal */\nexport function DeductionsListContextual() {\n const { employeeId, onEvent } = useFlow<DeductionsContextInterface>()\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const onAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD)\n }\n const onEdit = (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n }\n const onContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n const onDelete = async (deduction: Garnishment) => {\n const result = await list.actions.onDelete(deduction)\n if (!result) return\n if (result.data.remainingActiveCount === 0) {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY)\n } else {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED, result.data.garnishment)\n }\n }\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsList\n deductionsList={list}\n onAdd={onAdd}\n onEdit={onEdit}\n onDelete={(d: Garnishment) => {\n void onDelete(d)\n }}\n onContinue={onContinue}\n />\n </BaseLayout>\n )\n}\n\n/** @internal */\nexport function DeductionsFormContextual() {\n const { employeeId, editingDeductionId, onEvent } = useFlow<DeductionsContextInterface>()\n // The same list query the form hooks use internally — React Query dedupes\n // so this is the only outstanding request.\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n const formDictionary = useOnboardingDeductionsFormDictionary()\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const deduction = editingDeductionId\n ? (list.data.deductions.find(d => d.uuid === editingDeductionId) ?? null)\n : null\n const hasActiveDeductions = list.data.deductions.length > 0\n\n const onSaved = (saved: Garnishment, mode: 'create' | 'update') => {\n onEvent(\n mode === 'create'\n ? componentEvents.EMPLOYEE_DEDUCTION_CREATED\n : componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n saved,\n )\n }\n const onCancel = () => {\n onEvent(\n hasActiveDeductions\n ? componentEvents.EMPLOYEE_DEDUCTION_CANCEL\n : componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,\n )\n }\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsForm\n employeeId={ensureRequired(employeeId)}\n deduction={deduction}\n dictionary={formDictionary}\n onSaved={onSaved}\n onCancel={onCancel}\n />\n </BaseLayout>\n )\n}\n"],"names":["DeductionsListContextual","employeeId","onEvent","useFlow","list","useDeductionsList","ensureRequired","BaseLayout","onAdd","componentEvents","onEdit","deduction","onContinue","onDelete","result","jsx","DeductionsList","d","DeductionsFormContextual","editingDeductionId","formDictionary","useOnboardingDeductionsFormDictionary","hasActiveDeductions","onSaved","saved","mode","onCancel","DeductionsForm"],"mappings":";;;;;;;;;AA+BO,SAASA,IAA2B;AACzC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA,GAC1BC,IAAOC,EAAkB,EAAE,YAAYC,EAAeL,CAAU,GAAG;AAEzE,MAAIG,EAAK;AACP,6BAAQG,GAAA,EAAW,WAAS,IAAC,OAAOH,EAAK,cAAc,QAAQ;AAGjE,QAAMI,IAAQ,MAAM;AAClB,IAAAN,EAAQO,EAAgB,sBAAsB;AAAA,EAChD,GACMC,IAAS,CAACC,MAA2B;AACzC,IAAAT,EAAQO,EAAgB,yBAAyBE,CAAS;AAAA,EAC5D,GACMC,IAAa,MAAM;AACvB,IAAAV,EAAQO,EAAgB,uBAAuB;AAAA,EACjD,GACMI,IAAW,OAAOF,MAA2B;AACjD,UAAMG,IAAS,MAAMV,EAAK,QAAQ,SAASO,CAAS;AACpD,IAAKG,MACDA,EAAO,KAAK,yBAAyB,IACvCZ,EAAQO,EAAgB,gCAAgC,IAExDP,EAAQO,EAAgB,4BAA4BK,EAAO,KAAK,WAAW;AAAA,EAE/E;AAEA,SACE,gBAAAC,EAACR,GAAA,EAAW,OAAOH,EAAK,cAAc,QACpC,UAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBZ;AAAA,MAChB,OAAAI;AAAA,MACA,QAAAE;AAAA,MACA,UAAU,CAACO,MAAmB;AAC5B,QAAKJ,EAASI,CAAC;AAAA,MACjB;AAAA,MACA,YAAAL;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAGO,SAASM,IAA2B;AACzC,QAAM,EAAE,YAAAjB,GAAY,oBAAAkB,GAAoB,SAAAjB,EAAA,IAAYC,EAAA,GAG9CC,IAAOC,EAAkB,EAAE,YAAYC,EAAeL,CAAU,GAAG,GACnEmB,IAAiBC,EAAA;AAEvB,MAAIjB,EAAK;AACP,6BAAQG,GAAA,EAAW,WAAS,IAAC,OAAOH,EAAK,cAAc,QAAQ;AAGjE,QAAMO,IAAYQ,IACbf,EAAK,KAAK,WAAW,KAAK,CAAAa,MAAKA,EAAE,SAASE,CAAkB,KAAK,OAClE,MACEG,IAAsBlB,EAAK,KAAK,WAAW,SAAS,GAEpDmB,IAAU,CAACC,GAAoBC,MAA8B;AACjE,IAAAvB;AAAA,MACEuB,MAAS,WACLhB,EAAgB,6BAChBA,EAAgB;AAAA,MACpBe;AAAA,IAAA;AAAA,EAEJ,GACME,IAAW,MAAM;AACrB,IAAAxB;AAAA,MACEoB,IACIb,EAAgB,4BAChBA,EAAgB;AAAA,IAAA;AAAA,EAExB;AAEA,SACE,gBAAAM,EAACR,GAAA,EAAW,OAAOH,EAAK,cAAc,QACpC,UAAA,gBAAAW;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,YAAYrB,EAAeL,CAAU;AAAA,MACrC,WAAAU;AAAA,MACA,YAAYS;AAAA,MACZ,SAAAG;AAAA,MACA,UAAAG;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|