@gusto/embedded-react-sdk 0.51.0 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/components/Base/useBaseSubmit.js +4 -4
- package/dist/components/Base/useBaseSubmit.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.d.ts +8 -1
- package/dist/components/Common/DocumentList/DocumentList.js +24 -21
- package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.d.ts +2 -2
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.d.ts +2 -2
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/FormBox/FormBox.d.ts +9 -0
- package/dist/components/Common/UI/FormBox/FormBox.js +13 -0
- package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -0
- package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +14 -0
- package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -0
- package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +26 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.d.ts +9 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js +23 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js.map +1 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js +8 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js.map +1 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.d.ts +36 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js +7 -0
- package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js.map +1 -0
- package/dist/components/Common/UI/FormBoxHeader/index.d.ts +1 -0
- package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -0
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +5 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +1 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +9 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +9 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +11 -10
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/context.d.ts +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.d.ts +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +9 -8
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +3 -3
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +1 -1
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +2 -2
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +12 -11
- package/dist/components/Company/Industry/Context.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/LocationForm/Actions.js +7 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +46 -45
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +9 -8
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +9 -8
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.d.ts +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +9 -8
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -3
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +3 -3
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +6 -6
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +10 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js +23 -17
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js +17 -10
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +2 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +9 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +27 -27
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +9 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +24 -24
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +9 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.d.ts +4 -3
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -2
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +3 -3
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +3 -3
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +95 -92
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.d.ts +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.d.ts +1 -1
- package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.d.ts +3 -1
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +64 -51
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +202 -159
- package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +3 -3
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js +3 -3
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -1
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +2 -2
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js +55 -54
- package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -1
- package/dist/components/Contractor/Landing/Landing.js +2 -2
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -2
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +3 -3
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +5 -5
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +4 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +2 -2
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +3 -3
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +2 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +4 -4
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +3 -3
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +17 -5
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +32 -31
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +16 -4
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +34 -30
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +1 -1
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +6 -6
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +2 -2
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +3 -3
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +3 -3
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +2 -6
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +38 -42
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.d.ts +2 -2
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +2 -2
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.d.ts +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.d.ts +2 -2
- package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +2 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +3 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +7 -7
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +3 -3
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +7 -7
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/index.d.ts +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.d.ts +1 -1
- package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +1 -1
- package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +2 -2
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +3 -3
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +5 -5
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -2
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +3 -3
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js +2 -2
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +1 -1
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js +2 -2
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.d.ts +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +9 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +2 -2
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +2 -2
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.d.ts +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +3 -6
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.d.ts +1 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js +1 -1
- package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -2
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js +27 -32
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js +3 -3
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.d.ts +3 -3
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +4 -5
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -2
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +2 -2
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +2 -2
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.d.ts +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +3 -3
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.d.ts +1 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js +1 -1
- package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +2 -2
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js +1 -3
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +55 -49
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +2 -2
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +2 -2
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +2 -2
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +3 -3
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +1 -1
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.d.ts +1 -1
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js +3 -3
- package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +5 -5
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +2 -2
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +4 -4
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +2 -2
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +2 -2
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js +1 -1
- package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +9 -9
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +4 -4
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +2 -2
- package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +3 -3
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.d.ts +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +4 -5
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +101 -125
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +2 -2
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +0 -5
- package/dist/components/InformationRequests/InformationRequestsComponents.js +12 -13
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +2 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +3 -3
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +2 -2
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +5 -5
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +4 -4
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +8 -7
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +9 -9
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/index.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +4 -4
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +4 -4
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +2 -2
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +100 -95
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -6
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -5
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +6 -6
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +57 -56
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -4
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +2 -2
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +24 -7
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +37 -33
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +2 -2
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +7 -7
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +2 -2
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +4 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +2 -2
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +8 -8
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -3
- 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 +7 -7
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -4
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +31 -31
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +2 -2
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +9 -5
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +2 -2
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +2 -2
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Transition/index.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +4 -4
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +3 -3
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +26 -12
- package/dist/components/Payroll/helpers.js +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +3 -2
- package/dist/components/Payroll/payrollTypes.d.ts +1 -1
- package/dist/components/Payroll/payrollTypes.js +1 -1
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/components/Payroll/usePreparedPayrollData.js +16 -15
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.d.ts +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +3 -3
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +3 -3
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +3 -3
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js +6 -6
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +30 -29
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +2 -2
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +27 -26
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +2 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +69 -68
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +20 -20
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +67 -66
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -5
- package/dist/contexts/ApiProvider/ApiProvider.js +3 -3
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/apiVersion.d.ts +23 -0
- package/dist/contexts/ApiProvider/apiVersion.js +6 -0
- package/dist/contexts/ApiProvider/apiVersion.js.map +1 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js +3 -2
- package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +7 -6
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +40 -36
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +18 -16
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +6 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.d.ts +4 -5
- package/dist/contexts/GustoProvider/GustoProvider.js +6 -6
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +7 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -8
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +1 -1
- package/dist/contexts/index.d.ts +2 -6
- package/dist/helpers/apiErrorToList.d.ts +1 -1
- package/dist/helpers/apiErrorToList.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +2 -2
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.js +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorList.json.js +18 -16
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.DocumentsList.json.js +20 -16
- package/dist/i18n/en/Contractor.DocumentsList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
- package/dist/i18n/en/Employee.OnboardingSummary.json.js +24 -20
- package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
- package/dist/i18n/types.d.ts +12 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.js +121 -134
- package/dist/index.js.map +1 -1
- package/dist/models/WA_RISK_CODES.d.ts +5 -2
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/models/external.d.ts +236 -226
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +9 -4
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.d.ts +10 -2
- package/dist/partner-hook-utils/form/SDKFormProvider.js +7 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +7 -4
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/index.d.ts +1 -0
- package/dist/partner-hook-utils/form/index.d.ts +3 -3
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
- package/dist/partner-hook-utils/index.d.ts +1 -1
- package/dist/partner-hook-utils/types.d.ts +7 -3
- package/dist/shared/constants.d.ts +2 -2
- package/dist/shared/constants.js +5 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +11 -0
- package/dist/types/hooks.d.ts +2 -2
- package/dist/types/sdkError.js +3 -3
- package/dist/types/sdkError.js.map +1 -1
- package/docs/guides/endpoint-inventory.json +1201 -297
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Job } from '@gusto/embedded-api
|
|
2
|
-
import { FlsaStatusType } from '@gusto/embedded-api
|
|
1
|
+
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
2
|
+
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
3
3
|
import { RequireAtLeastOne } from '../../../../types/Helpers';
|
|
4
4
|
import { PAY_PERIODS } from '../../../../shared/constants';
|
|
5
5
|
import { BaseComponentInterface } from '../../../Base';
|
|
@@ -76,9 +76,5 @@ export interface CompensationProps extends BaseComponentInterface<'Employee.Comp
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
export declare function Compensation(props: CompensationProps): import("react").JSX.Element;
|
|
79
|
-
export declare namespace Compensation {
|
|
80
|
-
var JobsList: typeof import("./JobsList").JobsList;
|
|
81
|
-
var EditCompensation: typeof import("./EditCompensation").EditCompensation;
|
|
82
|
-
}
|
|
83
79
|
/** @internal */
|
|
84
80
|
export declare const CompensationContextual: () => import("react").JSX.Element;
|
|
@@ -1,53 +1,51 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createMachine as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { useJobsAndCompensationsGetJobsSuspense as
|
|
6
|
-
import { JobsListContextual as
|
|
7
|
-
import { compensationStateMachine as
|
|
8
|
-
import { FlsaStatus as
|
|
9
|
-
import { useComponentDictionary as
|
|
10
|
-
import { BaseComponent as
|
|
2
|
+
import { useState as p, useMemo as c } from "react";
|
|
3
|
+
import { createMachine as f } from "robot3";
|
|
4
|
+
import { useTranslation as d } from "react-i18next";
|
|
5
|
+
import { useJobsAndCompensationsGetJobsSuspense as C } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
|
|
6
|
+
import { JobsListContextual as b, InitialEditCompensationContextual as J } from "./CompensationFlowComponents.js";
|
|
7
|
+
import { compensationStateMachine as E } from "./compensationStateMachine.js";
|
|
8
|
+
import { FlsaStatus as S } from "../../../../shared/constants.js";
|
|
9
|
+
import { useComponentDictionary as w } from "../../../../i18n/I18n.js";
|
|
10
|
+
import { BaseComponent as I } from "../../../Base/Base.js";
|
|
11
11
|
import "../../../Base/useBase.js";
|
|
12
|
-
import { Flow as
|
|
13
|
-
import { useFlow as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
initialEditJob: E,
|
|
18
|
-
viewJobs: J
|
|
12
|
+
import { Flow as h } from "../../../Flow/Flow.js";
|
|
13
|
+
import { useFlow as v } from "../../../Flow/useFlow.js";
|
|
14
|
+
const x = {
|
|
15
|
+
initialEditJob: J,
|
|
16
|
+
viewJobs: b
|
|
19
17
|
};
|
|
20
|
-
function
|
|
18
|
+
function F(t) {
|
|
21
19
|
if (t.length === 0)
|
|
22
20
|
return { initialState: "initialEditJob", currentJobId: null };
|
|
23
|
-
const o = t.length === 1 ? t[0] ?? null : null, n =
|
|
24
|
-
return o && n?.flsaStatus !==
|
|
21
|
+
const o = t.length === 1 ? t[0] ?? null : null, n = g(o);
|
|
22
|
+
return o && n?.flsaStatus !== S.NONEXEMPT ? { initialState: "initialEditJob", currentJobId: o.uuid } : { initialState: "viewJobs", currentJobId: null };
|
|
25
23
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */ i(
|
|
24
|
+
function T(t) {
|
|
25
|
+
return /* @__PURE__ */ i(I, { ...t, children: /* @__PURE__ */ i(M, { ...t }) });
|
|
28
26
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
27
|
+
const g = (t) => t?.compensations?.find((o) => o.uuid === t.currentCompensationUuid);
|
|
28
|
+
function M({
|
|
31
29
|
employeeId: t,
|
|
32
30
|
startDate: o,
|
|
33
31
|
defaultValues: n,
|
|
34
32
|
dictionary: e,
|
|
35
33
|
onEvent: r
|
|
36
34
|
}) {
|
|
37
|
-
|
|
38
|
-
const { data:
|
|
39
|
-
() =>
|
|
40
|
-
),
|
|
41
|
-
() =>
|
|
35
|
+
w("Employee.Compensation", e);
|
|
36
|
+
const { data: m } = C({ employeeId: t }), [{ initialState: a, currentJobId: s }] = p(
|
|
37
|
+
() => F(m.jobs ?? [])
|
|
38
|
+
), u = c(
|
|
39
|
+
() => f(
|
|
42
40
|
a,
|
|
43
|
-
|
|
44
|
-
(
|
|
45
|
-
...
|
|
46
|
-
component:
|
|
41
|
+
E,
|
|
42
|
+
(l) => ({
|
|
43
|
+
...l,
|
|
44
|
+
component: x[a],
|
|
47
45
|
employeeId: t,
|
|
48
46
|
startDate: o,
|
|
49
47
|
partnerDefaultValues: n,
|
|
50
|
-
currentJobId:
|
|
48
|
+
currentJobId: s
|
|
51
49
|
})
|
|
52
50
|
),
|
|
53
51
|
// `defaultValues` is intentionally omitted: a partner-supplied prop that may
|
|
@@ -55,12 +53,12 @@ function D({
|
|
|
55
53
|
// once. `initialState` and `currentJobId` are stable values from useState
|
|
56
54
|
// above, so they're listed here as honest deps but never trigger recompute.
|
|
57
55
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
|
-
[t, o, a,
|
|
56
|
+
[t, o, a, s]
|
|
59
57
|
);
|
|
60
|
-
return /* @__PURE__ */ i(
|
|
58
|
+
return /* @__PURE__ */ i(h, { machine: u, onEvent: r });
|
|
61
59
|
}
|
|
62
|
-
const
|
|
63
|
-
const { employeeId: t, onEvent: o, startDate: n, defaultValues: e } =
|
|
60
|
+
const X = () => {
|
|
61
|
+
const { employeeId: t, onEvent: o, startDate: n, defaultValues: e } = v(), { t: r } = d("common");
|
|
64
62
|
if (!t || !n)
|
|
65
63
|
throw new Error(
|
|
66
64
|
r("errors.missingParamsOrContext", {
|
|
@@ -70,7 +68,7 @@ const z = () => {
|
|
|
70
68
|
})
|
|
71
69
|
);
|
|
72
70
|
return /* @__PURE__ */ i(
|
|
73
|
-
|
|
71
|
+
T,
|
|
74
72
|
{
|
|
75
73
|
employeeId: t,
|
|
76
74
|
startDate: n,
|
|
@@ -79,10 +77,8 @@ const z = () => {
|
|
|
79
77
|
}
|
|
80
78
|
);
|
|
81
79
|
};
|
|
82
|
-
s.JobsList = F;
|
|
83
|
-
s.EditCompensation = T;
|
|
84
80
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
T as Compensation,
|
|
82
|
+
X as CompensationContextual
|
|
87
83
|
};
|
|
88
84
|
//# sourceMappingURL=Compensation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Compensation.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/Compensation.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { createMachine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { type Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype'\nimport type { OnboardingContextInterface } from '../../OnboardingFlow/OnboardingFlowComponents'\nimport {\n InitialEditCompensationContextual,\n JobsListContextual,\n type CompensationFlowContextInterface,\n} from './CompensationFlowComponents'\nimport { compensationStateMachine } from './compensationStateMachine'\nimport { JobsList } from './JobsList'\nimport { EditCompensation } from './EditCompensation'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport type { PAY_PERIODS } from '@/shared/constants'\nimport { FlsaStatus } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flow } from '@/components/Flow/Flow'\nimport { useFlow } from '@/components/Flow/useFlow'\n\ntype CompensationInitialState = 'initialEditJob' | 'viewJobs'\n\ninterface InitialFlowConfig {\n initialState: CompensationInitialState\n currentJobId: string | null\n}\n\nconst INITIAL_COMPONENT_BY_STATE: Record<\n CompensationInitialState,\n React.ComponentType<CommonComponentInterface>\n> = {\n initialEditJob: InitialEditCompensationContextual,\n viewJobs: JobsListContextual,\n}\n\nfunction deriveInitialFlowConfig(employeeJobs: Job[]): InitialFlowConfig {\n if (employeeJobs.length === 0) {\n return { initialState: 'initialEditJob', currentJobId: null }\n }\n\n const onlyJob = employeeJobs.length === 1 ? (employeeJobs[0] ?? null) : null\n const onlyJobCompensation = findCurrentCompensation(onlyJob)\n\n if (onlyJob && onlyJobCompensation?.flsaStatus !== FlsaStatus.NONEXEMPT) {\n return { initialState: 'initialEditJob', currentJobId: onlyJob.uuid }\n }\n\n return { initialState: 'viewJobs', currentJobId: null }\n}\n\n/**\n * Default values for the compensation form fields.\n *\n * @remarks\n * At least one of the fields must be provided. If employee data is available\n * via the API, these values are overwritten.\n *\n * @public\n */\nexport type CompensationDefaultValues = RequireAtLeastOne<{\n /** The compensation rate (an amount in dollars). */\n rate?: Job['rate']\n /** The job title. */\n title?: Job['title']\n /** The pay period — one of `Hour`, `Week`, `Month`, `Year`, `Paycheck`. */\n paymentUnit?: (typeof PAY_PERIODS)[keyof typeof PAY_PERIODS]\n /** The FLSA classification — drives whether the role is treated as exempt, nonexempt, etc. */\n flsaStatus?: FlsaStatusType\n}>\n\n/**\n * Props for {@link Compensation}.\n *\n * @public\n */\nexport interface CompensationProps extends BaseComponentInterface<'Employee.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The date the employee will start work. */\n startDate: string\n /** Default values for the compensation form fields. If employee data is available via the API, these values are overwritten. */\n defaultValues?: CompensationDefaultValues\n}\n\n/**\n * Onboarding step for collecting an employee's role and compensation details.\n *\n * @remarks\n * Collects the job title, employee type (hourly, salary), compensation\n * amount, and pay period. For hourly employees, allows configuring multiple\n * roles. Automatically routes between editing the only job (when an employee\n * has zero or one non-Nonexempt job) and a jobs-list view (when multiple\n * roles need to be managed) on first mount; on subsequent refetches the user\n * stays on their current step.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/job/created` | Fired after a job is successfully created | {@link Job} |\n * | `employee/job/updated` | Fired after a job is successfully updated | {@link Job} |\n * | `employee/job/deleted` | Fired after a job is successfully deleted | — |\n * | `employee/compensation/updated` | Fired after compensation details are updated | {@link Compensation} |\n * | `employee/compensation/done` | Fired when compensation setup is complete and the parent flow can advance | — |\n *\n * @param props - See {@link CompensationProps}.\n * @returns The compensation onboarding step.\n * @public\n * @group Block components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Compensation\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * startDate=\"2025-01-01\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Compensation(props: CompensationProps) {\n return (\n <BaseComponent {...props}>\n <CompensationFlow {...props} />\n </BaseComponent>\n )\n}\n\nconst findCurrentCompensation = (job?: Job | null) => {\n return job?.compensations?.find(comp => comp.uuid === job.currentCompensationUuid)\n}\n\nfunction CompensationFlow({\n employeeId,\n startDate,\n defaultValues,\n dictionary,\n onEvent,\n}: CompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n\n const { data: jobsData } = useJobsAndCompensationsGetJobsSuspense({ employeeId })\n\n // Capture the routing decision from the first jobsData snapshot only. Suspense\n // guarantees that snapshot is fresh on first render. Subsequent refetches (e.g.\n // the getJobs invalidation that fires between EditCompensation's awaited job +\n // compensation mutations) must NOT re-seat the machine and reset the user's\n // place in the flow. Callers needing to re-derive routing for a different\n // employee should remount via `key`, matching the contract used by\n // OnboardingFlow / PayrollExecutionFlow / DismissalFlow.\n const [{ initialState, currentJobId }] = useState<InitialFlowConfig>(() =>\n deriveInitialFlowConfig(jobsData.jobs ?? []),\n )\n\n const manageCompensation = useMemo(\n () =>\n createMachine(\n initialState,\n compensationStateMachine,\n (initialContext: CompensationFlowContextInterface) => ({\n ...initialContext,\n component: INITIAL_COMPONENT_BY_STATE[initialState],\n employeeId,\n startDate,\n partnerDefaultValues: defaultValues,\n currentJobId,\n }),\n ),\n // `defaultValues` is intentionally omitted: a partner-supplied prop that may\n // arrive as a fresh object reference each render and only seeds the form\n // once. `initialState` and `currentJobId` are stable values from useState\n // above, so they're listed here as honest deps but never trigger recompute.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [employeeId, startDate, initialState, currentJobId],\n )\n\n return <Flow machine={manageCompensation} onEvent={onEvent} />\n}\n\n/** @internal */\nexport const CompensationContextual = () => {\n const { employeeId, onEvent, startDate, defaultValues } = useFlow<OnboardingContextInterface>()\n const { t } = useTranslation('common')\n\n if (!employeeId || !startDate) {\n throw new Error(\n t('errors.missingParamsOrContext', {\n component: 'Compensation',\n param: !employeeId ? 'employeeId' : 'startDate',\n provider: 'FlowProvider',\n }),\n )\n }\n return (\n <Compensation\n employeeId={employeeId}\n startDate={startDate}\n onEvent={onEvent}\n defaultValues={defaultValues?.compensation}\n />\n )\n}\n\nCompensation.JobsList = JobsList\nCompensation.EditCompensation = EditCompensation\n"],"names":["INITIAL_COMPONENT_BY_STATE","InitialEditCompensationContextual","JobsListContextual","deriveInitialFlowConfig","employeeJobs","onlyJob","onlyJobCompensation","findCurrentCompensation","FlsaStatus","Compensation","props","jsx","BaseComponent","CompensationFlow","job","comp","employeeId","startDate","defaultValues","dictionary","onEvent","useComponentDictionary","jobsData","useJobsAndCompensationsGetJobsSuspense","initialState","currentJobId","useState","manageCompensation","useMemo","createMachine","compensationStateMachine","initialContext","Flow","CompensationContextual","useFlow","t","useTranslation","JobsList","EditCompensation"],"mappings":";;;;;;;;;;;;;;;AAkCA,MAAMA,IAGF;AAAA,EACF,gBAAgBC;AAAA,EAChB,UAAUC;AACZ;AAEA,SAASC,EAAwBC,GAAwC;AACvE,MAAIA,EAAa,WAAW;AAC1B,WAAO,EAAE,cAAc,kBAAkB,cAAc,KAAA;AAGzD,QAAMC,IAAUD,EAAa,WAAW,IAAKA,EAAa,CAAC,KAAK,OAAQ,MAClEE,IAAsBC,EAAwBF,CAAO;AAE3D,SAAIA,KAAWC,GAAqB,eAAeE,EAAW,YACrD,EAAE,cAAc,kBAAkB,cAAcH,EAAQ,KAAA,IAG1D,EAAE,cAAc,YAAY,cAAc,KAAA;AACnD;AA4EO,SAASI,EAAaC,GAA0B;AACrD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAkB,GAAGH,GAAO,EAAA,CAC/B;AAEJ;AAEA,MAAMH,IAA0B,CAACO,MACxBA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AAA,MACA,SAAAG;AAAA,MACA,eAAeF,GAAe;AAAA,IAAA;AAAA,EAAA;AAGpC;AAEAT,EAAa,WAAW4B;AACxB5B,EAAa,mBAAmB6B;"}
|
|
1
|
+
{"version":3,"file":"Compensation.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/Compensation.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { createMachine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { OnboardingContextInterface } from '../../OnboardingFlow/OnboardingFlowComponents'\nimport {\n InitialEditCompensationContextual,\n JobsListContextual,\n type CompensationFlowContextInterface,\n} from './CompensationFlowComponents'\nimport { compensationStateMachine } from './compensationStateMachine'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport type { PAY_PERIODS } from '@/shared/constants'\nimport { FlsaStatus } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flow } from '@/components/Flow/Flow'\nimport { useFlow } from '@/components/Flow/useFlow'\n\ntype CompensationInitialState = 'initialEditJob' | 'viewJobs'\n\ninterface InitialFlowConfig {\n initialState: CompensationInitialState\n currentJobId: string | null\n}\n\nconst INITIAL_COMPONENT_BY_STATE: Record<\n CompensationInitialState,\n React.ComponentType<CommonComponentInterface>\n> = {\n initialEditJob: InitialEditCompensationContextual,\n viewJobs: JobsListContextual,\n}\n\nfunction deriveInitialFlowConfig(employeeJobs: Job[]): InitialFlowConfig {\n if (employeeJobs.length === 0) {\n return { initialState: 'initialEditJob', currentJobId: null }\n }\n\n const onlyJob = employeeJobs.length === 1 ? (employeeJobs[0] ?? null) : null\n const onlyJobCompensation = findCurrentCompensation(onlyJob)\n\n if (onlyJob && onlyJobCompensation?.flsaStatus !== FlsaStatus.NONEXEMPT) {\n return { initialState: 'initialEditJob', currentJobId: onlyJob.uuid }\n }\n\n return { initialState: 'viewJobs', currentJobId: null }\n}\n\n/**\n * Default values for the compensation form fields.\n *\n * @remarks\n * At least one of the fields must be provided. If employee data is available\n * via the API, these values are overwritten.\n *\n * @public\n */\nexport type CompensationDefaultValues = RequireAtLeastOne<{\n /** The compensation rate (an amount in dollars). */\n rate?: Job['rate']\n /** The job title. */\n title?: Job['title']\n /** The pay period — one of `Hour`, `Week`, `Month`, `Year`, `Paycheck`. */\n paymentUnit?: (typeof PAY_PERIODS)[keyof typeof PAY_PERIODS]\n /** The FLSA classification — drives whether the role is treated as exempt, nonexempt, etc. */\n flsaStatus?: FlsaStatusType\n}>\n\n/**\n * Props for {@link Compensation}.\n *\n * @public\n */\nexport interface CompensationProps extends BaseComponentInterface<'Employee.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The date the employee will start work. */\n startDate: string\n /** Default values for the compensation form fields. If employee data is available via the API, these values are overwritten. */\n defaultValues?: CompensationDefaultValues\n}\n\n/**\n * Onboarding step for collecting an employee's role and compensation details.\n *\n * @remarks\n * Collects the job title, employee type (hourly, salary), compensation\n * amount, and pay period. For hourly employees, allows configuring multiple\n * roles. Automatically routes between editing the only job (when an employee\n * has zero or one non-Nonexempt job) and a jobs-list view (when multiple\n * roles need to be managed) on first mount; on subsequent refetches the user\n * stays on their current step.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/job/created` | Fired after a job is successfully created | {@link Job} |\n * | `employee/job/updated` | Fired after a job is successfully updated | {@link Job} |\n * | `employee/job/deleted` | Fired after a job is successfully deleted | — |\n * | `employee/compensation/updated` | Fired after compensation details are updated | {@link Compensation} |\n * | `employee/compensation/done` | Fired when compensation setup is complete and the parent flow can advance | — |\n *\n * @param props - See {@link CompensationProps}.\n * @returns The compensation onboarding step.\n * @public\n * @group Block components\n *\n * @example\n * ```tsx\n * import { EmployeeOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <EmployeeOnboarding.Compensation\n * employeeId=\"4b3f930f-82cd-48a8-b797-798686e12e5e\"\n * startDate=\"2025-01-01\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Compensation(props: CompensationProps) {\n return (\n <BaseComponent {...props}>\n <CompensationFlow {...props} />\n </BaseComponent>\n )\n}\n\nconst findCurrentCompensation = (job?: Job | null) => {\n return job?.compensations?.find(comp => comp.uuid === job.currentCompensationUuid)\n}\n\nfunction CompensationFlow({\n employeeId,\n startDate,\n defaultValues,\n dictionary,\n onEvent,\n}: CompensationProps) {\n useComponentDictionary('Employee.Compensation', dictionary)\n\n const { data: jobsData } = useJobsAndCompensationsGetJobsSuspense({ employeeId })\n\n // Capture the routing decision from the first jobsData snapshot only. Suspense\n // guarantees that snapshot is fresh on first render. Subsequent refetches (e.g.\n // the getJobs invalidation that fires between EditCompensation's awaited job +\n // compensation mutations) must NOT re-seat the machine and reset the user's\n // place in the flow. Callers needing to re-derive routing for a different\n // employee should remount via `key`, matching the contract used by\n // OnboardingFlow / PayrollExecutionFlow / DismissalFlow.\n const [{ initialState, currentJobId }] = useState<InitialFlowConfig>(() =>\n deriveInitialFlowConfig(jobsData.jobs ?? []),\n )\n\n const manageCompensation = useMemo(\n () =>\n createMachine(\n initialState,\n compensationStateMachine,\n (initialContext: CompensationFlowContextInterface) => ({\n ...initialContext,\n component: INITIAL_COMPONENT_BY_STATE[initialState],\n employeeId,\n startDate,\n partnerDefaultValues: defaultValues,\n currentJobId,\n }),\n ),\n // `defaultValues` is intentionally omitted: a partner-supplied prop that may\n // arrive as a fresh object reference each render and only seeds the form\n // once. `initialState` and `currentJobId` are stable values from useState\n // above, so they're listed here as honest deps but never trigger recompute.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [employeeId, startDate, initialState, currentJobId],\n )\n\n return <Flow machine={manageCompensation} onEvent={onEvent} />\n}\n\n/** @internal */\nexport const CompensationContextual = () => {\n const { employeeId, onEvent, startDate, defaultValues } = useFlow<OnboardingContextInterface>()\n const { t } = useTranslation('common')\n\n if (!employeeId || !startDate) {\n throw new Error(\n t('errors.missingParamsOrContext', {\n component: 'Compensation',\n param: !employeeId ? 'employeeId' : 'startDate',\n provider: 'FlowProvider',\n }),\n )\n }\n return (\n <Compensation\n employeeId={employeeId}\n startDate={startDate}\n onEvent={onEvent}\n defaultValues={defaultValues?.compensation}\n />\n )\n}\n"],"names":["INITIAL_COMPONENT_BY_STATE","InitialEditCompensationContextual","JobsListContextual","deriveInitialFlowConfig","employeeJobs","onlyJob","onlyJobCompensation","findCurrentCompensation","FlsaStatus","Compensation","props","jsx","BaseComponent","CompensationFlow","job","comp","employeeId","startDate","defaultValues","dictionary","onEvent","useComponentDictionary","jobsData","useJobsAndCompensationsGetJobsSuspense","initialState","currentJobId","useState","manageCompensation","useMemo","createMachine","compensationStateMachine","initialContext","Flow","CompensationContextual","useFlow","t","useTranslation"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,IAGF;AAAA,EACF,gBAAgBC;AAAA,EAChB,UAAUC;AACZ;AAEA,SAASC,EAAwBC,GAAwC;AACvE,MAAIA,EAAa,WAAW;AAC1B,WAAO,EAAE,cAAc,kBAAkB,cAAc,KAAA;AAGzD,QAAMC,IAAUD,EAAa,WAAW,IAAKA,EAAa,CAAC,KAAK,OAAQ,MAClEE,IAAsBC,EAAwBF,CAAO;AAE3D,SAAIA,KAAWC,GAAqB,eAAeE,EAAW,YACrD,EAAE,cAAc,kBAAkB,cAAcH,EAAQ,KAAA,IAG1D,EAAE,cAAc,YAAY,cAAc,KAAA;AACnD;AA4EO,SAASI,EAAaC,GAA0B;AACrD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAkB,GAAGH,GAAO,EAAA,CAC/B;AAEJ;AAEA,MAAMH,IAA0B,CAACO,MACxBA,GAAK,eAAe,KA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;AAAA,MACA,eAAeF,GAAe;AAAA,IAAA;AAAA,EAAA;AAGpC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Job } from '@gusto/embedded-api
|
|
2
|
-
import { Compensation } from '@gusto/embedded-api
|
|
1
|
+
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
2
|
+
import { Compensation } from '@gusto/embedded-api/models/components/compensation';
|
|
3
3
|
import { CompensationDefaultValues } from './Compensation';
|
|
4
4
|
import { FlowContextInterface } from '../../../Flow/useFlow';
|
|
5
5
|
import { componentEvents } from '../../../../shared/constants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompensationFlowComponents.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/CompensationFlowComponents.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Job } from '@gusto/embedded-api
|
|
1
|
+
{"version":3,"file":"CompensationFlowComponents.js","sources":["../../../../../src/components/Employee/Compensation/onboarding/CompensationFlowComponents.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { Compensation } from '@gusto/embedded-api/models/components/compensation'\nimport type { CompensationDefaultValues } from './Compensation'\nimport { JobsList } from './JobsList'\nimport { EditCompensation } from './EditCompensation'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, FlsaStatus, type EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/** @internal */\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_JOB_ADD]: undefined\n [componentEvents.EMPLOYEE_JOB_EDIT]: { uuid: string }\n [componentEvents.EMPLOYEE_JOB_CREATED]: Job\n [componentEvents.EMPLOYEE_JOB_UPDATED]: Job\n [componentEvents.EMPLOYEE_JOB_DELETED]: undefined\n [componentEvents.EMPLOYEE_COMPENSATION_UPDATED]: Compensation\n [componentEvents.EMPLOYEE_COMPENSATION_RETURN_TO_LIST]: undefined\n [componentEvents.EMPLOYEE_COMPENSATION_CANCEL]: undefined\n [componentEvents.EMPLOYEE_COMPENSATION_DONE]: undefined\n}\n\n/** @internal */\nexport interface CompensationFlowContextInterface extends FlowContextInterface {\n employeeId: string\n startDate: string\n currentJobId?: string | null\n partnerDefaultValues?: CompensationDefaultValues\n}\n\n/** @internal */\nexport function JobsListContextual() {\n const { employeeId, onEvent } = useFlow<CompensationFlowContextInterface>()\n return <JobsList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function InitialEditCompensationContextual() {\n const { employeeId, startDate, currentJobId, partnerDefaultValues, onEvent } =\n useFlow<CompensationFlowContextInterface>()\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n\n const handleEvent: OnEventType<EventType, unknown> = (event, data) => {\n onEvent(event, data)\n if (event === componentEvents.EMPLOYEE_COMPENSATION_UPDATED) {\n const compensation = data as Compensation\n if (compensation.flsaStatus !== FlsaStatus.NONEXEMPT) {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE)\n } else {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_RETURN_TO_LIST)\n }\n }\n }\n\n return (\n <EditCompensation\n employeeId={ensureRequired(employeeId)}\n startDate={ensureRequired(startDate)}\n currentJobId={currentJobId}\n title={t('title')}\n submitCtaLabel={t('submitCta')}\n partnerDefaultValues={partnerDefaultValues}\n onEvent={handleEvent}\n />\n )\n}\n\n/** @internal */\nexport function EditCompensationContextual() {\n const { employeeId, startDate, currentJobId, partnerDefaultValues, onEvent } =\n useFlow<CompensationFlowContextInterface>()\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n\n const handleEvent: OnEventType<EventType, unknown> = (event, data) => {\n onEvent(event, data)\n if (event === componentEvents.EMPLOYEE_COMPENSATION_UPDATED) {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_RETURN_TO_LIST)\n }\n }\n\n return (\n <EditCompensation\n employeeId={ensureRequired(employeeId)}\n startDate={ensureRequired(startDate)}\n currentJobId={currentJobId}\n title={currentJobId ? t('editTitle') : t('addTitle')}\n submitCtaLabel={t('saveNewJobCta')}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_CANCEL)\n }}\n partnerDefaultValues={partnerDefaultValues}\n onEvent={handleEvent}\n />\n )\n}\n"],"names":["JobsListContextual","employeeId","onEvent","useFlow","JobsList","ensureRequired","InitialEditCompensationContextual","startDate","currentJobId","partnerDefaultValues","useI18n","t","useTranslation","handleEvent","event","data","componentEvents","FlsaStatus","jsx","EditCompensation","EditCompensationContextual"],"mappings":";;;;;;;;AAkCO,SAASA,IAAqB;AACnC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAChC,2BAAQC,GAAA,EAAS,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AAC7E;AAGO,SAASI,IAAoC;AAClD,QAAM,EAAE,YAAAL,GAAY,WAAAM,GAAW,cAAAC,GAAc,sBAAAC,GAAsB,SAAAP,EAAA,IACjEC,EAAA;AACF,EAAAO,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAE9CC,IAA+C,CAACC,GAAOC,MAAS;AACpE,IAAAb,EAAQY,GAAOC,CAAI,GACfD,MAAUE,EAAgB,kCACPD,EACJ,eAAeE,EAAW,YACzCf,EAAQc,EAAgB,0BAA0B,IAElDd,EAAQc,EAAgB,oCAAoC;AAAA,EAGlE;AAEA,SACE,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYd,EAAeJ,CAAU;AAAA,MACrC,WAAWI,EAAeE,CAAS;AAAA,MACnC,cAAAC;AAAA,MACA,OAAOG,EAAE,OAAO;AAAA,MAChB,gBAAgBA,EAAE,WAAW;AAAA,MAC7B,sBAAAF;AAAA,MACA,SAASI;AAAA,IAAA;AAAA,EAAA;AAGf;AAGO,SAASO,IAA6B;AAC3C,QAAM,EAAE,YAAAnB,GAAY,WAAAM,GAAW,cAAAC,GAAc,sBAAAC,GAAsB,SAAAP,EAAA,IACjEC,EAAA;AACF,EAAAO,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAE9CC,IAA+C,CAACC,GAAOC,MAAS;AACpE,IAAAb,EAAQY,GAAOC,CAAI,GACfD,MAAUE,EAAgB,iCAC5Bd,EAAQc,EAAgB,oCAAoC;AAAA,EAEhE;AAEA,SACE,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYd,EAAeJ,CAAU;AAAA,MACrC,WAAWI,EAAeE,CAAS;AAAA,MACnC,cAAAC;AAAA,MACA,OAAsBG,EAAfH,IAAiB,cAAiB,UAAN;AAAA,MACnC,gBAAgBG,EAAE,eAAe;AAAA,MACjC,UAAU,MAAM;AACd,QAAAT,EAAQc,EAAgB,4BAA4B;AAAA,MACtD;AAAA,MACA,sBAAAP;AAAA,MACA,SAASI;AAAA,IAAA;AAAA,EAAA;AAGf;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as r } from "react";
|
|
3
|
-
import { useJobsAndCompensationsGetJobsSuspense as f } from "@gusto/embedded-api
|
|
4
|
-
import { useJobsAndCompensationsDeleteMutation as D } from "@gusto/embedded-api
|
|
3
|
+
import { useJobsAndCompensationsGetJobsSuspense as f } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
|
|
4
|
+
import { useJobsAndCompensationsDeleteMutation as D } from "@gusto/embedded-api/react-query/jobsAndCompensationsDelete";
|
|
5
5
|
import { derivePrimaryFlsaStatus as b } from "../../shared/derivePrimaryFlsaStatus.js";
|
|
6
6
|
import { JobsListPresentation as y } from "./JobsListPresentation.js";
|
|
7
7
|
import { BaseComponent as C } from "../../../../Base/Base.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobsList.js","sources":["../../../../../../src/components/Employee/Compensation/onboarding/JobsList/JobsList.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api
|
|
1
|
+
{"version":3,"file":"JobsList.js","sources":["../../../../../../src/components/Employee/Compensation/onboarding/JobsList/JobsList.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useJobsAndCompensationsGetJobsSuspense } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useJobsAndCompensationsDeleteMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsDelete'\nimport { derivePrimaryFlsaStatus } from '../../shared/derivePrimaryFlsaStatus'\nimport { JobsListPresentation } from './JobsListPresentation'\nimport { BaseComponent, type BaseComponentInterface, useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\n/** @public */\nexport interface JobsListProps extends BaseComponentInterface<'Employee.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Lists an employee's jobs alongside their compensation details, with controls to add, edit,\n * or remove a job.\n *\n * @remarks\n * Used for employees who hold multiple roles. The primary job's FLSA classification determines\n * whether the employee is treated as exempt or nonexempt.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/job/add` | Fired when the user chooses to add a job | none |\n * | `employee/job/edit` | Fired when the user chooses to edit a job | `{ uuid: string }` |\n * | `employee/job/deleted` | Fired after a job is successfully deleted | none |\n * | `employee/compensations/done` | Fired when the user continues past the jobs list | none |\n *\n * @param props - See {@link JobsListProps}.\n * @returns The employee's jobs list.\n * @public\n */\nexport function JobsList(props: JobsListProps) {\n useComponentDictionary('Employee.Compensation', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className }: JobsListProps) {\n useI18n('Employee.Compensation')\n const { onEvent } = useBase()\n\n const { data: jobsData } = useJobsAndCompensationsGetJobsSuspense({ employeeId })\n const employeeJobs = useMemo(() => jobsData.jobs ?? [], [jobsData.jobs])\n\n const { mutateAsync: deleteEmployeeJob, isPending: isDeleting } =\n useJobsAndCompensationsDeleteMutation()\n\n const primaryFlsaStatus = useMemo(() => derivePrimaryFlsaStatus(employeeJobs), [employeeJobs])\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_JOB_ADD)\n }\n\n const handleEdit = (jobId: string) => {\n onEvent(componentEvents.EMPLOYEE_JOB_EDIT, { uuid: jobId })\n }\n\n const handleDelete = async (jobId: string) => {\n await deleteEmployeeJob({ request: { jobId } })\n onEvent(componentEvents.EMPLOYEE_JOB_DELETED)\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE)\n }\n\n return (\n <section className={className}>\n <JobsListPresentation\n jobs={employeeJobs}\n primaryFlsaStatus={primaryFlsaStatus}\n isPending={isDeleting}\n onAdd={handleAdd}\n onEdit={handleEdit}\n onDelete={(jobId: string) => {\n void handleDelete(jobId)\n }}\n onContinue={handleContinue}\n />\n </section>\n )\n}\n"],"names":["JobsList","props","useComponentDictionary","jsx","BaseComponent","Root","employeeId","className","useI18n","onEvent","useBase","jobsData","useJobsAndCompensationsGetJobsSuspense","employeeJobs","useMemo","deleteEmployeeJob","isDeleting","useJobsAndCompensationsDeleteMutation","primaryFlsaStatus","derivePrimaryFlsaStatus","handleAdd","componentEvents","handleEdit","jobId","handleDelete","JobsListPresentation"],"mappings":";;;;;;;;;;AAmCO,SAASA,EAASC,GAAsB;AAC7C,SAAAC,EAAuB,yBAAyBD,EAAM,UAAU,GAE9D,gBAAAE,EAACC,KAAe,GAAGH,GACjB,4BAACI,GAAA,EAAM,GAAGJ,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASI,EAAK,EAAE,YAAAC,GAAY,WAAAC,KAA4B;AACtD,EAAAC,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAMC,EAAA,IAAaC,EAAuC,EAAE,YAAAN,GAAY,GAC1EO,IAAeC,EAAQ,MAAMH,EAAS,QAAQ,IAAI,CAACA,EAAS,IAAI,CAAC,GAEjE,EAAE,aAAaI,GAAmB,WAAWC,EAAA,IACjDC,EAAA,GAEIC,IAAoBJ,EAAQ,MAAMK,EAAwBN,CAAY,GAAG,CAACA,CAAY,CAAC,GAEvFO,IAAY,MAAM;AACtB,IAAAX,EAAQY,EAAgB,gBAAgB;AAAA,EAC1C,GAEMC,IAAa,CAACC,MAAkB;AACpC,IAAAd,EAAQY,EAAgB,mBAAmB,EAAE,MAAME,GAAO;AAAA,EAC5D,GAEMC,IAAe,OAAOD,MAAkB;AAC5C,UAAMR,EAAkB,EAAE,SAAS,EAAE,OAAAQ,EAAA,GAAS,GAC9Cd,EAAQY,EAAgB,oBAAoB;AAAA,EAC9C;AAMA,SACE,gBAAAlB,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACsB;AAAA,IAAA;AAAA,MACC,MAAMZ;AAAA,MACN,mBAAAK;AAAA,MACA,WAAWF;AAAA,MACX,OAAOI;AAAA,MACP,QAAQE;AAAA,MACR,UAAU,CAACC,MAAkB;AAC3B,QAAKC,EAAaD,CAAK;AAAA,MACzB;AAAA,MACA,YAfiB,MAAM;AAC3B,QAAAd,EAAQY,EAAgB,0BAA0B;AAAA,MACpD;AAAA,IAakB;AAAA,EAAA,GAEhB;AAEJ;"}
|
package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobsListPresentation.js","sources":["../../../../../../src/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api
|
|
1
|
+
{"version":3,"file":"JobsListPresentation.js","sources":["../../../../../../src/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { ActionsLayout, DataView, Flex, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { FlsaStatus } from '@/shared/constants'\n\n/** @internal */\nexport interface JobsListPresentationProps {\n /** @internal */\n jobs: Job[]\n /** @internal */\n primaryFlsaStatus: string | undefined\n /** @internal */\n isPending: boolean\n /** @internal */\n onAdd: () => void\n /** @internal */\n onEdit: (jobId: string) => void\n /** @internal */\n onDelete: (jobId: string) => void\n /** @internal */\n onContinue: () => void\n}\n\n/** @internal */\nexport function JobsListPresentation({\n jobs,\n primaryFlsaStatus,\n isPending,\n onAdd,\n onEdit,\n onDelete,\n onContinue,\n}: JobsListPresentationProps) {\n useI18n('Employee.Compensation')\n const { t } = useTranslation('Employee.Compensation')\n const Components = useComponentContext()\n\n const showAddAnotherJob = primaryFlsaStatus === FlsaStatus.NONEXEMPT\n\n const dataViewProps = useDataView({\n data: jobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => {\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n return currentComp?.title || ''\n },\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n onEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n onDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <DataView\n data-testid=\"data-view\"\n label={t('allCompensations.tableLabel')}\n {...dataViewProps}\n />\n <ActionsLayout>\n {showAddAnotherJob && (\n <Components.Button variant=\"secondary\" onClick={onAdd} isDisabled={isPending}>\n {t('addAnotherJobCta')}\n </Components.Button>\n )}\n <Components.Button onClick={onContinue} isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["JobsListPresentation","jobs","primaryFlsaStatus","isPending","onAdd","onEdit","onDelete","onContinue","useI18n","t","useTranslation","Components","useComponentContext","showAddAnotherJob","FlsaStatus","dataViewProps","useDataView","job","c","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","jsxs","Flex","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;AA6BO,SAASA,EAAqB;AAAA,EACnC,MAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAA8B;AAC5B,EAAAC,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GAEbC,IAAoBX,MAAsBY,EAAW,WAErDC,IAAgBC,EAAY;AAAA,IAChC,MAAMf;AA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nB;AAAA,YAAA;AAAA,UACF;AAAA,QAED;AAAA,QAEP,WAAWd;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,CAEH;AAED,SACE,gBAAAsB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAL,EAACV,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,OAAO,GAAE;AAAA,IACxC,gBAAAY;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,eAAY;AAAA,QACZ,OAAOlB,EAAE,6BAA6B;AAAA,QACrC,GAAGM;AAAA,MAAA;AAAA,IAAA;AAAA,sBAELa,GAAA,EACE,UAAA;AAAA,MAAAf,KACC,gBAAAQ,EAACV,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASP,GAAO,YAAYD,GAChE,UAAAM,EAAE,kBAAkB,EAAA,CACvB;AAAA,MAEF,gBAAAY,EAACV,EAAW,QAAX,EAAkB,SAASJ,GAAY,WAAWJ,GAChD,UAAAM,EAAE,WAAW,EAAA,CAChB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/shared/AddCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api-v-2026-02-01/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2026-02-01/models/components/minimumwage'\nimport type { UseJobFormReady } from './useJobForm'\nimport type { UseCompensationFormReady } from './useCompensationForm'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\n\n/**\n * Translation overrides for the shared add-compensation form body. The body\n * reads its copy from the onboarding `Employee.Compensation` namespace by\n * default; management surfaces resolve this dictionary from\n * `Employee.Management.Compensation` and pass it in so management copy renders\n * while the two surfaces stay isolated.\n *\n * @internal\n */\nexport type AddCompensationFormDictionary = ResourceDictionary<'Employee.Compensation'>\n\n/** @internal */\nexport interface AddCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n /** Per-surface translation overrides resolved against the consumer's namespace. */\n dictionary?: AddCompensationFormDictionary\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (onboarding) and\n * `CompensationAddAnotherJobForm` (management). Field visibility is driven entirely by the hook\n * configuration — `JobFields.HireDate` is only defined when `withHireDateField: true`,\n * and `CompFields.EffectiveDate` is only defined when `withEffectiveDateField: true` —\n * so this component renders the correct subset for each use case with no extra props.\n *\n * Copy resolves from the onboarding `Employee.Compensation` namespace by default; management\n * consumers inject a `dictionary` mapped from `Employee.Management.Compensation` to keep\n * onboarding and management strings independently overridable.\n *\n * @internal\n */\nexport function AddCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n dictionary,\n}: AddCompensationFormBodyProps) {\n useI18n('Employee.Compensation')\n useComponentDictionary('Employee.Compensation', dictionary)\n const { t } = useTranslation('Employee.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n {JobFields.Title && (\n <JobFields.Title\n label={t('jobTitle')}\n validationMessages={{ REQUIRED: t('validations.title') }}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDate')}\n validationMessages={{ REQUIRED: t('validations.hireDate') }}\n formHookResult={jobForm}\n />\n )}\n\n {CompFields.FlsaStatus && (\n <>\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n placeholder={t('flsaStatusPlaceholder')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n {(compensationForm.status.showCommissionFederalMinimumPayAlert ||\n compensationForm.status.showCommissionMinimumWageAlert ||\n compensationForm.status.showOwnerSalaryAlert ||\n compensationForm.status.willDeleteSecondaryJobs) && (\n <Flex flexDirection=\"column\" gap={0}>\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('validations.classificationChangeNotification')}\n status=\"warning\"\n >\n {t('validations.classificationChangeRemovesSecondaryJobs')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionFederalMinimumPayAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.federalMinimumPay.label')}\n disableScrollIntoView\n >\n {t('commissionAlerts.federalMinimumPay.body')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionMinimumWageAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.minimumWage.label')}\n disableScrollIntoView\n >\n <Trans\n t={t}\n i18nKey=\"commissionAlerts.minimumWage.body\"\n components={{\n minimumWageLink: (\n <Components.Link\n href=\"https://support.gusto.com/article/112472520100000/manage-tip-wages-distributed-service-charges-and-tip-credits-in-gusto-for-admins\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Alert>\n )}\n {compensationForm.status.showOwnerSalaryAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.ownerSalary.label')}\n disableScrollIntoView\n />\n )}\n </Flex>\n )}\n </>\n )}\n\n {CompFields.Rate && (\n <CompFields.Rate\n label={t('wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.PaymentUnit && (\n <CompFields.PaymentUnit\n label={t('wageFrequencyLabel')}\n placeholder={t('paymentUnitPlaceholder')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) => t(`paymentUnitOptions.${unit}`)}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n placeholder={t('minimumWagePlaceholder')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDate')}\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n EFFECTIVE_DATE_BEFORE_MIN: t('validations.effectiveDateBeforeMin'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentStakeholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n </Flex>\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelNewJobCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["AddCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","dictionary","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;;AAiDO,SAASA,EAAwB;AAAA,EACtC,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAiC;AAC/B,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAC1D,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,uBAAuB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AAA;AAAA,MAAAtB,KACC,gBAAAc,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAAU,YAAYD,GACnE,UAAAK,EAAE,iBAAiB,EAAA,CACtB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"AddCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/shared/AddCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { UseJobFormReady } from './useJobForm'\nimport type { UseCompensationFormReady } from './useCompensationForm'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\n\n/**\n * Translation overrides for the shared add-compensation form body. The body\n * reads its copy from the onboarding `Employee.Compensation` namespace by\n * default; management surfaces resolve this dictionary from\n * `Employee.Management.Compensation` and pass it in so management copy renders\n * while the two surfaces stay isolated.\n *\n * @internal\n */\nexport type AddCompensationFormDictionary = ResourceDictionary<'Employee.Compensation'>\n\n/** @internal */\nexport interface AddCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n /** Per-surface translation overrides resolved against the consumer's namespace. */\n dictionary?: AddCompensationFormDictionary\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (onboarding) and\n * `CompensationAddAnotherJobForm` (management). Field visibility is driven entirely by the hook\n * configuration — `JobFields.HireDate` is only defined when `withHireDateField: true`,\n * and `CompFields.EffectiveDate` is only defined when `withEffectiveDateField: true` —\n * so this component renders the correct subset for each use case with no extra props.\n *\n * Copy resolves from the onboarding `Employee.Compensation` namespace by default; management\n * consumers inject a `dictionary` mapped from `Employee.Management.Compensation` to keep\n * onboarding and management strings independently overridable.\n *\n * @internal\n */\nexport function AddCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n dictionary,\n}: AddCompensationFormBodyProps) {\n useI18n('Employee.Compensation')\n useComponentDictionary('Employee.Compensation', dictionary)\n const { t } = useTranslation('Employee.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n {JobFields.Title && (\n <JobFields.Title\n label={t('jobTitle')}\n validationMessages={{ REQUIRED: t('validations.title') }}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDate')}\n validationMessages={{ REQUIRED: t('validations.hireDate') }}\n formHookResult={jobForm}\n />\n )}\n\n {CompFields.FlsaStatus && (\n <>\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n placeholder={t('flsaStatusPlaceholder')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n {(compensationForm.status.showCommissionFederalMinimumPayAlert ||\n compensationForm.status.showCommissionMinimumWageAlert ||\n compensationForm.status.showOwnerSalaryAlert ||\n compensationForm.status.willDeleteSecondaryJobs) && (\n <Flex flexDirection=\"column\" gap={0}>\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('validations.classificationChangeNotification')}\n status=\"warning\"\n >\n {t('validations.classificationChangeRemovesSecondaryJobs')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionFederalMinimumPayAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.federalMinimumPay.label')}\n disableScrollIntoView\n >\n {t('commissionAlerts.federalMinimumPay.body')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionMinimumWageAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.minimumWage.label')}\n disableScrollIntoView\n >\n <Trans\n t={t}\n i18nKey=\"commissionAlerts.minimumWage.body\"\n components={{\n minimumWageLink: (\n <Components.Link\n href=\"https://support.gusto.com/article/112472520100000/manage-tip-wages-distributed-service-charges-and-tip-credits-in-gusto-for-admins\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Alert>\n )}\n {compensationForm.status.showOwnerSalaryAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.ownerSalary.label')}\n disableScrollIntoView\n />\n )}\n </Flex>\n )}\n </>\n )}\n\n {CompFields.Rate && (\n <CompFields.Rate\n label={t('wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.PaymentUnit && (\n <CompFields.PaymentUnit\n label={t('wageFrequencyLabel')}\n placeholder={t('paymentUnitPlaceholder')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) => t(`paymentUnitOptions.${unit}`)}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n placeholder={t('minimumWagePlaceholder')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDate')}\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n EFFECTIVE_DATE_BEFORE_MIN: t('validations.effectiveDateBeforeMin'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentStakeholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n </Flex>\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelNewJobCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["AddCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","dictionary","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;;AAiDO,SAASA,EAAwB;AAAA,EACtC,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAiC;AAC/B,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAC1D,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GACbC,IAASC,EAAmB,UAAU,GAEtCC,IAAYf,EAAQ,KAAK,QACzBgB,IAAaf,EAAiB,KAAK;AAEzC,SACE,gBAAAgB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAT,GAAM;AAAA,IAEnC,gBAAAe,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,MAAAH,EAAU,SACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,UAAU;AAAA,UACnB,oBAAoB,EAAE,UAAUA,EAAE,mBAAmB,EAAA;AAAA,UACrD,gBAAg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AU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,qBAAqB;AAAA,UAC9B,aACE,gBAAAU;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,GAAAZ;AAAA,cACA,SAAQ;AAAA,cACR,YAAY;AAAA,gBACV,QACE,gBAAAU;AAAA,kBAACR,EAAW;AAAA,kBAAX;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,KAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAEJ;AAAA,UAAA;AAAA,UAGJ,gBAAgB,CAACe,MACLjB,EAAViB,IAAY,8BAAiC,0BAAN;AAAA,UAEzC,gBAAgB1B;AAAA,QAAA;AAAA,MAAA;AAAA,MAInBe,EAAU,oBACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,uBAAuB;AAAA,UAChC,aAAaA,EAAE,6BAA6B;AAAA,UAC5C,aAAaA,EAAE,uBAAuB;AAAA,UACtC,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBT;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAEC2B,GAAA,EACE,UAAA;AAAA,MAAAtB,KACC,gBAAAc,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAAU,YAAYD,GACnE,UAAAK,EAAE,iBAAiB,EAAA,CACtB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Job } from '@gusto/embedded-api
|
|
1
|
+
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the FLSA status of the employee's primary job's current compensation,
|
|
4
4
|
* or `undefined` when there is no primary job or no resolvable current compensation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivePrimaryFlsaStatus.js","sources":["../../../../../src/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.ts"],"sourcesContent":["import type { Job } from '@gusto/embedded-api
|
|
1
|
+
{"version":3,"file":"derivePrimaryFlsaStatus.js","sources":["../../../../../src/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.ts"],"sourcesContent":["import type { Job } from '@gusto/embedded-api/models/components/job'\n\n/**\n * Returns the FLSA status of the employee's primary job's current compensation,\n * or `undefined` when there is no primary job or no resolvable current compensation.\n *\n * The primary job is the one with `primary === true`; \"current compensation\" is the\n * entry in `job.compensations` whose `uuid` matches `job.currentCompensationUuid`.\n *\n * @internal\n */\nexport function derivePrimaryFlsaStatus(jobs: Job[] | undefined): string | undefined {\n return (jobs ?? []).reduce<string | undefined>((acc, job) => {\n const comp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n if (!job.primary || !comp) return acc\n return comp.flsaStatus ?? acc\n }, undefined)\n}\n"],"names":["derivePrimaryFlsaStatus","jobs","acc","job","comp","c"],"mappings":"AAWO,SAASA,EAAwBC,GAA6C;AACnF,UAAQA,KAAQ,CAAA,GAAI,OAA2B,CAACC,GAAKC,MAAQ;AAC3D,UAAMC,IAAOD,EAAI,eAAe,KAAK,OAAKE,EAAE,SAASF,EAAI,uBAAuB;AAChF,WAAI,CAACA,EAAI,WAAW,CAACC,IAAaF,IAC3BE,EAAK,cAAcF;AAAA,EAC5B,GAAG,MAAS;AACd;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FlsaStatusType } from '@gusto/embedded-api
|
|
2
|
-
import { Job } from '@gusto/embedded-api
|
|
1
|
+
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
2
|
+
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
3
3
|
/** @internal */
|
|
4
4
|
export type PendingChangeDetail = {
|
|
5
5
|
kind: 'titleChange';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPendingCompensationChanges.js","sources":["../../../../../src/components/Employee/Compensation/shared/getPendingCompensationChanges.ts"],"sourcesContent":["import type { Compensation } from '@gusto/embedded-api-v-2026-02-01/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype'\nimport type { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport { normalizeToDate } from '@/helpers/dateFormatting'\n\n/** @internal */\nexport type PendingChangeDetail =\n | { kind: 'titleChange'; title: string }\n | { kind: 'payChange'; rate: number; paymentUnit: string }\n | { kind: 'flsaChange'; flsaStatus: FlsaStatusType }\n | { kind: 'minWageEnabled'; wage: string | null }\n | { kind: 'minWageDisabled' }\n | { kind: 'minWageChanged'; wage: string | null }\n | {\n kind: 'newJob'\n title: string | null\n rate: number | null\n paymentUnit: string | null\n }\n\n/** @internal */\nexport interface PendingCompensationChange {\n compensationUuid: string\n jobUuid: string\n effectiveDate: string\n jobTitle: string | null\n details: PendingChangeDetail[]\n /**\n * True when the job has no current (on-or-before-today) compensation —\n * i.e., the job itself hasn't started yet. The UI renders a \"Pending\"\n * badge rather than a change alert in this case.\n */\n isNewJob: boolean\n}\n\nconst startOfLocalDay = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate())\n\nconst isAfterToday = (effectiveDate: string | undefined, todayStart: Date): boolean => {\n if (!effectiveDate) return false\n const parsed = normalizeToDate(effectiveDate)\n if (!parsed) return false\n return startOfLocalDay(parsed) > todayStart\n}\n\nconst isOnOrBeforeToday = (effectiveDate: string | undefined, todayStart: Date): boolean => {\n if (!effectiveDate) return false\n const parsed = normalizeToDate(effectiveDate)\n if (!parsed) return false\n return startOfLocalDay(parsed) <= todayStart\n}\n\nconst numericRate = (rate: string | undefined): number | null => {\n if (rate === undefined || rate === '') return null\n const n = Number(rate)\n return Number.isFinite(n) ? n : null\n}\n\nfunction buildExistingJobDetails(\n baseline: Compensation,\n future: Compensation,\n): PendingChangeDetail[] {\n const details: PendingChangeDetail[] = []\n\n // Title diffs come straight from `compensation.title` — that's where the\n // value lives in the API. A future comp that doesn't carry a title (e.g.\n // a pay-only change) leaves `future.title` undefined; the `futureTitle &&`\n // guard prevents that case from emitting a spurious title change.\n const baseTitle = baseline.title ?? null\n const futureTitle = future.title ?? null\n if (futureTitle && baseTitle !== futureTitle) {\n details.push({ kind: 'titleChange', title: futureTitle })\n }\n\n const baseRate = numericRate(baseline.rate)\n const futureRate = numericRate(future.rate)\n const baseUnit = baseline.paymentUnit\n const futureUnit = future.paymentUnit\n const rateDiffers = futureRate !== null && futureRate !== baseRate\n const unitDiffers = futureUnit !== undefined && futureUnit !== baseUnit\n if ((rateDiffers || unitDiffers) && futureRate !== null && futureUnit) {\n details.push({ kind: 'payChange', rate: futureRate, paymentUnit: futureUnit })\n }\n\n if (future.flsaStatus && future.flsaStatus !== baseline.flsaStatus) {\n details.push({ kind: 'flsaChange', flsaStatus: future.flsaStatus })\n }\n\n const baseAdj = baseline.adjustForMinimumWage ?? false\n const futureAdj = future.adjustForMinimumWage ?? false\n const baseMw = baseline.minimumWages?.[0]\n const futureMw = future.minimumWages?.[0]\n\n if (!baseAdj && futureAdj) {\n details.push({ kind: 'minWageEnabled', wage: futureMw?.wage ?? null })\n } else if (baseAdj && !futureAdj) {\n details.push({ kind: 'minWageDisabled' })\n } else if (baseAdj && futureAdj) {\n if (baseMw?.uuid !== futureMw?.uuid || baseMw?.wage !== futureMw?.wage) {\n details.push({ kind: 'minWageChanged', wage: futureMw?.wage ?? null })\n }\n }\n\n return details\n}\n\nfunction buildNewJobDetails(future: Compensation): PendingChangeDetail[] {\n const rate = numericRate(future.rate)\n return [\n {\n kind: 'newJob',\n title: future.title ?? null,\n rate,\n paymentUnit: rate !== null && future.paymentUnit ? future.paymentUnit : null,\n },\n ]\n}\n\n/**\n * Returns the pending compensation changes for an employee, flattened across\n * all jobs and sorted globally by `effectiveDate` ascending.\n *\n * A pending change is any `Compensation` whose `effectiveDate` is strictly\n * after today (local midnight). When a single job has multiple future-dated\n * compensations stacked, each is returned in chronological order and the diff\n * details for the N+1th comp are computed against the Nth (rather than the\n * job's current compensation) so the bullets remain meaningful end-to-end.\n *\n * The helper returns structured deltas (a discriminated union per detail) so\n * the consuming UI is responsible for formatting them via i18n / pay-rate\n * helpers. This keeps the helper pure and trivially unit-testable.\n *\n * @internal\n */\nexport function getPendingCompensationChanges(\n jobs: Job[] | undefined,\n options: { today?: Date } = {},\n): PendingCompensationChange[] {\n if (!jobs?.length) return []\n\n const now = options.today ?? new Date()\n const todayStart = startOfLocalDay(now)\n const results: PendingCompensationChange[] = []\n\n for (const job of jobs) {\n const comps = job.compensations ?? []\n\n const futureComps = comps\n .filter(c => isAfterToday(c.effectiveDate, todayStart))\n .slice()\n .sort((a, b) => (a.effectiveDate ?? '').localeCompare(b.effectiveDate ?? ''))\n\n if (futureComps.length === 0) continue\n\n const referencedCurrent = job.currentCompensationUuid\n ? comps.find(c => c.uuid === job.currentCompensationUuid)\n : undefined\n const currentComp =\n referencedCurrent && isOnOrBeforeToday(referencedCurrent.effectiveDate, todayStart)\n ? referencedCurrent\n : null\n\n // Title lives on compensation; `job.title` is a denormalized snapshot of\n // the primary comp's title and can lag behind comp-level edits on\n // secondaries (and on primaries until the server resyncs). For UI strings\n // that contextualize a change (\"Compensation for X will change on...\"),\n // use the title from the currently-in-effect comp; for a job that hasn't\n // started yet (`currentComp === null`), fall back to the first future\n // comp's title — that's the title the job is starting with.\n const displayTitle = currentComp?.title ?? futureComps[0]?.title ?? null\n\n for (let i = 0; i < futureComps.length; i++) {\n const future = futureComps[i]!\n const baseline = i === 0 ? currentComp : futureComps[i - 1]!\n\n const details = baseline\n ? buildExistingJobDetails(baseline, future)\n : buildNewJobDetails(future)\n\n results.push({\n compensationUuid: future.uuid,\n jobUuid: job.uuid,\n effectiveDate: future.effectiveDate!,\n jobTitle: displayTitle,\n details,\n isNewJob: baseline === null,\n })\n }\n }\n\n results.sort((a, b) => a.effectiveDate.localeCompare(b.effectiveDate))\n\n return results\n}\n"],"names":["startOfLocalDay","d","isAfterToday","effectiveDate","todayStart","parsed","normalizeToDate","isOnOrBeforeToday","numericRate","rate","n","buildExistingJobDetails","baseline","future","details","baseTitle","futureTitle","baseRate","futureRate","baseUnit","futureUnit","baseAdj","futureAdj","baseMw","futureMw","buildNewJobDetails","getPendingCompensationChanges","jobs","options","now","results","job","comps","futureComps","c","a","b","referencedCurrent","currentComp","displayTitle"],"mappings":";AAmCA,MAAMA,IAAkB,CAACC,MAAY,IAAI,KAAKA,EAAE,eAAeA,EAAE,SAAA,GAAYA,EAAE,SAAS,GAElFC,IAAe,CAACC,GAAmCC,MAA8B;AACrF,MAAI,CAACD,EAAe,QAAO;AAC3B,QAAME,IAASC,EAAgBH,CAAa;AAC5C,SAAKE,IACEL,EAAgBK,CAAM,IAAID,IADb;AAEtB,GAEMG,IAAoB,CAACJ,GAAmCC,MAA8B;AAC1F,MAAI,CAACD,EAAe,QAAO;AAC3B,QAAME,IAASC,EAAgBH,CAAa;AAC5C,SAAKE,IACEL,EAAgBK,CAAM,KAAKD,IADd;AAEtB,GAEMI,IAAc,CAACC,MAA4C;AAC/D,MAAIA,MAAS,UAAaA,MAAS,GAAI,QAAO;AAC9C,QAAMC,IAAI,OAAOD,CAAI;AACrB,SAAO,OAAO,SAASC,CAAC,IAAIA,IAAI;AAClC;AAEA,SAASC,EACPC,GACAC,GACuB;AACvB,QAAMC,IAAiC,CAAA,GAMjCC,IAAYH,EAAS,SAAS,MAC9BI,IAAcH,EAAO,SAAS;AACpC,EAAIG,KAAeD,MAAcC,KAC/BF,EAAQ,KAAK,EAAE,MAAM,eAAe,OAAOE,GAAa;AAG1D,QAAMC,IAAWT,EAAYI,EAAS,IAAI,GACpCM,IAAaV,EAAYK,EAAO,IAAI,GACpCM,IAAWP,EAAS,aACpBQ,IAAaP,EAAO;AAG1B,GAFoBK,MAAe,QAAQA,MAAeD,KACtCG,MAAe,UAAaA,MAAeD,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C+B,GAAGC,OAAOD,EAAE,iBAAiB,IAAI,cAAcC,EAAE,iBAAiB,EAAE,CAAC;AAE9E,QAAIH,EAAY,WAAW,EAAG;AAE9B,UAAMI,IAAoBN,EAAI,0BAC1BC,EAAM,KAAK,OAAKE,EAAE,SAASH,EAAI,uBAAuB,IACtD,QACEO,IACJD,KAAqB9B,EAAkB8B,EAAkB,eAAejC,CAAU,IAC9EiC,IACA,MASAE,IAAeD,GAAa,SAASL,EAAY,CAAC,GAAG,SAAS;AAEpE,aAAS,IAAI,GAAG,IAAIA,EAAY,QAAQ,KAAK;AAC3C,YAAMpB,IAASoB,EAAY,CAAC,GACtBrB,IAAW,MAAM,IAAI0B,IAAcL,EAAY,IAAI,CAAC,GAEpDnB,IAAUF,IACZD,EAAwBC,GAAUC,CAAM,IACxCY,EAAmBZ,CAAM;AAE7B,MAAAiB,EAAQ,KAAK;AAAA,QACX,kBAAkBjB,EAAO;AAAA,QACzB,SAASkB,EAAI;AAAA,QACb,eAAelB,EAAO;AAAA,QACtB,UAAU0B;AAAA,QACV,SAAAzB;AAAA,QACA,UAAUF,MAAa;AAAA,MAAA,CACxB;AAAA,IACH;AAAA,EACF;AAEA,SAAAkB,EAAQ,KAAK,CAACK,GAAGC,MAAMD,EAAE,cAAc,cAAcC,EAAE,aAAa,CAAC,GAE9DN;AACT;"}
|
|
1
|
+
{"version":3,"file":"getPendingCompensationChanges.js","sources":["../../../../../src/components/Employee/Compensation/shared/getPendingCompensationChanges.ts"],"sourcesContent":["import type { Compensation } from '@gusto/embedded-api/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport { normalizeToDate } from '@/helpers/dateFormatting'\n\n/** @internal */\nexport type PendingChangeDetail =\n | { kind: 'titleChange'; title: string }\n | { kind: 'payChange'; rate: number; paymentUnit: string }\n | { kind: 'flsaChange'; flsaStatus: FlsaStatusType }\n | { kind: 'minWageEnabled'; wage: string | null }\n | { kind: 'minWageDisabled' }\n | { kind: 'minWageChanged'; wage: string | null }\n | {\n kind: 'newJob'\n title: string | null\n rate: number | null\n paymentUnit: string | null\n }\n\n/** @internal */\nexport interface PendingCompensationChange {\n compensationUuid: string\n jobUuid: string\n effectiveDate: string\n jobTitle: string | null\n details: PendingChangeDetail[]\n /**\n * True when the job has no current (on-or-before-today) compensation —\n * i.e., the job itself hasn't started yet. The UI renders a \"Pending\"\n * badge rather than a change alert in this case.\n */\n isNewJob: boolean\n}\n\nconst startOfLocalDay = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate())\n\nconst isAfterToday = (effectiveDate: string | undefined, todayStart: Date): boolean => {\n if (!effectiveDate) return false\n const parsed = normalizeToDate(effectiveDate)\n if (!parsed) return false\n return startOfLocalDay(parsed) > todayStart\n}\n\nconst isOnOrBeforeToday = (effectiveDate: string | undefined, todayStart: Date): boolean => {\n if (!effectiveDate) return false\n const parsed = normalizeToDate(effectiveDate)\n if (!parsed) return false\n return startOfLocalDay(parsed) <= todayStart\n}\n\nconst numericRate = (rate: string | undefined): number | null => {\n if (rate === undefined || rate === '') return null\n const n = Number(rate)\n return Number.isFinite(n) ? n : null\n}\n\nfunction buildExistingJobDetails(\n baseline: Compensation,\n future: Compensation,\n): PendingChangeDetail[] {\n const details: PendingChangeDetail[] = []\n\n // Title diffs come straight from `compensation.title` — that's where the\n // value lives in the API. A future comp that doesn't carry a title (e.g.\n // a pay-only change) leaves `future.title` undefined; the `futureTitle &&`\n // guard prevents that case from emitting a spurious title change.\n const baseTitle = baseline.title ?? null\n const futureTitle = future.title ?? null\n if (futureTitle && baseTitle !== futureTitle) {\n details.push({ kind: 'titleChange', title: futureTitle })\n }\n\n const baseRate = numericRate(baseline.rate)\n const futureRate = numericRate(future.rate)\n const baseUnit = baseline.paymentUnit\n const futureUnit = future.paymentUnit\n const rateDiffers = futureRate !== null && futureRate !== baseRate\n const unitDiffers = futureUnit !== undefined && futureUnit !== baseUnit\n if ((rateDiffers || unitDiffers) && futureRate !== null && futureUnit) {\n details.push({ kind: 'payChange', rate: futureRate, paymentUnit: futureUnit })\n }\n\n if (future.flsaStatus && future.flsaStatus !== baseline.flsaStatus) {\n details.push({ kind: 'flsaChange', flsaStatus: future.flsaStatus })\n }\n\n const baseAdj = baseline.adjustForMinimumWage ?? false\n const futureAdj = future.adjustForMinimumWage ?? false\n const baseMw = baseline.minimumWages?.[0]\n const futureMw = future.minimumWages?.[0]\n\n if (!baseAdj && futureAdj) {\n details.push({ kind: 'minWageEnabled', wage: futureMw?.wage ?? null })\n } else if (baseAdj && !futureAdj) {\n details.push({ kind: 'minWageDisabled' })\n } else if (baseAdj && futureAdj) {\n if (baseMw?.uuid !== futureMw?.uuid || baseMw?.wage !== futureMw?.wage) {\n details.push({ kind: 'minWageChanged', wage: futureMw?.wage ?? null })\n }\n }\n\n return details\n}\n\nfunction buildNewJobDetails(future: Compensation): PendingChangeDetail[] {\n const rate = numericRate(future.rate)\n return [\n {\n kind: 'newJob',\n title: future.title ?? null,\n rate,\n paymentUnit: rate !== null && future.paymentUnit ? future.paymentUnit : null,\n },\n ]\n}\n\n/**\n * Returns the pending compensation changes for an employee, flattened across\n * all jobs and sorted globally by `effectiveDate` ascending.\n *\n * A pending change is any `Compensation` whose `effectiveDate` is strictly\n * after today (local midnight). When a single job has multiple future-dated\n * compensations stacked, each is returned in chronological order and the diff\n * details for the N+1th comp are computed against the Nth (rather than the\n * job's current compensation) so the bullets remain meaningful end-to-end.\n *\n * The helper returns structured deltas (a discriminated union per detail) so\n * the consuming UI is responsible for formatting them via i18n / pay-rate\n * helpers. This keeps the helper pure and trivially unit-testable.\n *\n * @internal\n */\nexport function getPendingCompensationChanges(\n jobs: Job[] | undefined,\n options: { today?: Date } = {},\n): PendingCompensationChange[] {\n if (!jobs?.length) return []\n\n const now = options.today ?? new Date()\n const todayStart = startOfLocalDay(now)\n const results: PendingCompensationChange[] = []\n\n for (const job of jobs) {\n const comps = job.compensations ?? []\n\n const futureComps = comps\n .filter(c => isAfterToday(c.effectiveDate, todayStart))\n .slice()\n .sort((a, b) => (a.effectiveDate ?? '').localeCompare(b.effectiveDate ?? ''))\n\n if (futureComps.length === 0) continue\n\n const referencedCurrent = job.currentCompensationUuid\n ? comps.find(c => c.uuid === job.currentCompensationUuid)\n : undefined\n const currentComp =\n referencedCurrent && isOnOrBeforeToday(referencedCurrent.effectiveDate, todayStart)\n ? referencedCurrent\n : null\n\n // Title lives on compensation; `job.title` is a denormalized snapshot of\n // the primary comp's title and can lag behind comp-level edits on\n // secondaries (and on primaries until the server resyncs). For UI strings\n // that contextualize a change (\"Compensation for X will change on...\"),\n // use the title from the currently-in-effect comp; for a job that hasn't\n // started yet (`currentComp === null`), fall back to the first future\n // comp's title — that's the title the job is starting with.\n const displayTitle = currentComp?.title ?? futureComps[0]?.title ?? null\n\n for (let i = 0; i < futureComps.length; i++) {\n const future = futureComps[i]!\n const baseline = i === 0 ? currentComp : futureComps[i - 1]!\n\n const details = baseline\n ? buildExistingJobDetails(baseline, future)\n : buildNewJobDetails(future)\n\n results.push({\n compensationUuid: future.uuid,\n jobUuid: job.uuid,\n effectiveDate: future.effectiveDate!,\n jobTitle: displayTitle,\n details,\n isNewJob: baseline === null,\n })\n }\n }\n\n results.sort((a, b) => a.effectiveDate.localeCompare(b.effectiveDate))\n\n return results\n}\n"],"names":["startOfLocalDay","d","isAfterToday","effectiveDate","todayStart","parsed","normalizeToDate","isOnOrBeforeToday","numericRate","rate","n","buildExistingJobDetails","baseline","future","details","baseTitle","futureTitle","baseRate","futureRate","baseUnit","futureUnit","baseAdj","futureAdj","baseMw","futureMw","buildNewJobDetails","getPendingCompensationChanges","jobs","options","now","results","job","comps","futureComps","c","a","b","referencedCurrent","currentComp","displayTitle"],"mappings":";AAmCA,MAAMA,IAAkB,CAACC,MAAY,IAAI,KAAKA,EAAE,eAAeA,EAAE,SAAA,GAAYA,EAAE,SAAS,GAElFC,IAAe,CAACC,GAAmCC,MAA8B;AACrF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AAY,IAAI,CAAC,GAEpDnB,IAAUF,IACZD,EAAwBC,GAAUC,CAAM,IACxCY,EAAmBZ,CAAM;AAE7B,MAAAiB,EAAQ,KAAK;AAAA,QACX,kBAAkBjB,EAAO;AAAA,QACzB,SAASkB,EAAI;AAAA,QACb,eAAelB,EAAO;AAAA,QACtB,UAAU0B;AAAA,QACV,SAAAzB;AAAA,QACA,UAAUF,MAAa;AAAA,MAAA,CACxB;AAAA,IACH;AAAA,EACF;AAEA,SAAAkB,EAAQ,KAAK,CAACK,GAAGC,MAAMD,EAAE,cAAc,cAAcC,EAAE,aAAa,CAAC,GAE9DN;AACT;"}
|
package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export type CompensationFormData = {
|
|
|
74
74
|
*/
|
|
75
75
|
title: string
|
|
76
76
|
flsaStatus: "Exempt" | "Salaried Nonexempt" | "Nonexempt" | "Owner" | "Commission Only Exempt" | "Commission Only Nonexempt" | undefined
|
|
77
|
-
paymentUnit: "Hour" | "
|
|
77
|
+
paymentUnit: "Hour" | "Month" | "Paycheck" | "Week" | "Year"
|
|
78
78
|
rate: number
|
|
79
79
|
/**
|
|
80
80
|
* The effective date a new compensation should take effect on.
|
|
@@ -125,7 +125,7 @@ export type CompensationFormData = {
|
|
|
125
125
|
* })
|
|
126
126
|
* ```
|
|
127
127
|
*/
|
|
128
|
-
export type CompensationOptionalFieldsToRequire = { create?: ("
|
|
128
|
+
export type CompensationOptionalFieldsToRequire = { create?: ("minimumWageId" | "title")[] | undefined; update?: ("effectiveDate" | "flsaStatus" | "minimumWageId" | "paymentUnit" | "rate" | "title")[] | undefined; };
|
|
129
129
|
/** @internal */
|
|
130
130
|
export type CompensationFormOutputs = CompensationFormData;
|
|
131
131
|
/** @internal */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MinimumWage } from '@gusto/embedded-api
|
|
2
|
-
import { FlsaStatusType } from '@gusto/embedded-api
|
|
3
|
-
import { PaymentUnit } from '@gusto/embedded-api
|
|
1
|
+
import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
|
|
2
|
+
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
3
|
+
import { PaymentUnit } from '@gusto/embedded-api/models/components/compensation';
|
|
4
4
|
import { CompensationErrorCodes } from './compensationSchema';
|
|
5
5
|
import { TextInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/TextInputHookField';
|
|
6
6
|
import { SelectHookFieldProps } from '../../../../../partner-hook-utils/form/fields/SelectHookField';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { CompensationErrorCodes } from './compensationSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { NumberInputHookFieldProps } from '@/partner-hook-utils/form/fields/NumberInputHookField'\nimport type { CheckboxHookFieldProps } from '@/partner-hook-utils/form/fields/CheckboxHookField'\nimport type { DatePickerHookFieldProps } from '@/partner-hook-utils/form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n NumberInputHookField,\n CheckboxHookField,\n DatePickerHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\n/**\n * The required-field error code produced by {@link useCompensationForm} fields that only emit `REQUIRED`.\n *\n * @remarks\n * Used as the `validationMessages` key for the title, FLSA status, payment\n * unit, and minimum-wage selection fields. See {@link CompensationErrorCodes}.\n *\n * @public\n */\nexport type RequiredValidation = typeof CompensationErrorCodes.REQUIRED\n\n/**\n * Validation error codes emitted by the `rate` field of {@link useCompensationForm}.\n *\n * @remarks\n * Use these as keys in `validationMessages` on `Fields.Rate`. See\n * {@link CompensationErrorCodes} for the full description of each code.\n *\n * @public\n */\nexport type RateValidation = (typeof CompensationErrorCodes)[\n 'REQUIRED' | 'RATE_MINIMUM' | 'RATE_EXEMPT_THRESHOLD']\n\n/**\n * Validation error codes emitted by the `effectiveDate` field of {@link useCompensationForm}.\n *\n * @remarks\n * Use these as keys in `validationMessages` on `Fields.EffectiveDate`. See\n * {@link CompensationErrorCodes} for the full description of each code.\n *\n * @public\n */\nexport type EffectiveDateValidation = (typeof CompensationErrorCodes)[\n 'REQUIRED' | 'EFFECTIVE_DATE_BEFORE_HIRE' | 'EFFECTIVE_DATE_BEFORE_MIN']\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.Title` component.\n *\n * @public\n */\nexport type TitleFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\n/** @internal */\nexport function TitleField(props: TitleFieldProps) {\n return <TextInputHookField {...props} name=\"title\" />\n}\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.FlsaStatus` component.\n *\n * @public\n */\nexport type FlsaStatusFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, FlsaStatusType>\n>\n\n/** @internal */\nexport function FlsaStatusField(props: FlsaStatusFieldProps) {\n return <SelectHookField {...props} name=\"flsaStatus\" />\n}\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.Rate` component.\n *\n * @public\n */\nexport type RateFieldProps = HookFieldProps<NumberInputHookFieldProps<RateValidation>>\n\n/** @internal */\nexport function RateField(props: RateFieldProps) {\n return <NumberInputHookField {...props} name=\"rate\" format=\"currency\" min={0} />\n}\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.PaymentUnit` component.\n *\n * @public\n */\nexport type PaymentUnitFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PaymentUnit>\n>\n\n/** @internal */\nexport function PaymentUnitField(props: PaymentUnitFieldProps) {\n return <SelectHookField {...props} name=\"paymentUnit\" />\n}\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.AdjustForMinimumWage` component.\n *\n * @public\n */\nexport type AdjustForMinimumWageFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\n/** @internal */\nexport function AdjustForMinimumWageField(props: AdjustForMinimumWageFieldProps) {\n return <CheckboxHookField {...props} name=\"adjustForMinimumWage\" />\n}\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.MinimumWageId` component.\n *\n * @public\n */\nexport type MinimumWageIdFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, MinimumWage>\n>\n\n/** @internal */\nexport function MinimumWageIdField(props: MinimumWageIdFieldProps) {\n return <SelectHookField {...props} name=\"minimumWageId\" />\n}\n\n/**\n * Props accepted by {@link useCompensationForm}'s `Fields.EffectiveDate` component.\n *\n * @public\n */\nexport type EffectiveDateFieldProps = HookFieldProps<\n DatePickerHookFieldProps<EffectiveDateValidation>\n>\n\n/** @internal */\nexport function EffectiveDateField(props: EffectiveDateFieldProps) {\n return <DatePickerHookField {...props} name=\"effectiveDate\" />\n}\n"],"names":["TitleField","props","jsx","TextInputHookField","FlsaStatusField","SelectHookField","RateField","NumberInputHookField","PaymentUnitField","AdjustForMinimumWageField","CheckboxHookField","MinimumWageIdField","EffectiveDateField","DatePickerHookField"],"mappings":";;;;;;AA6DO,SAASA,EAAWC,GAAwB;AACjD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,SAAQ;AACrD;AAYO,SAASG,EAAgBH,GAA6B;AAC3D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,cAAa;AACvD;AAUO,SAASK,EAAUL,GAAuB;AAC/C,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,QAAO,QAAO,YAAW,KAAK,EAAA,CAAG;AAChF;AAYO,SAASO,EAAiBP,GAA8B;AAC7D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,eAAc;AACxD;AAUO,SAASQ,EAA0BR,GAAuC;AAC/E,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,wBAAuB;AACnE;AAYO,SAASU,EAAmBV,GAAgC;AACjE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,iBAAgB;AAC1D;AAYO,SAASW,EAAmBX,GAAgC;AACjE,SAAO,gBAAAC,EAACW,GAAA,EAAqB,GAAGZ,GAAO,MAAK,iBAAgB;AAC9D;"}
|
package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { UseFormProps } from 'react-hook-form';
|
|
3
|
-
import { Compensation, PaymentUnit } from '@gusto/embedded-api
|
|
4
|
-
import { Job } from '@gusto/embedded-api
|
|
5
|
-
import { FlsaStatusType } from '@gusto/embedded-api
|
|
6
|
-
import { MinimumWage } from '@gusto/embedded-api
|
|
3
|
+
import { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components/compensation';
|
|
4
|
+
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
5
|
+
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
6
|
+
import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
|
|
7
7
|
import { CompensationOptionalFieldsToRequire, CompensationFormData } from './compensationSchema';
|
|
8
8
|
import { TitleFieldProps, FlsaStatusFieldProps, RateFieldProps, PaymentUnitFieldProps, AdjustForMinimumWageFieldProps, MinimumWageIdFieldProps, EffectiveDateFieldProps } from './fields';
|
|
9
9
|
import { BaseFormHookReady, FieldMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
|