@gusto/embedded-react-sdk 0.44.2 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +24 -23
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -20
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.js +12 -9
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -20
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -22
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -20
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -20
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +26 -26
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js +7 -6
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -28
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -23
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Head.js +10 -9
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.js +22 -19
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -20
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -20
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -20
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -20
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -20
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -22
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +42 -52
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -1
- package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
- package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
- package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
- package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +193 -181
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +14 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +19 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +133 -130
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +87 -65
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +89 -109
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +15 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +120 -25
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +24 -17
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
- package/dist/components/Employee/Dashboard/JobAndPayView.js +495 -114
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
- package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/TaxesView.js +82 -60
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +227 -40
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +7 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +14 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +60 -36
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
- package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
- package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
- package/dist/components/Employee/Deductions/Deductions.js +25 -52
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
- package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
- package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
- package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
- package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
- package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
- package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
- package/dist/components/Employee/Deductions/stateMachine.js +67 -89
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
- package/dist/components/Employee/Documents/management/index.d.ts +3 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +8 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +13 -13
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +14 -14
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
- package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
- package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
- package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
- package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
- package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +27 -26
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js +13 -10
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js +17 -14
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +75 -69
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -20
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
- package/dist/components/Employee/exports/employeeManagement.js +22 -18
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
- package/dist/components/Employee/index.d.ts +4 -4
- package/dist/components/Employee/index.js +5 -5
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +26 -34
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +22 -36
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +59 -48
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
- package/dist/helpers/formattedStrings.d.ts +12 -0
- package/dist/helpers/formattedStrings.js +55 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
- package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
- package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
- package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
- package/dist/i18n/I18n.js +6 -5
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +104 -76
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
- package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
- package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +7 -0
- package/dist/i18n/en/common.json.js +19 -17
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +16 -6
- package/dist/index.js +138 -112
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +8 -2
- package/dist/shared/constants.js +11 -8
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/assertions.d.ts +16 -0
- package/dist/types/i18next.d.ts +140 -4
- package/dist/types/sdkError.js +58 -47
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +980 -1170
- package/package.json +29 -21
- package/dist/components/Employee/Compensation/Compensation.js +0 -87
- package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
- package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
- package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.d.ts +0 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +0 -24
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
- package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Head.js +0 -13
- package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
- package/dist/components/Employee/PaymentMethod/Split.js +0 -175
- package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
- /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
- /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
- /package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
- /package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
- /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
- /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
- /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback, useRef, useMemo } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payroll'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport type { QueryParamSortBy } from '@gusto/embedded-api/models/operations/putv1companiescompanyidpayrollspayrollidprepare'\nimport { UnprocessableEntityError } from '@gusto/embedded-api/models/errors/unprocessableentityerror'\nimport { useBase } from '../Base'\nimport { retryAsync } from '@/helpers/retryAsync'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n employeeUuids?: string[]\n sortBy?: QueryParamSortBy\n onDataReady?: (preparedPayroll: PayrollPrepared) => void\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleShow | undefined\n isLoading: boolean\n isPaginating: boolean\n hasInitialData: boolean\n}\n\nconst PREPARE_MAX_ATTEMPTS = 4\nconst PREPARE_RETRY_DELAY_MS = 1500\n\nconst isPayrollBeingProcessedError = (error: unknown): boolean => {\n if (!(error instanceof UnprocessableEntityError)) return false\n return error.errors.some(e => e.category === 'invalid_operation')\n}\n\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n employeeUuids,\n sortBy,\n onDataReady,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n const hasInitialDataRef = useRef(false)\n const hasFiredRef = useRef(false)\n const { baseSubmitHandler } = useBase()\n\n const employeeUuidsKey = useMemo(() => employeeUuids?.join(',') ?? '', [employeeUuids])\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: !!preparedPayroll?.payPeriod?.payScheduleUuid,\n },\n )\n\n const executePrepare = useCallback(async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n sortBy,\n requestBody: {\n employeeUuids,\n },\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n if (result.payrollPrepared) {\n hasInitialDataRef.current = true\n onDataReady?.(result.payrollPrepared)\n }\n }, [companyId, payrollId, preparePayroll, employeeUuidsKey, sortBy, onDataReady])\n\n const handlePreparePayroll = useCallback(async () => {\n await baseSubmitHandler(null, () =>\n retryAsync(executePrepare, {\n maxAttempts: PREPARE_MAX_ATTEMPTS,\n delayMs: PREPARE_RETRY_DELAY_MS,\n shouldRetry: isPayrollBeingProcessedError,\n }),\n )\n }, [baseSubmitHandler, executePrepare])\n\n useEffect(() => {\n if (hasFiredRef.current) return\n hasFiredRef.current = true\n void handlePreparePayroll()\n }, [handlePreparePayroll])\n\n const isInitialLoading = isPreparePayrollPending && !hasInitialDataRef.current\n const isPaginating = isPreparePayrollPending && hasInitialDataRef.current\n const isLoading = isInitialLoading || isPayScheduleLoading\n\n return {\n handlePreparePayroll,\n preparedPayroll,\n paySchedule: payScheduleData?.payScheduleShow,\n isLoading,\n isPaginating,\n hasInitialData: hasInitialDataRef.current,\n }\n}\n"],"names":["PREPARE_MAX_ATTEMPTS","PREPARE_RETRY_DELAY_MS","isPayrollBeingProcessedError","error","UnprocessableEntityError","e","usePreparedPayrollData","companyId","payrollId","employeeUuids","sortBy","onDataReady","preparePayroll","isPreparePayrollPending","usePayrollsPrepareMutation","preparedPayroll","setPreparedPayroll","useState","hasInitialDataRef","useRef","hasFiredRef","baseSubmitHandler","useBase","employeeUuidsKey","useMemo","payScheduleData","isPayScheduleLoading","usePaySchedulesGet","executePrepare","useCallback","result","handlePreparePayroll","retryAsync","useEffect","isInitialLoading","isPaginating","isLoading"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback, useRef, useMemo } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payroll'\nimport type { PayScheduleShow } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport type { QueryParamSortBy } from '@gusto/embedded-api/models/operations/putv1companiescompanyidpayrollspayrollidprepare'\nimport { UnprocessableEntityError } from '@gusto/embedded-api/models/errors/unprocessableentityerror'\nimport { useBase } from '../Base'\nimport { retryAsync } from '@/helpers/retryAsync'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n employeeUuids?: string[]\n sortBy?: QueryParamSortBy\n onDataReady?: (preparedPayroll: PayrollPrepared) => void\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleShow | undefined\n isLoading: boolean\n isPaginating: boolean\n hasInitialData: boolean\n}\n\nconst PREPARE_MAX_ATTEMPTS = 4\nconst PREPARE_RETRY_DELAY_MS = 1500\n\nconst isPayrollBeingProcessedError = (error: unknown): boolean => {\n if (!(error instanceof UnprocessableEntityError)) return false\n return error.errors.some(e => e.category === 'invalid_operation')\n}\n\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n employeeUuids,\n sortBy,\n onDataReady,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n const hasInitialDataRef = useRef(false)\n const hasFiredRef = useRef(false)\n const { baseSubmitHandler } = useBase()\n\n const employeeUuidsKey = useMemo(() => employeeUuids?.join(',') ?? '', [employeeUuids])\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: !!preparedPayroll?.payPeriod?.payScheduleUuid,\n },\n )\n\n const executePrepare = useCallback(async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n sortBy,\n requestBody: {\n employeeUuids,\n },\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n if (result.payrollPrepared) {\n hasInitialDataRef.current = true\n onDataReady?.(result.payrollPrepared)\n }\n }, [companyId, payrollId, preparePayroll, employeeUuidsKey, sortBy, onDataReady])\n\n const handlePreparePayroll = useCallback(async () => {\n await baseSubmitHandler(null, () =>\n retryAsync(executePrepare, {\n maxAttempts: PREPARE_MAX_ATTEMPTS,\n delayMs: PREPARE_RETRY_DELAY_MS,\n shouldRetry: isPayrollBeingProcessedError,\n }),\n )\n }, [baseSubmitHandler, executePrepare])\n\n useEffect(() => {\n if (hasFiredRef.current) return\n hasFiredRef.current = true\n void handlePreparePayroll()\n }, [handlePreparePayroll])\n\n const isInitialLoading = isPreparePayrollPending && !hasInitialDataRef.current\n const isPaginating = isPreparePayrollPending && hasInitialDataRef.current\n const isLoading = isInitialLoading || isPayScheduleLoading\n\n return {\n handlePreparePayroll,\n preparedPayroll,\n paySchedule: payScheduleData?.payScheduleShow,\n isLoading,\n isPaginating,\n hasInitialData: hasInitialDataRef.current,\n }\n}\n"],"names":["PREPARE_MAX_ATTEMPTS","PREPARE_RETRY_DELAY_MS","isPayrollBeingProcessedError","error","UnprocessableEntityError","e","usePreparedPayrollData","companyId","payrollId","employeeUuids","sortBy","onDataReady","preparePayroll","isPreparePayrollPending","usePayrollsPrepareMutation","preparedPayroll","setPreparedPayroll","useState","hasInitialDataRef","useRef","hasFiredRef","baseSubmitHandler","useBase","employeeUuidsKey","useMemo","payScheduleData","isPayScheduleLoading","usePaySchedulesGet","executePrepare","useCallback","result","handlePreparePayroll","retryAsync","useEffect","isInitialLoading","isPaginating","isLoading"],"mappings":";;;;;;AA2BA,MAAMA,IAAuB,GACvBC,IAAyB,MAEzBC,IAA+B,CAACC,MAC9BA,aAAiBC,IAChBD,EAAM,OAAO,KAAK,CAAAE,MAAKA,EAAE,aAAa,mBAAmB,IADP,IAI9CC,IAAyB,CAAC;AAAA,EACrC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,MAAkE;AAChE,QAAM,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAC9CC,EAAA,GACI,CAACC,GAAiBC,CAAkB,IAAIC,EAAA,GACxCC,IAAoBC,EAAO,EAAK,GAChCC,IAAcD,EAAO,EAAK,GAC1B,EAAE,mBAAAE,EAAA,IAAsBC,EAAA,GAExBC,IAAmBC,EAAQ,MAAMf,GAAe,KAAK,GAAG,KAAK,IAAI,CAACA,CAAa,CAAC,GAEhF,EAAE,MAAMgB,GAAiB,WAAWC,MAAyBC;AAAA,IACjE;AAAA,MACE,WAAApB;AAAA,MACA,eAAeQ,GAAiB,WAAW,mBAAmB;AAAA,IAAA;AAAA,IAEhE;AAAA,MACE,SAAS,CAAC,CAACA,GAAiB,WAAW;AAAA,IAAA;AAAA,EACzC,GAGIa,IAAiBC,EAAY,YAAY;AAC7C,UAAMC,IAAS,MAAMlB,EAAe;AAAA,MAClC,SAAS;AAAA,QACP,WAAAL;AAAA,QACA,WAAAC;AAAA,QACA,QAAAE;AAAA,QACA,aAAa;AAAA,UACX,eAAAD;AAAA,QAAA;AAAA,MACF;AAAA,IACF,CACD;AACD,IAAAO,EAAmBc,EAAO,eAAe,GACrCA,EAAO,oBACTZ,EAAkB,UAAU,IAC5BP,IAAcmB,EAAO,eAAe;AAAA,EAExC,GAAG,CAACvB,GAAWC,GAAWI,GAAgBW,GAAkBb,GAAQC,CAAW,CAAC,GAE1EoB,IAAuBF,EAAY,YAAY;AACnD,UAAMR;AAAA,MAAkB;AAAA,MAAM,MAC5BW,EAAWJ,GAAgB;AAAA,QACzB,aAAa5B;AAAA,QACb,SAASC;AAAA,QACT,aAAaC;AAAA,MAAA,CACd;AAAA,IAAA;AAAA,EAEL,GAAG,CAACmB,GAAmBO,CAAc,CAAC;AAEtC,EAAAK,EAAU,MAAM;AACd,IAAIb,EAAY,YAChBA,EAAY,UAAU,IACjBW,EAAA;AAAA,EACP,GAAG,CAACA,CAAoB,CAAC;AAEzB,QAAMG,IAAmBrB,KAA2B,CAACK,EAAkB,SACjEiB,IAAetB,KAA2BK,EAAkB,SAC5DkB,IAAYF,KAAoBR;AAEtC,SAAO;AAAA,IACL,sBAAAK;AAAA,IACA,iBAAAhB;AAAA,IACA,aAAaU,GAAiB;AAAA,IAC9B,WAAAW;AAAA,IACA,cAAAD;AAAA,IACA,gBAAgBjB,EAAkB;AAAA,EAAA;AAEtC;"}
|
|
@@ -1,119 +1,121 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
import { useHolidayPayPoliciesGetSuspense as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useMemo as u } from "react";
|
|
3
|
+
import { useTranslation as T } from "react-i18next";
|
|
4
|
+
import { useQueryClient as Y } from "@tanstack/react-query";
|
|
5
|
+
import { useHolidayPayPoliciesGetSuspense as j, invalidateAllHolidayPayPoliciesGet as q } from "@gusto/embedded-api/react-query/holidayPayPoliciesGet";
|
|
6
6
|
import { useHolidayPayPoliciesRemoveEmployeesMutation as x } from "@gusto/embedded-api/react-query/holidayPayPoliciesRemoveEmployees";
|
|
7
7
|
import { useEmployeesListSuspense as Q } from "@gusto/embedded-api/react-query/employeesList";
|
|
8
|
-
import { getDefaultHolidayItems as
|
|
9
|
-
import { HolidayPolicyDetailPresentation as
|
|
8
|
+
import { getDefaultHolidayItems as G } from "../shared/holidayHelpers.js";
|
|
9
|
+
import { HolidayPolicyDetailPresentation as $ } from "./HolidayPolicyDetailPresentation.js";
|
|
10
|
+
import { useClientPagination as K } from "../../../hooks/useClientPagination/useClientPagination.js";
|
|
10
11
|
import { BaseComponent as V } from "../../Base/Base.js";
|
|
11
|
-
import { useBase as
|
|
12
|
-
import { componentEvents as
|
|
13
|
-
import { useComponentContext as
|
|
14
|
-
import { useI18n as
|
|
15
|
-
import { useLocale as
|
|
16
|
-
import { firstLastName as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { HamburgerMenu as
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
12
|
+
import { useBase as z } from "../../Base/useBase.js";
|
|
13
|
+
import { componentEvents as y } from "../../../shared/constants.js";
|
|
14
|
+
import { useComponentContext as J } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
+
import { useI18n as D } from "../../../i18n/I18n.js";
|
|
16
|
+
import { useLocale as W } from "../../../contexts/LocaleProvider/useLocale.js";
|
|
17
|
+
import { firstLastName as S } from "../../../helpers/formattedStrings.js";
|
|
18
|
+
import X from "../../../assets/icons/trashcan.svg.js";
|
|
19
|
+
import Z from "../../../assets/icons/edit-02.svg.js";
|
|
20
|
+
import ee from "../../../assets/icons/plus-circle.svg.js";
|
|
21
|
+
import { HamburgerMenu as oe } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
22
|
+
function He(t) {
|
|
23
|
+
return /* @__PURE__ */ a(V, { ...t, componentName: "Company.TimeOff.HolidayPolicy", children: /* @__PURE__ */ a(ae, { ...t }) });
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
const { t: i } =
|
|
27
|
-
companyId:
|
|
25
|
+
function ae({ companyId: t, defaultTab: _ = "holidays" }) {
|
|
26
|
+
D("Company.TimeOff.HolidayPolicy"), D("Company.TimeOff.PolicyDetail");
|
|
27
|
+
const { t: i } = T("Company.TimeOff.HolidayPolicy"), { t: l } = T("Company.TimeOff.PolicyDetail"), { Button: p } = J(), { locale: f } = W(), H = Y(), { onEvent: r, baseSubmitHandler: b } = z(), [A, N] = d(_), [O, h] = d(null), [n, m] = d(null), s = j({ companyUuid: t }).data.holidayPayPolicy, { data: C } = Q({
|
|
28
|
+
companyId: t,
|
|
28
29
|
terminated: !1
|
|
29
|
-
}),
|
|
30
|
-
const e =
|
|
31
|
-
return e.filter((
|
|
32
|
-
}, [i, s,
|
|
30
|
+
}), P = x(), L = u(() => {
|
|
31
|
+
const e = G(i, void 0, f), { federalHolidays: o } = s;
|
|
32
|
+
return e.filter((c) => o[c.uuid]?.selected === !0);
|
|
33
|
+
}, [i, s, f]), g = u(
|
|
33
34
|
() => new Set(s.employees.map((e) => e.uuid)),
|
|
34
35
|
[s.employees]
|
|
35
|
-
),
|
|
36
|
+
), w = u(() => (C.showEmployees ?? []).filter((o) => g.has(o.uuid)).map((o) => ({
|
|
36
37
|
uuid: o.uuid,
|
|
37
38
|
firstName: o.firstName,
|
|
38
39
|
lastName: o.lastName,
|
|
39
|
-
jobTitle: o.title ?? null
|
|
40
|
-
})), [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
jobTitle: o.jobs?.find((c) => c.primary)?.title ?? null
|
|
41
|
+
})), [C.showEmployees, g]), {
|
|
42
|
+
data: I,
|
|
43
|
+
pagination: M,
|
|
44
|
+
searchValue: k,
|
|
45
|
+
actions: E
|
|
46
|
+
} = K(w, {
|
|
47
|
+
defaultItemsPerPage: 10,
|
|
48
|
+
searchPredicate: (e, o) => `${e.firstName ?? ""} ${e.lastName ?? ""}`.toLowerCase().includes(o.toLowerCase())
|
|
49
|
+
}), B = async () => {
|
|
48
50
|
if (!n) return;
|
|
49
51
|
const e = n.uuid, o = n.name;
|
|
50
|
-
|
|
51
|
-
await
|
|
52
|
+
m(null), await b({}, async () => {
|
|
53
|
+
await P.mutateAsync({
|
|
52
54
|
request: {
|
|
53
|
-
companyUuid:
|
|
55
|
+
companyUuid: t,
|
|
54
56
|
requestBody: {
|
|
55
57
|
version: s.version,
|
|
56
58
|
employees: [{ uuid: e }]
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
|
-
}), await
|
|
61
|
+
}), await q(H), h(i("flash.employeeRemoved", { name: o }));
|
|
60
62
|
});
|
|
61
|
-
}, k = () => {
|
|
62
|
-
u(f.TIME_OFF_BACK_TO_LIST);
|
|
63
|
-
}, B = () => {
|
|
64
|
-
u(f.TIME_OFF_HOLIDAY_ADD_EMPLOYEES);
|
|
65
63
|
}, F = () => {
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
r(y.TIME_OFF_BACK_TO_LIST);
|
|
65
|
+
}, v = () => {
|
|
66
|
+
r(y.TIME_OFF_HOLIDAY_ADD_EMPLOYEES);
|
|
67
|
+
}, R = () => {
|
|
68
|
+
r(y.TIME_OFF_EDIT_HOLIDAY_POLICY);
|
|
69
|
+
}, U = [
|
|
70
|
+
/* @__PURE__ */ a(
|
|
71
|
+
p,
|
|
70
72
|
{
|
|
71
73
|
variant: "secondary",
|
|
72
|
-
icon: /* @__PURE__ */
|
|
73
|
-
onClick:
|
|
74
|
+
icon: /* @__PURE__ */ a(ee, { "aria-hidden": !0 }),
|
|
75
|
+
onClick: v,
|
|
74
76
|
children: i("show.addEmployeesCta")
|
|
75
77
|
},
|
|
76
78
|
"add"
|
|
77
79
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
80
|
+
/* @__PURE__ */ a(
|
|
81
|
+
p,
|
|
80
82
|
{
|
|
81
83
|
variant: "secondary",
|
|
82
|
-
icon: /* @__PURE__ */
|
|
83
|
-
onClick:
|
|
84
|
+
icon: /* @__PURE__ */ a(Z, { "aria-hidden": !0 }),
|
|
85
|
+
onClick: R,
|
|
84
86
|
children: i("show.editPolicyCta")
|
|
85
87
|
},
|
|
86
88
|
"edit"
|
|
87
89
|
)
|
|
88
90
|
];
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
|
|
91
|
+
return /* @__PURE__ */ a(
|
|
92
|
+
$,
|
|
91
93
|
{
|
|
92
94
|
title: i("show.title"),
|
|
93
|
-
onBack:
|
|
94
|
-
backLabel:
|
|
95
|
-
actions:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
onBack: F,
|
|
96
|
+
backLabel: l("backLabel"),
|
|
97
|
+
actions: U,
|
|
98
|
+
onAddEmployee: v,
|
|
99
|
+
holidays: L,
|
|
100
|
+
selectedTabId: A,
|
|
101
|
+
onTabChange: N,
|
|
99
102
|
employees: {
|
|
100
103
|
data: I,
|
|
101
|
-
searchValue:
|
|
102
|
-
onSearchChange:
|
|
103
|
-
onSearchClear:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
$,
|
|
104
|
+
searchValue: k,
|
|
105
|
+
onSearchChange: E.onSearchChange,
|
|
106
|
+
onSearchClear: E.onSearchClear,
|
|
107
|
+
pagination: M,
|
|
108
|
+
itemMenu: (e) => /* @__PURE__ */ a(
|
|
109
|
+
oe,
|
|
108
110
|
{
|
|
109
111
|
items: [
|
|
110
112
|
{
|
|
111
|
-
label:
|
|
112
|
-
icon: /* @__PURE__ */
|
|
113
|
+
label: l("removeEmployeeDialog.confirmCta"),
|
|
114
|
+
icon: /* @__PURE__ */ a(X, { "aria-hidden": !0 }),
|
|
113
115
|
onClick: () => {
|
|
114
|
-
|
|
116
|
+
m({
|
|
115
117
|
uuid: e.uuid,
|
|
116
|
-
name:
|
|
118
|
+
name: S({
|
|
117
119
|
first_name: e.firstName,
|
|
118
120
|
last_name: e.lastName
|
|
119
121
|
})
|
|
@@ -121,8 +123,8 @@ function ee({ companyId: a, defaultTab: H = "holidays" }) {
|
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
],
|
|
124
|
-
triggerLabel:
|
|
125
|
-
name:
|
|
126
|
+
triggerLabel: l("employeeActions", {
|
|
127
|
+
name: S({ first_name: e.firstName, last_name: e.lastName })
|
|
126
128
|
})
|
|
127
129
|
}
|
|
128
130
|
)
|
|
@@ -130,20 +132,20 @@ function ee({ companyId: a, defaultTab: H = "holidays" }) {
|
|
|
130
132
|
removeDialog: {
|
|
131
133
|
isOpen: n !== null,
|
|
132
134
|
employeeName: n?.name ?? "",
|
|
133
|
-
onConfirm:
|
|
135
|
+
onConfirm: B,
|
|
134
136
|
onClose: () => {
|
|
135
|
-
|
|
137
|
+
m(null);
|
|
136
138
|
},
|
|
137
|
-
isPending:
|
|
139
|
+
isPending: P.isPending
|
|
138
140
|
},
|
|
139
|
-
successAlert:
|
|
141
|
+
successAlert: O ?? void 0,
|
|
140
142
|
onDismissAlert: () => {
|
|
141
|
-
|
|
143
|
+
h(null);
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
);
|
|
145
147
|
}
|
|
146
148
|
export {
|
|
147
|
-
|
|
149
|
+
He as HolidayPolicyDetail
|
|
148
150
|
};
|
|
149
151
|
//# sourceMappingURL=HolidayPolicyDetail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HolidayPolicyDetail.js","sources":["../../../../src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useQueryClient } from '@tanstack/react-query'\nimport {\n useHolidayPayPoliciesGetSuspense,\n invalidateAllHolidayPayPoliciesGet,\n} from '@gusto/embedded-api/react-query/holidayPayPoliciesGet'\nimport { useHolidayPayPoliciesRemoveEmployeesMutation } from '@gusto/embedded-api/react-query/holidayPayPoliciesRemoveEmployees'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport { getDefaultHolidayItems } from '../shared/holidayHelpers'\nimport { HolidayPolicyDetailPresentation } from './HolidayPolicyDetailPresentation'\nimport type { HolidayPolicyDetailEmployee } from './HolidayPolicyDetailTypes'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport EditIcon from '@/assets/icons/edit-02.svg?react'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nexport interface HolidayPolicyDetailProps extends BaseComponentInterface {\n companyId: string\n defaultTab?: 'holidays' | 'employees'\n}\n\nexport function HolidayPolicyDetail(props: HolidayPolicyDetailProps) {\n return (\n <BaseComponent {...props} componentName=\"Company.TimeOff.HolidayPolicy\">\n <Root {...props} />\n </BaseComponent>\n )\n}\n\ninterface RemoveDialogTarget {\n uuid: string\n name: string\n}\n\nfunction Root({ companyId, defaultTab = 'holidays' }: HolidayPolicyDetailProps) {\n useI18n('Company.TimeOff.HolidayPolicy')\n useI18n('Company.TimeOff.PolicyDetail')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n const { t: tShared } = useTranslation('Company.TimeOff.PolicyDetail')\n const { Button } = useComponentContext()\n const { locale } = useLocale()\n const queryClient = useQueryClient()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [selectedTabId, setSelectedTabId] = useState<string>(defaultTab)\n const [searchValue, setSearchValue] = useState('')\n const [successAlert, setSuccessAlert] = useState<string | null>(null)\n const [removeDialogTarget, setRemoveDialogTarget] = useState<RemoveDialogTarget | null>(null)\n\n const holidayQuery = useHolidayPayPoliciesGetSuspense({ companyUuid: companyId })\n const holidayPayPolicy = holidayQuery.data.holidayPayPolicy!\n\n const { data: employeesData } = useEmployeesListSuspense({\n companyId,\n terminated: false,\n })\n\n const removeEmployeesMutation = useHolidayPayPoliciesRemoveEmployeesMutation()\n\n const holidays = useMemo(() => {\n const allHolidays = getDefaultHolidayItems(t, undefined, locale)\n const { federalHolidays } = holidayPayPolicy\n return allHolidays.filter(holiday => {\n const holidayData = federalHolidays[holiday.uuid as keyof typeof federalHolidays]\n return holidayData?.selected === true\n })\n }, [t, holidayPayPolicy, locale])\n\n const policyEmployeeUuids = useMemo(\n () => new Set(holidayPayPolicy.employees.map(e => e.uuid)),\n [holidayPayPolicy.employees],\n )\n\n const employees: HolidayPolicyDetailEmployee[] = useMemo(() => {\n const allEmployees = employeesData.showEmployees ?? []\n return allEmployees\n .filter(emp => policyEmployeeUuids.has(emp.uuid))\n .map(emp => ({\n uuid: emp.uuid,\n firstName: emp.firstName,\n lastName: emp.lastName,\n jobTitle: emp.title ?? null,\n }))\n }, [employeesData.showEmployees, policyEmployeeUuids])\n\n const filteredEmployees = useMemo(() => {\n if (!searchValue) return employees\n const query = searchValue.toLowerCase()\n return employees.filter(emp => {\n const name = firstLastName({\n first_name: emp.firstName,\n last_name: emp.lastName,\n }).toLowerCase()\n return name.includes(query)\n })\n }, [employees, searchValue])\n\n const handleRemoveEmployee = async () => {\n if (!removeDialogTarget) return\n\n const targetUuid = removeDialogTarget.uuid\n const targetName = removeDialogTarget.name\n setRemoveDialogTarget(null)\n\n await baseSubmitHandler({}, async () => {\n await removeEmployeesMutation.mutateAsync({\n request: {\n companyUuid: companyId,\n requestBody: {\n version: holidayPayPolicy.version!,\n employees: [{ uuid: targetUuid }],\n },\n },\n })\n await invalidateAllHolidayPayPoliciesGet(queryClient)\n setSuccessAlert(t('flash.employeeRemoved', { name: targetName }))\n })\n }\n\n const handleBack = () => {\n onEvent(componentEvents.TIME_OFF_BACK_TO_LIST)\n }\n\n const handleAddEmployees = () => {\n onEvent(componentEvents.TIME_OFF_HOLIDAY_ADD_EMPLOYEES)\n }\n\n const handleEditPolicy = () => {\n onEvent(componentEvents.TIME_OFF_EDIT_HOLIDAY_POLICY)\n }\n\n const actions = [\n <Button\n key=\"add\"\n variant=\"secondary\"\n icon={<PlusCircleIcon aria-hidden />}\n onClick={handleAddEmployees}\n >\n {t('show.addEmployeesCta')}\n </Button>,\n <Button\n key=\"edit\"\n variant=\"secondary\"\n icon={<EditIcon aria-hidden />}\n onClick={handleEditPolicy}\n >\n {t('show.editPolicyCta')}\n </Button>,\n ]\n\n return (\n <HolidayPolicyDetailPresentation\n title={t('show.title')}\n onBack={handleBack}\n backLabel={tShared('backLabel')}\n actions={actions}\n holidays={holidays}\n selectedTabId={selectedTabId}\n onTabChange={setSelectedTabId}\n employees={{\n data: filteredEmployees,\n searchValue,\n onSearchChange: setSearchValue,\n onSearchClear: () => {\n setSearchValue('')\n },\n itemMenu: employee => (\n <HamburgerMenu\n items={[\n {\n label: tShared('removeEmployeeDialog.confirmCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n setRemoveDialogTarget({\n uuid: employee.uuid,\n name: firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n }),\n })\n },\n },\n ]}\n triggerLabel={tShared('employeeActions', {\n name: firstLastName({ first_name: employee.firstName, last_name: employee.lastName }),\n })}\n />\n ),\n }}\n removeDialog={{\n isOpen: removeDialogTarget !== null,\n employeeName: removeDialogTarget?.name ?? '',\n onConfirm: handleRemoveEmployee,\n onClose: () => {\n setRemoveDialogTarget(null)\n },\n isPending: removeEmployeesMutation.isPending,\n }}\n successAlert={successAlert ?? undefined}\n onDismissAlert={() => {\n setSuccessAlert(null)\n }}\n />\n )\n}\n"],"names":["HolidayPolicyDetail","props","jsx","BaseComponent","Root","companyId","defaultTab","useI18n","t","useTranslation","tShared","Button","useComponentContext","locale","useLocale","queryClient","useQueryClient","onEvent","baseSubmitHandler","useBase","selectedTabId","setSelectedTabId","useState","searchValue","setSearchValue","successAlert","setSuccessAlert","removeDialogTarget","setRemoveDialogTarget","holidayPayPolicy","useHolidayPayPoliciesGetSuspense","employeesData","useEmployeesListSuspense","removeEmployeesMutation","useHolidayPayPoliciesRemoveEmployeesMutation","holidays","useMemo","allHolidays","getDefaultHolidayItems","federalHolidays","holiday","policyEmployeeUuids","employees","emp","filteredEmployees","query","firstLastName","handleRemoveEmployee","targetUuid","targetName","invalidateAllHolidayPayPoliciesGet","handleBack","componentEvents","handleAddEmployees","handleEditPolicy","actions","PlusCircleIcon","EditIcon","HolidayPolicyDetailPresentation","employee","HamburgerMenu","TrashCanSvg"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BO,SAASA,GAAoBC,GAAiC;AACnE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GAAO,eAAc,iCACtC,UAAA,gBAAAC,EAACE,IAAA,EAAM,GAAGH,EAAA,CAAO,EAAA,CACnB;AAEJ;AAOA,SAASG,GAAK,EAAE,WAAAC,GAAW,YAAAC,IAAa,cAAwC;AAC9E,EAAAC,EAAQ,+BAA+B,GACvCA,EAAQ,8BAA8B;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,GAAGC,MAAYD,EAAe,8BAA8B,GAC9D,EAAE,QAAAE,EAAA,IAAWC,EAAA,GACb,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAcC,EAAA,GACd,EAAE,SAAAC,GAAS,mBAA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C,EAAgB,IAAI;AAAA,MACtB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"HolidayPolicyDetail.js","sources":["../../../../src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useQueryClient } from '@tanstack/react-query'\nimport {\n useHolidayPayPoliciesGetSuspense,\n invalidateAllHolidayPayPoliciesGet,\n} from '@gusto/embedded-api/react-query/holidayPayPoliciesGet'\nimport { useHolidayPayPoliciesRemoveEmployeesMutation } from '@gusto/embedded-api/react-query/holidayPayPoliciesRemoveEmployees'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport { getDefaultHolidayItems } from '../shared/holidayHelpers'\nimport { HolidayPolicyDetailPresentation } from './HolidayPolicyDetailPresentation'\nimport type { HolidayPolicyDetailEmployee } from './HolidayPolicyDetailTypes'\nimport { useClientPagination } from '@/hooks/useClientPagination/useClientPagination'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport EditIcon from '@/assets/icons/edit-02.svg?react'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nexport interface HolidayPolicyDetailProps extends BaseComponentInterface {\n companyId: string\n defaultTab?: 'holidays' | 'employees'\n}\n\nexport function HolidayPolicyDetail(props: HolidayPolicyDetailProps) {\n return (\n <BaseComponent {...props} componentName=\"Company.TimeOff.HolidayPolicy\">\n <Root {...props} />\n </BaseComponent>\n )\n}\n\ninterface RemoveDialogTarget {\n uuid: string\n name: string\n}\n\nfunction Root({ companyId, defaultTab = 'holidays' }: HolidayPolicyDetailProps) {\n useI18n('Company.TimeOff.HolidayPolicy')\n useI18n('Company.TimeOff.PolicyDetail')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n const { t: tShared } = useTranslation('Company.TimeOff.PolicyDetail')\n const { Button } = useComponentContext()\n const { locale } = useLocale()\n const queryClient = useQueryClient()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [selectedTabId, setSelectedTabId] = useState<string>(defaultTab)\n const [successAlert, setSuccessAlert] = useState<string | null>(null)\n const [removeDialogTarget, setRemoveDialogTarget] = useState<RemoveDialogTarget | null>(null)\n\n const holidayQuery = useHolidayPayPoliciesGetSuspense({ companyUuid: companyId })\n const holidayPayPolicy = holidayQuery.data.holidayPayPolicy!\n\n const { data: employeesData } = useEmployeesListSuspense({\n companyId,\n terminated: false,\n })\n\n const removeEmployeesMutation = useHolidayPayPoliciesRemoveEmployeesMutation()\n\n const holidays = useMemo(() => {\n const allHolidays = getDefaultHolidayItems(t, undefined, locale)\n const { federalHolidays } = holidayPayPolicy\n return allHolidays.filter(holiday => {\n const holidayData = federalHolidays[holiday.uuid as keyof typeof federalHolidays]\n return holidayData?.selected === true\n })\n }, [t, holidayPayPolicy, locale])\n\n const policyEmployeeUuids = useMemo(\n () => new Set(holidayPayPolicy.employees.map(e => e.uuid)),\n [holidayPayPolicy.employees],\n )\n\n const employees: HolidayPolicyDetailEmployee[] = useMemo(() => {\n const allEmployees = employeesData.showEmployees ?? []\n return allEmployees\n .filter(emp => policyEmployeeUuids.has(emp.uuid))\n .map(emp => ({\n uuid: emp.uuid,\n firstName: emp.firstName,\n lastName: emp.lastName,\n jobTitle: emp.jobs?.find(job => job.primary)?.title ?? null,\n }))\n }, [employeesData.showEmployees, policyEmployeeUuids])\n\n const {\n data: pagedEmployees,\n pagination,\n searchValue,\n actions: paginationActions,\n } = useClientPagination(employees, {\n defaultItemsPerPage: 10,\n searchPredicate: (emp, query) =>\n `${emp.firstName ?? ''} ${emp.lastName ?? ''}`.toLowerCase().includes(query.toLowerCase()),\n })\n\n const handleRemoveEmployee = async () => {\n if (!removeDialogTarget) return\n\n const targetUuid = removeDialogTarget.uuid\n const targetName = removeDialogTarget.name\n setRemoveDialogTarget(null)\n\n await baseSubmitHandler({}, async () => {\n await removeEmployeesMutation.mutateAsync({\n request: {\n companyUuid: companyId,\n requestBody: {\n version: holidayPayPolicy.version!,\n employees: [{ uuid: targetUuid }],\n },\n },\n })\n await invalidateAllHolidayPayPoliciesGet(queryClient)\n setSuccessAlert(t('flash.employeeRemoved', { name: targetName }))\n })\n }\n\n const handleBack = () => {\n onEvent(componentEvents.TIME_OFF_BACK_TO_LIST)\n }\n\n const handleAddEmployees = () => {\n onEvent(componentEvents.TIME_OFF_HOLIDAY_ADD_EMPLOYEES)\n }\n\n const handleEditPolicy = () => {\n onEvent(componentEvents.TIME_OFF_EDIT_HOLIDAY_POLICY)\n }\n\n const actions = [\n <Button\n key=\"add\"\n variant=\"secondary\"\n icon={<PlusCircleIcon aria-hidden />}\n onClick={handleAddEmployees}\n >\n {t('show.addEmployeesCta')}\n </Button>,\n <Button\n key=\"edit\"\n variant=\"secondary\"\n icon={<EditIcon aria-hidden />}\n onClick={handleEditPolicy}\n >\n {t('show.editPolicyCta')}\n </Button>,\n ]\n\n return (\n <HolidayPolicyDetailPresentation\n title={t('show.title')}\n onBack={handleBack}\n backLabel={tShared('backLabel')}\n actions={actions}\n onAddEmployee={handleAddEmployees}\n holidays={holidays}\n selectedTabId={selectedTabId}\n onTabChange={setSelectedTabId}\n employees={{\n data: pagedEmployees,\n searchValue,\n onSearchChange: paginationActions.onSearchChange,\n onSearchClear: paginationActions.onSearchClear,\n pagination,\n itemMenu: employee => (\n <HamburgerMenu\n items={[\n {\n label: tShared('removeEmployeeDialog.confirmCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n setRemoveDialogTarget({\n uuid: employee.uuid,\n name: firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n }),\n })\n },\n },\n ]}\n triggerLabel={tShared('employeeActions', {\n name: firstLastName({ first_name: employee.firstName, last_name: employee.lastName }),\n })}\n />\n ),\n }}\n removeDialog={{\n isOpen: removeDialogTarget !== null,\n employeeName: removeDialogTarget?.name ?? '',\n onConfirm: handleRemoveEmployee,\n onClose: () => {\n setRemoveDialogTarget(null)\n },\n isPending: removeEmployeesMutation.isPending,\n }}\n successAlert={successAlert ?? undefined}\n onDismissAlert={() => {\n setSuccessAlert(null)\n }}\n />\n )\n}\n"],"names":["HolidayPolicyDetail","props","jsx","BaseComponent","Root","companyId","defaultTab","useI18n","t","useTranslation","tShared","Button","useComponentContext","locale","useLocale","queryClient","useQueryClient","onEvent","baseSubmitHandler","useBase","selectedTabId","setSelectedTabId","useState","successAlert","setSuccessAlert","removeDialogTarget","setRemoveDialogTarget","holidayPayPolicy","useHolidayPayPoliciesGetSuspense","employeesData","useEmployeesListSuspense","removeEmployeesMutation","useHolidayPayPoliciesRemoveEmployeesMutation","holidays","useMemo","allHolidays","getDefaultHolidayItems","federalHolidays","holiday","policyEmployeeUuids","employees","emp","job","pagedEmployees","pagination","searchValue","paginationActions","useClientPagination","query","handleRemoveEmployee","targetUuid","targetName","invalidateAllHolidayPayPoliciesGet","handleBack","componentEvents","handleAddEmployees","handleEditPolicy","actions","PlusCircleIcon","EditIcon","HolidayPolicyDetailPresentation","employee","HamburgerMenu","TrashCanSvg","firstLastName"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BO,SAASA,GAAoBC,GAAiC;AACnE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GAAO,eAAc,iCACtC,UAAA,gBAAAC,EAACE,IAAA,EAAM,GAAGH,EAAA,CAAO,EAAA,CACnB;AAEJ;AAOA,SAASG,GAAK,EAAE,WAAAC,GAAW,YAAAC,IAAa,cAAwC;AAC9E,EAAAC,EAAQ,+BAA+B,GACvCA,EAAQ,8BAA8B;A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cAAcA,GAAoB,QAAQ;AAAA,QAC1C,WAAWwB;AAAA,QACX,SAAS,MAAM;AACb,UAAAvB,EAAsB,IAAI;AAAA,QAC5B;AAAA,QACA,WAAWK,EAAwB;AAAA,MAAA;AAAA,MAErC,cAAcR,KAAgB;AAAA,MAC9B,gBAAgB,MAAM;AACpB,QAAAC,EAAgB,IAAI;AAAA,MACtB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HolidayPolicyDetailPresentationProps } from './HolidayPolicyDetailTypes';
|
|
2
|
-
export declare function HolidayPolicyDetailPresentation({ title, subtitle, onBack, backLabel, actions, holidays, selectedTabId, onTabChange, employees, removeDialog, successAlert, onDismissAlert, }: HolidayPolicyDetailPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function HolidayPolicyDetailPresentation({ title, subtitle, onBack, backLabel, actions, holidays, selectedTabId, onTabChange, employees, onAddEmployee, removeDialog, successAlert, onDismissAlert, }: HolidayPolicyDetailPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as D } from "react";
|
|
3
|
+
import { useTranslation as n } from "react-i18next";
|
|
4
4
|
import "classnames";
|
|
5
5
|
import "../../../shared/constants.js";
|
|
6
|
-
import {
|
|
7
|
-
import { useI18n as d } from "../../../i18n/I18n.js";
|
|
6
|
+
import { useI18n as l } from "../../../i18n/I18n.js";
|
|
8
7
|
import { PolicyDetailLayout as T } from "../shared/PolicyDetailLayout/PolicyDetailLayout.js";
|
|
9
|
-
import { useDataView as
|
|
10
|
-
import { DataView as
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
title:
|
|
8
|
+
import { useDataView as O } from "../../Common/DataView/useDataView.js";
|
|
9
|
+
import { DataView as P } from "../../Common/DataView/DataView.js";
|
|
10
|
+
const v = "holidays";
|
|
11
|
+
function j({
|
|
12
|
+
title: t,
|
|
14
13
|
subtitle: e,
|
|
15
|
-
onBack:
|
|
16
|
-
backLabel:
|
|
17
|
-
actions:
|
|
18
|
-
holidays:
|
|
19
|
-
selectedTabId:
|
|
20
|
-
onTabChange:
|
|
21
|
-
employees:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
onBack: a,
|
|
15
|
+
backLabel: i,
|
|
16
|
+
actions: o,
|
|
17
|
+
holidays: s,
|
|
18
|
+
selectedTabId: m,
|
|
19
|
+
onTabChange: y,
|
|
20
|
+
employees: d,
|
|
21
|
+
onAddEmployee: f,
|
|
22
|
+
removeDialog: b,
|
|
23
|
+
successAlert: c,
|
|
24
|
+
onDismissAlert: p
|
|
25
25
|
}) {
|
|
26
|
-
|
|
27
|
-
const { t:
|
|
28
|
-
return /* @__PURE__ */
|
|
26
|
+
l("Company.TimeOff.HolidayPolicy");
|
|
27
|
+
const { t: u } = n("Company.TimeOff.HolidayPolicy"), H = /* @__PURE__ */ r(x, { holidays: s });
|
|
28
|
+
return /* @__PURE__ */ r(
|
|
29
29
|
T,
|
|
30
30
|
{
|
|
31
|
-
title:
|
|
31
|
+
title: t,
|
|
32
32
|
subtitle: e,
|
|
33
|
-
onBack:
|
|
34
|
-
backLabel:
|
|
35
|
-
actions:
|
|
33
|
+
onBack: a,
|
|
34
|
+
backLabel: i,
|
|
35
|
+
actions: o,
|
|
36
36
|
firstTab: {
|
|
37
|
-
id:
|
|
38
|
-
label:
|
|
39
|
-
content:
|
|
37
|
+
id: v,
|
|
38
|
+
label: u("tabs.holidays"),
|
|
39
|
+
content: H
|
|
40
40
|
},
|
|
41
|
-
selectedTabId:
|
|
42
|
-
onTabChange:
|
|
43
|
-
employees:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
selectedTabId: m,
|
|
42
|
+
onTabChange: y,
|
|
43
|
+
employees: d,
|
|
44
|
+
onAddEmployee: f,
|
|
45
|
+
removeDialog: b,
|
|
46
|
+
successAlert: c,
|
|
47
|
+
onDismissAlert: p
|
|
47
48
|
}
|
|
48
49
|
);
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
const { t: e } =
|
|
51
|
+
function x({ holidays: t }) {
|
|
52
|
+
l("Company.TimeOff.HolidayPolicy");
|
|
53
|
+
const { t: e } = n("Company.TimeOff.HolidayPolicy"), a = D(
|
|
53
54
|
() => [
|
|
54
55
|
{
|
|
55
56
|
key: "name",
|
|
56
57
|
title: e("tableHeaders.holidayName"),
|
|
57
|
-
render: (
|
|
58
|
+
render: (o) => o.name
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
key: "observedDate",
|
|
61
62
|
title: e("tableHeaders.observedDate"),
|
|
62
|
-
render: (
|
|
63
|
+
render: (o) => o.observedDate
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
66
|
key: "nextObservation",
|
|
66
67
|
title: e("tableHeaders.nextObservation"),
|
|
67
|
-
render: (
|
|
68
|
+
render: (o) => o.nextObservation
|
|
68
69
|
}
|
|
69
70
|
],
|
|
70
|
-
[e
|
|
71
|
-
),
|
|
72
|
-
data:
|
|
73
|
-
columns:
|
|
71
|
+
[e]
|
|
72
|
+
), i = O({
|
|
73
|
+
data: t,
|
|
74
|
+
columns: a
|
|
74
75
|
});
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ r(P, { label: e("tableLabel"), ...i });
|
|
76
77
|
}
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
+
j as HolidayPolicyDetailPresentation
|
|
79
80
|
};
|
|
80
81
|
//# sourceMappingURL=HolidayPolicyDetailPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HolidayPolicyDetailPresentation.js","sources":["../../../../src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { HolidayItem } from '../HolidaySelectionForm/HolidaySelectionFormTypes'\nimport { PolicyDetailLayout } from '../shared/PolicyDetailLayout'\nimport type { HolidayPolicyDetailPresentationProps } from './HolidayPolicyDetailTypes'\nimport { DataView, useDataView } from '@/components/Common'\nimport {
|
|
1
|
+
{"version":3,"file":"HolidayPolicyDetailPresentation.js","sources":["../../../../src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { HolidayItem } from '../HolidaySelectionForm/HolidaySelectionFormTypes'\nimport { PolicyDetailLayout } from '../shared/PolicyDetailLayout'\nimport type { HolidayPolicyDetailPresentationProps } from './HolidayPolicyDetailTypes'\nimport { DataView, useDataView } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\nconst HOLIDAYS_TAB_ID = 'holidays'\n\nexport function HolidayPolicyDetailPresentation({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n holidays,\n selectedTabId,\n onTabChange,\n employees,\n onAddEmployee,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: HolidayPolicyDetailPresentationProps) {\n useI18n('Company.TimeOff.HolidayPolicy')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n\n const holidaysTabContent = <HolidaysTab holidays={holidays} />\n\n return (\n <PolicyDetailLayout\n title={title}\n subtitle={subtitle}\n onBack={onBack}\n backLabel={backLabel}\n actions={actions}\n firstTab={{\n id: HOLIDAYS_TAB_ID,\n label: t('tabs.holidays'),\n content: holidaysTabContent,\n }}\n selectedTabId={selectedTabId}\n onTabChange={onTabChange}\n employees={employees}\n onAddEmployee={onAddEmployee}\n removeDialog={removeDialog}\n successAlert={successAlert}\n onDismissAlert={onDismissAlert}\n />\n )\n}\n\nfunction HolidaysTab({ holidays }: { holidays: HolidayItem[] }) {\n useI18n('Company.TimeOff.HolidayPolicy')\n const { t } = useTranslation('Company.TimeOff.HolidayPolicy')\n\n const columns = useMemo(\n () => [\n {\n key: 'name' as keyof HolidayItem,\n title: t('tableHeaders.holidayName'),\n render: (item: HolidayItem) => item.name,\n },\n {\n key: 'observedDate' as keyof HolidayItem,\n title: t('tableHeaders.observedDate'),\n render: (item: HolidayItem) => item.observedDate,\n },\n {\n key: 'nextObservation' as keyof HolidayItem,\n title: t('tableHeaders.nextObservation'),\n render: (item: HolidayItem) => item.nextObservation,\n },\n ],\n [t],\n )\n\n const dataViewProps = useDataView<HolidayItem>({\n data: holidays,\n columns,\n })\n\n return <DataView label={t('tableLabel')} {...dataViewProps} />\n}\n"],"names":["HOLIDAYS_TAB_ID","HolidayPolicyDetailPresentation","title","subtitle","onBack","backLabel","actions","holidays","selectedTabId","onTabChange","employees","onAddEmployee","removeDialog","successAlert","onDismissAlert","useI18n","t","useTranslation","holidaysTabContent","jsx","HolidaysTab","PolicyDetailLayout","columns","useMemo","item","dataViewProps","useDataView","DataView"],"mappings":";;;;;;;;;AAQA,MAAMA,IAAkB;AAEjB,SAASC,EAAgC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,GAAyC;AACvC,EAAAC,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GAEtDC,IAAqB,gBAAAC,EAACC,GAAA,EAAY,UAAAb,EAAA,CAAoB;AAE5D,SACE,gBAAAY;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAAnB;AAAA,MACA,UAAAC;AAAA,MACA,QAAAC;AAAA,MACA,WAAAC;AAAA,MACA,SAAAC;AAAA,MACA,UAAU;AAAA,QACR,IAAIN;AAAA,QACJ,OAAOgB,EAAE,eAAe;AAAA,QACxB,SAASE;AAAA,MAAA;AAAA,MAEX,eAAAV;AAAA,MACA,aAAAC;AAAA,MACA,WAAAC;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASM,EAAY,EAAE,UAAAb,KAAyC;AAC9D,EAAAQ,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GAEtDK,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,KAAK;AAAA,QACL,OAAOP,EAAE,0BAA0B;AAAA,QACnC,QAAQ,CAACQ,MAAsBA,EAAK;AAAA,MAAA;AAAA,MAEtC;AAAA,QACE,KAAK;AAAA,QACL,OAAOR,EAAE,2BAA2B;AAAA,QACpC,QAAQ,CAACQ,MAAsBA,EAAK;AAAA,MAAA;AAAA,MAEtC;AAAA,QACE,KAAK;AAAA,QACL,OAAOR,EAAE,8BAA8B;AAAA,QACvC,QAAQ,CAACQ,MAAsBA,EAAK;AAAA,MAAA;AAAA,IACtC;AAAA,IAEF,CAACR,CAAC;AAAA,EAAA,GAGES,IAAgBC,EAAyB;AAAA,IAC7C,MAAMnB;AAAA,IACN,SAAAe;AAAA,EAAA,CACD;AAED,2BAAQK,GAAA,EAAS,OAAOX,EAAE,YAAY,GAAI,GAAGS,GAAe;AAC9D;"}
|
|
@@ -15,6 +15,7 @@ export interface HolidayPolicyDetailPresentationProps {
|
|
|
15
15
|
selectedTabId: string;
|
|
16
16
|
onTabChange: (id: string) => void;
|
|
17
17
|
employees: Pick<EmployeeTableProps<HolidayPolicyDetailEmployee>, 'data' | 'searchValue' | 'onSearchChange' | 'onSearchClear' | 'searchPlaceholder' | 'itemMenu' | 'pagination' | 'isFetching' | 'emptyState'>;
|
|
18
|
+
onAddEmployee?: () => void;
|
|
18
19
|
removeDialog: RemoveDialogState;
|
|
19
20
|
successAlert?: string;
|
|
20
21
|
onDismissAlert?: () => void;
|