@gusto/embedded-react-sdk 0.57.1 → 0.57.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +32 -32
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -11
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -9
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -10
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +11 -13
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -6
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +66 -62
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js +2 -2
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js +34 -14
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.js +106 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.js +136 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +38 -20
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +78 -44
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +45 -37
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +253 -92
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.js +22 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.js +13 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +48 -43
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.js +57 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js +11 -13
- package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.js +83 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.js +84 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js +49 -44
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +109 -39
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -6
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +5 -5
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js.map +1 -1
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js +16 -17
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js +4 -4
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js.map +1 -1
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js +3 -3
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js.map +1 -1
- package/dist/components/Contractor/ContractorList/shared/useContractorList.js +6 -6
- package/dist/components/Contractor/ContractorList/shared/useContractorList.js.map +1 -1
- package/dist/components/Contractor/Dashboard/Dashboard.js +20 -20
- package/dist/components/Contractor/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js +10 -10
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js.map +1 -1
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js +8 -9
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Contractor/Landing/Landing.js +43 -39
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js +6 -8
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js.map +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +4 -4
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +8 -8
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +5 -5
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +3 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js +26 -27
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Contractor/Profile/management/ProfileEditForm.js +11 -11
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js +1 -1
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js.map +1 -1
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -9
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +18 -18
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +6 -6
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +25 -25
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +15 -15
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +25 -25
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js +12 -13
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +12 -13
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +7 -7
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +3 -4
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +6 -6
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +37 -33
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +27 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +22 -24
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +8 -9
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +14 -15
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +6 -6
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +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/SelfOnboardingFlow/SelfOnboardingComponents.js +8 -15
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +7 -8
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +7 -8
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +11 -11
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +12 -12
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +26 -26
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +56 -54
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +14 -16
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +9 -11
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +66 -64
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +6 -6
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +75 -89
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +9 -9
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +44 -46
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +63 -61
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js +14 -13
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js.map +1 -1
- package/dist/components/Payroll/helpers.js +53 -49
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/payrollTypes.js +1 -1
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +13 -16
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +2 -2
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -4
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +6 -8
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +28 -30
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/contexts/ApiProvider/payrollOffCycleReasonEnumHook.js +1 -1
- package/dist/contexts/ApiProvider/payrollOffCycleReasonEnumHook.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.js +47 -40
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/en/Company.Management.PaySchedule.json.js +37 -17
- package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +20 -10
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollList.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +8 -10
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +12 -14
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +13 -15
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +10 -12
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +14 -16
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +8 -10
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/shared/constants.js +5 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/src/components/Common/DateRangeFilter/DateRangeFilter.d.ts +2 -2
- package/dist/src/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/PayScheduleForm.d.ts +6 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.d.ts +10 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.d.ts +21 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.d.ts +34 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.d.ts +9 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +5 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +10 -10
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +12 -4
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.d.ts +19 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.d.ts +17 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.d.ts +34 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +16 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.d.ts +23 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.d.ts +25 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleManagementComponents.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +1 -1
- package/dist/src/components/Contractor/Landing/Landing.d.ts +5 -2
- package/dist/src/components/Employee/Landing/Landing.d.ts +5 -2
- package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/helpers.d.ts +22 -2
- package/dist/src/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/src/helpers/dateFormatting.d.ts +13 -0
- package/dist/src/i18n/types.d.ts +96 -6
- package/dist/src/models/external.d.ts +63 -48
- package/dist/src/shared/constants.d.ts +1 -1
- package/dist/style.css +1 -1
- package/docs/guides/endpoint-inventory.json +33 -13
- package/package.json +21 -21
|
@@ -7,20 +7,20 @@ import { JobAndPayView as C } from "./JobAndPayView.js";
|
|
|
7
7
|
import { TaxesViewWithData as E } from "./TaxesView.js";
|
|
8
8
|
import { Flex as l } from "../../Common/Flex/Flex.js";
|
|
9
9
|
import { useComponentContext as b } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
|
-
import { BaseBoundaries as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { componentEvents as
|
|
13
|
-
import { firstLastName as
|
|
10
|
+
import { BaseBoundaries as S } from "../../Base/Base.js";
|
|
11
|
+
import { useI18n as j, useComponentDictionary as B } from "../../../i18n/I18n.js";
|
|
12
|
+
import { componentEvents as N } from "../../../shared/constants.js";
|
|
13
|
+
import { firstLastName as P } from "../../../helpers/formattedStrings.js";
|
|
14
14
|
import { DocumentsCard as _ } from "../Documents/management/DocumentsCard/DocumentsCard.js";
|
|
15
|
-
function
|
|
16
|
-
employeeId:
|
|
17
|
-
dictionary:
|
|
15
|
+
function w({
|
|
16
|
+
employeeId: o,
|
|
17
|
+
dictionary: a,
|
|
18
18
|
onEvent: t,
|
|
19
19
|
selectedTab: r,
|
|
20
20
|
LoaderComponent: p,
|
|
21
21
|
className: d
|
|
22
22
|
}) {
|
|
23
|
-
|
|
23
|
+
j("Employee.Dashboard"), B("Employee.Dashboard", a);
|
|
24
24
|
const { t: n } = c("Employee.Dashboard"), u = b(), [f, D] = y("basicDetails"), s = r ?? f, h = [
|
|
25
25
|
{
|
|
26
26
|
id: "basicDetails",
|
|
@@ -44,7 +44,7 @@ function H({
|
|
|
44
44
|
}
|
|
45
45
|
];
|
|
46
46
|
return /* @__PURE__ */ i(l, { className: d, flexDirection: "column", gap: 32, children: [
|
|
47
|
-
/* @__PURE__ */ e(T, { fallback: null, children: /* @__PURE__ */ e(
|
|
47
|
+
/* @__PURE__ */ e(T, { fallback: null, children: /* @__PURE__ */ e(H, { employeeId: o }) }),
|
|
48
48
|
/* @__PURE__ */ i(l, { flexDirection: "column", gap: 8, children: [
|
|
49
49
|
/* @__PURE__ */ e(
|
|
50
50
|
u.Tabs,
|
|
@@ -53,19 +53,19 @@ function H({
|
|
|
53
53
|
selectedId: s,
|
|
54
54
|
onSelectionChange: (x) => {
|
|
55
55
|
const m = x;
|
|
56
|
-
D(m), t(
|
|
56
|
+
D(m), t(N.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: m });
|
|
57
57
|
},
|
|
58
58
|
"aria-label": n("tabsLabel")
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
/* @__PURE__ */ i(l, { flexDirection: "column", gap: 24, children: [
|
|
62
|
-
s === "basicDetails" && /* @__PURE__ */ e(g, { employeeId:
|
|
63
|
-
s === "jobAndPay" && /* @__PURE__ */ e(C, { employeeId:
|
|
64
|
-
s === "taxes" && /* @__PURE__ */ e(E, { employeeId:
|
|
62
|
+
s === "basicDetails" && /* @__PURE__ */ e(g, { employeeId: o, onEvent: t }),
|
|
63
|
+
s === "jobAndPay" && /* @__PURE__ */ e(C, { employeeId: o, onEvent: t }),
|
|
64
|
+
s === "taxes" && /* @__PURE__ */ e(E, { employeeId: o, onEvent: t }),
|
|
65
65
|
s === "documents" && /* @__PURE__ */ e(
|
|
66
66
|
_,
|
|
67
67
|
{
|
|
68
|
-
employeeId:
|
|
68
|
+
employeeId: o,
|
|
69
69
|
onEvent: t,
|
|
70
70
|
LoaderComponent: p
|
|
71
71
|
}
|
|
@@ -74,23 +74,23 @@ function H({
|
|
|
74
74
|
] })
|
|
75
75
|
] });
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
const { t:
|
|
79
|
-
data: {
|
|
80
|
-
} = A({ employeeId:
|
|
77
|
+
function H({ employeeId: o }) {
|
|
78
|
+
const { t: a } = c("Employee.Dashboard"), t = b(), {
|
|
79
|
+
data: { employeeShow: r }
|
|
80
|
+
} = A({ employeeId: o });
|
|
81
81
|
return /* @__PURE__ */ i(l, { flexDirection: "column", gap: 4, children: [
|
|
82
|
-
/* @__PURE__ */ e(t.Heading, { as: "h2", children:
|
|
83
|
-
/* @__PURE__ */ e(t.Text, { variant: "supporting", children:
|
|
82
|
+
/* @__PURE__ */ e(t.Heading, { as: "h2", children: P({ first_name: r?.firstName, last_name: r?.lastName }) }),
|
|
83
|
+
/* @__PURE__ */ e(t.Text, { variant: "supporting", children: a("employeeRoleLabel") })
|
|
84
84
|
] });
|
|
85
85
|
}
|
|
86
|
-
function Q({ FallbackComponent:
|
|
86
|
+
function Q({ FallbackComponent: o, LoaderComponent: a, ...t }) {
|
|
87
87
|
return /* @__PURE__ */ e(
|
|
88
|
-
|
|
88
|
+
S,
|
|
89
89
|
{
|
|
90
90
|
componentName: "Employee.Dashboard",
|
|
91
|
-
FallbackComponent:
|
|
92
|
-
LoaderComponent:
|
|
93
|
-
children: /* @__PURE__ */ e(
|
|
91
|
+
FallbackComponent: o,
|
|
92
|
+
LoaderComponent: a,
|
|
93
|
+
children: /* @__PURE__ */ e(w, { ...t, LoaderComponent: a })
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.js","sources":["../../../../src/components/Employee/Dashboard/Dashboard.tsx"],"sourcesContent":["import { Suspense, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { BasicDetailsView } from './BasicDetailsView'\nimport { JobAndPayView } from './JobAndPayView'\nimport { TaxesViewWithData } from './TaxesView'\nimport { DocumentsCard } from '@/components/Employee/Documents/management/DocumentsCard'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/** @public */\nexport type DashboardTab = 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents'\n\n/** @public */\nexport interface DashboardProps extends BaseComponentInterface<'Employee.Dashboard'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The currently active tab. Defaults to `'basicDetails'` when uncontrolled. */\n selectedTab?: DashboardTab\n}\n\nfunction DashboardRoot({\n employeeId,\n dictionary,\n onEvent,\n selectedTab: controlledTab,\n LoaderComponent,\n className,\n}: DashboardProps) {\n useI18n('Employee.Dashboard')\n useComponentDictionary('Employee.Dashboard', dictionary)\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const [internalTab, setInternalTab] = useState<DashboardTab>('basicDetails')\n const selectedTab = controlledTab ?? internalTab\n\n const tabs = [\n {\n id: 'basicDetails' as const,\n label: t('tabs.basicDetails'),\n content: null,\n },\n {\n id: 'jobAndPay' as const,\n label: t('tabs.jobAndPay'),\n content: null,\n },\n {\n id: 'taxes' as const,\n label: t('tabs.taxes'),\n content: null,\n },\n {\n id: 'documents' as const,\n label: t('tabs.documents'),\n content: null,\n },\n ]\n\n return (\n <Flex className={className} flexDirection=\"column\" gap={32}>\n <Suspense fallback={null}>\n <DashboardHeader employeeId={employeeId} />\n </Suspense>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n const next = id as DashboardTab\n setInternalTab(next)\n onEvent(componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: next })\n }}\n aria-label={t('tabsLabel')}\n />\n\n <Flex flexDirection=\"column\" gap={24}>\n {selectedTab === 'basicDetails' && (\n <BasicDetailsView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'jobAndPay' && (\n <JobAndPayView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'taxes' && (\n <TaxesViewWithData employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'documents' && (\n <DocumentsCard\n employeeId={employeeId}\n onEvent={onEvent}\n LoaderComponent={LoaderComponent}\n />\n )}\n </Flex>\n </Flex>\n </Flex>\n )\n}\n\nfunction DashboardHeader({ employeeId }: { employeeId: string }) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {firstLastName({ first_name: employee?.firstName, last_name: employee?.lastName })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('employeeRoleLabel')}</Components.Text>\n </Flex>\n )\n}\n\n/**\n * Employee self-service dashboard summarizing a single employee's basic details, job and pay, taxes, and documents.\n *\n * @remarks\n * Renders a tabbed overview of the employee, wrapped in the SDK's standard error and suspense\n * boundaries. The active tab may be controlled via `selectedTab` or left uncontrolled, in which\n * case it defaults to basic details. Each tab composes the read-only section cards listed below.\n *\n * @components\n * - {@link ProfileCard}\n * - {@link HomeAddressCard}\n * - {@link WorkAddressCard}\n * - {@link CompensationCard}\n * - {@link PaymentMethodCard}\n * - {@link DeductionsCard}\n * - {@link PaystubsCard}\n * - {@link FederalTaxesCard}\n * - {@link StateTaxesCard}\n * - {@link DocumentsCard}\n *\n * @param props - Component props. See {@link DashboardProps}.\n * @returns A React element rendering the employee dashboard.\n * @public\n */\nexport function Dashboard({ FallbackComponent, LoaderComponent, ...props }: DashboardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Dashboard\"\n FallbackComponent={FallbackComponent}\n LoaderComponent={LoaderComponent}\n >\n <DashboardRoot {...props} LoaderComponent={LoaderComponent} />\n </BaseBoundaries>\n )\n}\n"],"names":["DashboardRoot","employeeId","dictionary","onEvent","controlledTab","LoaderComponent","className","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","internalTab","setInternalTab","useState","selectedTab","tabs","Flex","jsx","Suspense","DashboardHeader","jsxs","id","next","componentEvents","BasicDetailsView","JobAndPayView","TaxesViewWithData","DocumentsCard","employee","useEmployeesGetSuspense","firstLastName","Dashboard","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;AAyBA,SAASA,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAaC;AAAA,EACb,iBAAAC;AAAA,EACA,WAAAC;AACF,GAAmB;AACjB,EAAAC,EAAQ,oBAAoB,GAC5BC,EAAuB,sBAAsBN,CAAU;AACvD,QAAM,EAAE,GAAAO,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,CAACC,GAAaC,CAAc,IAAIC,EAAuB,cAAc,GACrEC,IAAcZ,KAAiBS,GAE/BI,IAAO;AAAA,IACX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOR,EAAE,mBAAmB;AAAA,MAC5B,SAAS;AAAA,IAAA;AAAA,IAEX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOA,EAAE,gBAAgB;AAAA,MACzB,SAAS;AAAA,IAAA;AAAA,IAEX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOA,EAAE,YAAY;AAAA,MACrB,SAAS;AAAA,IAAA;AAAA,IAEX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOA,EAAE,gBAAgB;AAAA,MACzB,SAAS;AAAA,IAAA;AAAA,EACX;AAGF,2BACGS,GAAA,EAAK,WAAAZ,GAAsB,eAAc,UAAS,KAAK,IACtD,UAAA;AAAA,IAAA,gBAAAa,EAACC,KAAS,UAAU,MAClB,UAAA,gBAAAD,EAACE,GAAA,EAAgB,YAAApB,GAAwB,GAC3C;AAAA,IAEA,gBAAAqB,EAACJ,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACR,EAAW;AAAA,QAAX;AAAA,UACC,MAAAM;AAAA,UACA,YAAYD;AAAA,UACZ,mBAAmB,CAAAO,MAAM;AACvB,kBAAMC,IAAOD;AACb,YAAAT,EAAeU,CAAI,GACnBrB,EAAQsB,EAAgB,+BAA+B,EAAE,KAAKD,GAAM;AAAA,UACtE;AAAA,UACA,cAAYf,EAAE,WAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAG3B,gBAAAa,EAACJ,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,QAAAF,MAAgB,kBACf,gBAAAG,EAACO,GAAA,EAAiB,YAAAzB,GAAwB,SAAAE,GAAkB;AAAA,QAG7Da,MAAgB,eACf,gBAAAG,EAACQ,GAAA,EAAc,YAAA1B,GAAwB,SAAAE,GAAkB;AAAA,QAG1Da,MAAgB,WACf,gBAAAG,EAACS,GAAA,EAAkB,YAAA3B,GAAwB,SAAAE,GAAkB;AAAA,QAG9Da,MAAgB,eACf,gBAAAG;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,YAAA5B;AAAA,YACA,SAAAE;AAAA,YACA,iBAAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACF,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;AAEA,SAASgB,EAAgB,EAAE,YAAApB,KAAsC;AAC/D,QAAM,EAAE,GAAAQ,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb;AAAA,IACJ,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"Dashboard.js","sources":["../../../../src/components/Employee/Dashboard/Dashboard.tsx"],"sourcesContent":["import { Suspense, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { BasicDetailsView } from './BasicDetailsView'\nimport { JobAndPayView } from './JobAndPayView'\nimport { TaxesViewWithData } from './TaxesView'\nimport { DocumentsCard } from '@/components/Employee/Documents/management/DocumentsCard'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/** @public */\nexport type DashboardTab = 'basicDetails' | 'jobAndPay' | 'taxes' | 'documents'\n\n/** @public */\nexport interface DashboardProps extends BaseComponentInterface<'Employee.Dashboard'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The currently active tab. Defaults to `'basicDetails'` when uncontrolled. */\n selectedTab?: DashboardTab\n}\n\nfunction DashboardRoot({\n employeeId,\n dictionary,\n onEvent,\n selectedTab: controlledTab,\n LoaderComponent,\n className,\n}: DashboardProps) {\n useI18n('Employee.Dashboard')\n useComponentDictionary('Employee.Dashboard', dictionary)\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const [internalTab, setInternalTab] = useState<DashboardTab>('basicDetails')\n const selectedTab = controlledTab ?? internalTab\n\n const tabs = [\n {\n id: 'basicDetails' as const,\n label: t('tabs.basicDetails'),\n content: null,\n },\n {\n id: 'jobAndPay' as const,\n label: t('tabs.jobAndPay'),\n content: null,\n },\n {\n id: 'taxes' as const,\n label: t('tabs.taxes'),\n content: null,\n },\n {\n id: 'documents' as const,\n label: t('tabs.documents'),\n content: null,\n },\n ]\n\n return (\n <Flex className={className} flexDirection=\"column\" gap={32}>\n <Suspense fallback={null}>\n <DashboardHeader employeeId={employeeId} />\n </Suspense>\n\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Tabs\n tabs={tabs}\n selectedId={selectedTab}\n onSelectionChange={id => {\n const next = id as DashboardTab\n setInternalTab(next)\n onEvent(componentEvents.EMPLOYEE_DASHBOARD_TAB_CHANGE, { tab: next })\n }}\n aria-label={t('tabsLabel')}\n />\n\n <Flex flexDirection=\"column\" gap={24}>\n {selectedTab === 'basicDetails' && (\n <BasicDetailsView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'jobAndPay' && (\n <JobAndPayView employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'taxes' && (\n <TaxesViewWithData employeeId={employeeId} onEvent={onEvent} />\n )}\n\n {selectedTab === 'documents' && (\n <DocumentsCard\n employeeId={employeeId}\n onEvent={onEvent}\n LoaderComponent={LoaderComponent}\n />\n )}\n </Flex>\n </Flex>\n </Flex>\n )\n}\n\nfunction DashboardHeader({ employeeId }: { employeeId: string }) {\n const { t } = useTranslation('Employee.Dashboard')\n const Components = useComponentContext()\n const {\n data: { employeeShow: employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {firstLastName({ first_name: employee?.firstName, last_name: employee?.lastName })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('employeeRoleLabel')}</Components.Text>\n </Flex>\n )\n}\n\n/**\n * Employee self-service dashboard summarizing a single employee's basic details, job and pay, taxes, and documents.\n *\n * @remarks\n * Renders a tabbed overview of the employee, wrapped in the SDK's standard error and suspense\n * boundaries. The active tab may be controlled via `selectedTab` or left uncontrolled, in which\n * case it defaults to basic details. Each tab composes the read-only section cards listed below.\n *\n * @components\n * - {@link ProfileCard}\n * - {@link HomeAddressCard}\n * - {@link WorkAddressCard}\n * - {@link CompensationCard}\n * - {@link PaymentMethodCard}\n * - {@link DeductionsCard}\n * - {@link PaystubsCard}\n * - {@link FederalTaxesCard}\n * - {@link StateTaxesCard}\n * - {@link DocumentsCard}\n *\n * @param props - Component props. See {@link DashboardProps}.\n * @returns A React element rendering the employee dashboard.\n * @public\n */\nexport function Dashboard({ FallbackComponent, LoaderComponent, ...props }: DashboardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Dashboard\"\n FallbackComponent={FallbackComponent}\n LoaderComponent={LoaderComponent}\n >\n <DashboardRoot {...props} LoaderComponent={LoaderComponent} />\n </BaseBoundaries>\n )\n}\n"],"names":["DashboardRoot","employeeId","dictionary","onEvent","controlledTab","LoaderComponent","className","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","internalTab","setInternalTab","useState","selectedTab","tabs","Flex","jsx","Suspense","DashboardHeader","jsxs","id","next","componentEvents","BasicDetailsView","JobAndPayView","TaxesViewWithData","DocumentsCard","employee","useEmployeesGetSuspense","firstLastName","Dashboard","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;AAyBA,SAASA,EAAc;AAAA,EACrB,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAaC;AAAA,EACb,iBAAAC;AAAA,EACA,WAAAC;AACF,GAAmB;AACjB,EAAAC,EAAQ,oBAAoB,GAC5BC,EAAuB,sBAAsBN,CAAU;AACvD,QAAM,EAAE,GAAAO,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,CAACC,GAAaC,CAAc,IAAIC,EAAuB,cAAc,GACrEC,IAAcZ,KAAiBS,GAE/BI,IAAO;AAAA,IACX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOR,EAAE,mBAAmB;AAAA,MAC5B,SAAS;AAAA,IAAA;AAAA,IAEX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOA,EAAE,gBAAgB;AAAA,MACzB,SAAS;AAAA,IAAA;AAAA,IAEX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOA,EAAE,YAAY;AAAA,MACrB,SAAS;AAAA,IAAA;AAAA,IAEX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOA,EAAE,gBAAgB;AAAA,MACzB,SAAS;AAAA,IAAA;AAAA,EACX;AAGF,2BACGS,GAAA,EAAK,WAAAZ,GAAsB,eAAc,UAAS,KAAK,IACtD,UAAA;AAAA,IAAA,gBAAAa,EAACC,KAAS,UAAU,MAClB,UAAA,gBAAAD,EAACE,GAAA,EAAgB,YAAApB,GAAwB,GAC3C;AAAA,IAEA,gBAAAqB,EAACJ,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACR,EAAW;AAAA,QAAX;AAAA,UACC,MAAAM;AAAA,UACA,YAAYD;AAAA,UACZ,mBAAmB,CAAAO,MAAM;AACvB,kBAAMC,IAAOD;AACb,YAAAT,EAAeU,CAAI,GACnBrB,EAAQsB,EAAgB,+BAA+B,EAAE,KAAKD,GAAM;AAAA,UACtE;AAAA,UACA,cAAYf,EAAE,WAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAG3B,gBAAAa,EAACJ,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,QAAAF,MAAgB,kBACf,gBAAAG,EAACO,GAAA,EAAiB,YAAAzB,GAAwB,SAAAE,GAAkB;AAAA,QAG7Da,MAAgB,eACf,gBAAAG,EAACQ,GAAA,EAAc,YAAA1B,GAAwB,SAAAE,GAAkB;AAAA,QAG1Da,MAAgB,WACf,gBAAAG,EAACS,GAAA,EAAkB,YAAA3B,GAAwB,SAAAE,GAAkB;AAAA,QAG9Da,MAAgB,eACf,gBAAAG;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,YAAA5B;AAAA,YACA,SAAAE;AAAA,YACA,iBAAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACF,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;AAEA,SAASgB,EAAgB,EAAE,YAAApB,KAAsC;AAC/D,QAAM,EAAE,GAAAQ,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb;AAAA,IACJ,MAAM,EAAE,cAAckB,EAAA;AAAA,EAAS,IAC7BC,EAAwB,EAAE,YAAA9B,GAAY;AAE1C,SACE,gBAAAqB,EAACJ,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAqB,EAAc,EAAE,YAAYF,GAAU,WAAW,WAAWA,GAAU,SAAA,CAAU,GACnF;AAAA,IACA,gBAAAX,EAACR,EAAW,MAAX,EAAgB,SAAQ,cAAc,UAAAF,EAAE,mBAAmB,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;AA0BO,SAASwB,EAAU,EAAE,mBAAAC,GAAmB,iBAAA7B,GAAiB,GAAG8B,KAAyB;AAC1F,SACE,gBAAAhB;AAAA,IAACiB;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAF;AAAA,MACA,iBAAA7B;AAAA,MAEA,UAAA,gBAAAc,EAACnB,GAAA,EAAe,GAAGmC,GAAO,iBAAA9B,EAAA,CAAkC;AAAA,IAAA;AAAA,EAAA;AAGlE;"}
|
|
@@ -4,8 +4,6 @@ import { useDeductionsList as A } from "../../shared/useDeductionsList.js";
|
|
|
4
4
|
import { useDeleteDeduction as P } from "../../shared/useDeleteDeduction.js";
|
|
5
5
|
import { DeleteDeductionDialog as N } from "../../shared/DeleteDeductionDialog.js";
|
|
6
6
|
import { formatDeductionAmount as S } from "../../shared/formatDeductionAmount.js";
|
|
7
|
-
import "classnames";
|
|
8
|
-
import { componentEvents as s } from "../../../../../shared/constants.js";
|
|
9
7
|
import { Loading as b } from "../../../../Common/Loading/Loading.js";
|
|
10
8
|
import { EmptyData as k } from "../../../../Common/EmptyData/EmptyData.js";
|
|
11
9
|
import { HamburgerMenu as x } from "../../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
@@ -13,33 +11,34 @@ import { BaseBoundaries as B, BaseLayout as U } from "../../../../Base/Base.js";
|
|
|
13
11
|
import { useComponentContext as w } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
12
|
import u from "../../../../../hooks/useNumberFormatter.js";
|
|
15
13
|
import { useI18n as O } from "../../../../../i18n/I18n.js";
|
|
14
|
+
import { componentEvents as s } from "../../../../../shared/constants.js";
|
|
16
15
|
import v from "../../../../../assets/icons/plus-circle.svg.js";
|
|
17
16
|
import G from "../../../../../assets/icons/trashcan.svg.js";
|
|
18
17
|
import R from "../../../../../assets/icons/pencil.svg.js";
|
|
19
18
|
import { useDataView as H } from "../../../../Common/DataView/useDataView.js";
|
|
20
19
|
import { DataView as I } from "../../../../Common/DataView/DataView.js";
|
|
21
|
-
function
|
|
20
|
+
function de({ LoaderComponent: o, ...r }) {
|
|
22
21
|
return /* @__PURE__ */ i(
|
|
23
22
|
B,
|
|
24
23
|
{
|
|
25
24
|
componentName: "Employee.Management.Deductions",
|
|
26
|
-
LoaderComponent:
|
|
27
|
-
children: /* @__PURE__ */ i(j, { LoaderComponent:
|
|
25
|
+
LoaderComponent: o,
|
|
26
|
+
children: /* @__PURE__ */ i(j, { LoaderComponent: o, ...r })
|
|
28
27
|
}
|
|
29
28
|
);
|
|
30
29
|
}
|
|
31
|
-
function j({ employeeId:
|
|
30
|
+
function j({ employeeId: o, onEvent: r, LoaderComponent: D }) {
|
|
32
31
|
O("Employee.Management.Deductions");
|
|
33
|
-
const { t: e } = _("Employee.Management.Deductions"), d = w(), p = u("currency"), f = u("percent"),
|
|
32
|
+
const { t: e } = _("Employee.Management.Deductions"), d = w(), p = u("currency"), f = u("percent"), n = A({ employeeId: o }), {
|
|
34
33
|
pendingDeleteDeduction: c,
|
|
35
34
|
setPendingDeleteDeduction: m,
|
|
36
35
|
handleConfirmDelete: g
|
|
37
36
|
} = P(async (t) => {
|
|
38
|
-
if (
|
|
39
|
-
const a = await
|
|
37
|
+
if (n.isLoading) return;
|
|
38
|
+
const a = await n.actions.onDelete(t);
|
|
40
39
|
a && r(s.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED, a.data.garnishment);
|
|
41
|
-
}), E =
|
|
42
|
-
r(s.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED, { employeeId:
|
|
40
|
+
}), E = n.isLoading && n.errorHandling.errors.length === 0, C = n.isLoading ? [] : n.data.deductions, l = n.isLoading ? void 0 : n.status.deletingGarnishmentUuid, h = () => {
|
|
41
|
+
r(s.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED, { employeeId: o });
|
|
43
42
|
}, y = (t) => {
|
|
44
43
|
r(s.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED, t);
|
|
45
44
|
}, L = [
|
|
@@ -91,7 +90,7 @@ function j({ employeeId: n, onEvent: r, LoaderComponent: D }) {
|
|
|
91
90
|
),
|
|
92
91
|
emptyState: () => /* @__PURE__ */ i(k, { title: e("emptyState.title"), description: e("emptyState.description") })
|
|
93
92
|
});
|
|
94
|
-
return /* @__PURE__ */ T(U, { error:
|
|
93
|
+
return /* @__PURE__ */ T(U, { error: n.errorHandling.errors, LoaderComponent: D, children: [
|
|
95
94
|
/* @__PURE__ */ i(
|
|
96
95
|
d.Box,
|
|
97
96
|
{
|
|
@@ -128,6 +127,6 @@ function j({ employeeId: n, onEvent: r, LoaderComponent: D }) {
|
|
|
128
127
|
] });
|
|
129
128
|
}
|
|
130
129
|
export {
|
|
131
|
-
|
|
130
|
+
de as DeductionsCard
|
|
132
131
|
};
|
|
133
132
|
//# sourceMappingURL=DeductionsCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeductionsCard.js","sources":["../../../../../../src/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { useDeductionsList } from '../../shared/useDeductionsList'\nimport { useDeleteDeduction } from '../../shared/useDeleteDeduction'\nimport { DeleteDeductionDialog } from '../../shared/DeleteDeductionDialog'\nimport { formatDeductionAmount } from '../../shared/formatDeductionAmount'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { LoaderComponentType } from '@/components/Base'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\n/**\n * Props for {@link DeductionsCard}.\n *\n * @public\n */\nexport interface DeductionsCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link DeductionsCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n /** Custom loading indicator rendered while this component's async data is fetching. Overrides the indicator configured on `GustoProvider` for this instance only. */\n LoaderComponent?: LoaderComponentType\n}\n\n/**\n * Standalone read-only card listing an employee's active deductions, with affordances to add, edit, or delete a deduction.\n *\n * @remarks\n * Fetches its own data and owns the delete confirm dialog. Has no alert API — alert rendering is the consumer's responsibility. Add and edit affordances do not open a form themselves; emit-then-route is the contract, so the consumer listens for the `addRequested` / `editRequested` events and renders {@link DeductionsEditForm} (or its own equivalent) accordingly. For an orchestrated card-plus-form flow, use {@link Deductions} instead.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/deductions/card/addRequested` | Fired when the \"Add deduction\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a deduction | The matching `Garnishment` |\n * | `employee/management/deductions/card/deleted` | Fired after a deduction is deleted via the confirm dialog | The deleted `Garnishment` |\n *\n * @param props - See {@link DeductionsCardProps}.\n * @returns The rendered deductions card.\n * @public\n */\nexport function DeductionsCard({ LoaderComponent, ...props }: DeductionsCardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Deductions\"\n LoaderComponent={LoaderComponent}\n >\n <DeductionsCardContent LoaderComponent={LoaderComponent} {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsCardContent({ employeeId, onEvent, LoaderComponent }: DeductionsCardProps) {\n useI18n('Employee.Management.Deductions')\n const { t } = useTranslation('Employee.Management.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const deductionsList = useDeductionsList({ employeeId })\n\n const {\n pendingDeleteDeduction,\n setPendingDeleteDeduction,\n handleConfirmDelete: handleConfirmDeleteDeduction,\n } = useDeleteDeduction(async garnishment => {\n if (deductionsList.isLoading) return\n const result = await deductionsList.actions.onDelete(garnishment)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED, result.data.garnishment)\n }\n })\n\n // `useDeductionsList` returns `isLoading: true` even when the query has\n // errored and `data` is missing. Treat those rows as \"not loading\" so the\n // section doesn't show a perpetual skeleton while BaseLayout already\n // renders the error alert.\n const isDeductionsLoading =\n deductionsList.isLoading && deductionsList.errorHandling.errors.length === 0\n\n const deductions = deductionsList.isLoading ? [] : deductionsList.data.deductions\n const deletingGarnishmentUuid = deductionsList.isLoading\n ? undefined\n : deductionsList.status.deletingGarnishmentUuid\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleEdit = (garnishment: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED, garnishment)\n }\n\n const garnishmentsColumns = [\n {\n key: 'description',\n title: t('columns.deduction'),\n render: (garnishment: Garnishment) => garnishment.description || '-',\n },\n {\n key: 'frequency',\n title: t('columns.frequency'),\n render: (garnishment: Garnishment) => (garnishment.recurring ? t('recurring') : t('oneTime')),\n },\n {\n key: 'amount',\n title: t('columns.withhold'),\n justify: 'end' as const,\n render: (garnishment: Garnishment) =>\n formatDeductionAmount(garnishment, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('amountPerPaycheck', { value }),\n }),\n },\n ]\n\n const garnishmentsDataView = useDataView({\n data: deductions,\n columns: garnishmentsColumns,\n itemMenu: (garnishment: Garnishment) => (\n <HamburgerMenu\n isLoading={deletingGarnishmentUuid === garnishment.uuid}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(garnishment)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n setPendingDeleteDeduction(garnishment)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n />\n ),\n emptyState: () => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n ),\n })\n\n return (\n <BaseLayout error={deductionsList.errorHandling.errors} LoaderComponent={LoaderComponent}>\n <Components.Box\n withPadding={false}\n header={\n <Components.BoxHeader\n title={t('title')}\n action={\n <Components.Button variant=\"secondary\" onClick={handleAdd} icon={<PlusCircleIcon />}>\n {t('addDeductionCta')}\n </Components.Button>\n }\n />\n }\n >\n {isDeductionsLoading ? (\n <Loading />\n ) : (\n <DataView label={t('listLabel')} isWithinBox {...garnishmentsDataView} />\n )}\n </Components.Box>\n\n <DeleteDeductionDialog\n pendingDeleteDeduction={pendingDeleteDeduction}\n isPrimaryActionLoading={deletingGarnishmentUuid === pendingDeleteDeduction?.uuid}\n onClose={() => {\n setPendingDeleteDeduction(null)\n }}\n onConfirm={() => {\n void handleConfirmDeleteDeduction()\n }}\n title={t('deleteDeductionDialog.title')}\n description={t('deleteDeductionDialog.description', {\n deduction: pendingDeleteDeduction?.description ?? '',\n })}\n confirmLabel={t('deleteDeductionDialog.confirmCta')}\n cancelLabel={t('deleteDeductionDialog.cancelCta')}\n />\n </BaseLayout>\n )\n}\n"],"names":["DeductionsCard","LoaderComponent","props","jsx","BaseBoundaries","DeductionsCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","deductionsList","useDeductionsList","pendingDeleteDeduction","setPendingDeleteDeduction","handleConfirmDeleteDeduction","useDeleteDeduction","garnishment","result","componentEvents","isDeductionsLoading","deductions","deletingGarnishmentUuid","handleAdd","handleEdit","garnishmentsColumns","formatDeductionAmount","value","garnishmentsDataView","useDataView","HamburgerMenu","PencilSvg","TrashCanSvg","EmptyData","BaseLayout","PlusCircleIcon","Loading","DataView","DeleteDeductionDialog"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"DeductionsCard.js","sources":["../../../../../../src/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { useDeductionsList } from '../../shared/useDeductionsList'\nimport { useDeleteDeduction } from '../../shared/useDeleteDeduction'\nimport { DeleteDeductionDialog } from '../../shared/DeleteDeductionDialog'\nimport { formatDeductionAmount } from '../../shared/formatDeductionAmount'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { LoaderComponentType } from '@/components/Base'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\n/**\n * Props for {@link DeductionsCard}.\n *\n * @public\n */\nexport interface DeductionsCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link DeductionsCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n /** Custom loading indicator rendered while this component's async data is fetching. Overrides the indicator configured on `GustoProvider` for this instance only. */\n LoaderComponent?: LoaderComponentType\n}\n\n/**\n * Standalone read-only card listing an employee's active deductions, with affordances to add, edit, or delete a deduction.\n *\n * @remarks\n * Fetches its own data and owns the delete confirm dialog. Has no alert API — alert rendering is the consumer's responsibility. Add and edit affordances do not open a form themselves; emit-then-route is the contract, so the consumer listens for the `addRequested` / `editRequested` events and renders {@link DeductionsEditForm} (or its own equivalent) accordingly. For an orchestrated card-plus-form flow, use {@link Deductions} instead.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/deductions/card/addRequested` | Fired when the \"Add deduction\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/deductions/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a deduction | The matching `Garnishment` |\n * | `employee/management/deductions/card/deleted` | Fired after a deduction is deleted via the confirm dialog | The deleted `Garnishment` |\n *\n * @param props - See {@link DeductionsCardProps}.\n * @returns The rendered deductions card.\n * @public\n */\nexport function DeductionsCard({ LoaderComponent, ...props }: DeductionsCardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Deductions\"\n LoaderComponent={LoaderComponent}\n >\n <DeductionsCardContent LoaderComponent={LoaderComponent} {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DeductionsCardContent({ employeeId, onEvent, LoaderComponent }: DeductionsCardProps) {\n useI18n('Employee.Management.Deductions')\n const { t } = useTranslation('Employee.Management.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const deductionsList = useDeductionsList({ employeeId })\n\n const {\n pendingDeleteDeduction,\n setPendingDeleteDeduction,\n handleConfirmDelete: handleConfirmDeleteDeduction,\n } = useDeleteDeduction(async garnishment => {\n if (deductionsList.isLoading) return\n const result = await deductionsList.actions.onDelete(garnishment)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_DELETED, result.data.garnishment)\n }\n })\n\n // `useDeductionsList` returns `isLoading: true` even when the query has\n // errored and `data` is missing. Treat those rows as \"not loading\" so the\n // section doesn't show a perpetual skeleton while BaseLayout already\n // renders the error alert.\n const isDeductionsLoading =\n deductionsList.isLoading && deductionsList.errorHandling.errors.length === 0\n\n const deductions = deductionsList.isLoading ? [] : deductionsList.data.deductions\n const deletingGarnishmentUuid = deductionsList.isLoading\n ? undefined\n : deductionsList.status.deletingGarnishmentUuid\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleEdit = (garnishment: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DEDUCTIONS_CARD_EDIT_REQUESTED, garnishment)\n }\n\n const garnishmentsColumns = [\n {\n key: 'description',\n title: t('columns.deduction'),\n render: (garnishment: Garnishment) => garnishment.description || '-',\n },\n {\n key: 'frequency',\n title: t('columns.frequency'),\n render: (garnishment: Garnishment) => (garnishment.recurring ? t('recurring') : t('oneTime')),\n },\n {\n key: 'amount',\n title: t('columns.withhold'),\n justify: 'end' as const,\n render: (garnishment: Garnishment) =>\n formatDeductionAmount(garnishment, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('amountPerPaycheck', { value }),\n }),\n },\n ]\n\n const garnishmentsDataView = useDataView({\n data: deductions,\n columns: garnishmentsColumns,\n itemMenu: (garnishment: Garnishment) => (\n <HamburgerMenu\n isLoading={deletingGarnishmentUuid === garnishment.uuid}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(garnishment)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n setPendingDeleteDeduction(garnishment)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n triggerLabel={t('hamburgerTitle')}\n />\n ),\n emptyState: () => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n ),\n })\n\n return (\n <BaseLayout error={deductionsList.errorHandling.errors} LoaderComponent={LoaderComponent}>\n <Components.Box\n withPadding={false}\n header={\n <Components.BoxHeader\n title={t('title')}\n action={\n <Components.Button variant=\"secondary\" onClick={handleAdd} icon={<PlusCircleIcon />}>\n {t('addDeductionCta')}\n </Components.Button>\n }\n />\n }\n >\n {isDeductionsLoading ? (\n <Loading />\n ) : (\n <DataView label={t('listLabel')} isWithinBox {...garnishmentsDataView} />\n )}\n </Components.Box>\n\n <DeleteDeductionDialog\n pendingDeleteDeduction={pendingDeleteDeduction}\n isPrimaryActionLoading={deletingGarnishmentUuid === pendingDeleteDeduction?.uuid}\n onClose={() => {\n setPendingDeleteDeduction(null)\n }}\n onConfirm={() => {\n void handleConfirmDeleteDeduction()\n }}\n title={t('deleteDeductionDialog.title')}\n description={t('deleteDeductionDialog.description', {\n deduction: pendingDeleteDeduction?.description ?? '',\n })}\n confirmLabel={t('deleteDeductionDialog.confirmCta')}\n cancelLabel={t('deleteDeductionDialog.cancelCta')}\n />\n </BaseLayout>\n )\n}\n"],"names":["DeductionsCard","LoaderComponent","props","jsx","BaseBoundaries","DeductionsCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","deductionsList","useDeductionsList","pendingDeleteDeduction","setPendingDeleteDeduction","handleConfirmDeleteDeduction","useDeleteDeduction","garnishment","result","componentEvents","isDeductionsLoading","deductions","deletingGarnishmentUuid","handleAdd","handleEdit","garnishmentsColumns","formatDeductionAmount","value","garnishmentsDataView","useDataView","HamburgerMenu","PencilSvg","TrashCanSvg","EmptyData","BaseLayout","PlusCircleIcon","Loading","DataView","DeleteDeductionDialog"],"mappings":";;;;;;;;;;;;;;;;;;;AAkDO,SAASA,GAAe,EAAE,iBAAAC,GAAiB,GAAGC,KAA8B;AACjF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,iBAAAH;AAAA,MAEA,UAAA,gBAAAE,EAACE,GAAA,EAAsB,iBAAAJ,GAAmC,GAAGC,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAG1E;AAEA,SAASG,EAAsB,EAAE,YAAAC,GAAY,SAAAC,GAAS,iBAAAN,KAAwC;AAC5F,EAAAO,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvDC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5CE,IAAiBC,EAAkB,EAAE,YAAAX,GAAY,GAEjD;AAAA,IACJ,wBAAAY;AAAA,IACA,2BAAAC;AAAA,IACA,qBAAqBC;AAAA,EAAA,IACnBC,EAAmB,OAAMC,MAAe;AAC1C,QAAIN,EAAe,UAAW;AAC9B,UAAMO,IAAS,MAAMP,EAAe,QAAQ,SAASM,CAAW;AAChE,IAAIC,KACFhB,EAAQiB,EAAgB,6CAA6CD,EAAO,KAAK,WAAW;AAAA,EAEhG,CAAC,GAMKE,IACJT,EAAe,aAAaA,EAAe,cAAc,OAAO,WAAW,GAEvEU,IAAaV,EAAe,YAAY,CAAA,IAAKA,EAAe,KAAK,YACjEW,IAA0BX,EAAe,YAC3C,SACAA,EAAe,OAAO,yBAEpBY,IAAY,MAAM;AACtB,IAAArB,EAAQiB,EAAgB,mDAAmD,EAAE,YAAAlB,EAAA,CAAY;AAAA,EAC3F,GACMuB,IAAa,CAACP,MAA6B;AAC/C,IAAAf,EAAQiB,EAAgB,oDAAoDF,CAAW;AAAA,EACzF,GAEMQ,IAAsB;AAAA,IAC1B;AAAA,MACE,KAAK;AAAA,MACL,OAAOrB,EAAE,mBAAmB;AAAA,MAC5B,QAAQ,CAACa,MAA6BA,EAAY,eAAe;AAAA,IAAA;AAAA,IAEnE;AAAA,MACE,KAAK;AAAA,MACL,OAAOb,EAAE,mBAAmB;AAAA,MAC5B,QAAQ,CAACa,MAA8BA,EAAY,YAAYb,EAAE,WAAW,IAAIA,EAAE,SAAS;AAAA,IAAA;AAAA,IAE7F;AAAA,MACE,KAAK;AAAA,MACL,OAAOA,EAAE,kBAAkB;AAAA,MAC3B,SAAS;AAAA,MACT,QAAQ,CAACa,MACPS,EAAsBT,GAAa;AAAA,QACjC,gBAAAT;AAAA,QACA,eAAAE;AAAA,QACA,mBAAmB,CAACiB,MAAkBvB,EAAE,qBAAqB,EAAE,OAAAuB,GAAO;AAAA,MAAA,CACvE;AAAA,IAAA;AAAA,EACL,GAGIC,IAAuBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAASI;AAAA,IACT,UAAU,CAACR,MACT,gBAAAnB;AAAA,MAACgC;AAAA,MAAA;AAAA,QACC,WAAWR,MAA4BL,EAAY;AAAA,QACnD,OAAO;AAAA,UACL;AAAA,YACE,OAAOb,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAoB,EAAWP,CAAW;AAAA,YACxB;AAAA,YACA,MAAM,gBAAAnB,EAACiC,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,UAE/B;AAAA,YACE,OAAO3B,EAAE,WAAW;AAAA,YACpB,SAAS,MAAM;AACb,cAAAU,EAA0BG,CAAW;AAAA,YACvC;AAAA,YACA,MAAM,gBAAAnB,EAACkC,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,QAEF,cAAc5B,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAGpC,YAAY,MACV,gBAAAN,EAACmC,GAAA,EAAU,OAAO7B,EAAE,kBAAkB,GAAG,aAAaA,EAAE,wBAAwB,EAAA,CAAG;AAAA,EAAA,CAEtF;AAED,2BACG8B,GAAA,EAAW,OAAOvB,EAAe,cAAc,QAAQ,iBAAAf,GACtD,UAAA;AAAA,IAAA,gBAAAE;AAAA,MAACQ,EAAW;AAAA,MAAX;AAAA,QACC,aAAa;AAAA,QACb,QACE,gBAAAR;AAAA,UAACQ,EAAW;AAAA,UAAX;AAAA,YACC,OAAOF,EAAE,OAAO;AAAA,YAChB,QACE,gBAAAN,EAACQ,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASiB,GAAW,MAAM,gBAAAzB,EAACqC,GAAA,CAAA,CAAe,GAC9E,UAAA/B,EAAE,iBAAiB,EAAA,CACtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAKL,UAAAgB,IACC,gBAAAtB,EAACsC,GAAA,CAAA,CAAQ,IAET,gBAAAtC,EAACuC,GAAA,EAAS,OAAOjC,EAAE,WAAW,GAAG,aAAW,IAAE,GAAGwB,EAAA,CAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,IAI3E,gBAAA9B;AAAA,MAACwC;AAAA,MAAA;AAAA,QACC,wBAAAzB;AAAA,QACA,wBAAwBS,MAA4BT,GAAwB;AAAA,QAC5E,SAAS,MAAM;AACb,UAAAC,EAA0B,IAAI;AAAA,QAChC;AAAA,QACA,WAAW,MAAM;AACf,UAAKC,EAAA;AAAA,QACP;AAAA,QACA,OAAOX,EAAE,6BAA6B;AAAA,QACtC,aAAaA,EAAE,qCAAqC;AAAA,UAClD,WAAWS,GAAwB,eAAe;AAAA,QAAA,CACnD;AAAA,QACD,cAAcT,EAAE,kCAAkC;AAAA,QAClD,aAAaA,EAAE,iCAAiC;AAAA,MAAA;AAAA,IAAA;AAAA,EAClD,GACF;AAEJ;"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as c } from "react-i18next";
|
|
3
|
-
import "
|
|
4
|
-
import { componentEvents as l } from "../../../../../shared/constants.js";
|
|
5
|
-
import { Loading as p } from "../../../../Common/Loading/Loading.js";
|
|
3
|
+
import { Loading as l } from "../../../../Common/Loading/Loading.js";
|
|
6
4
|
import { EmptyData as g } from "../../../../Common/EmptyData/EmptyData.js";
|
|
7
|
-
import { BaseBoundaries as
|
|
8
|
-
import { useComponentContext as
|
|
9
|
-
import { useI18n as
|
|
5
|
+
import { BaseBoundaries as p, BaseLayout as f } from "../../../../Base/Base.js";
|
|
6
|
+
import { useComponentContext as y } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
import { useI18n as E } from "../../../../../i18n/I18n.js";
|
|
8
|
+
import { componentEvents as C } from "../../../../../shared/constants.js";
|
|
10
9
|
import { useDocumentsList as D } from "../../shared/useDocumentsList/useDocumentsList.js";
|
|
11
10
|
import { useDataView as S } from "../../../../Common/DataView/useDataView.js";
|
|
12
11
|
import { DataView as L } from "../../../../Common/DataView/DataView.js";
|
|
13
|
-
function
|
|
12
|
+
function A(o) {
|
|
14
13
|
return /* @__PURE__ */ e(
|
|
15
|
-
|
|
14
|
+
p,
|
|
16
15
|
{
|
|
17
16
|
componentName: "Employee.Management.Documents",
|
|
18
17
|
LoaderComponent: o.LoaderComponent,
|
|
@@ -21,8 +20,8 @@ function b(o) {
|
|
|
21
20
|
);
|
|
22
21
|
}
|
|
23
22
|
function h({ employeeId: o, onEvent: s, LoaderComponent: a }) {
|
|
24
|
-
|
|
25
|
-
const { t } = c("Employee.Management.Documents"), r =
|
|
23
|
+
E("Employee.Management.Documents");
|
|
24
|
+
const { t } = c("Employee.Management.Documents"), r = y(), i = D({ employeeId: o }), m = i.isLoading ? [] : i.data.forms, u = [
|
|
26
25
|
{
|
|
27
26
|
key: "title",
|
|
28
27
|
title: t("columns.title"),
|
|
@@ -51,7 +50,7 @@ function h({ employeeId: o, onEvent: s, LoaderComponent: a }) {
|
|
|
51
50
|
{
|
|
52
51
|
variant: "secondary",
|
|
53
52
|
onClick: () => {
|
|
54
|
-
s(
|
|
53
|
+
s(C.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED, {
|
|
55
54
|
employeeId: o,
|
|
56
55
|
formId: n.uuid
|
|
57
56
|
});
|
|
@@ -61,9 +60,9 @@ function h({ employeeId: o, onEvent: s, LoaderComponent: a }) {
|
|
|
61
60
|
),
|
|
62
61
|
emptyState: () => /* @__PURE__ */ e(g, { title: t("emptyState.title"), description: t("emptyState.description") })
|
|
63
62
|
});
|
|
64
|
-
return /* @__PURE__ */ e(
|
|
63
|
+
return /* @__PURE__ */ e(f, { error: i.errorHandling.errors, LoaderComponent: a, children: /* @__PURE__ */ e(r.Box, { withPadding: !1, header: /* @__PURE__ */ e(r.BoxHeader, { title: t("title") }), children: i.isLoading ? /* @__PURE__ */ e(l, {}) : /* @__PURE__ */ e(L, { label: t("listLabel"), isWithinBox: !0, ...d }) }) });
|
|
65
64
|
}
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
A as DocumentsCard
|
|
68
67
|
};
|
|
69
68
|
//# sourceMappingURL=DocumentsCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentsCard.js","sources":["../../../../../../src/components/Employee/Documents/management/DocumentsCard/DocumentsCard.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useDocumentsList } from '../../shared/useDocumentsList'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { LoaderComponentType } from '@/components/Base'\n\n/**\n * Props for {@link DocumentsCard}.\n *\n * @public\n */\nexport interface DocumentsCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Event handler fired when a row's View CTA is clicked. */\n onEvent: OnEventType<EventType, unknown>\n /** Custom loading indicator rendered while this component's async data is fetching. Overrides the indicator configured on `GustoProvider` for this instance only. */\n LoaderComponent?: LoaderComponentType\n}\n\n/**\n * Standalone \"Documents\" (forms) card. Owns its own data fetch via\n * {@link useDocumentsList} and renders the employee's forms in a table with a\n * per-row \"View\" action. Emits\n * `employee/management/documents/card/viewRequested` with\n * `{ employeeId, formId }` when a row's View CTA is clicked. The card is\n * read-only — viewing or signing a form happens in the screen the parent\n * routes to — and renders no alerts: alert rendering is the parent's\n * responsibility.\n *\n * @param props - See {@link DocumentsCardProps}.\n * @returns The documents card.\n * @public\n */\nexport function DocumentsCard(props: DocumentsCardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Documents\"\n LoaderComponent={props.LoaderComponent}\n >\n <DocumentsCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DocumentsCardContent({ employeeId, onEvent, LoaderComponent }: DocumentsCardProps) {\n useI18n('Employee.Management.Documents')\n const { t } = useTranslation('Employee.Management.Documents')\n const Components = useComponentContext()\n\n const documentsList = useDocumentsList({ employeeId })\n\n const forms = documentsList.isLoading ? [] : documentsList.data.forms\n\n const formsColumns = [\n {\n key: 'title',\n title: t('columns.title'),\n render: (form: Form) => form.title || '-',\n },\n {\n key: 'year',\n title: t('columns.year'),\n render: (form: Form) => (form.year ? String(form.year) : '-'),\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: (form: Form) => (form.draft ? t('status.draft') : t('status.final')),\n },\n {\n key: 'requiresSigning',\n title: t('columns.requiresSigning'),\n render: (form: Form) =>\n form.requiresSigning ? (\n <Components.Badge status=\"warning\">{t('signingStatus.notSigned')}</Components.Badge>\n ) : (\n <Components.Badge status=\"success\">{t('signingStatus.signed')}</Components.Badge>\n ),\n },\n ]\n\n const formsDataView = useDataView({\n data: forms,\n columns: formsColumns,\n itemMenu: (form: Form) => (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED, {\n employeeId,\n formId: form.uuid,\n })\n }}\n >\n {t('viewCta')}\n </Components.Button>\n ),\n emptyState: () => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n ),\n })\n\n return (\n <BaseLayout error={documentsList.errorHandling.errors} LoaderComponent={LoaderComponent}>\n <Components.Box withPadding={false} header={<Components.BoxHeader title={t('title')} />}>\n {documentsList.isLoading ? (\n <Loading />\n ) : (\n <DataView label={t('listLabel')} isWithinBox {...formsDataView} />\n )}\n </Components.Box>\n </BaseLayout>\n )\n}\n"],"names":["DocumentsCard","props","jsx","BaseBoundaries","DocumentsCardContent","employeeId","onEvent","LoaderComponent","useI18n","useTranslation","Components","useComponentContext","documentsList","useDocumentsList","forms","formsColumns","form","formsDataView","useDataView","componentEvents","EmptyData","BaseLayout","Loading","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentsCard.js","sources":["../../../../../../src/components/Employee/Documents/management/DocumentsCard/DocumentsCard.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { useDocumentsList } from '../../shared/useDocumentsList'\nimport { DataView, useDataView, EmptyData, Loading } from '@/components/Common'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { LoaderComponentType } from '@/components/Base'\n\n/**\n * Props for {@link DocumentsCard}.\n *\n * @public\n */\nexport interface DocumentsCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Event handler fired when a row's View CTA is clicked. */\n onEvent: OnEventType<EventType, unknown>\n /** Custom loading indicator rendered while this component's async data is fetching. Overrides the indicator configured on `GustoProvider` for this instance only. */\n LoaderComponent?: LoaderComponentType\n}\n\n/**\n * Standalone \"Documents\" (forms) card. Owns its own data fetch via\n * {@link useDocumentsList} and renders the employee's forms in a table with a\n * per-row \"View\" action. Emits\n * `employee/management/documents/card/viewRequested` with\n * `{ employeeId, formId }` when a row's View CTA is clicked. The card is\n * read-only — viewing or signing a form happens in the screen the parent\n * routes to — and renders no alerts: alert rendering is the parent's\n * responsibility.\n *\n * @param props - See {@link DocumentsCardProps}.\n * @returns The documents card.\n * @public\n */\nexport function DocumentsCard(props: DocumentsCardProps) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Documents\"\n LoaderComponent={props.LoaderComponent}\n >\n <DocumentsCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction DocumentsCardContent({ employeeId, onEvent, LoaderComponent }: DocumentsCardProps) {\n useI18n('Employee.Management.Documents')\n const { t } = useTranslation('Employee.Management.Documents')\n const Components = useComponentContext()\n\n const documentsList = useDocumentsList({ employeeId })\n\n const forms = documentsList.isLoading ? [] : documentsList.data.forms\n\n const formsColumns = [\n {\n key: 'title',\n title: t('columns.title'),\n render: (form: Form) => form.title || '-',\n },\n {\n key: 'year',\n title: t('columns.year'),\n render: (form: Form) => (form.year ? String(form.year) : '-'),\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: (form: Form) => (form.draft ? t('status.draft') : t('status.final')),\n },\n {\n key: 'requiresSigning',\n title: t('columns.requiresSigning'),\n render: (form: Form) =>\n form.requiresSigning ? (\n <Components.Badge status=\"warning\">{t('signingStatus.notSigned')}</Components.Badge>\n ) : (\n <Components.Badge status=\"success\">{t('signingStatus.signed')}</Components.Badge>\n ),\n },\n ]\n\n const formsDataView = useDataView({\n data: forms,\n columns: formsColumns,\n itemMenu: (form: Form) => (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_DOCUMENTS_CARD_VIEW_REQUESTED, {\n employeeId,\n formId: form.uuid,\n })\n }}\n >\n {t('viewCta')}\n </Components.Button>\n ),\n emptyState: () => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n ),\n })\n\n return (\n <BaseLayout error={documentsList.errorHandling.errors} LoaderComponent={LoaderComponent}>\n <Components.Box withPadding={false} header={<Components.BoxHeader title={t('title')} />}>\n {documentsList.isLoading ? (\n <Loading />\n ) : (\n <DataView label={t('listLabel')} isWithinBox {...formsDataView} />\n )}\n </Components.Box>\n </BaseLayout>\n )\n}\n"],"names":["DocumentsCard","props","jsx","BaseBoundaries","DocumentsCardContent","employeeId","onEvent","LoaderComponent","useI18n","useTranslation","Components","useComponentContext","documentsList","useDocumentsList","forms","formsColumns","form","formsDataView","useDataView","componentEvents","EmptyData","BaseLayout","Loading","DataView"],"mappings":";;;;;;;;;;;AAuCO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,iBAAiBF,EAAM;AAAA,MAEvB,UAAA,gBAAAC,EAACE,GAAA,EAAsB,GAAGH,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGvC;AAEA,SAASG,EAAqB,EAAE,YAAAC,GAAY,SAAAC,GAAS,iBAAAC,KAAuC;AAC1F,EAAAC,EAAQ,+BAA+B;AACvC,QAAM,EAAE,EAAA,IAAMC,EAAe,+BAA+B,GACtDC,IAAaC,EAAA,GAEbC,IAAgBC,EAAiB,EAAE,YAAAR,GAAY,GAE/CS,IAAQF,EAAc,YAAY,CAAA,IAAKA,EAAc,KAAK,OAE1DG,IAAe;AAAA,IACnB;AAAA,MACE,KAAK;AAAA,MACL,OAAO,EAAE,eAAe;AAAA,MACxB,QAAQ,CAACC,MAAeA,EAAK,SAAS;AAAA,IAAA;AAAA,IAExC;AAAA,MACE,KAAK;AAAA,MACL,OAAO,EAAE,cAAc;AAAA,MACvB,QAAQ,CAACA,MAAgBA,EAAK,OAAO,OAAOA,EAAK,IAAI,IAAI;AAAA,IAAA;AAAA,IAE3D;AAAA,MACE,KAAK;AAAA,MACL,OAAO,EAAE,gBAAgB;AAAA,MACzB,QAAQ,CAACA,MAAgBA,EAAK,QAAQ,EAAE,cAAc,IAAI,EAAE,cAAc;AAAA,IAAA;AAAA,IAE5E;AAAA,MACE,KAAK;AAAA,MACL,OAAO,EAAE,yBAAyB;AAAA,MAClC,QAAQ,CAACA,MACPA,EAAK,kBACH,gBAAAd,EAACQ,EAAW,OAAX,EAAiB,QAAO,WAAW,YAAE,yBAAyB,GAAE,IAEjE,gBAAAR,EAACQ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAA,EAAE,sBAAsB,EAAA,CAAE;AAAA,IAAA;AAAA,EAEpE,GAGIO,IAAgBC,EAAY;AAAA,IAChC,MAAMJ;AAAA,IACN,SAASC;AAAA,IACT,UAAU,CAACC,MACT,gBAAAd;AAAA,MAACQ,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAJ,EAAQa,EAAgB,mDAAmD;AAAA,YACzE,YAAAd;AAAA,YACA,QAAQW,EAAK;AAAA,UAAA,CACd;AAAA,QACH;AAAA,QAEC,YAAE,SAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAGhB,YAAY,MACV,gBAAAd,EAACkB,GAAA,EAAU,OAAO,EAAE,kBAAkB,GAAG,aAAa,EAAE,wBAAwB,EAAA,CAAG;AAAA,EAAA,CAEtF;AAED,2BACGC,GAAA,EAAW,OAAOT,EAAc,cAAc,QAAQ,iBAAAL,GACrD,UAAA,gBAAAL,EAACQ,EAAW,KAAX,EAAe,aAAa,IAAO,QAAQ,gBAAAR,EAACQ,EAAW,WAAX,EAAqB,OAAO,EAAE,OAAO,GAAG,GAClF,UAAAE,EAAc,YACb,gBAAAV,EAACoB,GAAA,EAAQ,IAET,gBAAApB,EAACqB,GAAA,EAAS,OAAO,EAAE,WAAW,GAAG,aAAW,IAAE,GAAGN,EAAA,CAAe,GAEpE,GACF;AAEJ;"}
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
|
-
import { useDocumentList as
|
|
4
|
-
import "
|
|
5
|
-
import "../../../../../../shared/constants.js";
|
|
6
|
-
import { ActionsLayout as s } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
3
|
+
import { useDocumentList as s } from "./useDocumentList.js";
|
|
4
|
+
import { ActionsLayout as m } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
5
|
import { useComponentContext as c } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
function
|
|
9
|
-
const { t } = r("Employee.DocumentSigner"), { handleContinue:
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
6
|
+
function d() {
|
|
7
|
+
const { t: n } = r("Employee.DocumentSigner"), { handleContinue: t, hasSignedAllForms: e } = s(), i = c();
|
|
8
|
+
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(i.Button, { onClick: t, isLoading: !1, isDisabled: !e, children: n("continueCta") }) });
|
|
11
9
|
}
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
d as Actions
|
|
14
12
|
};
|
|
15
13
|
//# sourceMappingURL=Actions.js.map
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAMO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAAH,EAAE,aAAa,GAClB,GACF;AAEJ;"}
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js
CHANGED
|
@@ -9,16 +9,13 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
|
|
|
9
9
|
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
10
10
|
import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
|
-
import "dompurify";
|
|
13
|
-
import "../../../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
12
|
import "../../../../../../shared/constants.js";
|
|
15
|
-
import "classnames";
|
|
16
13
|
import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
14
|
import "../../../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
18
15
|
import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
|
|
19
|
-
const [
|
|
16
|
+
const [a, f] = t("DocumentListContext");
|
|
20
17
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
f as DocumentListProvider,
|
|
19
|
+
a as useDocumentList
|
|
23
20
|
};
|
|
24
21
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -3,9 +3,9 @@ import { createMachine as f } from "robot3";
|
|
|
3
3
|
import { useMemo as l } from "react";
|
|
4
4
|
import { useEmployeesGetSuspense as g } from "@gusto/embedded-api/react-query/employeesGet";
|
|
5
5
|
import { useEmployeeFormsListSuspense as D } from "@gusto/embedded-api/react-query/employeeFormsList";
|
|
6
|
-
import { EmploymentEligibilityContextual as
|
|
7
|
-
import { documentSignerMachine as
|
|
8
|
-
import { Flow as
|
|
6
|
+
import { EmploymentEligibilityContextual as S, DocumentListContextual as d } from "./documentSignerStateMachine.js";
|
|
7
|
+
import { documentSignerMachine as y } from "./stateMachine.js";
|
|
8
|
+
import { Flow as E } from "../../../../Flow/Flow.js";
|
|
9
9
|
import { BaseComponent as x } from "../../../../Base/Base.js";
|
|
10
10
|
import "../../../../Base/useBase.js";
|
|
11
11
|
import { useComponentDictionary as C } from "../../../../../i18n/I18n.js";
|
|
@@ -15,20 +15,20 @@ function O(o) {
|
|
|
15
15
|
}
|
|
16
16
|
function M({ employeeId: o, onEvent: i, dictionary: s, withEmployeeI9: t = !1 }) {
|
|
17
17
|
C("Employee.DocumentSigner", s);
|
|
18
|
-
const { data: a } = g({ employeeId: o }), { data: c } = D({ employeeId: o }), u = a.
|
|
18
|
+
const { data: a } = g({ employeeId: o }), { data: c } = D({ employeeId: o }), u = a.employeeShow?.onboardingDocumentsConfig?.i9Document === !0, m = c.forms?.find((e) => e.name === F), r = t && u && (!m || m.requiresSigning === !0), p = l(
|
|
19
19
|
() => f(
|
|
20
20
|
r ? "employmentEligibility" : "index",
|
|
21
|
-
|
|
21
|
+
y,
|
|
22
22
|
(e) => ({
|
|
23
23
|
...e,
|
|
24
|
-
component: r ?
|
|
24
|
+
component: r ? S : d,
|
|
25
25
|
employeeId: o,
|
|
26
26
|
withEmployeeI9: t
|
|
27
27
|
})
|
|
28
28
|
),
|
|
29
29
|
[o, t]
|
|
30
30
|
);
|
|
31
|
-
return /* @__PURE__ */ n(
|
|
31
|
+
return /* @__PURE__ */ n(E, { machine: p, onEvent: i });
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
34
|
O as DocumentSigner
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSigner.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport {\n DocumentListContextual,\n EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { I9_FORM_NAME } from '@/shared/constants'\n\n/**\n * Props for {@link DocumentSigner}.\n *\n * @public\n */\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n /** The associated employee identifier. */\n employeeId: string\n /** When `true`, the flow routes through I-9 employment eligibility before listing documents for signing. Defaults to `false`. */\n withEmployeeI9?: boolean\n}\n\n/**\n * Onboarding step for signing employee documents.\n *\n * @remarks\n * Lists the employee's pending forms and routes through the signing UI for each\n * one. When `withEmployeeI9` is `true` and the employee's I-9 has not been\n * signed, the flow starts on the I-9 employment eligibility step before\n * presenting the document list.\n *\n * Each form's description is rendered as returned by the API, unless the `dictionary` prop\n * supplies a `forms.<name>.description` override for that form's `name` (e.g.\n * `forms.employee_direct_deposit.description`).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/employmentEligibility/done` | Fired after I-9 employment eligibility is captured | The updated I-9 authorization |\n * | `employee/forms/view` | Fired when a form's \"Sign\" action is selected from the document list | `{ uuid: string; name?: string }` |\n * | `employee/forms/sign` | Fired after a form is successfully signed | {@link APIModels.Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `employee/forms/done` | Fired when all required forms have been signed and the parent flow can advance | — |\n * | `cancel` | Fired when the user cancels signing a form and returns to the document list | — |\n *\n * @components\n * - {@link EmploymentEligibility}\n * - {@link I9SignatureForm}\n * - {@link DocumentList}\n * - {@link SignatureForm}\n *\n * @param props - See {@link DocumentSignerProps}.\n * @returns The document signer flow.\n * @public\n */\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const { data: employeeData } = useEmployeesGetSuspense({ employeeId })\n const { data: formsData } = useEmployeeFormsListSuspense({ employeeId })\n\n const employeeHasI9Enabled
|
|
1
|
+
{"version":3,"file":"DocumentSigner.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport {\n DocumentListContextual,\n EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { I9_FORM_NAME } from '@/shared/constants'\n\n/**\n * Props for {@link DocumentSigner}.\n *\n * @public\n */\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n /** The associated employee identifier. */\n employeeId: string\n /** When `true`, the flow routes through I-9 employment eligibility before listing documents for signing. Defaults to `false`. */\n withEmployeeI9?: boolean\n}\n\n/**\n * Onboarding step for signing employee documents.\n *\n * @remarks\n * Lists the employee's pending forms and routes through the signing UI for each\n * one. When `withEmployeeI9` is `true` and the employee's I-9 has not been\n * signed, the flow starts on the I-9 employment eligibility step before\n * presenting the document list.\n *\n * Each form's description is rendered as returned by the API, unless the `dictionary` prop\n * supplies a `forms.<name>.description` override for that form's `name` (e.g.\n * `forms.employee_direct_deposit.description`).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/employmentEligibility/done` | Fired after I-9 employment eligibility is captured | The updated I-9 authorization |\n * | `employee/forms/view` | Fired when a form's \"Sign\" action is selected from the document list | `{ uuid: string; name?: string }` |\n * | `employee/forms/sign` | Fired after a form is successfully signed | {@link APIModels.Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `employee/forms/done` | Fired when all required forms have been signed and the parent flow can advance | — |\n * | `cancel` | Fired when the user cancels signing a form and returns to the document list | — |\n *\n * @components\n * - {@link EmploymentEligibility}\n * - {@link I9SignatureForm}\n * - {@link DocumentList}\n * - {@link SignatureForm}\n *\n * @param props - See {@link DocumentSignerProps}.\n * @returns The document signer flow.\n * @public\n */\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const { data: employeeData } = useEmployeesGetSuspense({ employeeId })\n const { data: formsData } = useEmployeeFormsListSuspense({ employeeId })\n\n const employeeHasI9Enabled =\n employeeData.employeeShow?.onboardingDocumentsConfig?.i9Document === true\n\n const i9Form = formsData.forms?.find(form => form.name === I9_FORM_NAME)\n const needsI9Form =\n withEmployeeI9 && employeeHasI9Enabled && (!i9Form || i9Form.requiresSigning === true)\n\n const machine = useMemo(\n () =>\n createMachine(\n needsI9Form ? 'employmentEligibility' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: needsI9Form ? EmploymentEligibilityContextual : DocumentListContextual,\n employeeId,\n withEmployeeI9,\n }),\n ),\n [employeeId, withEmployeeI9],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","props","jsx","BaseComponent","Root","employeeId","onEvent","dictionary","withEmployeeI9","useComponentDictionary","employeeData","useEmployeesGetSuspense","formsData","useEmployeeFormsListSuspense","employeeHasI9Enabled","i9Form","form","I9_FORM_NAME","needsI9Form","machine","useMemo","createMachine","documentSignerMachine","initialContext","EmploymentEligibilityContextual","DocumentListContextual","Flow"],"mappings":";;;;;;;;;;;;AA4DO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,GAAY,gBAAAC,IAAiB,MAA8B;AAC9F,EAAAC,EAAuB,2BAA2BF,CAAU;AAE5D,QAAM,EAAE,MAAMG,EAAA,IAAiBC,EAAwB,EAAE,YAAAN,GAAY,GAC/D,EAAE,MAAMO,EAAA,IAAcC,EAA6B,EAAE,YAAAR,GAAY,GAEjES,IACJJ,EAAa,cAAc,2BAA2B,eAAe,IAEjEK,IAASH,EAAU,OAAO,KAAK,CAAAI,MAAQA,EAAK,SAASC,CAAY,GACjEC,IACJV,KAAkBM,MAAyB,CAACC,KAAUA,EAAO,oBAAoB,KAE7EI,IAAUC;AAAA,IACd,MACEC;AAAA,MACEH,IAAc,0BAA0B;AAAA,MACxCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAcM,IAAkCC;AAAA,QAC3D,YAAApB;AAAA,QACA,gBAAAG;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACH,GAAYG,CAAc;AAAA,EAAA;AAG7B,SAAO,gBAAAN,EAACwB,GAAA,EAAK,SAAAP,GAAkB,SAAAb,EAAA,CAAkB;AACnD;"}
|
package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js
CHANGED
|
@@ -14,7 +14,7 @@ function P(o) {
|
|
|
14
14
|
}
|
|
15
15
|
const U = ({ employeeId: o, dictionary: t, className: r }) => {
|
|
16
16
|
N("Employee.EmployeeDocuments", t);
|
|
17
|
-
const { onEvent: s, baseSubmitHandler: u } = b(), { data: a } = y({ employeeId: o }), e = a.
|
|
17
|
+
const { onEvent: s, baseSubmitHandler: u } = b(), { data: a } = y({ employeeId: o }), e = a.employeeShow, c = e?.onboardingDocumentsConfig?.i9Document ?? !1, p = e?.onboardingStatus ? C.has(e.onboardingStatus) || e.onboardingStatus === _.SELF_ONBOARDING_PENDING_INVITE : !1, { mutateAsync: E } = f(), l = d({
|
|
18
18
|
mutationKey: g()
|
|
19
19
|
}) > 0;
|
|
20
20
|
return /* @__PURE__ */ n(
|
package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeDocuments.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.tsx"],"sourcesContent":["import { useIsMutating } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeesUpdateOnboardingDocumentsConfigMutation,\n mutationKeyEmployeesUpdateOnboardingDocumentsConfig,\n} from '@gusto/embedded-api/react-query/employeesUpdateOnboardingDocumentsConfig'\nimport {\n EmployeeDocumentsPresentation,\n type EmployeeDocumentsFormValues,\n} from './EmployeeDocumentsPresentation'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n componentEvents,\n EmployeeSelfOnboardingStatuses,\n EmployeeOnboardingStatus,\n} from '@/shared/constants'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport type { OnboardingContextInterface } from '@/components/Employee/OnboardingFlow/OnboardingFlowComponents'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link EmployeeDocuments}.\n *\n * @public\n */\nexport interface EmployeeDocumentsProps extends BaseComponentInterface<'Employee.EmployeeDocuments'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for selecting which documents the employee must complete.\n *\n * @remarks\n * Shows the I-9 toggle when the employee is self-onboarding (so the employee\n * can choose whether their employer will collect I-9 verification) and a\n * summary otherwise. Persists the selection to the employee's onboarding\n * documents configuration and advances the parent flow.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/onboardingDocumentsConfig/updated` | Fired after the employee's documents configuration is saved | The updated documents configuration response |\n * | `employee/documents/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - Component props including `employeeId` and `onEvent`.\n * @returns The employee documents onboarding step.\n * @public\n */\nexport function EmployeeDocuments(props: EmployeeDocumentsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary, className }: EmployeeDocumentsProps) => {\n useComponentDictionary('Employee.EmployeeDocuments', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeesGetSuspense({ employeeId })\n const employee = data.
|
|
1
|
+
{"version":3,"file":"EmployeeDocuments.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.tsx"],"sourcesContent":["import { useIsMutating } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeesUpdateOnboardingDocumentsConfigMutation,\n mutationKeyEmployeesUpdateOnboardingDocumentsConfig,\n} from '@gusto/embedded-api/react-query/employeesUpdateOnboardingDocumentsConfig'\nimport {\n EmployeeDocumentsPresentation,\n type EmployeeDocumentsFormValues,\n} from './EmployeeDocumentsPresentation'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n componentEvents,\n EmployeeSelfOnboardingStatuses,\n EmployeeOnboardingStatus,\n} from '@/shared/constants'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport type { OnboardingContextInterface } from '@/components/Employee/OnboardingFlow/OnboardingFlowComponents'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link EmployeeDocuments}.\n *\n * @public\n */\nexport interface EmployeeDocumentsProps extends BaseComponentInterface<'Employee.EmployeeDocuments'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for selecting which documents the employee must complete.\n *\n * @remarks\n * Shows the I-9 toggle when the employee is self-onboarding (so the employee\n * can choose whether their employer will collect I-9 verification) and a\n * summary otherwise. Persists the selection to the employee's onboarding\n * documents configuration and advances the parent flow.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/onboardingDocumentsConfig/updated` | Fired after the employee's documents configuration is saved | The updated documents configuration response |\n * | `employee/documents/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - Component props including `employeeId` and `onEvent`.\n * @returns The employee documents onboarding step.\n * @public\n */\nexport function EmployeeDocuments(props: EmployeeDocumentsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary, className }: EmployeeDocumentsProps) => {\n useComponentDictionary('Employee.EmployeeDocuments', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeesGetSuspense({ employeeId })\n const employee = data.employeeShow\n const currentI9Status = employee?.onboardingDocumentsConfig?.i9Document ?? false\n\n const isEmployeeSelfOnboarding = employee?.onboardingStatus\n ? EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus) ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n : false\n\n const { mutateAsync: updateOnboardingDocumentsConfig } =\n useEmployeesUpdateOnboardingDocumentsConfigMutation()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyEmployeesUpdateOnboardingDocumentsConfig(),\n })\n const isPending = isMutating > 0\n\n const onSubmit = async (formData: EmployeeDocumentsFormValues) => {\n await baseSubmitHandler(formData, async () => {\n const response = await updateOnboardingDocumentsConfig({\n request: {\n employeeId,\n employeeOnboardingDocumentsConfigRequest: {\n i9Document: formData.includeI9,\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DOCUMENTS_CONFIG_UPDATED, response)\n onEvent(componentEvents.EMPLOYEE_DOCUMENTS_DONE)\n })\n }\n\n const handleDone = () => {\n onEvent(componentEvents.EMPLOYEE_DOCUMENTS_DONE)\n }\n\n return (\n <EmployeeDocumentsPresentation\n className={className}\n isEmployeeSelfOnboarding={isEmployeeSelfOnboarding}\n currentI9Status={currentI9Status}\n onSubmit={onSubmit}\n onDone={handleDone}\n isPending={isPending}\n />\n )\n}\n\n/** @internal */\nexport const EmployeeDocumentsContextual = () => {\n const { employeeId, onEvent } = useFlow<OnboardingContextInterface>()\n\n return <EmployeeDocuments employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n"],"names":["EmployeeDocuments","props","jsx","BaseComponent","Root","employeeId","dictionary","className","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useEmployeesGetSuspense","employee","currentI9Status","isEmployeeSelfOnboarding","EmployeeSelfOnboardingStatuses","EmployeeOnboardingStatus","updateOnboardingDocumentsConfig","useEmployeesUpdateOnboardingDocumentsConfigMutation","isPending","useIsMutating","mutationKeyEmployeesUpdateOnboardingDocumentsConfig","EmployeeDocumentsPresentation","formData","response","componentEvents","EmployeeDocumentsContextual","useFlow","ensureRequired"],"mappings":";;;;;;;;;;;AAkDO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,GAAY,WAAAC,QAAwC;AAC9E,EAAAC,EAAuB,8BAA8BF,CAAU;AAC/D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAwB,EAAE,YAAAR,GAAY,GACjDS,IAAWF,EAAK,cAChBG,IAAkBD,GAAU,2BAA2B,cAAc,IAErEE,IAA2BF,GAAU,mBACvCG,EAA+B,IAAIH,EAAS,gBAAgB,KAC5DA,EAAS,qBAAqBI,EAAyB,iCACvD,IAEE,EAAE,aAAaC,EAAA,IACnBC,EAAA,GAKIC,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAoD,CAClE,IAC8B;AAsB/B,SACE,gBAAArB;AAAA,IAACsB;AAAA,IAAA;AAAA,MACC,WAAAjB;AAAA,MACA,0BAAAS;AAAA,MACA,iBAAAD;AAAA,MACA,UAzBa,OAAOU,MAA0C;AAChE,cAAMf,EAAkBe,GAAU,YAAY;AAC5C,gBAAMC,IAAW,MAAMP,EAAgC;AAAA,YACrD,SAAS;AAAA,cACP,YAAAd;AAAA,cACA,0CAA0C;AAAA,gBACxC,YAAYoB,EAAS;AAAA,cAAA;AAAA,YACvB;AAAA,UACF,CACD;AAED,UAAAhB,EAAQkB,EAAgB,8CAA8CD,CAAQ,GAC9EjB,EAAQkB,EAAgB,uBAAuB;AAAA,QACjD,CAAC;AAAA,MACH;AAAA,MAYI,QAVe,MAAM;AACvB,QAAAlB,EAAQkB,EAAgB,uBAAuB;AAAA,MACjD;AAAA,MASI,WAAAN;AAAA,IAAA;AAAA,EAAA;AAGN,GAGaO,IAA8B,MAAM;AAC/C,QAAM,EAAE,YAAAvB,GAAY,SAAAI,EAAA,IAAYoB,EAAA;AAEhC,2BAAQ7B,GAAA,EAAkB,YAAY8B,EAAezB,CAAU,GAAG,SAAAI,GAAkB;AACtF;"}
|
|
@@ -5,12 +5,11 @@ import { useFederalTaxesForm as M } from "../shared/useFederalTaxesForm/useFeder
|
|
|
5
5
|
import { useManagementFederalTaxesViewDictionary as y } from "./useViewDictionary.js";
|
|
6
6
|
import { BaseBoundaries as _, BaseLayout as g } from "../../../Base/Base.js";
|
|
7
7
|
import "../../../Base/useBase.js";
|
|
8
|
-
import "classnames";
|
|
9
|
-
import { componentEvents as c } from "../../../../shared/constants.js";
|
|
10
8
|
import { ActionsLayout as A } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
9
|
import { useI18n as h, useComponentDictionary as D } from "../../../../i18n/I18n.js";
|
|
10
|
+
import { componentEvents as c } from "../../../../shared/constants.js";
|
|
12
11
|
import { useComponentContext as L } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
-
function
|
|
12
|
+
function G({
|
|
14
13
|
FallbackComponent: n,
|
|
15
14
|
LoaderComponent: t,
|
|
16
15
|
...r
|
|
@@ -74,6 +73,6 @@ function C({
|
|
|
74
73
|
);
|
|
75
74
|
}
|
|
76
75
|
export {
|
|
77
|
-
|
|
76
|
+
G as FederalTaxesEditForm
|
|
78
77
|
};
|
|
79
78
|
//# sourceMappingURL=FederalTaxesEditForm.js.map
|