@gusto/embedded-react-sdk 0.53.0 → 0.54.1-rc.1
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 +64 -0
- package/DISCLAIMER.md +13 -0
- package/LICENSE +198 -4
- package/README.md +6 -0
- package/dist/components/Base/Base.d.ts +26 -5
- package/dist/components/Base/Base.js +89 -78
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +3 -3
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +6 -5
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/Loading/Loading.d.ts +6 -1
- package/dist/components/Common/Loading/Loading.js +13 -12
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +8 -8
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +18 -16
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +19 -18
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/BankAccount/BankAccount.js +9 -9
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/stateMachine.d.ts +3 -3
- package/dist/components/Company/BankAccount/stateMachine.js +7 -6
- package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +10 -10
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js +13 -12
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.d.ts +4 -4
- package/dist/components/Company/DocumentSigner/stateMachine.js +14 -13
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js +2 -2
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Locations/Locations.js +8 -8
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.d.ts +3 -3
- package/dist/components/Company/Locations/stateMachine.js +3 -2
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +8 -8
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.d.ts +10 -10
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +11 -10
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +20 -19
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +16 -15
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +4 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +68 -60
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +3 -3
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +4 -3
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +24 -21
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +11 -11
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js +8 -8
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +14 -13
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +3 -3
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +13 -12
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Contractor/Address/management/Address.d.ts +30 -0
- package/dist/components/Contractor/Address/management/Address.js +43 -0
- package/dist/components/Contractor/Address/management/Address.js.map +1 -0
- package/dist/components/Contractor/Address/management/AddressCard/AddressCard.d.ts +35 -0
- package/dist/components/Contractor/Address/management/AddressCard/AddressCard.js +45 -0
- package/dist/components/Contractor/Address/management/AddressCard/AddressCard.js.map +1 -0
- package/dist/components/Contractor/Address/management/AddressCard/index.d.ts +1 -0
- package/dist/components/Contractor/Address/management/AddressComponents.d.ts +12 -0
- package/dist/components/Contractor/Address/management/AddressComponents.js +48 -0
- package/dist/components/Contractor/Address/management/AddressComponents.js.map +1 -0
- package/dist/components/Contractor/Address/management/AddressEditForm.d.ts +29 -0
- package/dist/components/Contractor/Address/management/AddressEditForm.js +126 -0
- package/dist/components/Contractor/Address/management/AddressEditForm.js.map +1 -0
- package/dist/components/Contractor/Address/management/AddressEditForm.module.scss.js +8 -0
- package/dist/components/Contractor/Address/management/AddressEditForm.module.scss.js.map +1 -0
- package/dist/components/Contractor/Address/management/addressStateMachine.d.ts +5 -0
- package/dist/components/Contractor/Address/management/addressStateMachine.js +38 -0
- package/dist/components/Contractor/Address/management/addressStateMachine.js.map +1 -0
- package/dist/components/Contractor/Address/management/index.d.ts +3 -0
- package/dist/components/Contractor/Address/{Address.d.ts → onboarding/Address.d.ts} +7 -4
- package/dist/components/Contractor/Address/onboarding/Address.js +119 -0
- package/dist/components/Contractor/Address/onboarding/Address.js.map +1 -0
- package/dist/components/Contractor/Address/{types.d.ts → onboarding/types.d.ts} +2 -2
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.d.ts +19 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js +27 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/Compensation.d.ts +30 -0
- package/dist/components/Contractor/Compensation/management/Compensation.js +43 -0
- package/dist/components/Contractor/Compensation/management/Compensation.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.d.ts +35 -0
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js +57 -0
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/CompensationCard/index.d.ts +1 -0
- package/dist/components/Contractor/Compensation/management/CompensationComponents.d.ts +12 -0
- package/dist/components/Contractor/Compensation/management/CompensationComponents.js +48 -0
- package/dist/components/Contractor/Compensation/management/CompensationComponents.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/CompensationEditForm.d.ts +29 -0
- package/dist/components/Contractor/Compensation/management/CompensationEditForm.js +94 -0
- package/dist/components/Contractor/Compensation/management/CompensationEditForm.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/CompensationEditForm.module.scss.js +8 -0
- package/dist/components/Contractor/Compensation/management/CompensationEditForm.module.scss.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/compensationStateMachine.d.ts +5 -0
- package/dist/components/Contractor/Compensation/management/compensationStateMachine.js +46 -0
- package/dist/components/Contractor/Compensation/management/compensationStateMachine.js.map +1 -0
- package/dist/components/Contractor/Compensation/management/index.d.ts +3 -0
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.d.ts +17 -0
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js +23 -0
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js.map +1 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/contractorPaySchema.d.ts +50 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/contractorPaySchema.js +32 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/contractorPaySchema.js.map +1 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/fields.d.ts +26 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/fields.js +14 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/fields.js.map +1 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/index.d.ts +4 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.d.ts +111 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js +95 -0
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js.map +1 -0
- package/dist/components/Contractor/ContractorList/management/ManagementContractorList.d.ts +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +56 -46
- package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +22 -21
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
- package/dist/components/Contractor/ContractorList/onboarding/ContractorList.d.ts +1 -1
- package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js +44 -24
- package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js.map +1 -1
- package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js +3 -3
- package/dist/components/Contractor/Dashboard/Dashboard.d.ts +30 -0
- package/dist/components/Contractor/Dashboard/Dashboard.js +80 -0
- package/dist/components/Contractor/Dashboard/Dashboard.js.map +1 -0
- package/dist/components/Contractor/Dashboard/DashboardComponents.d.ts +25 -0
- package/dist/components/Contractor/Dashboard/DashboardComponents.js +67 -0
- package/dist/components/Contractor/Dashboard/DashboardComponents.js.map +1 -0
- package/dist/components/Contractor/Dashboard/DashboardFlow.d.ts +88 -0
- package/dist/components/Contractor/Dashboard/DashboardFlow.js +25 -0
- package/dist/components/Contractor/Dashboard/DashboardFlow.js.map +1 -0
- package/dist/components/Contractor/Dashboard/DetailsView.d.ts +26 -0
- package/dist/components/Contractor/Dashboard/DetailsView.js +14 -0
- package/dist/components/Contractor/Dashboard/DetailsView.js.map +1 -0
- package/dist/components/Contractor/Dashboard/PayView.d.ts +26 -0
- package/dist/components/Contractor/Dashboard/PayView.js +14 -0
- package/dist/components/Contractor/Dashboard/PayView.js.map +1 -0
- package/dist/components/Contractor/Dashboard/dashboardStateMachine.d.ts +8 -0
- package/dist/components/Contractor/Dashboard/dashboardStateMachine.js +139 -0
- package/dist/components/Contractor/Dashboard/dashboardStateMachine.js.map +1 -0
- package/dist/components/Contractor/Dashboard/index.d.ts +4 -0
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.d.ts +36 -0
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js +93 -0
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -0
- package/dist/components/Contractor/Documents/management/DocumentsCard/index.d.ts +1 -0
- package/dist/components/Contractor/Documents/management/index.d.ts +2 -0
- package/dist/components/Contractor/Documents/{DocumentSigner → onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
- package/dist/components/Contractor/Documents/onboarding/DocumentSigner/DocumentSigner.js +32 -0
- package/dist/components/Contractor/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Contractor/Documents/{DocumentSigner → onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Contractor/Documents/{DocumentSigner → onboarding/DocumentSigner}/documentSignerStateMachine.js +3 -3
- package/dist/components/Contractor/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Contractor/Documents/onboarding/DocumentSigner/stateMachine.d.ts +5 -0
- package/dist/components/Contractor/Documents/{DocumentSigner → onboarding/DocumentSigner}/stateMachine.js +14 -13
- package/dist/components/Contractor/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Contractor/Documents/{DocumentsList → onboarding/DocumentsList}/DocumentsList.d.ts +1 -1
- package/dist/components/Contractor/Documents/onboarding/DocumentsList/DocumentsList.js +81 -0
- package/dist/components/Contractor/Documents/onboarding/DocumentsList/DocumentsList.js.map +1 -0
- package/dist/components/Contractor/Documents/onboarding/DocumentsList/index.d.ts +1 -0
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/SignatureForm.d.ts +1 -1
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/SignatureForm.js +112 -116
- package/dist/components/Contractor/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +2 -2
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/contractorSignatureFormSchema.js +3 -3
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.js.map +1 -0
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/fields.d.ts +5 -5
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/fields.js +6 -6
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/fields.js.map +1 -0
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/useContractorSignatureForm.d.ts +2 -2
- package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/useContractorSignatureForm.js +8 -8
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -0
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -0
- package/dist/components/Contractor/Documents/shared/documentSigningStatus.d.ts +15 -0
- package/dist/components/Contractor/Documents/shared/documentSigningStatus.js +7 -0
- package/dist/components/Contractor/Documents/shared/documentSigningStatus.js.map +1 -0
- package/dist/components/Contractor/Documents/shared/documentSigningStatus.test.d.ts +1 -0
- package/dist/components/Contractor/Documents/shared/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -0
- package/dist/components/Contractor/Landing/Landing.js +30 -29
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +8 -8
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +16 -16
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +7 -7
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +8 -7
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +18 -17
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethod.d.ts +32 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethod.js +43 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethod.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodCard/PaymentMethodCard.d.ts +37 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodCard/PaymentMethodCard.js +133 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodCard/PaymentMethodCard.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodCard/index.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodComponents.d.ts +12 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodComponents.js +48 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodEditForm.d.ts +30 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodEditForm.js +57 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodEditForm.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodEditForm.module.scss.js +8 -0
- package/dist/components/Contractor/PaymentMethod/management/PaymentMethodEditForm.module.scss.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/management/index.d.ts +3 -0
- package/dist/components/Contractor/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Contractor/PaymentMethod/management/paymentMethodStateMachine.js +62 -0
- package/dist/components/Contractor/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/management/useFormDictionary.d.ts +11 -0
- package/dist/components/Contractor/PaymentMethod/management/useFormDictionary.js +33 -0
- package/dist/components/Contractor/PaymentMethod/management/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/{PaymentMethod.d.ts → onboarding/PaymentMethod.d.ts} +1 -1
- package/dist/components/Contractor/PaymentMethod/onboarding/PaymentMethod.js +87 -0
- package/dist/components/Contractor/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/{types.d.ts → onboarding/types.d.ts} +1 -1
- package/dist/components/Contractor/PaymentMethod/onboarding/useFormDictionary.d.ts +12 -0
- package/dist/components/Contractor/PaymentMethod/onboarding/useFormDictionary.js +31 -0
- package/dist/components/Contractor/PaymentMethod/onboarding/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFields/ContractorBankAccountFields.d.ts +29 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFields/ContractorBankAccountFields.js +55 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFields/ContractorBankAccountFields.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFields/index.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.d.ts +30 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js +46 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/index.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.d.ts +12 -3
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js +71 -69
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodSummary/index.d.ts +1 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodSummary/useContractorPaymentMethodSummary.d.ts +24 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodSummary/useContractorPaymentMethodSummary.js +43 -0
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodSummary/useContractorPaymentMethodSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +41 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +175 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.d.ts +18 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.js +83 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +134 -141
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +7 -3
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +58 -137
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/CreatePayment/useFormDictionary.js +53 -0
- package/dist/components/Contractor/Payments/CreatePayment/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.d.ts +63 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js +46 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlow.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlowComponents.d.ts +22 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlowComponents.js +26 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/CreatePaymentFlowComponents.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/createPaymentMachine.d.ts +8 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/createPaymentMachine.js +64 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/createPaymentMachine.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/createPaymentMachine.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreatePaymentFlow/index.d.ts +2 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.d.ts +30 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +56 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js +33 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +8 -8
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -10
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -44
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +26 -8
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +59 -152
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +46 -131
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js +36 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.d.ts +63 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js +46 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlow.js.map +1 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlowComponents.d.ts +20 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlowComponents.js +25 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/ViewPaymentFlowComponents.js.map +1 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/index.d.ts +2 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/viewPaymentMachine.d.ts +8 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/viewPaymentMachine.js +52 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/viewPaymentMachine.js.map +1 -0
- package/dist/components/Contractor/Payments/ViewPaymentFlow/viewPaymentMachine.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +83 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +124 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/EditContractorPaymentFormSchema.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/EditContractorPaymentPresentation.d.ts +44 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/EditContractorPaymentPresentation.js +128 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/EditContractorPaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/SetPaymentAmounts.d.ts +52 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/SetPaymentAmounts.js +131 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/SetPaymentAmounts.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/SetPaymentAmounts/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/shared/historicalPaymentDateBounds.d.ts +19 -0
- package/dist/components/Contractor/Payments/shared/historicalPaymentDateBounds.js +13 -0
- package/dist/components/Contractor/Payments/shared/historicalPaymentDateBounds.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/historicalPaymentDateBounds.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +1 -1
- package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +44 -35
- package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -1
- package/dist/components/Contractor/Profile/management/Profile.d.ts +30 -0
- package/dist/components/Contractor/Profile/management/Profile.js +43 -0
- package/dist/components/Contractor/Profile/management/Profile.js.map +1 -0
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.d.ts +35 -0
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js +55 -0
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js.map +1 -0
- package/dist/components/Contractor/Profile/management/ProfileCard/index.d.ts +1 -0
- package/dist/components/Contractor/Profile/management/ProfileComponents.d.ts +12 -0
- package/dist/components/Contractor/Profile/management/ProfileComponents.js +48 -0
- package/dist/components/Contractor/Profile/management/ProfileComponents.js.map +1 -0
- package/dist/components/Contractor/Profile/management/ProfileEditForm.d.ts +32 -0
- package/dist/components/Contractor/Profile/management/ProfileEditForm.js +235 -0
- package/dist/components/Contractor/Profile/management/ProfileEditForm.js.map +1 -0
- package/dist/components/Contractor/Profile/management/ProfileEditForm.module.scss.js +16 -0
- package/dist/components/Contractor/Profile/management/ProfileEditForm.module.scss.js.map +1 -0
- package/dist/components/Contractor/Profile/management/index.d.ts +3 -0
- package/dist/components/Contractor/Profile/management/profileStateMachine.d.ts +5 -0
- package/dist/components/Contractor/Profile/management/profileStateMachine.js +38 -0
- package/dist/components/Contractor/Profile/management/profileStateMachine.js.map +1 -0
- package/dist/components/Contractor/Profile/{BusinessSelfOnboardingProfile.d.ts → onboarding/BusinessSelfOnboardingProfile.d.ts} +1 -1
- package/dist/components/Contractor/Profile/{BusinessSelfOnboardingProfile.js → onboarding/BusinessSelfOnboardingProfile.js} +34 -26
- package/dist/components/Contractor/Profile/onboarding/BusinessSelfOnboardingProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/{ContractorProfile.d.ts → onboarding/ContractorProfile.d.ts} +2 -2
- package/dist/components/Contractor/Profile/{ContractorProfile.js → onboarding/ContractorProfile.js} +82 -63
- package/dist/components/Contractor/Profile/onboarding/ContractorProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/{IndividualSelfOnboardingProfile.d.ts → onboarding/IndividualSelfOnboardingProfile.d.ts} +1 -1
- package/dist/components/Contractor/Profile/onboarding/IndividualSelfOnboardingProfile.js +104 -0
- package/dist/components/Contractor/Profile/onboarding/IndividualSelfOnboardingProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/{SelfOnboardingContractorProfile.d.ts → onboarding/SelfOnboardingContractorProfile.d.ts} +6 -3
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js +43 -0
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +13 -3
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +93 -92
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.d.ts +17 -0
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js +23 -0
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js.map +1 -0
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js +12 -12
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.js +8 -8
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.d.ts +5 -5
- package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.js +7 -6
- package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorManagement.d.ts +15 -0
- package/dist/components/Contractor/exports/contractorManagement.js +51 -13
- package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +8 -8
- package/dist/components/Contractor/exports/contractorOnboarding.js +13 -13
- package/dist/components/Contractor/shared/SelectContractors/SelectContractors.d.ts +19 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js +39 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractors.js.map +1 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractorsPresentation.d.ts +3 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractorsPresentation.js +78 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractorsPresentation.js.map +1 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractorsPresentation.module.scss.js +10 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractorsPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/shared/SelectContractors/SelectContractorsPresentationTypes.d.ts +18 -0
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.d.ts +58 -0
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +82 -0
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -0
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.test.d.ts +1 -0
- package/dist/components/Contractor/{Payments/CreatePayment → shared}/helpers.js +1 -1
- package/dist/components/Contractor/shared/helpers.js.map +1 -0
- package/dist/components/Contractor/shared/useContractorHasSignedW9.js +1 -1
- package/dist/components/Contractor/shared/useContractorHasSignedW9.js.map +1 -1
- package/dist/components/Employee/Compensation/management/Compensation.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/Compensation.js +30 -23
- package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +4 -2
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js +55 -46
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +4 -2
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js +37 -21
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +4 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js +122 -102
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationComponents.js +43 -21
- package/dist/components/Employee/Compensation/management/CompensationComponents.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +4 -2
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +29 -26
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.d.ts +4 -2
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +74 -46
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.d.ts +4 -2
- package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.js +62 -53
- package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/compensationStateMachine.d.ts +4 -4
- package/dist/components/Employee/Compensation/management/compensationStateMachine.js +21 -20
- package/dist/components/Employee/Compensation/management/compensationStateMachine.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +11 -11
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +4 -2
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +46 -45
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.d.ts +15 -5
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js +33 -35
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.test.d.ts +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +20 -20
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +50 -34
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardFlow.js +8 -8
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +13 -13
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +15 -14
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/management/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/management/Deductions.js +26 -19
- package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.d.ts +4 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js +61 -54
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsComponents.js +27 -19
- package/dist/components/Employee/Deductions/management/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +40 -33
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.d.ts +2 -2
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js +9 -8
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.js +24 -15
- package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js +39 -38
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/stateMachine.d.ts +14 -4
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js +24 -25
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/stateMachine.test.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.d.ts +3 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +20 -19
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.d.ts +4 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +48 -44
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.d.ts +3 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js +41 -38
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js +2 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/management/Documents.d.ts +1 -1
- package/dist/components/Employee/Documents/management/Documents.js +26 -19
- package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.d.ts +3 -0
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +26 -19
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsComponents.js +22 -14
- package/dist/components/Employee/Documents/management/DocumentsComponents.js.map +1 -1
- package/dist/components/Employee/Documents/management/documentsStateMachine.d.ts +2 -2
- package/dist/components/Employee/Documents/management/documentsStateMachine.js +4 -3
- package/dist/components/Employee/Documents/management/documentsStateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +10 -10
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.d.ts +15 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js +39 -40
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.test.d.ts +1 -0
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.d.ts +3 -2
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +53 -43
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.d.ts +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +56 -40
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +8 -8
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +4 -4
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +8 -7
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +26 -19
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js +31 -24
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesComponents.js +27 -13
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesComponents.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +54 -40
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.d.ts +2 -2
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js +4 -3
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +47 -30
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.d.ts +3 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +15 -14
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +28 -21
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.d.ts +3 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js +30 -23
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressComponents.js +26 -12
- package/dist/components/Employee/HomeAddress/management/HomeAddressComponents.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +39 -22
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.d.ts +2 -2
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js +6 -5
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +31 -30
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js +6 -6
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +8 -8
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js +20 -19
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +8 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +3 -3
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +4 -3
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +59 -58
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +35 -27
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.d.ts +4 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.js +81 -68
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +28 -21
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +3 -3
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +9 -8
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +3 -1
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +83 -81
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +49 -22
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +17 -9
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +3 -3
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +7 -6
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +3 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +31 -23
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.d.ts +3 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js +81 -64
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.d.ts +4 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +69 -67
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.d.ts +1 -1
- package/dist/components/Employee/Profile/management/Profile.js +28 -21
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.d.ts +4 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +26 -26
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileComponents.js +27 -13
- package/dist/components/Employee/Profile/management/ProfileComponents.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.d.ts +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +65 -47
- package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
- package/dist/components/Employee/Profile/management/profileStateMachine.d.ts +2 -2
- package/dist/components/Employee/Profile/management/profileStateMachine.js +12 -11
- package/dist/components/Employee/Profile/management/profileStateMachine.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.d.ts +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +105 -102
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.d.ts +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +46 -45
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/Profile.d.ts +1 -1
- package/dist/components/Employee/Profile/onboarding/Profile.js +37 -15
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +18 -15
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +8 -8
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts +6 -6
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +21 -20
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +26 -19
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.d.ts +4 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js +37 -30
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesComponents.js +33 -19
- package/dist/components/Employee/StateTaxes/management/StateTaxesComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +46 -32
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.d.ts +2 -2
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js +4 -3
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +48 -31
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.d.ts +3 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +19 -18
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +9 -9
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +4 -4
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +7 -6
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +28 -21
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.d.ts +3 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js +35 -28
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressComponents.js +26 -12
- package/dist/components/Employee/WorkAddress/management/WorkAddressComponents.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +40 -23
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.d.ts +2 -2
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js +2 -1
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js.map +1 -1
- package/dist/components/Flow/Flow.d.ts +6 -7
- package/dist/components/Flow/Flow.js +27 -21
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +7 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +125 -101
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/index.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequests.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +48 -46
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +3 -0
- package/dist/components/InformationRequests/InformationRequestsComponents.js +12 -10
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
- package/dist/components/InformationRequests/informationRequestsStateMachine.d.ts +3 -3
- package/dist/components/InformationRequests/informationRequestsStateMachine.js +10 -9
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +18 -18
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +4 -4
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +4 -3
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +7 -7
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +2 -2
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +10 -9
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +7 -7
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.d.ts +2 -2
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +15 -14
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +94 -92
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +44 -44
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +108 -108
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +9 -9
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +5 -5
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +12 -11
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +10 -10
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -7
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +15 -14
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +7 -7
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +15 -15
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +3 -3
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +13 -12
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +103 -97
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +1 -9
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +12 -12
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +3 -3
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +6 -5
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +7 -7
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +2 -2
- package/dist/components/Payroll/Transition/transitionStateMachine.js +15 -14
- package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js +71 -70
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js +8 -8
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -14
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +5 -4
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +23 -23
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +4 -11
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/i18n/I18n.js +10 -0
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +5 -5
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +20 -18
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -1
- package/dist/i18n/en/Contractor.BankAccountFields.json.js +26 -0
- package/dist/i18n/en/Contractor.BankAccountFields.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Dashboard.json.js +14 -0
- package/dist/i18n/en/Contractor.Dashboard.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Management.Address.json.js +16 -0
- package/dist/i18n/en/Contractor.Management.Address.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Management.Compensation.json.js +26 -0
- package/dist/i18n/en/Contractor.Management.Compensation.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Management.Documents.json.js +24 -0
- package/dist/i18n/en/Contractor.Management.Documents.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Management.PaymentMethod.json.js +34 -0
- package/dist/i18n/en/Contractor.Management.PaymentMethod.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Management.Profile.json.js +26 -0
- package/dist/i18n/en/Contractor.Management.Profile.json.js.map +1 -0
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js +46 -44
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js +48 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +7 -7
- package/dist/i18n/en/Contractor.SelectContractors.json.js +20 -0
- package/dist/i18n/en/Contractor.SelectContractors.json.js.map +1 -0
- package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +18 -20
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.Common.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/types.d.ts +590 -10
- package/dist/index.d.ts +7 -5
- package/dist/index.js +93 -88
- package/dist/index.js.map +1 -1
- package/dist/lib/state-machine/__tests__/core.test.d.ts +1 -0
- package/dist/lib/state-machine/core.d.ts +20 -0
- package/dist/lib/state-machine/core.js +48 -0
- package/dist/lib/state-machine/core.js.map +1 -0
- package/dist/lib/state-machine/index.d.ts +5 -0
- package/dist/lib/state-machine/index.js +39 -0
- package/dist/lib/state-machine/index.js.map +1 -0
- package/dist/lib/state-machine/types.d.ts +60 -0
- package/dist/shared/constants.d.ts +68 -0
- package/dist/shared/constants.js +111 -81
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +1 -3
- package/docs/guides/endpoint-inventory.json +205 -4
- package/package.json +35 -34
- package/dist/components/Contractor/Address/Address.js +0 -98
- package/dist/components/Contractor/Address/Address.js.map +0 -1
- package/dist/components/Contractor/Address/index.d.ts +0 -2
- package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.js +0 -32
- package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.js.map +0 -1
- package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.d.ts +0 -5
- package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js.map +0 -1
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +0 -83
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +0 -1
- package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +0 -2
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +0 -1
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.js.map +0 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js.map +0 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +0 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +0 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +0 -114
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +0 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +0 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +0 -12
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +0 -124
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +0 -1
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +0 -1
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +0 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +0 -1
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +0 -96
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +0 -1
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +0 -40
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +0 -1
- package/dist/components/Contractor/Profile/index.d.ts +0 -1
- /package/dist/components/Contractor/Address/{Address.module.scss.js → onboarding/Address.module.scss.js} +0 -0
- /package/dist/components/Contractor/Address/{Address.module.scss.js.map → onboarding/Address.module.scss.js.map} +0 -0
- /package/dist/components/Contractor/Documents/{DocumentSigner → onboarding/DocumentSigner}/index.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/SignatureForm.module.scss.js +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/SignatureForm.module.scss.js.map +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/index.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/contractorSignatureFormSchema.test.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/index.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/w9Fields.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/w9Fields.js +0 -0
- /package/dist/components/Contractor/Documents/{SignatureForm → shared/SignatureForm}/useContractorSignatureForm/w9Fields.test.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{DocumentsList → shared}/useContractorDocumentsList/index.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{DocumentsList → shared}/useContractorDocumentsList/useContractorDocumentsList.d.ts +0 -0
- /package/dist/components/Contractor/Documents/{DocumentsList → shared}/useContractorDocumentsList/useContractorDocumentsList.js +0 -0
- /package/dist/components/Contractor/PaymentMethod/{PaymentMethod.module.scss.js → onboarding/PaymentMethod.module.scss.js} +0 -0
- /package/dist/components/Contractor/PaymentMethod/{PaymentMethod.module.scss.js.map → onboarding/PaymentMethod.module.scss.js.map} +0 -0
- /package/dist/components/Contractor/Payments/{CreatePayment → shared/SetPaymentAmounts}/EditContractorPaymentFormSchema.d.ts +0 -0
- /package/dist/components/Contractor/Payments/{CreatePayment → shared/SetPaymentAmounts}/EditContractorPaymentFormSchema.js +0 -0
- /package/dist/components/Contractor/Profile/{ContractorProfile.module.scss.js → onboarding/ContractorProfile.module.scss.js} +0 -0
- /package/dist/components/Contractor/Profile/{ContractorProfile.module.scss.js.map → onboarding/ContractorProfile.module.scss.js.map} +0 -0
- /package/dist/components/Contractor/{Payments/CreatePayment → shared}/helpers.d.ts +0 -0
package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompensationForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef } from 'react'\nimport type { ComponentType } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsCreateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsCreateCompensation'\nimport { useJobsAndCompensationsUpdateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsUpdateCompensation'\nimport { useLocationsGetMinimumWages } from '@gusto/embedded-api/react-query/locationsGetMinimumWages'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n createCompensationSchema,\n type CompensationOptionalFieldsToRequire,\n type CompensationFormData,\n type CompensationFormOutputs,\n} from './compensationSchema'\nimport {\n TitleField,\n FlsaStatusField,\n RateField,\n PaymentUnitField,\n AdjustForMinimumWageField,\n MinimumWageIdField,\n EffectiveDateField,\n} from './fields'\nimport type {\n TitleFieldProps,\n FlsaStatusFieldProps,\n RateFieldProps,\n PaymentUnitFieldProps,\n AdjustForMinimumWageFieldProps,\n MinimumWageIdFieldProps,\n EffectiveDateFieldProps,\n} from './fields'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { withFlags } from '@/partner-hook-utils/form/withFlags'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldMetadata,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { FlsaStatus, PAY_PERIODS, TIP_CREDITS_UNSUPPORTED_STATES } from '@/shared/constants'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { addDays, formatDateToStringDate } from '@/helpers/dateFormatting'\n\n/**\n * Optional values supplied to {@link useCompensationForm}'s `actions.onSubmit` at submit time.\n *\n * @remarks\n * Use these to override hook-construction props when an ID isn't known at\n * mount — most commonly the **onboarding stub-fill** chain, where `useJobForm`\n * creates the parent job and returns the auto-created stub compensation, and\n * the IDs and version are threaded into this hook's `onSubmit` to PUT the\n * stub.\n *\n * @public\n */\nexport interface CompensationSubmitOptions {\n /** Override jobId — required when creating a compensation if not configured at hook construction (e.g. when the parent job was just created in the same submit chain). */\n jobId?: string\n /** Override compensationId — when present, forces update (PUT) routing regardless of hook construction. */\n compensationId?: string\n /**\n * Compensation version for optimistic locking on PUT. Required when forcing\n * update routing post-create (e.g. updating the auto-created stub returned\n * from `POST /v1/employees/:id/jobs`). When omitted, the hook reads the\n * version from its cached `currentCompensation`.\n */\n compensationVersion?: string\n /**\n * Supply `effectiveDate` at submit time. When `withEffectiveDateField`\n * is `true`, this overrides the form's value. When `withEffectiveDateField`\n * is `false`, this is the only way to put `effective_date` on the wire —\n * the form value is not read in that mode (matching the options-only\n * convention of `useWorkAddressForm` / `useHomeAddressForm` / `useJobForm`).\n */\n effectiveDate?: string\n}\n\n/**\n * Configuration options for {@link useCompensationForm}.\n *\n * @remarks\n * Presence or absence of `compensationId` selects the API verb — see the\n * `compensationId` field description. `employeeId` is optional so the hook\n * can be composed alongside an employee-creation step. `jobId` is optional in\n * update mode (derived from the loaded compensation) and required in create\n * mode (scopes the POST); supply it at submit time via\n * {@link CompensationSubmitOptions.jobId} when the parent job is created in\n * the same submit chain.\n *\n * @public\n */\nexport interface UseCompensationFormProps {\n /** UUID of the employee whose compensation is being created or edited. Drives data fetching for derived helpers (jobs list, work address, minimum wages). May be omitted when composing alongside an employee-creation step. */\n employeeId?: string\n /** The parent job's UUID. Required in create mode (scopes `POST /v1/jobs/:jobId/compensations`). Optional in update mode — the parent job is derived from the loaded compensation. */\n jobId?: string\n /** Present → update mode (PUT /v1/compensations/:id). Omitted → create mode (POST /v1/jobs/:jobId/compensations). */\n compensationId?: string\n /** Override fields that are optional on a given mode to be required. See {@link CompensationOptionalFieldsToRequire}. */\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n /** Pre-fill form values. Server data takes precedence on update mode. */\n defaultValues?: Partial<CompensationFormData>\n /** Passed through to react-hook-form. Defaults to `'onSubmit'`. */\n validationMode?: UseFormProps['mode']\n /** Auto-focus the first invalid field on submit. Set to `false` when using `composeSubmitHandler` so submit-time focus is coordinated across multiple forms. Defaults to `true`. */\n shouldFocusError?: boolean\n /**\n * When `false`, hides `Fields.EffectiveDate` (becomes `undefined`) and\n * removes `effectiveDate` from schema validation. In this mode the hook\n * does not read any form value at submit time — `effective_date` is\n * omitted from the request body unless explicitly supplied via\n * {@link CompensationSubmitOptions.effectiveDate}. This matches the\n * options-only convention of other form hooks, and means the\n * `willDeleteSecondaryJobs` carve-out's form-state side effects do not\n * leak onto the wire (there is no field to render them in anyway).\n * Defaults to `true`.\n */\n withEffectiveDateField?: boolean\n}\n\n/**\n * Pre-bound field components exposed on `useCompensationForm().form.Fields`.\n *\n * @remarks\n * Each property is either the field component or `undefined`. A field is\n * `undefined` when conditions for rendering it aren't met — see each member\n * for its visibility rule. Always null-check conditional fields (e.g.\n * `{Fields.FlsaStatus && <Fields.FlsaStatus ... />}`) before rendering.\n *\n * @public\n */\nexport interface CompensationFormFields {\n /** Bound to `title`. Title text input. Always available. Optional in both modes unless `optionalFieldsToRequire` requires it. */\n Title: ComponentType<TitleFieldProps>\n /** Bound to `flsaStatus`. FLSA classification select. `undefined` when the status is not user-editable (e.g. secondary jobs that must match the primary). */\n FlsaStatus: ComponentType<FlsaStatusFieldProps> | undefined\n /** Bound to `rate`. Compensation amount input. `undefined` for commission-only FLSA statuses, which don't accept a partner-supplied rate. */\n Rate: ComponentType<RateFieldProps> | undefined\n /** Bound to `paymentUnit`. Payment unit select. `undefined` for commission-only FLSA statuses (the hook forces `paymentUnit=Year`). */\n PaymentUnit: ComponentType<PaymentUnitFieldProps> | undefined\n /** Bound to `adjustForMinimumWage`. Minimum-wage adjustment checkbox. `undefined` unless `flsaStatus === Nonexempt`, the employee's work location has minimum wages, and the state supports tip credits. */\n AdjustForMinimumWage: ComponentType<AdjustForMinimumWageFieldProps> | undefined\n /** Bound to `minimumWageId`. Minimum-wage selection. `undefined` unless `Fields.AdjustForMinimumWage` is rendered and checked. */\n MinimumWageId: ComponentType<MinimumWageIdFieldProps> | undefined\n /** Bound to `effectiveDate`. Effective-date picker. `undefined` when `withEffectiveDateField: false`; supply the value via `CompensationSubmitOptions.effectiveDate` in that mode. */\n EffectiveDate: ComponentType<EffectiveDateFieldProps> | undefined\n}\n\n/**\n * Ready-state shape returned by {@link useCompensationForm} once data has loaded.\n *\n * @remarks\n * Discriminated by `isLoading: false`. Extends {@link BaseFormHookReady} with\n * the compensation-specific `data`, `status`, `actions`, and `form.Fields`\n * shape. Static, entity-derived values live under `data.*`; reactive values\n * that flip with form input live under `status.*`.\n *\n * @public\n */\nexport interface UseCompensationFormReady extends BaseFormHookReady<\n CompensationFieldsMetadata,\n CompensationFormData,\n CompensationFormFields\n> {\n /** Compensation-specific data payload: the loaded compensation, the parent job, available minimum wages, and effective-date bounds. */\n data: {\n /** The compensation row loaded for update; `null` in create mode. */\n compensation: Compensation | null\n /** The parent job. In update mode it's derived from the loaded compensation; in create mode it's looked up by `jobId`. `null` if neither resolves. */\n currentJob: Job | null\n /** Minimum wages available at the employee's active work location. Empty when no location is set or no minimums are defined. */\n minimumWages: MinimumWage[]\n /** Lower bound for `effectiveDate` (typically the parent job's hire date). */\n minimumEffectiveDate: string | null\n /** Upper bound for `effectiveDate` — the next scheduled future compensation's effective date, when one exists. */\n maximumEffectiveDate: string | null\n /** True when at least one future-dated compensation already exists for this job. */\n hasPendingFutureCompensation: boolean\n }\n /** Submission state and reactive flags derived from current form input. `isPending` is `true` while a create/update mutation is in flight; `mode` reflects whether the next submit will create or update; the `show*Alert` flags drive FLSA-specific inline warnings. */\n status: {\n /** `true` while a create or update mutation is in flight. */\n isPending: boolean\n /** Reflects whether the next submit will POST a new compensation or PUT an existing one. */\n mode: 'create' | 'update'\n /**\n * True when submitting the form right now would delete the employee's\n * secondary jobs server-side (the \"carve-out\" branch). Reactive:\n * derived from the current `flsaStatus` form value, the loaded\n * compensation, and the other-jobs count, so this flips as you change\n * inputs.\n *\n * Conditions: update mode, the loaded compensation is Nonexempt, the\n * form's `flsaStatus` has been changed to a non-Nonexempt value, and\n * the employee has at least one secondary job.\n *\n * While this flag is true the hook also takes the `effectiveDate`\n * field over: it forces the form value to today (so submits route\n * through a PUT that immediately deletes secondaries) and exposes\n * `fieldsMetadata.effectiveDate.isDisabled = true` so `Fields.EffectiveDate`\n * renders as disabled. On revert (FLSA back to Nonexempt) the prior\n * `effectiveDate` is restored. Render an inline warning keyed off\n * this flag — no separate confirmation step is needed.\n */\n willDeleteSecondaryJobs: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_EXEMPT`\n * (Commission Only/No Overtime). Render the federal-minimum-pay\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionFederalMinimumPayAlert: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_NONEXEMPT`\n * (Commission Only/Eligible for overtime). Render the local-minimum-wage\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionMinimumWageAlert: boolean\n /**\n * True when the current `flsaStatus` is `OWNER` (Owner's draw). Render\n * an informational alert noting that the IRS requires S-corp owners to\n * pay themselves a reasonable salary for similar work before taking\n * distributions.\n */\n showOwnerSalaryAlert: boolean\n }\n /** Submit actions exposed by the hook. */\n actions: {\n /** Validates the form, runs the appropriate create/update mutation, and resolves to a {@link HookSubmitResult} containing the saved compensation. Resolves to `undefined` on validation failure or mutation error. Accepts {@link CompensationSubmitOptions} for threading IDs/version into the onboarding stub-fill chain. */\n onSubmit: (\n options?: CompensationSubmitOptions,\n ) => Promise<HookSubmitResult<Compensation> | undefined>\n }\n}\n\nfunction resolveCompAndJob(\n jobs: Job[] | undefined,\n compensationId: string | undefined,\n jobId: string | undefined,\n): { compensation: Compensation | null; job: Job | null } {\n if (!jobs) return { compensation: null, job: null }\n if (compensationId) {\n for (const job of jobs) {\n const compensation = job.compensations?.find(c => c.uuid === compensationId)\n if (compensation) return { compensation, job }\n }\n // If the comp isn't in any job's compensations list, still try to resolve\n // the job by jobId so callers can check job metadata (e.g. job.primary).\n const fallbackJob = jobId ? (jobs.find(j => j.uuid === jobId) ?? null) : null\n return { compensation: null, job: fallbackJob }\n }\n if (jobId) return { compensation: null, job: jobs.find(j => j.uuid === jobId) ?? null }\n return { compensation: null, job: null }\n}\n\nfunction findPrimaryFlsaStatus(jobs: Job[] | undefined): FlsaStatusType | null {\n if (!jobs) return null\n for (const job of jobs) {\n if (!job.primary) continue\n const compensation = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n if (compensation?.flsaStatus) return compensation.flsaStatus\n }\n return null\n}\n\nfunction findFutureCompensations(job: Job | null): Compensation[] {\n if (!job?.compensations) return []\n const today = todayISO()\n return job.compensations.filter(c => c.effectiveDate !== undefined && c.effectiveDate > today)\n}\n\nfunction earliestEffectiveDate(comps: Compensation[]): string | null {\n if (comps.length === 0) return null\n return comps.reduce<string | null>((min, c) => {\n const d = c.effectiveDate\n if (!d) return min\n if (!min || d < min) return d\n return min\n }, null)\n}\n\nconst flsaStatusEntries: FlsaStatusType[] = [\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n]\n\nconst flsaOptions = flsaStatusEntries.map(status => ({ value: status, label: status }))\n\nconst paymentUnitEntries: PaymentUnit[] = [\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n]\n\nconst paymentUnitOptions = paymentUnitEntries.map(unit => ({ value: unit, label: unit }))\n\nfunction todayISO(): string {\n return new Date().toISOString().split('T')[0]!\n}\n\n/** @internal */\nfunction buildCompensationFieldsMetadata(\n base: Record<keyof CompensationFormData, FieldMetadata>,\n {\n willDeleteSecondaryJobs,\n isCreateMode,\n isCommissionOnly,\n isOwner,\n isAdjustMinimumWageEnabled,\n effectiveDateMinDate,\n maximumEffectiveDate,\n minimumWageOptions,\n minimumWages,\n }: {\n willDeleteSecondaryJobs: boolean\n isCreateMode: boolean\n isCommissionOnly: boolean\n isOwner: boolean\n isAdjustMinimumWageEnabled: boolean\n effectiveDateMinDate: string | null\n maximumEffectiveDate: string | null\n minimumWageOptions: { value: string; label: string }[]\n minimumWages: MinimumWage[]\n },\n) {\n return {\n title: base.title,\n effectiveDate: withFlags(base.effectiveDate, {\n isDisabled: willDeleteSecondaryJobs && !isCreateMode,\n minDate: effectiveDateMinDate,\n maxDate: maximumEffectiveDate,\n }),\n flsaStatus: withOptions<FlsaStatusType>(base.flsaStatus, flsaOptions, flsaStatusEntries),\n rate: withFlags(base.rate, { isDisabled: isCommissionOnly }),\n paymentUnit: withOptions<PaymentUnit>(\n withFlags(base.paymentUnit, { isDisabled: isOwner || isCommissionOnly }),\n paymentUnitOptions,\n paymentUnitEntries,\n ),\n adjustForMinimumWage: withFlags(base.adjustForMinimumWage, {\n isDisabled: !isAdjustMinimumWageEnabled,\n }),\n minimumWageId: withOptions<MinimumWage>(base.minimumWageId, minimumWageOptions, minimumWages),\n } satisfies FieldsMetadata\n}\n\n/**\n * Headless hook for creating or updating a compensation row on a job — FLSA classification, pay rate, payment unit, effective date, and optional minimum-wage adjustment.\n *\n * @remarks\n * Companion hook to `useJobForm`. Jobs and their compensations are separate\n * entities in the Gusto API and this hook focuses exclusively on the\n * compensation side. Presence of `compensationId` selects the verb:\n *\n * | Hook config / submit options | Mode | API call |\n * | ---------------------------- | ---- | -------- |\n * | `{ jobId, compensationId }` | update | `PUT /v1/compensations/:compensationId` (with `version`) |\n * | `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:jobId/compensations` |\n * | `{ employeeId }` + submit `{ jobId, compensationId, compensationVersion }` | update | `PUT /v1/compensations/:compensationId` (with the supplied `version`) |\n * | `{ employeeId }` + submit `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:options.jobId/compensations` |\n *\n * Use the submit-options form for the **onboarding stub-fill** chain: after\n * `useJobForm.actions.onSubmit()` creates a job, capture the auto-created\n * compensation's UUID and version from the response, and pass them as\n * `{ jobId, compensationId, compensationVersion }` to this hook's `onSubmit`\n * to PUT the stub.\n *\n * The hook exposes several derived helpers for driving UX — static\n * entity-derived values under `data.*` (effective-date bounds, pending\n * future compensations) and reactive flags under `status.*` (the\n * `willDeleteSecondaryJobs` carve-out, plus FLSA-specific alerts for\n * commission-only and owner classifications). When\n * `willDeleteSecondaryJobs` is `true` in update mode, the hook also locks\n * the `effectiveDate` field (forces to today, renders disabled) until the\n * FLSA selection is reverted.\n *\n * @param input - {@link UseCompensationFormProps} — `employeeId`, `jobId`, `compensationId` (toggle create/update), required-field overrides, default values, and which fields the hook renders.\n * @returns A {@link HookLoadingResult} while data is loading, or a {@link UseCompensationFormReady} once ready.\n * @public\n *\n * @example\n * ```tsx\n * import { useCompensationForm, SDKFormProvider } from '@gusto/embedded-react-sdk'\n *\n * function CompensationForm({ employeeId, jobId }: { employeeId: string; jobId: string }) {\n * const comp = useCompensationForm({ employeeId, jobId })\n * if (comp.isLoading) return null\n *\n * const { Fields } = comp.form\n * return (\n * <form onSubmit={e => { e.preventDefault(); comp.actions.onSubmit() }}>\n * <SDKFormProvider formHookResult={comp}>\n * {Fields.FlsaStatus && <Fields.FlsaStatus label=\"Employee type\" />}\n * <Fields.Rate label=\"Compensation amount\" />\n * <Fields.PaymentUnit label=\"Payment unit\" />\n * {Fields.EffectiveDate && <Fields.EffectiveDate label=\"Effective date\" />}\n * </SDKFormProvider>\n * {comp.status.willDeleteSecondaryJobs && (\n * <p>Saving will remove this employee's secondary jobs.</p>\n * )}\n * <button type=\"submit\" disabled={comp.status.isPending}>Save</button>\n * </form>\n * )\n * }\n * ```\n */\nexport function useCompensationForm({\n employeeId,\n jobId,\n compensationId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n withEffectiveDateField = true,\n}: UseCompensationFormProps): HookLoadingResult | UseCompensationFormReady {\n const jobsQuery = useJobsAndCompensationsGetJobs(\n {\n employeeId: employeeId ?? '',\n // Fetch all effective-dated compensations when editing an existing one so\n // resolveCompAndJob can find the target comp (future-dated comps are\n // omitted from the default response, which only returns the current comp).\n include: compensationId\n ? GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations\n : undefined,\n },\n { enabled: !!employeeId },\n )\n const addressesQuery = useEmployeeAddressesGetWorkAddresses(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n const employeeQuery = useEmployeesGet({ employeeId: employeeId ?? '' }, { enabled: !!employeeId })\n\n const employeeJobs = jobsQuery.data?.jobs\n const workAddresses = addressesQuery.data?.employeeWorkAddressesList\n const currentWorkAddress = workAddresses?.find(address => address.active)\n const locationUuid = currentWorkAddress?.locationUuid\n const employee = employeeQuery.data?.employee\n\n const minWagesQuery = useLocationsGetMinimumWages(\n { locationUuid: locationUuid ?? '' },\n { enabled: !!locationUuid },\n )\n\n const minimumWages = minWagesQuery.data?.minimumWageList ?? []\n\n const { compensation: currentCompensation, job: currentJob } = resolveCompAndJob(\n employeeJobs,\n compensationId,\n jobId,\n )\n\n const otherJobsCount =\n employeeJobs && currentJob ? employeeJobs.filter(j => j.uuid !== currentJob.uuid).length : 0\n\n // Snapshot — written exactly once, on the first render where `employeeJobs`\n // is defined (i.e., the initial `getJobs` query has resolved) — capturing\n // whether the employee already had a primary job at that moment.\n //\n // Used to ignore the API-generated stub primary (FLSA Nonexempt, rate \"0.00\")\n // that briefly appears between the chained job POST and comp PUT during\n // onboarding: `getJobs` invalidates between the two mutations and\n // momentarily includes the stub, which would otherwise flip\n // `isAddingSecondaryJob` to true and hide `Fields.FlsaStatus` mid-submit.\n //\n // In steady-state flows (edit primary, edit secondary, add secondary), the\n // real primary already exists when the query first resolves, so the snapshot\n // is `true` and live `employeeJobs` continues to drive `primaryFlsaStatus`.\n // Recovery for the rare case where a partner mounts before any jobs exist\n // and a primary is created externally mid-form is to remount the hook\n // (e.g., via a `key` change).\n const hadPrimaryAtMountRef = useRef<boolean | null>(null)\n if (hadPrimaryAtMountRef.current === null && employeeJobs !== undefined) {\n hadPrimaryAtMountRef.current = employeeJobs.some(job => job.primary)\n }\n const hadPrimaryAtMount = hadPrimaryAtMountRef.current === true\n\n // FLSA status of the employee's primary job's current compensation, when one\n // exists. Used as a fallback default when adding a *secondary* job/comp so the\n // multi-job classification stays consistent with the primary by default — the\n // user can still override it (when allowed). Null when there was no primary\n // job at the moment the hook first observed `employeeJobs`, or when the\n // primary has no current compensation yet.\n const primaryFlsaStatus = hadPrimaryAtMount ? findPrimaryFlsaStatus(employeeJobs) : null\n\n const hireDate =\n currentJob?.hireDate ??\n // Secondary jobs being created (CompensationAddAnotherJobForm) have no hireDate until the\n // job POST completes. Fall back to the primary job's hireDate so the schema\n // can enforce EFFECTIVE_DATE_BEFORE_HIRE during that window.\n employeeJobs?.find(j => j.primary)?.hireDate ??\n null\n\n // In update mode, exclude the compensation being edited so it doesn't\n // bound `maximumEffectiveDate` to its own current date — that would prevent\n // the user from pushing the pending effective date further out.\n const futureCompensations = findFutureCompensations(currentJob).filter(\n c => c.uuid !== compensationId,\n )\n const hasPendingFutureCompensation = futureCompensations.length > 0\n const maximumEffectiveDate = earliestEffectiveDate(futureCompensations)\n\n const isCreateMode = !compensationId\n const mode = isCreateMode ? 'create' : 'update'\n // Adding a secondary job (the employee already has a primary). The Gusto API\n // only allows secondaries when the primary's current FLSA is Nonexempt, and\n // the secondary itself must match — so the FLSA field is not user-editable\n // in this branch. We force the form value to the primary's FLSA below and\n // hide `Fields.FlsaStatus`.\n // True when adding a brand-new secondary job (not when scheduling a future\n // comp for the primary). The distinction matters: for the primary's future\n // comp, FLSA should be editable; for a secondary, it must match the primary.\n const isAddingSecondaryJob =\n isCreateMode && primaryFlsaStatus === FlsaStatus.NONEXEMPT && currentJob?.primary !== true\n\n // Derive the effective-date floor internally so consumers don't need to wire\n // it up. Rules by mode and job type:\n // create (any job): tomorrow — new comp must be future-dated\n // update, primary: undefined — the carve-out (willDeleteSecondaryJobs) can\n // force effectiveDate to today on a disabled field; enforcing a floor here\n // would produce a spurious EFFECTIVE_DATE_BEFORE_MIN on submit.\n // update, secondary: tomorrow — must be in the future\n // The hire-date lower bound is handled separately in the schema via the\n // `hireDate` option (→ EFFECTIVE_DATE_BEFORE_HIRE), which fires alongside\n // this check so each violation gets its own error message.\n const internalMinEffectiveDate = useMemo(() => {\n if (!withEffectiveDateField) return undefined\n if (!isCreateMode && currentJob?.primary === true) return undefined\n\n return formatDateToStringDate(addDays(new Date(), 1)) ?? undefined\n }, [isCreateMode, currentJob?.primary, withEffectiveDateField])\n\n const [schema, metadataConfig] = useMemo(\n () =>\n createCompensationSchema({\n mode,\n optionalFieldsToRequire,\n hireDate,\n minEffectiveDate: internalMinEffectiveDate,\n withEffectiveDateField,\n }),\n [mode, optionalFieldsToRequire, hireDate, internalMinEffectiveDate, withEffectiveDateField],\n )\n\n const state = currentWorkAddress?.state\n\n // `flsaStatus` is intentionally allowed to be undefined so the field renders\n // an empty placeholder when nothing is provided — partners can choose to\n // seed it via `defaultValues.flsaStatus`. When a `compensation` is loaded we\n // seed from it; for a brand-new secondary job we inherit from the primary's\n // current compensation so multi-job classification stays consistent. The\n // schema enforces requiredness on submit in `create` mode (see\n // `requiredFieldsConfig` in compensationSchema.ts).\n //\n // `title` lives on compensation in the API — `job.title` is a denormalized\n // snapshot of the primary comp's title that can lag behind comp-level edits\n // on secondaries. Seed directly from the loaded compensation so editing in\n // place can't silently re-introduce a stale title from the job record.\n const resolvedDefaults: CompensationFormData = useMemo(\n () => ({\n title: currentCompensation?.title ?? partnerDefaults?.title ?? '',\n // When adding a secondary, the FLSA must match the primary's — force it\n // here (overriding any partner default) so the form submits the right\n // value even though `Fields.FlsaStatus` is hidden.\n flsaStatus: isAddingSecondaryJob\n ? primaryFlsaStatus\n : (currentCompensation?.flsaStatus ??\n partnerDefaults?.flsaStatus ??\n primaryFlsaStatus ??\n undefined),\n rate: Number(currentCompensation?.rate ?? partnerDefaults?.rate ?? 0),\n adjustForMinimumWage:\n currentCompensation?.adjustForMinimumWage ?? partnerDefaults?.adjustForMinimumWage ?? false,\n minimumWageId:\n currentCompensation?.minimumWages?.[0]?.uuid ?? partnerDefaults?.minimumWageId ?? '',\n paymentUnit:\n currentCompensation?.paymentUnit ?? partnerDefaults?.paymentUnit ?? PAY_PERIODS.HOUR,\n effectiveDate: currentCompensation?.effectiveDate ?? partnerDefaults?.effectiveDate ?? null,\n }),\n [currentCompensation, currentJob, partnerDefaults, primaryFlsaStatus, isAddingSecondaryJob],\n )\n\n const formMethods = useForm<CompensationFormData, unknown, CompensationFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const { control, getValues, setValue, clearErrors } = formMethods\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedAdjustForMinimumWage = useWatch({\n control,\n name: 'adjustForMinimumWage',\n })\n\n // Validation rules for `paymentUnit` and `rate` are FLSA-driven, so any\n // prior error on those fields is stale once FLSA changes. RHF doesn't clear\n // them on its own (`setValue` without `shouldValidate` skips the resolver,\n // and reValidate is per-field) — clear eagerly and let the next blur/submit\n // re-establish the error if it still applies.\n useEffect(() => {\n clearErrors(['paymentUnit', 'rate'])\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n setValue('paymentUnit', PAY_PERIODS.PAYCHECK)\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n setValue('paymentUnit', PAY_PERIODS.YEAR)\n setValue('rate', 0)\n } else {\n setValue('paymentUnit', resolvedDefaults.paymentUnit)\n }\n }, [watchedFlsaStatus, setValue, clearErrors, resolvedDefaults.paymentUnit])\n\n // The FLSA status that represents the employee's current classification.\n // In update mode this is the compensation being edited. In create mode\n // `currentCompensation` is null, so fall back to the job's active\n // compensation (identified by currentCompensationUuid) — this lets the\n // secondary-job warning fire even when scheduling a future-dated change.\n const currentJobActiveComp = currentJob\n ? currentJob.compensations?.find(c => c.uuid === currentJob.currentCompensationUuid)\n : undefined\n const effectiveBaseFlsaStatus =\n currentCompensation?.flsaStatus ?? currentJobActiveComp?.flsaStatus ?? null\n\n // True when the user is changing FLSA away from Nonexempt on a job that has\n // secondary jobs — those secondaries will be deleted by the API when the\n // new classification takes effect (immediately in update mode, at the chosen\n // effective date in create mode). Drives the warning and, in update mode\n // only, the effectiveDate-lock side effect below.\n const willDeleteSecondaryJobs =\n effectiveBaseFlsaStatus === FlsaStatus.NONEXEMPT &&\n watchedFlsaStatus !== undefined &&\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT &&\n otherJobsCount > 0\n\n // Carve-out UX — update mode only: while willDeleteSecondaryJobs is active\n // the server deletes secondaries immediately on PUT. Mirror this by forcing\n // `effectiveDate` to today and disabling the field. In create mode the\n // deletion happens at the chosen future date, so we show the warning but\n // leave the date field editable.\n const carveOutActiveRef = useRef(false)\n const priorEffectiveDateRef = useRef<string | null>(null)\n useEffect(() => {\n if (!isCreateMode && willDeleteSecondaryJobs && !carveOutActiveRef.current) {\n priorEffectiveDateRef.current = getValues('effectiveDate') ?? null\n setValue('effectiveDate', todayISO(), { shouldDirty: true, shouldValidate: false })\n carveOutActiveRef.current = true\n } else if (!isCreateMode && !willDeleteSecondaryJobs && carveOutActiveRef.current) {\n setValue('effectiveDate', priorEffectiveDateRef.current ?? null, {\n shouldDirty: true,\n shouldValidate: false,\n })\n priorEffectiveDateRef.current = null\n carveOutActiveRef.current = false\n }\n }, [isCreateMode, willDeleteSecondaryJobs, getValues, setValue])\n\n const updateCompensationMutation = useJobsAndCompensationsUpdateCompensationMutation()\n const createCompensationMutation = useJobsAndCompensationsCreateCompensationMutation()\n\n const isPending = updateCompensationMutation.isPending || createCompensationMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('CompensationForm')\n\n const queriesForErrors = employeeId\n ? [jobsQuery, addressesQuery, employeeQuery, minWagesQuery]\n : []\n const errorHandling = composeErrorHandler(queriesForErrors, { submitError, setSubmitError })\n\n const isCommissionOnly =\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n const isOwner = watchedFlsaStatus === FlsaStatus.OWNER\n\n // Hide `Fields.FlsaStatus` when the user has no meaningful choice:\n // - update mode editing a secondary whose comp is already Nonexempt\n // (must keep matching the primary), and\n // - create mode while adding a secondary (must inherit primary's FLSA).\n // The first job's create flow and primary-job edits keep the field exposed.\n const isFlsaSelectionEnabled =\n !isAddingSecondaryJob &&\n (watchedFlsaStatus !== FlsaStatus.NONEXEMPT || currentJob?.primary === true || isCreateMode)\n\n const isAdjustMinimumWageEnabled =\n watchedFlsaStatus === FlsaStatus.NONEXEMPT &&\n minimumWages.length > 0 &&\n state !== undefined &&\n !TIP_CREDITS_UNSUPPORTED_STATES.includes(state)\n\n // Min-wage adjustment is only valid for Nonexempt FLSA (and a state that\n // allows tip credit). When the gate flips off — typically because the user\n // changed FLSA away from Nonexempt — `Fields.AdjustForMinimumWage` and\n // `Fields.MinimumWageId` stop rendering, but the underlying form values\n // persist in react-hook-form state. That would leak an\n // `adjust_for_minimum_wage: true` + `minimum_wages: [...]` body on submit\n // (server rejects with \"Minimum wage adjustments only valid for\n // flsa_status: Nonexempt\"). Reset both values to safe defaults so the\n // submitted payload always matches what the user can actually see.\n useEffect(() => {\n if (isAdjustMinimumWageEnabled) return\n if (getValues('adjustForMinimumWage')) {\n setValue('adjustForMinimumWage', false, { shouldDirty: true, shouldValidate: false })\n }\n if (getValues('minimumWageId')) {\n setValue('minimumWageId', '', { shouldDirty: true, shouldValidate: false })\n }\n // Both fields stop rendering once the gate closes — clear errors so a\n // stale one doesn't silently fail the next submit with no visible UI to fix.\n clearErrors(['adjustForMinimumWage', 'minimumWageId'])\n }, [isAdjustMinimumWageEnabled, getValues, setValue, clearErrors])\n\n const minimumWageOptions = minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${wage.wage} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const effectiveDateMinDate = useMemo(\n () =>\n [internalMinEffectiveDate, hireDate]\n .filter((d): d is string => !!d)\n .reduce<string | null>((max, d) => (!max || d > max ? d : max), null),\n [internalMinEffectiveDate, hireDate],\n )\n const fieldsMetadata = buildCompensationFieldsMetadata(baseMetadata, {\n willDeleteSecondaryJobs,\n isCreateMode,\n isCommissionOnly,\n isOwner,\n isAdjustMinimumWageEnabled,\n effectiveDateMinDate,\n maximumEffectiveDate,\n minimumWageOptions,\n minimumWages,\n })\n\n const onSubmit = async (\n options?: CompensationSubmitOptions,\n ): Promise<HookSubmitResult<Compensation> | undefined> => {\n let submitResult: HookSubmitResult<Compensation> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: CompensationFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const resolvedJobId = options?.jobId ?? jobId\n const resolvedCompensationId = options?.compensationId ?? compensationId\n const resolvedMode = resolvedCompensationId ? 'update' : 'create'\n\n // When the field is rendered, the validated payload value wins\n // unless an explicit submit-time override is supplied. When the\n // field is hidden (`withEffectiveDateField: false`) we are\n // strictly options-only — matching `useWorkAddressForm` and the\n // hidden-field behavior of `useHomeAddressForm` / `useJobForm`.\n // The carve-out's form-state side effect (force value to today)\n // is therefore inert in the hidden-field path; partners who\n // need a specific date there must supply it via\n // `CompensationSubmitOptions.effectiveDate`.\n const resolvedEffectiveDate = withEffectiveDateField\n ? (options?.effectiveDate ?? payload.effectiveDate ?? undefined)\n : (options?.effectiveDate ?? undefined)\n\n const requestBodyBase = {\n rate: String(payload.rate),\n paymentUnit: payload.paymentUnit,\n flsaStatus: payload.flsaStatus,\n effectiveDate: resolvedEffectiveDate,\n title: payload.title || undefined,\n adjustForMinimumWage: payload.adjustForMinimumWage,\n minimumWages: payload.adjustForMinimumWage ? [{ uuid: payload.minimumWageId }] : [],\n }\n\n let result: Compensation | undefined\n\n if (resolvedMode === 'create') {\n if (!resolvedJobId) {\n throw new SDKInternalError(\n 'jobId is required to create a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n // Schema's `requiredFieldsConfig` guarantees `flsaStatus` is set\n // on create-mode submit; the runtime guard appeases the API\n // request-body type (which requires a non-undefined value on\n // POST, vs. the optional PUT body).\n if (!payload.flsaStatus) {\n throw new SDKInternalError('flsaStatus is required to create a compensation.')\n }\n const createResponse = await createCompensationMutation.mutateAsync({\n request: {\n jobId: resolvedJobId,\n compensationsRequestBody: { ...requestBodyBase, flsaStatus: payload.flsaStatus },\n },\n })\n result = createResponse.compensation\n if (!result) throw new SDKInternalError('Compensation creation failed')\n } else {\n if (!resolvedCompensationId) {\n throw new SDKInternalError(\n 'compensationId is required to update a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n const resolvedVersion =\n options?.compensationVersion ?? (currentCompensation?.version as string | undefined)\n if (!resolvedVersion) {\n throw new SDKInternalError(\n 'compensation version is required to update a compensation. Pass it via submit options when threading post-create, or ensure the compensation is loaded.',\n )\n }\n const updateResponse = await updateCompensationMutation.mutateAsync({\n request: {\n compensationId: resolvedCompensationId,\n compensationsUpdateRequestBody: {\n version: resolvedVersion,\n ...requestBodyBase,\n },\n },\n })\n result = updateResponse.compensation\n if (!result) throw new SDKInternalError('Compensation update failed')\n }\n\n submitResult = { mode: resolvedMode, data: result }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = employeeId\n ? jobsQuery.isLoading ||\n addressesQuery.isLoading ||\n employeeQuery.isLoading ||\n minWagesQuery.isLoading\n : false\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n if (isDataLoading || (employeeId && (!employeeJobs || !employee))) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n compensation: currentCompensation,\n currentJob,\n minimumWages,\n minimumEffectiveDate: effectiveDateMinDate,\n maximumEffectiveDate,\n hasPendingFutureCompensation,\n },\n status: {\n isPending,\n mode,\n willDeleteSecondaryJobs,\n showCommissionFederalMinimumPayAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT,\n showCommissionMinimumWageAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n showOwnerSalaryAlert: watchedFlsaStatus === FlsaStatus.OWNER,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Title: TitleField,\n FlsaStatus: isFlsaSelectionEnabled ? FlsaStatusField : undefined,\n Rate: isCommissionOnly ? undefined : RateField,\n PaymentUnit: isCommissionOnly ? undefined : PaymentUnitField,\n AdjustForMinimumWage: isAdjustMinimumWageEnabled ? AdjustForMinimumWageField : undefined,\n MinimumWageId:\n isAdjustMinimumWageEnabled && watchedAdjustForMinimumWage\n ? MinimumWageIdField\n : undefined,\n EffectiveDate: withEffectiveDateField ? EffectiveDateField : undefined,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\n/**\n * Discriminated union returned by {@link useCompensationForm} — either the loading state or the ready state.\n *\n * @remarks\n * Use this type when threading the hook result through helpers (e.g.\n * presentational components). Discriminate on `isLoading` to narrow to\n * {@link UseCompensationFormReady}.\n *\n * @public\n */\nexport type UseCompensationFormResult = HookLoadingResult | UseCompensationFormReady\n\n/**\n * Metadata for each {@link useCompensationForm} field, exposed on `form.fieldsMetadata`.\n *\n * @remarks\n * Includes per-field `isDisabled`, `isRequired`, and the dynamic option list\n * for select fields (`flsaStatus`, `paymentUnit`, `minimumWageId`).\n * `effectiveDate` additionally carries `minDate` / `maxDate` derived from\n * the parent job's hire date and any pending future compensation.\n *\n * @public\n */\nexport type CompensationFieldsMetadata = ReturnType<typeof buildCompensationFieldsMetadata>\n"],"names":["resolveCompAndJob","jobs","compensationId","jobId","job","compensation","c","j","findPrimaryFlsaStatus","findFutureCompensations","today","todayISO","earliestEffectiveDate","comps","min","d","flsaStatusEntries","FlsaStatus","flsaOptions","status","paymentUnitEntries","PAY_PERIODS","paymentUnitOptions","unit","buildCompensationFieldsMetadata","base","willDeleteSecondaryJobs","isCreateMode","isCommissionOnly","isOwner","isAdjustMinimumWageEnabled","effectiveDateMinDate","maximumEffectiveDate","minimumWageOptions","minimumWages","withFlags","withOptions","useCompensationForm","employeeId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","withEffectiveDateField","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","addressesQuery","useEmployeeAddressesGetWorkAddresses","employeeQuery","useEmployeesGet","employeeJobs","currentWorkAddress","address","locationUuid","employee","minWagesQuery","useLocationsGetMinimumWages","currentCompensation","currentJob","otherJobsCount","hadPrimaryAtMountRef","useRef","primaryFlsaStatus","hireDate","futureCompensations","hasPendingFutureCompensation","mode","isAddingSecondaryJob","internalMinEffectiveDate","useMemo","formatDateToStringDate","addDays","schema","metadataConfig","createCompensationSchema","state","resolvedDefaults","formMethods","useForm","zodResolver","control","getValues","setValue","clearErrors","watchedFlsaStatus","useWatch","watchedAdjustForMinimumWage","useEffect","currentJobActiveComp","carveOutActiveRef","priorEffectiveDateRef","updateCompensationMutation","useJobsAndCompensationsUpdateCompensationMutation","createCompensationMutation","useJobsAndCompensationsCreateCompensationMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isFlsaSelectionEnabled","TIP_CREDITS_UNSUPPORTED_STATES","wage","baseMetadata","useDeriveFieldsMetadata","max","fieldsMetadata","onSubmit","options","submitResult","resolve","data","payload","resolvedJobId","resolvedCompensationId","resolvedMode","resolvedEffectiveDate","requestBodyBase","result","SDKInternalError","resolvedVersion","isDataLoading","hookFormInternals","useHookFormInternals","TitleField","FlsaStatusField","RateField","PaymentUnitField","AdjustForMinimumWageField","MinimumWageIdField","EffectiveDateField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6PA,SAASA,GACPC,GACAC,GACAC,GACwD;AACxD,MAAI,CAACF,EAAM,QAAO,EAAE,cAAc,MAAM,KAAK,KAAA;AAC7C,MAAIC,GAAgB;AAClB,eAAWE,KAAOH,GAAM;AACtB,YAAMI,IAAeD,EAAI,eAAe,KAAK,CAAAE,MAAKA,EAAE,SAASJ,CAAc;AAC3E,UAAIG,EAAc,QAAO,EAAE,cAAAA,GAAc,KAAAD,EAAA;AAAA,IAC3C;AAIA,WAAO,EAAE,cAAc,MAAM,KADTD,IAASF,EAAK,KAAK,OAAKM,EAAE,SAASJ,CAAK,KAAK,OAAQ,KACvC;AAAA,EACpC;AACA,SAAIA,IAAc,EAAE,cAAc,MAAM,KAAKF,EAAK,KAAK,CAAAM,MAAKA,EAAE,SAASJ,CAAK,KAAK,KAAA,IAC1E,EAAE,cAAc,MAAM,KAAK,KAAA;AACpC;AAEA,SAASK,GAAsBP,GAAgD;AAC7E,MAAI,CAACA,EAAM,QAAO;AAClB,aAAWG,KAAOH,GAAM;AACtB,QAAI,CAACG,EAAI,QAAS;AAClB,UAAMC,IAAeD,EAAI,eAAe,KAAK,OAAKE,EAAE,SAASF,EAAI,uBAAu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,aAAarG,IAAmB,SAAYsG;AAAA,QAC5C,sBAAsBpG,IAA6BqG,KAA4B;AAAA,QAC/E,eACErG,KAA8ByD,KAC1B6C,KACA;AAAA,QACN,eAAezF,IAAyB0F,KAAqB;AAAA,MAAA;AAAA,MAE/D,gBAAAxB;AAAA,MACA,mBAAAgB;AAAA,MACA,yBAAyBS,GAA8BxD,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"useCompensationForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef } from 'react'\nimport type { ComponentType } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsCreateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsCreateCompensation'\nimport { useJobsAndCompensationsUpdateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsUpdateCompensation'\nimport { useLocationsGetMinimumWages } from '@gusto/embedded-api/react-query/locationsGetMinimumWages'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n createCompensationSchema,\n type CompensationOptionalFieldsToRequire,\n type CompensationFormData,\n type CompensationFormOutputs,\n} from './compensationSchema'\nimport {\n TitleField,\n FlsaStatusField,\n RateField,\n PaymentUnitField,\n AdjustForMinimumWageField,\n MinimumWageIdField,\n EffectiveDateField,\n} from './fields'\nimport type {\n TitleFieldProps,\n FlsaStatusFieldProps,\n RateFieldProps,\n PaymentUnitFieldProps,\n AdjustForMinimumWageFieldProps,\n MinimumWageIdFieldProps,\n EffectiveDateFieldProps,\n} from './fields'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { withFlags } from '@/partner-hook-utils/form/withFlags'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldMetadata,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { FlsaStatus, PAY_PERIODS, TIP_CREDITS_UNSUPPORTED_STATES } from '@/shared/constants'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { addDays, formatDateToStringDate } from '@/helpers/dateFormatting'\n\n/**\n * Optional values supplied to {@link useCompensationForm}'s `actions.onSubmit` at submit time.\n *\n * @remarks\n * Use these to override hook-construction props when an ID isn't known at\n * mount — most commonly the **onboarding stub-fill** chain, where `useJobForm`\n * creates the parent job and returns the auto-created stub compensation, and\n * the IDs and version are threaded into this hook's `onSubmit` to PUT the\n * stub.\n *\n * @public\n */\nexport interface CompensationSubmitOptions {\n /** Override jobId — required when creating a compensation if not configured at hook construction (e.g. when the parent job was just created in the same submit chain). */\n jobId?: string\n /** Override compensationId — when present, forces update (PUT) routing regardless of hook construction. */\n compensationId?: string\n /**\n * Compensation version for optimistic locking on PUT. Required when forcing\n * update routing post-create (e.g. updating the auto-created stub returned\n * from `POST /v1/employees/:id/jobs`). When omitted, the hook reads the\n * version from its cached `currentCompensation`.\n */\n compensationVersion?: string\n /**\n * Supply `effectiveDate` at submit time. When `withEffectiveDateField`\n * is `true`, this overrides the form's value. When `withEffectiveDateField`\n * is `false`, this is the only way to put `effective_date` on the wire —\n * the form value is not read in that mode (matching the options-only\n * convention of `useWorkAddressForm` / `useHomeAddressForm` / `useJobForm`).\n */\n effectiveDate?: string\n}\n\n/**\n * Configuration options for {@link useCompensationForm}.\n *\n * @remarks\n * Presence or absence of `compensationId` selects the API verb — see the\n * `compensationId` field description. `employeeId` is optional so the hook\n * can be composed alongside an employee-creation step. `jobId` is optional in\n * update mode (derived from the loaded compensation) and required in create\n * mode (scopes the POST); supply it at submit time via\n * {@link CompensationSubmitOptions.jobId} when the parent job is created in\n * the same submit chain.\n *\n * @public\n */\nexport interface UseCompensationFormProps {\n /** UUID of the employee whose compensation is being created or edited. Drives data fetching for derived helpers (jobs list, work address, minimum wages). May be omitted when composing alongside an employee-creation step. */\n employeeId?: string\n /** The parent job's UUID. Required in create mode (scopes `POST /v1/jobs/:jobId/compensations`). Optional in update mode — the parent job is derived from the loaded compensation. */\n jobId?: string\n /** Present → update mode (PUT /v1/compensations/:id). Omitted → create mode (POST /v1/jobs/:jobId/compensations). */\n compensationId?: string\n /** Override fields that are optional on a given mode to be required. See {@link CompensationOptionalFieldsToRequire}. */\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n /** Pre-fill form values. Server data takes precedence on update mode. */\n defaultValues?: Partial<CompensationFormData>\n /** Passed through to react-hook-form. Defaults to `'onSubmit'`. */\n validationMode?: UseFormProps['mode']\n /** Auto-focus the first invalid field on submit. Set to `false` when using `composeSubmitHandler` so submit-time focus is coordinated across multiple forms. Defaults to `true`. */\n shouldFocusError?: boolean\n /**\n * When `false`, hides `Fields.EffectiveDate` (becomes `undefined`) and\n * removes `effectiveDate` from schema validation. In this mode the hook\n * does not read any form value at submit time — `effective_date` is\n * omitted from the request body unless explicitly supplied via\n * {@link CompensationSubmitOptions.effectiveDate}. This matches the\n * options-only convention of other form hooks, and means the\n * `willDeleteSecondaryJobs` carve-out's form-state side effects do not\n * leak onto the wire (there is no field to render them in anyway).\n * Defaults to `true`.\n */\n withEffectiveDateField?: boolean\n}\n\n/**\n * Pre-bound field components exposed on `useCompensationForm().form.Fields`.\n *\n * @remarks\n * Each property is either the field component or `undefined`. A field is\n * `undefined` when conditions for rendering it aren't met — see each member\n * for its visibility rule. Always null-check conditional fields (e.g.\n * `{Fields.FlsaStatus && <Fields.FlsaStatus ... />}`) before rendering.\n *\n * @public\n */\nexport interface CompensationFormFields {\n /** Bound to `title`. Title text input. Always available. Optional in both modes unless `optionalFieldsToRequire` requires it. */\n Title: ComponentType<TitleFieldProps>\n /** Bound to `flsaStatus`. FLSA classification select. `undefined` when the status is not user-editable (e.g. secondary jobs that must match the primary). */\n FlsaStatus: ComponentType<FlsaStatusFieldProps> | undefined\n /** Bound to `rate`. Compensation amount input. `undefined` for commission-only FLSA statuses, which don't accept a partner-supplied rate. */\n Rate: ComponentType<RateFieldProps> | undefined\n /** Bound to `paymentUnit`. Payment unit select. `undefined` for commission-only FLSA statuses (the hook forces `paymentUnit=Year`). */\n PaymentUnit: ComponentType<PaymentUnitFieldProps> | undefined\n /** Bound to `adjustForMinimumWage`. Minimum-wage adjustment checkbox. `undefined` unless `flsaStatus === Nonexempt`, the employee's work location has minimum wages, and the state supports tip credits. */\n AdjustForMinimumWage: ComponentType<AdjustForMinimumWageFieldProps> | undefined\n /** Bound to `minimumWageId`. Minimum-wage selection. `undefined` unless `Fields.AdjustForMinimumWage` is rendered and checked. */\n MinimumWageId: ComponentType<MinimumWageIdFieldProps> | undefined\n /** Bound to `effectiveDate`. Effective-date picker. `undefined` when `withEffectiveDateField: false`; supply the value via `CompensationSubmitOptions.effectiveDate` in that mode. */\n EffectiveDate: ComponentType<EffectiveDateFieldProps> | undefined\n}\n\n/**\n * Ready-state shape returned by {@link useCompensationForm} once data has loaded.\n *\n * @remarks\n * Discriminated by `isLoading: false`. Extends {@link BaseFormHookReady} with\n * the compensation-specific `data`, `status`, `actions`, and `form.Fields`\n * shape. Static, entity-derived values live under `data.*`; reactive values\n * that flip with form input live under `status.*`.\n *\n * @public\n */\nexport interface UseCompensationFormReady extends BaseFormHookReady<\n CompensationFieldsMetadata,\n CompensationFormData,\n CompensationFormFields\n> {\n /** Compensation-specific data payload: the loaded compensation, the parent job, available minimum wages, and effective-date bounds. */\n data: {\n /** The compensation row loaded for update; `null` in create mode. */\n compensation: Compensation | null\n /** The parent job. In update mode it's derived from the loaded compensation; in create mode it's looked up by `jobId`. `null` if neither resolves. */\n currentJob: Job | null\n /** Minimum wages available at the employee's active work location. Empty when no location is set or no minimums are defined. */\n minimumWages: MinimumWage[]\n /** Lower bound for `effectiveDate` (typically the parent job's hire date). */\n minimumEffectiveDate: string | null\n /** Upper bound for `effectiveDate` — the next scheduled future compensation's effective date, when one exists. */\n maximumEffectiveDate: string | null\n /** True when at least one future-dated compensation already exists for this job. */\n hasPendingFutureCompensation: boolean\n }\n /** Submission state and reactive flags derived from current form input. `isPending` is `true` while a create/update mutation is in flight; `mode` reflects whether the next submit will create or update; the `show*Alert` flags drive FLSA-specific inline warnings. */\n status: {\n /** `true` while a create or update mutation is in flight. */\n isPending: boolean\n /** Reflects whether the next submit will POST a new compensation or PUT an existing one. */\n mode: 'create' | 'update'\n /**\n * True when submitting the form right now would delete the employee's\n * secondary jobs server-side (the \"carve-out\" branch). Reactive:\n * derived from the current `flsaStatus` form value, the loaded\n * compensation, and the other-jobs count, so this flips as you change\n * inputs.\n *\n * Conditions: update mode, the loaded compensation is Nonexempt, the\n * form's `flsaStatus` has been changed to a non-Nonexempt value, and\n * the employee has at least one secondary job.\n *\n * While this flag is true the hook also takes the `effectiveDate`\n * field over: it forces the form value to today (so submits route\n * through a PUT that immediately deletes secondaries) and exposes\n * `fieldsMetadata.effectiveDate.isDisabled = true` so `Fields.EffectiveDate`\n * renders as disabled. On revert (FLSA back to Nonexempt) the prior\n * `effectiveDate` is restored. Render an inline warning keyed off\n * this flag — no separate confirmation step is needed.\n */\n willDeleteSecondaryJobs: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_EXEMPT`\n * (Commission Only/No Overtime). Render the federal-minimum-pay\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionFederalMinimumPayAlert: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_NONEXEMPT`\n * (Commission Only/Eligible for overtime). Render the local-minimum-wage\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionMinimumWageAlert: boolean\n /**\n * True when the current `flsaStatus` is `OWNER` (Owner's draw). Render\n * an informational alert noting that the IRS requires S-corp owners to\n * pay themselves a reasonable salary for similar work before taking\n * distributions.\n */\n showOwnerSalaryAlert: boolean\n }\n /** Submit actions exposed by the hook. */\n actions: {\n /** Validates the form, runs the appropriate create/update mutation, and resolves to a {@link HookSubmitResult} containing the saved compensation. Resolves to `undefined` on validation failure or mutation error. Accepts {@link CompensationSubmitOptions} for threading IDs/version into the onboarding stub-fill chain. */\n onSubmit: (\n options?: CompensationSubmitOptions,\n ) => Promise<HookSubmitResult<Compensation> | undefined>\n }\n}\n\nfunction resolveCompAndJob(\n jobs: Job[] | undefined,\n compensationId: string | undefined,\n jobId: string | undefined,\n): { compensation: Compensation | null; job: Job | null } {\n if (!jobs) return { compensation: null, job: null }\n if (compensationId) {\n for (const job of jobs) {\n const compensation = job.compensations?.find(c => c.uuid === compensationId)\n if (compensation) return { compensation, job }\n }\n // If the comp isn't in any job's compensations list, still try to resolve\n // the job by jobId so callers can check job metadata (e.g. job.primary).\n const fallbackJob = jobId ? (jobs.find(j => j.uuid === jobId) ?? null) : null\n return { compensation: null, job: fallbackJob }\n }\n if (jobId) return { compensation: null, job: jobs.find(j => j.uuid === jobId) ?? null }\n return { compensation: null, job: null }\n}\n\nfunction findPrimaryFlsaStatus(jobs: Job[] | undefined): FlsaStatusType | null {\n if (!jobs) return null\n for (const job of jobs) {\n if (!job.primary) continue\n const compensation = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n if (compensation?.flsaStatus) return compensation.flsaStatus\n }\n return null\n}\n\nfunction findFutureCompensations(job: Job | null): Compensation[] {\n if (!job?.compensations) return []\n const today = todayISO()\n return job.compensations.filter(c => c.effectiveDate !== undefined && c.effectiveDate > today)\n}\n\nfunction earliestEffectiveDate(comps: Compensation[]): string | null {\n if (comps.length === 0) return null\n return comps.reduce<string | null>((min, c) => {\n const d = c.effectiveDate\n if (!d) return min\n if (!min || d < min) return d\n return min\n }, null)\n}\n\nconst flsaStatusEntries: FlsaStatusType[] = [\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n]\n\nconst flsaOptions = flsaStatusEntries.map(status => ({ value: status, label: status }))\n\nconst paymentUnitEntries: PaymentUnit[] = [\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n]\n\nconst paymentUnitOptions = paymentUnitEntries.map(unit => ({ value: unit, label: unit }))\n\nfunction todayISO(): string {\n return new Date().toISOString().split('T')[0]!\n}\n\n/** @internal */\nfunction buildCompensationFieldsMetadata(\n base: Record<keyof CompensationFormData, FieldMetadata>,\n {\n willDeleteSecondaryJobs,\n isCreateMode,\n isCommissionOnly,\n isOwner,\n isAdjustMinimumWageEnabled,\n effectiveDateMinDate,\n maximumEffectiveDate,\n minimumWageOptions,\n minimumWages,\n }: {\n willDeleteSecondaryJobs: boolean\n isCreateMode: boolean\n isCommissionOnly: boolean\n isOwner: boolean\n isAdjustMinimumWageEnabled: boolean\n effectiveDateMinDate: string | null\n maximumEffectiveDate: string | null\n minimumWageOptions: { value: string; label: string }[]\n minimumWages: MinimumWage[]\n },\n) {\n return {\n title: base.title,\n effectiveDate: withFlags(base.effectiveDate, {\n isDisabled: willDeleteSecondaryJobs && !isCreateMode,\n minDate: effectiveDateMinDate,\n maxDate: maximumEffectiveDate,\n }),\n flsaStatus: withOptions<FlsaStatusType>(base.flsaStatus, flsaOptions, flsaStatusEntries),\n rate: withFlags(base.rate, { isDisabled: isCommissionOnly }),\n paymentUnit: withOptions<PaymentUnit>(\n withFlags(base.paymentUnit, { isDisabled: isOwner || isCommissionOnly }),\n paymentUnitOptions,\n paymentUnitEntries,\n ),\n adjustForMinimumWage: withFlags(base.adjustForMinimumWage, {\n isDisabled: !isAdjustMinimumWageEnabled,\n }),\n minimumWageId: withOptions<MinimumWage>(base.minimumWageId, minimumWageOptions, minimumWages),\n } satisfies FieldsMetadata\n}\n\n/**\n * Headless hook for creating or updating a compensation row on a job — FLSA classification, pay rate, payment unit, effective date, and optional minimum-wage adjustment.\n *\n * @remarks\n * Companion hook to `useJobForm`. Jobs and their compensations are separate\n * entities in the Gusto API and this hook focuses exclusively on the\n * compensation side. Presence of `compensationId` selects the verb:\n *\n * | Hook config / submit options | Mode | API call |\n * | ---------------------------- | ---- | -------- |\n * | `{ jobId, compensationId }` | update | `PUT /v1/compensations/:compensationId` (with `version`) |\n * | `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:jobId/compensations` |\n * | `{ employeeId }` + submit `{ jobId, compensationId, compensationVersion }` | update | `PUT /v1/compensations/:compensationId` (with the supplied `version`) |\n * | `{ employeeId }` + submit `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:options.jobId/compensations` |\n *\n * Use the submit-options form for the **onboarding stub-fill** chain: after\n * `useJobForm.actions.onSubmit()` creates a job, capture the auto-created\n * compensation's UUID and version from the response, and pass them as\n * `{ jobId, compensationId, compensationVersion }` to this hook's `onSubmit`\n * to PUT the stub.\n *\n * The hook exposes several derived helpers for driving UX — static\n * entity-derived values under `data.*` (effective-date bounds, pending\n * future compensations) and reactive flags under `status.*` (the\n * `willDeleteSecondaryJobs` carve-out, plus FLSA-specific alerts for\n * commission-only and owner classifications). When\n * `willDeleteSecondaryJobs` is `true` in update mode, the hook also locks\n * the `effectiveDate` field (forces to today, renders disabled) until the\n * FLSA selection is reverted.\n *\n * @param input - {@link UseCompensationFormProps} — `employeeId`, `jobId`, `compensationId` (toggle create/update), required-field overrides, default values, and which fields the hook renders.\n * @returns A {@link HookLoadingResult} while data is loading, or a {@link UseCompensationFormReady} once ready.\n * @public\n *\n * @example\n * ```tsx\n * import { useCompensationForm, SDKFormProvider } from '@gusto/embedded-react-sdk'\n *\n * function CompensationForm({ employeeId, jobId }: { employeeId: string; jobId: string }) {\n * const comp = useCompensationForm({ employeeId, jobId })\n * if (comp.isLoading) return null\n *\n * const { Fields } = comp.form\n * return (\n * <form onSubmit={e => { e.preventDefault(); comp.actions.onSubmit() }}>\n * <SDKFormProvider formHookResult={comp}>\n * {Fields.FlsaStatus && <Fields.FlsaStatus label=\"Employee type\" />}\n * <Fields.Rate label=\"Compensation amount\" />\n * <Fields.PaymentUnit label=\"Payment unit\" />\n * {Fields.EffectiveDate && <Fields.EffectiveDate label=\"Effective date\" />}\n * </SDKFormProvider>\n * {comp.status.willDeleteSecondaryJobs && (\n * <p>Saving will remove this employee's secondary jobs.</p>\n * )}\n * <button type=\"submit\" disabled={comp.status.isPending}>Save</button>\n * </form>\n * )\n * }\n * ```\n */\nexport function useCompensationForm({\n employeeId,\n jobId,\n compensationId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n withEffectiveDateField = true,\n}: UseCompensationFormProps): HookLoadingResult | UseCompensationFormReady {\n const jobsQuery = useJobsAndCompensationsGetJobs(\n {\n employeeId: employeeId ?? '',\n // Fetch all effective-dated compensations when editing an existing one so\n // resolveCompAndJob can find the target comp (future-dated comps are\n // omitted from the default response, which only returns the current comp).\n include: compensationId\n ? GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations\n : undefined,\n },\n { enabled: !!employeeId },\n )\n const addressesQuery = useEmployeeAddressesGetWorkAddresses(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n const employeeQuery = useEmployeesGet({ employeeId: employeeId ?? '' }, { enabled: !!employeeId })\n\n const employeeJobs = jobsQuery.data?.jobs\n const workAddresses = addressesQuery.data?.employeeWorkAddressesList\n const currentWorkAddress = workAddresses?.find(address => address.active)\n const locationUuid = currentWorkAddress?.locationUuid\n const employee = employeeQuery.data?.employee\n\n const minWagesQuery = useLocationsGetMinimumWages(\n { locationUuid: locationUuid ?? '' },\n { enabled: !!locationUuid, staleTime: Infinity },\n )\n\n const minimumWages = minWagesQuery.data?.minimumWageList ?? []\n\n const { compensation: currentCompensation, job: currentJob } = resolveCompAndJob(\n employeeJobs,\n compensationId,\n jobId,\n )\n\n const otherJobsCount =\n employeeJobs && currentJob ? employeeJobs.filter(j => j.uuid !== currentJob.uuid).length : 0\n\n // Snapshot — written exactly once, on the first render where `employeeJobs`\n // is defined (i.e., the initial `getJobs` query has resolved) — capturing\n // whether the employee already had a primary job at that moment.\n //\n // Used to ignore the API-generated stub primary (FLSA Nonexempt, rate \"0.00\")\n // that briefly appears between the chained job POST and comp PUT during\n // onboarding: `getJobs` invalidates between the two mutations and\n // momentarily includes the stub, which would otherwise flip\n // `isAddingSecondaryJob` to true and hide `Fields.FlsaStatus` mid-submit.\n //\n // In steady-state flows (edit primary, edit secondary, add secondary), the\n // real primary already exists when the query first resolves, so the snapshot\n // is `true` and live `employeeJobs` continues to drive `primaryFlsaStatus`.\n // Recovery for the rare case where a partner mounts before any jobs exist\n // and a primary is created externally mid-form is to remount the hook\n // (e.g., via a `key` change).\n const hadPrimaryAtMountRef = useRef<boolean | null>(null)\n if (hadPrimaryAtMountRef.current === null && employeeJobs !== undefined) {\n hadPrimaryAtMountRef.current = employeeJobs.some(job => job.primary)\n }\n const hadPrimaryAtMount = hadPrimaryAtMountRef.current === true\n\n // FLSA status of the employee's primary job's current compensation, when one\n // exists. Used as a fallback default when adding a *secondary* job/comp so the\n // multi-job classification stays consistent with the primary by default — the\n // user can still override it (when allowed). Null when there was no primary\n // job at the moment the hook first observed `employeeJobs`, or when the\n // primary has no current compensation yet.\n const primaryFlsaStatus = hadPrimaryAtMount ? findPrimaryFlsaStatus(employeeJobs) : null\n\n const hireDate =\n currentJob?.hireDate ??\n // Secondary jobs being created (CompensationAddAnotherJobForm) have no hireDate until the\n // job POST completes. Fall back to the primary job's hireDate so the schema\n // can enforce EFFECTIVE_DATE_BEFORE_HIRE during that window.\n employeeJobs?.find(j => j.primary)?.hireDate ??\n null\n\n // In update mode, exclude the compensation being edited so it doesn't\n // bound `maximumEffectiveDate` to its own current date — that would prevent\n // the user from pushing the pending effective date further out.\n const futureCompensations = findFutureCompensations(currentJob).filter(\n c => c.uuid !== compensationId,\n )\n const hasPendingFutureCompensation = futureCompensations.length > 0\n const maximumEffectiveDate = earliestEffectiveDate(futureCompensations)\n\n const isCreateMode = !compensationId\n const mode = isCreateMode ? 'create' : 'update'\n // Adding a secondary job (the employee already has a primary). The Gusto API\n // only allows secondaries when the primary's current FLSA is Nonexempt, and\n // the secondary itself must match — so the FLSA field is not user-editable\n // in this branch. We force the form value to the primary's FLSA below and\n // hide `Fields.FlsaStatus`.\n // True when adding a brand-new secondary job (not when scheduling a future\n // comp for the primary). The distinction matters: for the primary's future\n // comp, FLSA should be editable; for a secondary, it must match the primary.\n const isAddingSecondaryJob =\n isCreateMode && primaryFlsaStatus === FlsaStatus.NONEXEMPT && currentJob?.primary !== true\n\n // Derive the effective-date floor internally so consumers don't need to wire\n // it up. Rules by mode and job type:\n // create (any job): tomorrow — new comp must be future-dated\n // update, primary: undefined — the carve-out (willDeleteSecondaryJobs) can\n // force effectiveDate to today on a disabled field; enforcing a floor here\n // would produce a spurious EFFECTIVE_DATE_BEFORE_MIN on submit.\n // update, secondary: tomorrow — must be in the future\n // The hire-date lower bound is handled separately in the schema via the\n // `hireDate` option (→ EFFECTIVE_DATE_BEFORE_HIRE), which fires alongside\n // this check so each violation gets its own error message.\n const internalMinEffectiveDate = useMemo(() => {\n if (!withEffectiveDateField) return undefined\n if (!isCreateMode && currentJob?.primary === true) return undefined\n\n return formatDateToStringDate(addDays(new Date(), 1)) ?? undefined\n }, [isCreateMode, currentJob?.primary, withEffectiveDateField])\n\n const [schema, metadataConfig] = useMemo(\n () =>\n createCompensationSchema({\n mode,\n optionalFieldsToRequire,\n hireDate,\n minEffectiveDate: internalMinEffectiveDate,\n withEffectiveDateField,\n }),\n [mode, optionalFieldsToRequire, hireDate, internalMinEffectiveDate, withEffectiveDateField],\n )\n\n const state = currentWorkAddress?.state\n\n // `flsaStatus` is intentionally allowed to be undefined so the field renders\n // an empty placeholder when nothing is provided — partners can choose to\n // seed it via `defaultValues.flsaStatus`. When a `compensation` is loaded we\n // seed from it; for a brand-new secondary job we inherit from the primary's\n // current compensation so multi-job classification stays consistent. The\n // schema enforces requiredness on submit in `create` mode (see\n // `requiredFieldsConfig` in compensationSchema.ts).\n //\n // `title` lives on compensation in the API — `job.title` is a denormalized\n // snapshot of the primary comp's title that can lag behind comp-level edits\n // on secondaries. Seed directly from the loaded compensation so editing in\n // place can't silently re-introduce a stale title from the job record.\n const resolvedDefaults: CompensationFormData = useMemo(\n () => ({\n title: currentCompensation?.title ?? partnerDefaults?.title ?? '',\n // When adding a secondary, the FLSA must match the primary's — force it\n // here (overriding any partner default) so the form submits the right\n // value even though `Fields.FlsaStatus` is hidden.\n flsaStatus: isAddingSecondaryJob\n ? primaryFlsaStatus\n : (currentCompensation?.flsaStatus ??\n partnerDefaults?.flsaStatus ??\n primaryFlsaStatus ??\n undefined),\n rate: Number(currentCompensation?.rate ?? partnerDefaults?.rate ?? 0),\n adjustForMinimumWage:\n currentCompensation?.adjustForMinimumWage ?? partnerDefaults?.adjustForMinimumWage ?? false,\n minimumWageId:\n currentCompensation?.minimumWages?.[0]?.uuid ?? partnerDefaults?.minimumWageId ?? '',\n paymentUnit:\n currentCompensation?.paymentUnit ?? partnerDefaults?.paymentUnit ?? PAY_PERIODS.HOUR,\n effectiveDate: currentCompensation?.effectiveDate ?? partnerDefaults?.effectiveDate ?? null,\n }),\n [currentCompensation, currentJob, partnerDefaults, primaryFlsaStatus, isAddingSecondaryJob],\n )\n\n const formMethods = useForm<CompensationFormData, unknown, CompensationFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const { control, getValues, setValue, clearErrors } = formMethods\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedAdjustForMinimumWage = useWatch({\n control,\n name: 'adjustForMinimumWage',\n })\n\n // Validation rules for `paymentUnit` and `rate` are FLSA-driven, so any\n // prior error on those fields is stale once FLSA changes. RHF doesn't clear\n // them on its own (`setValue` without `shouldValidate` skips the resolver,\n // and reValidate is per-field) — clear eagerly and let the next blur/submit\n // re-establish the error if it still applies.\n useEffect(() => {\n clearErrors(['paymentUnit', 'rate'])\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n setValue('paymentUnit', PAY_PERIODS.PAYCHECK)\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n setValue('paymentUnit', PAY_PERIODS.YEAR)\n setValue('rate', 0)\n } else {\n setValue('paymentUnit', resolvedDefaults.paymentUnit)\n }\n }, [watchedFlsaStatus, setValue, clearErrors, resolvedDefaults.paymentUnit])\n\n // The FLSA status that represents the employee's current classification.\n // In update mode this is the compensation being edited. In create mode\n // `currentCompensation` is null, so fall back to the job's active\n // compensation (identified by currentCompensationUuid) — this lets the\n // secondary-job warning fire even when scheduling a future-dated change.\n const currentJobActiveComp = currentJob\n ? currentJob.compensations?.find(c => c.uuid === currentJob.currentCompensationUuid)\n : undefined\n const effectiveBaseFlsaStatus =\n currentCompensation?.flsaStatus ?? currentJobActiveComp?.flsaStatus ?? null\n\n // True when the user is changing FLSA away from Nonexempt on a job that has\n // secondary jobs — those secondaries will be deleted by the API when the\n // new classification takes effect (immediately in update mode, at the chosen\n // effective date in create mode). Drives the warning and, in update mode\n // only, the effectiveDate-lock side effect below.\n const willDeleteSecondaryJobs =\n effectiveBaseFlsaStatus === FlsaStatus.NONEXEMPT &&\n watchedFlsaStatus !== undefined &&\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT &&\n otherJobsCount > 0\n\n // Carve-out UX — update mode only: while willDeleteSecondaryJobs is active\n // the server deletes secondaries immediately on PUT. Mirror this by forcing\n // `effectiveDate` to today and disabling the field. In create mode the\n // deletion happens at the chosen future date, so we show the warning but\n // leave the date field editable.\n const carveOutActiveRef = useRef(false)\n const priorEffectiveDateRef = useRef<string | null>(null)\n useEffect(() => {\n if (!isCreateMode && willDeleteSecondaryJobs && !carveOutActiveRef.current) {\n priorEffectiveDateRef.current = getValues('effectiveDate') ?? null\n setValue('effectiveDate', todayISO(), { shouldDirty: true, shouldValidate: false })\n carveOutActiveRef.current = true\n } else if (!isCreateMode && !willDeleteSecondaryJobs && carveOutActiveRef.current) {\n setValue('effectiveDate', priorEffectiveDateRef.current ?? null, {\n shouldDirty: true,\n shouldValidate: false,\n })\n priorEffectiveDateRef.current = null\n carveOutActiveRef.current = false\n }\n }, [isCreateMode, willDeleteSecondaryJobs, getValues, setValue])\n\n const updateCompensationMutation = useJobsAndCompensationsUpdateCompensationMutation()\n const createCompensationMutation = useJobsAndCompensationsCreateCompensationMutation()\n\n const isPending = updateCompensationMutation.isPending || createCompensationMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('CompensationForm')\n\n const queriesForErrors = employeeId\n ? [jobsQuery, addressesQuery, employeeQuery, minWagesQuery]\n : []\n const errorHandling = composeErrorHandler(queriesForErrors, { submitError, setSubmitError })\n\n const isCommissionOnly =\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n const isOwner = watchedFlsaStatus === FlsaStatus.OWNER\n\n // Hide `Fields.FlsaStatus` when the user has no meaningful choice:\n // - update mode editing a secondary whose comp is already Nonexempt\n // (must keep matching the primary), and\n // - create mode while adding a secondary (must inherit primary's FLSA).\n // The first job's create flow and primary-job edits keep the field exposed.\n const isFlsaSelectionEnabled =\n !isAddingSecondaryJob &&\n (watchedFlsaStatus !== FlsaStatus.NONEXEMPT || currentJob?.primary === true || isCreateMode)\n\n const isAdjustMinimumWageEnabled =\n watchedFlsaStatus === FlsaStatus.NONEXEMPT &&\n minimumWages.length > 0 &&\n state !== undefined &&\n !TIP_CREDITS_UNSUPPORTED_STATES.includes(state)\n\n // Min-wage adjustment is only valid for Nonexempt FLSA (and a state that\n // allows tip credit). When the gate flips off — typically because the user\n // changed FLSA away from Nonexempt — `Fields.AdjustForMinimumWage` and\n // `Fields.MinimumWageId` stop rendering, but the underlying form values\n // persist in react-hook-form state. That would leak an\n // `adjust_for_minimum_wage: true` + `minimum_wages: [...]` body on submit\n // (server rejects with \"Minimum wage adjustments only valid for\n // flsa_status: Nonexempt\"). Reset both values to safe defaults so the\n // submitted payload always matches what the user can actually see.\n useEffect(() => {\n if (isAdjustMinimumWageEnabled) return\n if (getValues('adjustForMinimumWage')) {\n setValue('adjustForMinimumWage', false, { shouldDirty: true, shouldValidate: false })\n }\n if (getValues('minimumWageId')) {\n setValue('minimumWageId', '', { shouldDirty: true, shouldValidate: false })\n }\n // Both fields stop rendering once the gate closes — clear errors so a\n // stale one doesn't silently fail the next submit with no visible UI to fix.\n clearErrors(['adjustForMinimumWage', 'minimumWageId'])\n }, [isAdjustMinimumWageEnabled, getValues, setValue, clearErrors])\n\n const minimumWageOptions = minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${wage.wage} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const effectiveDateMinDate = useMemo(\n () =>\n [internalMinEffectiveDate, hireDate]\n .filter((d): d is string => !!d)\n .reduce<string | null>((max, d) => (!max || d > max ? d : max), null),\n [internalMinEffectiveDate, hireDate],\n )\n const fieldsMetadata = buildCompensationFieldsMetadata(baseMetadata, {\n willDeleteSecondaryJobs,\n isCreateMode,\n isCommissionOnly,\n isOwner,\n isAdjustMinimumWageEnabled,\n effectiveDateMinDate,\n maximumEffectiveDate,\n minimumWageOptions,\n minimumWages,\n })\n\n const onSubmit = async (\n options?: CompensationSubmitOptions,\n ): Promise<HookSubmitResult<Compensation> | undefined> => {\n let submitResult: HookSubmitResult<Compensation> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: CompensationFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const resolvedJobId = options?.jobId ?? jobId\n const resolvedCompensationId = options?.compensationId ?? compensationId\n const resolvedMode = resolvedCompensationId ? 'update' : 'create'\n\n // When the field is rendered, the validated payload value wins\n // unless an explicit submit-time override is supplied. When the\n // field is hidden (`withEffectiveDateField: false`) we are\n // strictly options-only — matching `useWorkAddressForm` and the\n // hidden-field behavior of `useHomeAddressForm` / `useJobForm`.\n // The carve-out's form-state side effect (force value to today)\n // is therefore inert in the hidden-field path; partners who\n // need a specific date there must supply it via\n // `CompensationSubmitOptions.effectiveDate`.\n const resolvedEffectiveDate = withEffectiveDateField\n ? (options?.effectiveDate ?? payload.effectiveDate ?? undefined)\n : (options?.effectiveDate ?? undefined)\n\n const requestBodyBase = {\n rate: String(payload.rate),\n paymentUnit: payload.paymentUnit,\n flsaStatus: payload.flsaStatus,\n effectiveDate: resolvedEffectiveDate,\n title: payload.title || undefined,\n adjustForMinimumWage: payload.adjustForMinimumWage,\n minimumWages: payload.adjustForMinimumWage ? [{ uuid: payload.minimumWageId }] : [],\n }\n\n let result: Compensation | undefined\n\n if (resolvedMode === 'create') {\n if (!resolvedJobId) {\n throw new SDKInternalError(\n 'jobId is required to create a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n // Schema's `requiredFieldsConfig` guarantees `flsaStatus` is set\n // on create-mode submit; the runtime guard appeases the API\n // request-body type (which requires a non-undefined value on\n // POST, vs. the optional PUT body).\n if (!payload.flsaStatus) {\n throw new SDKInternalError('flsaStatus is required to create a compensation.')\n }\n const createResponse = await createCompensationMutation.mutateAsync({\n request: {\n jobId: resolvedJobId,\n compensationsRequestBody: { ...requestBodyBase, flsaStatus: payload.flsaStatus },\n },\n })\n result = createResponse.compensation\n if (!result) throw new SDKInternalError('Compensation creation failed')\n } else {\n if (!resolvedCompensationId) {\n throw new SDKInternalError(\n 'compensationId is required to update a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n const resolvedVersion =\n options?.compensationVersion ?? (currentCompensation?.version as string | undefined)\n if (!resolvedVersion) {\n throw new SDKInternalError(\n 'compensation version is required to update a compensation. Pass it via submit options when threading post-create, or ensure the compensation is loaded.',\n )\n }\n const updateResponse = await updateCompensationMutation.mutateAsync({\n request: {\n compensationId: resolvedCompensationId,\n compensationsUpdateRequestBody: {\n version: resolvedVersion,\n ...requestBodyBase,\n },\n },\n })\n result = updateResponse.compensation\n if (!result) throw new SDKInternalError('Compensation update failed')\n }\n\n submitResult = { mode: resolvedMode, data: result }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = employeeId\n ? jobsQuery.isLoading ||\n addressesQuery.isLoading ||\n employeeQuery.isLoading ||\n minWagesQuery.isLoading\n : false\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n if (isDataLoading || (employeeId && (!employeeJobs || !employee))) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n compensation: currentCompensation,\n currentJob,\n minimumWages,\n minimumEffectiveDate: effectiveDateMinDate,\n maximumEffectiveDate,\n hasPendingFutureCompensation,\n },\n status: {\n isPending,\n mode,\n willDeleteSecondaryJobs,\n showCommissionFederalMinimumPayAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT,\n showCommissionMinimumWageAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n showOwnerSalaryAlert: watchedFlsaStatus === FlsaStatus.OWNER,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Title: TitleField,\n FlsaStatus: isFlsaSelectionEnabled ? FlsaStatusField : undefined,\n Rate: isCommissionOnly ? undefined : RateField,\n PaymentUnit: isCommissionOnly ? undefined : PaymentUnitField,\n AdjustForMinimumWage: isAdjustMinimumWageEnabled ? AdjustForMinimumWageField : undefined,\n MinimumWageId:\n isAdjustMinimumWageEnabled && watchedAdjustForMinimumWage\n ? MinimumWageIdField\n : undefined,\n EffectiveDate: withEffectiveDateField ? EffectiveDateField : undefined,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\n/**\n * Discriminated union returned by {@link useCompensationForm} — either the loading state or the ready state.\n *\n * @remarks\n * Use this type when threading the hook result through helpers (e.g.\n * presentational components). Discriminate on `isLoading` to narrow to\n * {@link UseCompensationFormReady}.\n *\n * @public\n */\nexport type UseCompensationFormResult = HookLoadingResult | UseCompensationFormReady\n\n/**\n * Metadata for each {@link useCompensationForm} field, exposed on `form.fieldsMetadata`.\n *\n * @remarks\n * Includes per-field `isDisabled`, `isRequired`, and the dynamic option list\n * for select fields (`flsaStatus`, `paymentUnit`, `minimumWageId`).\n * `effectiveDate` additionally carries `minDate` / `maxDate` derived from\n * the parent job's hire date and any pending future compensation.\n *\n * @public\n */\nexport type CompensationFieldsMetadata = ReturnType<typeof buildCompensationFieldsMetadata>\n"],"names":["resolveCompAndJob","jobs","compensationId","jobId","job","compensation","c","j","findPrimaryFlsaStatus","findFutureCompensations","today","todayISO","earliestEffectiveDate","comps","min","d","flsaStatusEntries","FlsaStatus","flsaOptions","status","paymentUnitEntries","PAY_PERIODS","paymentUnitOptions","unit","buildCompensationFieldsMetadata","base","willDeleteSecondaryJobs","isCreateMode","isCommissionOnly","isOwner","isAdjustMinimumWageEnabled","effectiveDateMinDate","maximumEffectiveDate","minimumWageOptions","minimumWages","withFlags","withOptions","useCompensationForm","employeeId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","withEffectiveDateField","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","addressesQuery","useEmployeeAddressesGetWorkAddresses","employeeQuery","useEmployeesGet","employeeJobs","currentWorkAddress","address","locationUuid","employee","minWagesQuery","useLocationsGetMinimumWages","currentCompensation","currentJob","otherJobsCount","hadPrimaryAtMountRef","useRef","primaryFlsaStatus","hireDate","futureCompensations","hasPendingFutureCompensation","mode","isAddingSecondaryJob","internalMinEffectiveDate","useMemo","formatDateToStringDate","addDays","schema","metadataConfig","createCompensationSchema","state","resolvedDefaults","formMethods","useForm","zodResolver","control","getValues","setValue","clearErrors","watchedFlsaStatus","useWatch","watchedAdjustForMinimumWage","useEffect","currentJobActiveComp","carveOutActiveRef","priorEffectiveDateRef","updateCompensationMutation","useJobsAndCompensationsUpdateCompensationMutation","createCompensationMutation","useJobsAndCompensationsCreateCompensationMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isFlsaSelectionEnabled","TIP_CREDITS_UNSUPPORTED_STATES","wage","baseMetadata","useDeriveFieldsMetadata","max","fieldsMetadata","onSubmit","options","submitResult","resolve","data","payload","resolvedJobId","resolvedCompensationId","resolvedMode","resolvedEffectiveDate","requestBodyBase","result","SDKInternalError","resolvedVersion","isDataLoading","hookFormInternals","useHookFormInternals","TitleField","FlsaStatusField","RateField","PaymentUnitField","AdjustForMinimumWageField","MinimumWageIdField","EffectiveDateField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6PA,SAASA,GACPC,GACAC,GACAC,GACwD;AACxD,MAAI,CAACF,EAAM,QAAO,EAAE,cAAc,MAAM,KAAK,KAAA;AAC7C,MAAIC,GAAgB;AAClB,eAAWE,KAAOH,GAAM;AACtB,YAAMI,IAAeD,EAAI,eAAe,KAAK,CAAAE,MAAKA,EAAE,SAASJ,CAAc;AAC3E,UAAIG,EAAc,QAAO,EAAE,cAAAA,GAAc,KAAAD,EAAA;AAAA,IAC3C;AAIA,WAAO,EAAE,cAAc,MAAM,KADTD,IAASF,EAAK,KAAK,OAAKM,EAAE,SAASJ,CAAK,KAAK,OAAQ,KACvC;AAAA,EACpC;AACA,SAAIA,IAAc,EAAE,cAAc,MAAM,KAAKF,EAAK,KAAK,CAAAM,MAAKA,EAAE,SAASJ,CAAK,KAAK,KAAA,IAC1E,EAAE,cAAc,MAAM,KAAK,KAAA;AACpC;AAEA,SAASK,GAAsBP,GAAgD;AAC7E,MAAI,CAACA,EAAM,QAAO;AAClB,aAAWG,KAAOH,GAAM;AACtB,QAAI,CAACG,EAAI,QAAS;AAClB,UAAMC,IAAeD,EAAI,eAAe,KAAK,OAAKE,EAAE,SAASF,EAAI,uBAAuB;AACxF,QAAIC,GAAc,WAAY,QAAOA,EAAa;AAAA,EACpD;AACA,SAAO;AACT;AAEA,SAASI,GAAwBL,GAAiC;AAChE,MAAI,CAACA,GAAK,cAAe,QAAO,CAAA;AAChC,QAAMM,IAAQC,GAAA;AACd,SAAOP,EAAI,cAAc,OAAO,CAAAE,MAAKA,EAAE,kBAAkB,UAAaA,EAAE,gBAAgBI,CAAK;AAC/F;AAEA,SAASE,GAAsBC,GAAsC;AACnE,SAAIA,EAAM,WAAW,IAAU,OACxBA,EAAM,OAAsB,CAACC,GAAKR,MAAM;AAC7C,UAAMS,IA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QACF;AAAA,QACA,MAAM;AACJ,UAAAA,GAAA;AAAA,QACF;AAAA,MAAA,EACF;AAAA,IACF,CAAC,GAEMD;AAAA,EACT,GAEMY,KAAgBtF,IAClBM,EAAU,aACVG,EAAe,aACfE,EAAc,aACdO,EAAc,YACd,IAEEqE,KAAoBC,GAAqBhD,CAAW;AAE1D,SAAI8C,MAAkBtF,MAAe,CAACa,KAAgB,CAACI,MAC9C,EAAE,WAAW,IAAe,eAAA8C,GAAA,IAG9B;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,cAAc3C;AAAA,MACd,YAAAC;AAAA,MACA,cAAAzB;AAAA,MACA,sBAAsBH;AAAA,MACtB,sBAAAC;AAAA,MACA,8BAAAkC;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAA8B;AAAA,MACA,MAAA7B;AAAA,MACA,yBAAAzC;AAAA,MACA,sCAAsC2D,MAAsBpE,EAAW;AAAA,MACvE,gCAAgCoE,MAAsBpE,EAAW;AAAA,MACjE,sBAAsBoE,MAAsBpE,EAAW;AAAA,IAAA;AAAA,IAEzD,SAAS,EAAE,UAAA6F,GAAA;AAAA,IACX,eAAAT;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,OAAO0B;AAAA,QACP,YAAYxB,KAAyByB,KAAkB;AAAA,QACvD,MAAMpG,IAAmB,SAAYqG;AAAA,QACrC,aAAarG,IAAmB,SAAYsG;AAAA,QAC5C,sBAAsBpG,IAA6BqG,KAA4B;AAAA,QAC/E,eACErG,KAA8ByD,KAC1B6C,KACA;AAAA,QACN,eAAezF,IAAyB0F,KAAqB;AAAA,MAAA;AAAA,MAE/D,gBAAAxB;AAAA,MACA,mBAAAgB;AAAA,MACA,yBAAyBS,GAA8BxD,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
@@ -32,4 +32,4 @@ export interface DashboardProps extends BaseComponentInterface<'Employee.Dashboa
|
|
|
32
32
|
* @returns A React element rendering the employee dashboard.
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
|
-
export declare function Dashboard({ FallbackComponent, ...props }: DashboardProps): import("react").JSX.Element;
|
|
35
|
+
export declare function Dashboard({ FallbackComponent, LoaderComponent, ...props }: DashboardProps): import("react").JSX.Element;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as x, Suspense as y } from "react";
|
|
3
3
|
import { useTranslation as c } from "react-i18next";
|
|
4
|
-
import { useEmployeesGetSuspense as
|
|
5
|
-
import { BasicDetailsView as
|
|
6
|
-
import { JobAndPayView as
|
|
4
|
+
import { useEmployeesGetSuspense as T } from "@gusto/embedded-api/react-query/employeesGet";
|
|
5
|
+
import { BasicDetailsView as A } from "./BasicDetailsView.js";
|
|
6
|
+
import { JobAndPayView as g } from "./JobAndPayView.js";
|
|
7
7
|
import { TaxesViewWithData as C } from "./TaxesView.js";
|
|
8
8
|
import { Flex as l } from "../../Common/Flex/Flex.js";
|
|
9
9
|
import { useComponentContext as b } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
|
-
import { BaseBoundaries as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { componentEvents as
|
|
13
|
-
import { firstLastName as
|
|
14
|
-
import { DocumentsCard as
|
|
15
|
-
function
|
|
16
|
-
employeeId:
|
|
17
|
-
dictionary:
|
|
18
|
-
onEvent:
|
|
19
|
-
selectedTab: r
|
|
10
|
+
import { BaseBoundaries as E } from "../../Base/Base.js";
|
|
11
|
+
import { useI18n as j, useComponentDictionary as B } from "../../../i18n/I18n.js";
|
|
12
|
+
import { componentEvents as N } from "../../../shared/constants.js";
|
|
13
|
+
import { firstLastName as P } from "../../../helpers/formattedStrings.js";
|
|
14
|
+
import { DocumentsCard as S } from "../Documents/management/DocumentsCard/DocumentsCard.js";
|
|
15
|
+
function _({
|
|
16
|
+
employeeId: a,
|
|
17
|
+
dictionary: o,
|
|
18
|
+
onEvent: t,
|
|
19
|
+
selectedTab: r,
|
|
20
|
+
LoaderComponent: p
|
|
20
21
|
}) {
|
|
21
|
-
|
|
22
|
-
const { t: n } = c("Employee.Dashboard"),
|
|
22
|
+
j("Employee.Dashboard"), B("Employee.Dashboard", o);
|
|
23
|
+
const { t: n } = c("Employee.Dashboard"), d = b(), [u, f] = x("basicDetails"), s = r ?? u, D = [
|
|
23
24
|
{
|
|
24
25
|
id: "basicDetails",
|
|
25
26
|
label: n("tabs.basicDetails"),
|
|
@@ -42,42 +43,57 @@ function S({
|
|
|
42
43
|
}
|
|
43
44
|
];
|
|
44
45
|
return /* @__PURE__ */ i(l, { flexDirection: "column", gap: 32, children: [
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
+
/* @__PURE__ */ e(y, { fallback: null, children: /* @__PURE__ */ e(H, { employeeId: a }) }),
|
|
46
47
|
/* @__PURE__ */ i(l, { flexDirection: "column", gap: 8, children: [
|
|
47
48
|
/* @__PURE__ */ e(
|
|
48
|
-
|
|
49
|
+
d.Tabs,
|
|
49
50
|
{
|
|
50
|
-
tabs:
|
|
51
|
+
tabs: D,
|
|
51
52
|
selectedId: s,
|
|
52
|
-
onSelectionChange: (
|
|
53
|
-
const m =
|
|
54
|
-
|
|
53
|
+
onSelectionChange: (h) => {
|
|
54
|
+
const m = h;
|
|
55
|
+
f(m), t(N.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: m });
|
|
55
56
|
},
|
|
56
57
|
"aria-label": n("tabsLabel")
|
|
57
58
|
}
|
|
58
59
|
),
|
|
59
60
|
/* @__PURE__ */ i(l, { flexDirection: "column", gap: 24, children: [
|
|
60
|
-
s === "basicDetails" && /* @__PURE__ */ e(
|
|
61
|
-
s === "jobAndPay" && /* @__PURE__ */ e(
|
|
62
|
-
s === "taxes" && /* @__PURE__ */ e(C, { employeeId:
|
|
63
|
-
s === "documents" && /* @__PURE__ */ e(
|
|
61
|
+
s === "basicDetails" && /* @__PURE__ */ e(A, { employeeId: a, onEvent: t }),
|
|
62
|
+
s === "jobAndPay" && /* @__PURE__ */ e(g, { employeeId: a, onEvent: t }),
|
|
63
|
+
s === "taxes" && /* @__PURE__ */ e(C, { employeeId: a, onEvent: t }),
|
|
64
|
+
s === "documents" && /* @__PURE__ */ e(
|
|
65
|
+
S,
|
|
66
|
+
{
|
|
67
|
+
employeeId: a,
|
|
68
|
+
onEvent: t,
|
|
69
|
+
LoaderComponent: p
|
|
70
|
+
}
|
|
71
|
+
)
|
|
64
72
|
] })
|
|
65
73
|
] })
|
|
66
74
|
] });
|
|
67
75
|
}
|
|
68
|
-
function
|
|
69
|
-
const { t:
|
|
76
|
+
function H({ employeeId: a }) {
|
|
77
|
+
const { t: o } = c("Employee.Dashboard"), t = b(), {
|
|
70
78
|
data: { employee: r }
|
|
71
|
-
} =
|
|
79
|
+
} = T({ employeeId: a });
|
|
72
80
|
return /* @__PURE__ */ i(l, { flexDirection: "column", gap: 4, children: [
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
/* @__PURE__ */ e(
|
|
81
|
+
/* @__PURE__ */ e(t.Heading, { as: "h2", children: P({ first_name: r?.firstName, last_name: r?.lastName }) }),
|
|
82
|
+
/* @__PURE__ */ e(t.Text, { variant: "supporting", children: o("employeeRoleLabel") })
|
|
75
83
|
] });
|
|
76
84
|
}
|
|
77
|
-
function
|
|
78
|
-
return /* @__PURE__ */ e(
|
|
85
|
+
function K({ FallbackComponent: a, LoaderComponent: o, ...t }) {
|
|
86
|
+
return /* @__PURE__ */ e(
|
|
87
|
+
E,
|
|
88
|
+
{
|
|
89
|
+
componentName: "Employee.Dashboard",
|
|
90
|
+
FallbackComponent: a,
|
|
91
|
+
LoaderComponent: o,
|
|
92
|
+
children: /* @__PURE__ */ e(_, { ...t, LoaderComponent: o })
|
|
93
|
+
}
|
|
94
|
+
);
|
|
79
95
|
}
|
|
80
96
|
export {
|
|
81
|
-
|
|
97
|
+
K as Dashboard
|
|
82
98
|
};
|
|
83
99
|
//# sourceMappingURL=Dashboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.js","sources":["../../../../src/components/Employee/Dashboard/Dashboard.tsx"],"sourcesContent":["import { Suspense, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { BasicDetailsView } from './BasicDetailsView'\nimport { JobAndPayView } from './JobAndPayView'\nimport { TaxesViewWithData } from './TaxesView'\nimport { DocumentsCard } from '@/components/Employee/Documents/management/DocumentsCard'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/** @public */\nexport type DashboardTab = 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents'\n\n/** @public */\nexport interface DashboardProps extends BaseComponentInterface<'Employee.Dashboard'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The currently active tab. Defaults to `'basicDetails'` when uncontrolled. */\n selectedTab?: DashboardTab\n}\n\nfunction DashboardRoot({\n employeeId,\n dictionary,\n onEvent,\n selectedTab: controlledTab,\n}: DashboardProps) {\n useI18n('Employee.Dashboard')\n useComponentDictionary('Employee.Dashboard', dictionary)\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const [internalTab, setInternalTab] = useState<DashboardTab>('basicDetails')\n const selectedTab = controlledTab ?? internalTab\n\n const tabs = [\n {\n id: 'basicDetails' as const,\n label: t('tabs.basicDetails'),\n content: null,\n },\n {\n id: 'jobAndPay' as const,\n label: t('tabs.jobAndPay'),\n content: null,\n },\n {\n id: 'taxes' as const,\n label: t('tabs.taxes'),\n content: null,\n },\n {\n id: 'documents' as const,\n label: t('tabs.documents'),\n content: null,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Suspense fallback={null}>\n <DashboardHeader employeeId={employeeId} />\n </Suspense>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n const next = id as DashboardTab\n setInternalTab(next)\n onEvent(componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: next })\n }}\n aria-label={t('tabsLabel')}\n />\n\n <Flex flexDirection=\"column\" gap={24}>\n {selectedTab === 'basicDetails' && (\n <BasicDetailsView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'jobAndPay' && (\n <JobAndPayView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'taxes' && (\n <TaxesViewWithData employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'documents' && (\n <DocumentsCard
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sources":["../../../../src/components/Employee/Dashboard/Dashboard.tsx"],"sourcesContent":["import { Suspense, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { BasicDetailsView } from './BasicDetailsView'\nimport { JobAndPayView } from './JobAndPayView'\nimport { TaxesViewWithData } from './TaxesView'\nimport { DocumentsCard } from '@/components/Employee/Documents/management/DocumentsCard'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/** @public */\nexport type DashboardTab = 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents'\n\n/** @public */\nexport interface DashboardProps extends BaseComponentInterface<'Employee.Dashboard'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The currently active tab. Defaults to `'basicDetails'` when uncontrolled. */\n selectedTab?: DashboardTab\n}\n\nfunction DashboardRoot({\n employeeId,\n dictionary,\n onEvent,\n selectedTab: controlledTab,\n LoaderComponent,\n}: DashboardProps) {\n useI18n('Employee.Dashboard')\n useComponentDictionary('Employee.Dashboard', dictionary)\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const [internalTab, setInternalTab] = useState<DashboardTab>('basicDetails')\n const selectedTab = controlledTab ?? internalTab\n\n const tabs = [\n {\n id: 'basicDetails' as const,\n label: t('tabs.basicDetails'),\n content: null,\n },\n {\n id: 'jobAndPay' as const,\n label: t('tabs.jobAndPay'),\n content: null,\n },\n {\n id: 'taxes' as const,\n label: t('tabs.taxes'),\n content: null,\n },\n {\n id: 'documents' as const,\n label: t('tabs.documents'),\n content: null,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Suspense fallback={null}>\n <DashboardHeader employeeId={employeeId} />\n </Suspense>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n const next = id as DashboardTab\n setInternalTab(next)\n onEvent(componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: next })\n }}\n aria-label={t('tabsLabel')}\n />\n\n <Flex flexDirection=\"column\" gap={24}>\n {selectedTab === 'basicDetails' && (\n <BasicDetailsView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'jobAndPay' && (\n <JobAndPayView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'taxes' && (\n <TaxesViewWithData employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'documents' && (\n <DocumentsCard\n employeeId={employeeId}\n onEvent={onEvent}\n LoaderComponent={LoaderComponent}\n />\n )}\n </Flex>\n </Flex>\n </Flex>\n )\n}\n\nfunction DashboardHeader({ employeeId }: { employeeId: string }) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {firstLastName({ first_name: employee?.firstName, last_name: employee?.lastName })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('employeeRoleLabel')}</Components.Text>\n </Flex>\n )\n}\n\n/**\n * Employee self-service dashboard summarizing a single employee's basic details, job and pay, taxes, and documents.\n *\n * @remarks\n * Renders a tabbed overview of the employee, wrapped in the SDK's standard error and suspense\n * boundaries. The active tab may be controlled via `selectedTab` or left uncontrolled, in which\n * case it defaults to basic details. Each tab composes the read-only section cards listed below.\n *\n * @components\n * - {@link ProfileCard}\n * - {@link HomeAddressCard}\n * - {@link WorkAddressCard}\n * - {@link CompensationCard}\n * - {@link PaymentMethodCard}\n * - {@link DeductionsCard}\n * - {@link PaystubsCard}\n * - {@link FederalTaxesCard}\n * - {@link StateTaxesCard}\n * - {@link DocumentsCard}\n *\n * @param props - Component props. See {@link DashboardProps}.\n * @returns A React element rendering the employee dashboard.\n * @public\n */\nexport function Dashboard({ FallbackComponent, LoaderComponent, ...props }: DashboardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Dashboard\"\n FallbackComponent={FallbackComponent}\n LoaderComponent={LoaderComponent}\n >\n <DashboardRoot {...props} LoaderComponent={LoaderComponent} />\n </BaseBoundaries>\n )\n}\n"],"names":["DashboardRoot","employeeId","dictionary","onEvent","controlledTab","LoaderComponent","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","internalTab","setInternalTab","useState","selectedTab","tabs","jsxs","Flex","jsx","Suspense","DashboardHeader","id","next","componentEvents","BasicDetailsView","JobAndPayView","TaxesViewWithData","DocumentsCard","employee","useEmployeesGetSuspense","firstLastName","Dashboard","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;AAyBA,SAASA,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC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AAA7B,EAAA,CAAkC;AAAA,IAAA;AAAA,EAAA;AAGlE;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useMemo as e } from "react";
|
|
3
|
+
import { dashboardStateMachine as i } from "./dashboardStateMachine.js";
|
|
4
|
+
import { DashboardViewContextual as n } from "./DashboardComponents.js";
|
|
5
|
+
import { createMachine as c } from "../../../lib/state-machine/core.js";
|
|
6
6
|
import { Flow as h } from "../../Flow/Flow.js";
|
|
7
7
|
const M = ({ employeeId: o, onEvent: r }) => {
|
|
8
|
-
const t =
|
|
9
|
-
() =>
|
|
8
|
+
const t = e(
|
|
9
|
+
() => c(
|
|
10
10
|
"index",
|
|
11
|
-
|
|
11
|
+
i,
|
|
12
12
|
(a) => ({
|
|
13
13
|
...a,
|
|
14
|
-
component:
|
|
14
|
+
component: n,
|
|
15
15
|
employeeId: o
|
|
16
16
|
})
|
|
17
17
|
),
|
|
@@ -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<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
|
+
{"version":3,"file":"DashboardFlow.js","sources":["../../../../src/components/Employee/Dashboard/DashboardFlow.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { dashboardStateMachine } from './dashboardStateMachine'\nimport { type DashboardContextInterface, DashboardViewContextual } from './DashboardComponents'\nimport { createMachine } from '@/lib/state-machine'\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,16 +1,16 @@
|
|
|
1
1
|
/** @internal */
|
|
2
2
|
export declare const dashboardStateMachine: {
|
|
3
|
-
index: import('
|
|
4
|
-
homeAddress: import('
|
|
5
|
-
workAddress: import('
|
|
6
|
-
federalTaxes: import('
|
|
7
|
-
stateTaxes: import('
|
|
8
|
-
profile: import('
|
|
9
|
-
paymentBankForm: import('
|
|
10
|
-
paymentSplitView: import('
|
|
11
|
-
documentManager: import('
|
|
12
|
-
editDeduction: import('
|
|
13
|
-
addJob: import('
|
|
14
|
-
editCompensation: import('
|
|
15
|
-
addAnotherJob: import('
|
|
3
|
+
index: import('../../../lib/state-machine').StateDefinition;
|
|
4
|
+
homeAddress: import('../../../lib/state-machine').StateDefinition;
|
|
5
|
+
workAddress: import('../../../lib/state-machine').StateDefinition;
|
|
6
|
+
federalTaxes: import('../../../lib/state-machine').StateDefinition;
|
|
7
|
+
stateTaxes: import('../../../lib/state-machine').StateDefinition;
|
|
8
|
+
profile: import('../../../lib/state-machine').StateDefinition;
|
|
9
|
+
paymentBankForm: import('../../../lib/state-machine').StateDefinition;
|
|
10
|
+
paymentSplitView: import('../../../lib/state-machine').StateDefinition;
|
|
11
|
+
documentManager: import('../../../lib/state-machine').StateDefinition;
|
|
12
|
+
editDeduction: import('../../../lib/state-machine').StateDefinition;
|
|
13
|
+
addJob: import('../../../lib/state-machine').StateDefinition;
|
|
14
|
+
editCompensation: import('../../../lib/state-machine').StateDefinition;
|
|
15
|
+
addAnotherJob: import('../../../lib/state-machine').StateDefinition;
|
|
16
16
|
};
|