@gusto/embedded-react-sdk 0.44.1 → 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 +63 -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 +28 -28
- 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 +11 -11
- 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 +11 -11
- 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/StateTaxes/shared/EmployeeStateTaxesView.js +19 -17
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js +8 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js.map +1 -0
- 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/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +71 -54
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/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/dateFormatting.js +52 -56
- package/dist/helpers/dateFormatting.js.map +1 -1
- 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 +20 -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 +33 -22
- 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,83 +1,100 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { usePayrollsSkipMutation as
|
|
6
|
-
import { PayrollType as
|
|
7
|
-
import { PayrollTypes as
|
|
8
|
-
import { RFCDate as
|
|
9
|
-
import { TransitionPayrollAlertPresentation as
|
|
10
|
-
import { BaseComponent as
|
|
11
|
-
import { useBase as
|
|
12
|
-
import { componentEvents as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { jsx as D } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as P, useEffect as E, useState as A, useCallback as f } from "react";
|
|
3
|
+
import { usePaySchedulesGetPayPeriods as R } from "@gusto/embedded-api/react-query/paySchedulesGetPayPeriods";
|
|
4
|
+
import { usePaySchedulesGetAll as N } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
|
|
5
|
+
import { usePayrollsSkipMutation as O } from "@gusto/embedded-api/react-query/payrollsSkip";
|
|
6
|
+
import { PayrollType as w } from "@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid";
|
|
7
|
+
import { PayrollTypes as g } from "@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods";
|
|
8
|
+
import { RFCDate as U } from "@gusto/embedded-api/types/rfcdate";
|
|
9
|
+
import { TransitionPayrollAlertPresentation as b } from "./TransitionPayrollAlertPresentation.js";
|
|
10
|
+
import { BaseComponent as _ } from "../../Base/Base.js";
|
|
11
|
+
import { useBase as L } from "../../Base/useBase.js";
|
|
12
|
+
import { componentEvents as h } from "../../../shared/constants.js";
|
|
13
|
+
import { useObservability as M } from "../../../contexts/ObservabilityProvider/useObservability.js";
|
|
14
|
+
import { normalizeToSDKError as C } from "../../../types/sdkError.js";
|
|
15
|
+
const v = 90, x = "Payroll.TransitionPayrollAlert";
|
|
16
|
+
function Z({ companyId: a, onEvent: i }) {
|
|
17
|
+
const { observability: r } = M(), c = P(() => {
|
|
18
|
+
const t = /* @__PURE__ */ new Date();
|
|
19
|
+
return t.setDate(t.getDate() + v), new U(t);
|
|
20
|
+
}, []), { data: n, error: p } = R({
|
|
21
|
+
companyId: a,
|
|
22
|
+
payrollTypes: g.Transition,
|
|
23
|
+
endDate: c
|
|
24
|
+
}), { data: l, error: d } = N({ companyId: a }), o = p ?? d;
|
|
25
|
+
E(() => {
|
|
26
|
+
if (!o) return;
|
|
27
|
+
i(h.ERROR, o);
|
|
28
|
+
const t = C(o);
|
|
29
|
+
r?.onError?.({
|
|
30
|
+
...t,
|
|
31
|
+
timestamp: Date.now(),
|
|
32
|
+
componentName: x
|
|
33
|
+
});
|
|
34
|
+
}, [o, i, r]);
|
|
35
|
+
const m = P(() => {
|
|
36
|
+
if (!n || !l) return [];
|
|
37
|
+
const t = l.payScheduleShowResponse ?? [], S = (n.payPeriods ?? []).filter(
|
|
38
|
+
(s) => !s.payroll?.processed
|
|
39
|
+
), e = /* @__PURE__ */ new Map();
|
|
40
|
+
for (const s of S) {
|
|
41
|
+
const y = s.payScheduleUuid ?? "unknown", u = e.get(y) ?? [];
|
|
42
|
+
u.push(s), e.set(y, u);
|
|
30
43
|
}
|
|
31
|
-
return Array.from(e.entries()).map(([s,
|
|
32
|
-
const
|
|
33
|
-
return { payScheduleUuid: s, payScheduleName:
|
|
44
|
+
return Array.from(e.entries()).map(([s, y]) => {
|
|
45
|
+
const u = t.find((k) => k.uuid === s), T = u?.customName || u?.name || "Transition";
|
|
46
|
+
return { payScheduleUuid: s, payScheduleName: T, payPeriods: y };
|
|
34
47
|
});
|
|
35
|
-
}, [
|
|
48
|
+
}, [n, l]);
|
|
49
|
+
return !n || !l || m.length === 0 ? null : /* @__PURE__ */ D(_, { onEvent: i, children: /* @__PURE__ */ D(B, { companyId: a, groupedPayPeriods: m }) });
|
|
50
|
+
}
|
|
51
|
+
function B({ companyId: a, groupedPayPeriods: i }) {
|
|
52
|
+
const { onEvent: r, baseSubmitHandler: c } = L(), [n, p] = A(!1), [l, d] = A(null), { mutateAsync: o } = O(), m = f(
|
|
36
53
|
(e) => {
|
|
37
|
-
|
|
54
|
+
r(h.RUN_TRANSITION_PAYROLL, {
|
|
38
55
|
startDate: e.startDate,
|
|
39
56
|
endDate: e.endDate,
|
|
40
57
|
payScheduleUuid: e.payScheduleUuid
|
|
41
58
|
});
|
|
42
59
|
},
|
|
43
|
-
[
|
|
44
|
-
),
|
|
60
|
+
[r]
|
|
61
|
+
), t = f(
|
|
45
62
|
async (e) => {
|
|
46
|
-
|
|
47
|
-
await
|
|
63
|
+
d(e), await c({}, async () => {
|
|
64
|
+
await o({
|
|
48
65
|
request: {
|
|
49
|
-
companyUuid:
|
|
66
|
+
companyUuid: a,
|
|
50
67
|
requestBody: {
|
|
51
|
-
payrollType:
|
|
68
|
+
payrollType: w.TransitionFromOldPaySchedule,
|
|
52
69
|
startDate: e.startDate,
|
|
53
70
|
endDate: e.endDate,
|
|
54
71
|
payScheduleUuid: e.payScheduleUuid ?? void 0
|
|
55
72
|
}
|
|
56
73
|
}
|
|
57
|
-
}),
|
|
74
|
+
}), p(!0), r(h.TRANSITION_PAYROLL_SKIPPED, {
|
|
58
75
|
startDate: e.startDate,
|
|
59
76
|
endDate: e.endDate,
|
|
60
77
|
payScheduleUuid: e.payScheduleUuid
|
|
61
78
|
});
|
|
62
|
-
}),
|
|
79
|
+
}), d(null);
|
|
63
80
|
},
|
|
64
|
-
[
|
|
65
|
-
),
|
|
66
|
-
|
|
81
|
+
[a, o, r, c]
|
|
82
|
+
), S = f(() => {
|
|
83
|
+
p(!1);
|
|
67
84
|
}, []);
|
|
68
|
-
return
|
|
69
|
-
|
|
85
|
+
return /* @__PURE__ */ D(
|
|
86
|
+
b,
|
|
70
87
|
{
|
|
71
|
-
groupedPayPeriods:
|
|
72
|
-
onRunPayroll:
|
|
73
|
-
onSkipPayroll:
|
|
74
|
-
showSkipSuccessAlert:
|
|
75
|
-
onDismissSkipSuccessAlert:
|
|
76
|
-
skippingPayPeriod:
|
|
88
|
+
groupedPayPeriods: i,
|
|
89
|
+
onRunPayroll: m,
|
|
90
|
+
onSkipPayroll: t,
|
|
91
|
+
showSkipSuccessAlert: n,
|
|
92
|
+
onDismissSkipSuccessAlert: S,
|
|
93
|
+
skippingPayPeriod: l
|
|
77
94
|
}
|
|
78
95
|
);
|
|
79
96
|
}
|
|
80
97
|
export {
|
|
81
|
-
|
|
98
|
+
Z as TransitionPayrollAlert
|
|
82
99
|
};
|
|
83
100
|
//# sourceMappingURL=TransitionPayrollAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransitionPayrollAlert.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.tsx"],"sourcesContent":["import { useMemo, useState, useCallback } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"TransitionPayrollAlert.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.tsx"],"sourcesContent":["import { useMemo, useState, useCallback, useEffect } from 'react'\nimport { usePaySchedulesGetPayPeriods } from '@gusto/embedded-api/react-query/paySchedulesGetPayPeriods'\nimport { usePaySchedulesGetAll } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePayrollsSkipMutation } from '@gusto/embedded-api/react-query/payrollsSkip'\nimport { PayrollType } from '@gusto/embedded-api/models/operations/postcompaniespayrollskipcompanyuuid'\nimport { PayrollTypes } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayperiods'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport {\n TransitionPayrollAlertPresentation,\n type TransitionPayPeriodGroup,\n} from './TransitionPayrollAlertPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { componentEvents } from '@/shared/constants'\nimport { useObservability } from '@/contexts/ObservabilityProvider/useObservability'\nimport { normalizeToSDKError } from '@/types/sdkError'\n\ninterface TransitionPayrollAlertProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\ninterface RootProps {\n companyId: string\n groupedPayPeriods: TransitionPayPeriodGroup[]\n}\n\nconst LOOK_AHEAD_DAYS = 90\nconst COMPONENT_NAME = 'Payroll.TransitionPayrollAlert'\n\nexport function TransitionPayrollAlert({ companyId, onEvent }: TransitionPayrollAlertProps) {\n const { observability } = useObservability()\n\n const lookAheadEndDate = useMemo(() => {\n const date = new Date()\n date.setDate(date.getDate() + LOOK_AHEAD_DAYS)\n return new RFCDate(date)\n }, [])\n\n const { data: payPeriodsData, error: payPeriodsError } = usePaySchedulesGetPayPeriods({\n companyId,\n payrollTypes: PayrollTypes.Transition,\n endDate: lookAheadEndDate,\n })\n\n const { data: paySchedulesData, error: paySchedulesError } = usePaySchedulesGetAll({ companyId })\n\n const gateError = payPeriodsError ?? paySchedulesError\n\n useEffect(() => {\n if (!gateError) return\n onEvent(componentEvents.ERROR, gateError)\n const sdkError = normalizeToSDKError(gateError)\n observability?.onError?.({\n ...sdkError,\n timestamp: Date.now(),\n componentName: COMPONENT_NAME,\n })\n }, [gateError, onEvent, observability])\n\n const groupedPayPeriods = useMemo<TransitionPayPeriodGroup[]>(() => {\n if (!payPeriodsData || !paySchedulesData) return []\n const paySchedules = paySchedulesData.payScheduleShowResponse ?? []\n const unprocessed = (payPeriodsData.payPeriods ?? []).filter(\n (pp: PayPeriod) => !pp.payroll?.processed,\n )\n\n const groups = new Map<string, PayPeriod[]>()\n for (const period of unprocessed) {\n const uuid = period.payScheduleUuid ?? 'unknown'\n const existing = groups.get(uuid) ?? []\n existing.push(period)\n groups.set(uuid, existing)\n }\n\n return Array.from(groups.entries()).map(([payScheduleUuid, payPeriods]) => {\n const schedule = paySchedules.find(s => s.uuid === payScheduleUuid)\n const payScheduleName = schedule?.customName || schedule?.name || 'Transition'\n return { payScheduleUuid, payScheduleName, payPeriods }\n })\n }, [payPeriodsData, paySchedulesData])\n\n if (!payPeriodsData || !paySchedulesData || groupedPayPeriods.length === 0) {\n return null\n }\n\n return (\n <BaseComponent onEvent={onEvent}>\n <Root companyId={companyId} groupedPayPeriods={groupedPayPeriods} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, groupedPayPeriods }: RootProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n\n const [showSkipSuccessAlert, setShowSkipSuccessAlert] = useState(false)\n const [skippingPayPeriod, setSkippingPayPeriod] = useState<PayPeriod | null>(null)\n\n const { mutateAsync: skipPayroll } = usePayrollsSkipMutation()\n\n const handleRunPayroll = useCallback(\n (payPeriod: PayPeriod) => {\n onEvent(componentEvents.RUN_TRANSITION_PAYROLL, {\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid,\n })\n },\n [onEvent],\n )\n\n const handleSkipPayroll = useCallback(\n async (payPeriod: PayPeriod) => {\n setSkippingPayPeriod(payPeriod)\n await baseSubmitHandler({}, async () => {\n await skipPayroll({\n request: {\n companyUuid: companyId,\n requestBody: {\n payrollType: PayrollType.TransitionFromOldPaySchedule,\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid ?? undefined,\n },\n },\n })\n setShowSkipSuccessAlert(true)\n onEvent(componentEvents.TRANSITION_PAYROLL_SKIPPED, {\n startDate: payPeriod.startDate,\n endDate: payPeriod.endDate,\n payScheduleUuid: payPeriod.payScheduleUuid,\n })\n })\n setSkippingPayPeriod(null)\n },\n [companyId, skipPayroll, onEvent, baseSubmitHandler],\n )\n\n const handleDismissSkipSuccessAlert = useCallback(() => {\n setShowSkipSuccessAlert(false)\n }, [])\n\n return (\n <TransitionPayrollAlertPresentation\n groupedPayPeriods={groupedPayPeriods}\n onRunPayroll={handleRunPayroll}\n onSkipPayroll={handleSkipPayroll}\n showSkipSuccessAlert={showSkipSuccessAlert}\n onDismissSkipSuccessAlert={handleDismissSkipSuccessAlert}\n skippingPayPeriod={skippingPayPeriod}\n />\n )\n}\n"],"names":["LOOK_AHEAD_DAYS","COMPONENT_NAME","TransitionPayrollAlert","companyId","onEvent","observability","useObservability","lookAheadEndDate","useMemo","date","RFCDate","payPeriodsData","payPeriodsError","usePaySchedulesGetPayPeriods","PayrollTypes","paySchedulesData","paySchedulesError","usePaySchedulesGetAll","gateError","useEffect","componentEvents","sdkError","normalizeToSDKError","groupedPayPeriods","paySchedules","unprocessed","pp","groups","period","uuid","existing","payScheduleUuid","payPeriods","schedule","s","payScheduleName","BaseComponent","Root","baseSubmitHandler","useBase","showSkipSuccessAlert","setShowSkipSuccessAlert","useState","skippingPayPeriod","setSkippingPayPeriod","skipPayroll","usePayrollsSkipMutation","handleRunPayroll","useCallback","payPeriod","handleSkipPayroll","PayrollType","handleDismissSkipSuccessAlert","jsx","TransitionPayrollAlertPresentation"],"mappings":"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"}
|
package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransitionPayrollAlertPresentation.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\
|
|
1
|
+
{"version":3,"file":"TransitionPayrollAlertPresentation.js","sources":["../../../../src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { PayPeriod } from '@gusto/embedded-api/models/components/payperiod'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport interface TransitionPayPeriodGroup {\n payScheduleUuid: string\n payScheduleName: string\n payPeriods: PayPeriod[]\n}\n\ninterface TransitionPayrollAlertPresentationProps {\n groupedPayPeriods: TransitionPayPeriodGroup[]\n onRunPayroll: (payPeriod: PayPeriod) => void\n onSkipPayroll: (payPeriod: PayPeriod) => void\n showSkipSuccessAlert: boolean\n onDismissSkipSuccessAlert: () => void\n skippingPayPeriod: PayPeriod | null\n}\n\nexport function TransitionPayrollAlertPresentation({\n groupedPayPeriods,\n onRunPayroll,\n onSkipPayroll,\n showSkipSuccessAlert,\n onDismissSkipSuccessAlert,\n skippingPayPeriod,\n}: TransitionPayrollAlertPresentationProps) {\n useI18n('Payroll.TransitionPayrollAlert')\n const { t } = useTranslation('Payroll.TransitionPayrollAlert')\n const { Alert, Button, Text, Dialog } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const [skipDialogPayPeriod, setSkipDialogPayPeriod] = useState<PayPeriod | null>(null)\n\n if (groupedPayPeriods.length === 0) {\n return null\n }\n\n const formatDateRange = (payPeriod: PayPeriod) =>\n dateFormatter.formatPayPeriodRange(payPeriod.startDate, payPeriod.endDate, {\n useShortMonth: true,\n })\n\n const handleConfirmSkip = () => {\n if (skipDialogPayPeriod) {\n onSkipPayroll(skipDialogPayPeriod)\n setSkipDialogPayPeriod(null)\n }\n }\n\n const hasMultipleGroups = groupedPayPeriods.length > 1\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {showSkipSuccessAlert && (\n <Alert status=\"info\" label={t('skipSuccessAlert')} onDismiss={onDismissSkipSuccessAlert} />\n )}\n {groupedPayPeriods.map((group, groupIndex) => (\n <Flex key={group.payScheduleUuid || `group-${groupIndex}`} flexDirection=\"column\" gap={16}>\n {hasMultipleGroups && <Text weight=\"semibold\">{group.payScheduleName}</Text>}\n {group.payPeriods.map(payPeriod => {\n const dateRange = formatDateRange(payPeriod)\n const isSkipping = skippingPayPeriod === payPeriod\n\n return (\n <Alert\n key={`${payPeriod.payScheduleUuid}-${payPeriod.startDate}`}\n status=\"warning\"\n label={t('alertTitle', { dateRange })}\n >\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('alertDescription')}</Text>\n <Flex gap={12} alignItems=\"center\">\n <div>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onRunPayroll(payPeriod)\n }}\n >\n {t('runPayroll')}\n </Button>\n </div>\n <Button\n variant=\"tertiary\"\n onClick={() => {\n setSkipDialogPayPeriod(payPeriod)\n }}\n isLoading={isSkipping}\n >\n {t('skipPayroll')}\n </Button>\n </Flex>\n </Flex>\n </Alert>\n )\n })}\n </Flex>\n ))}\n <Dialog\n isOpen={skipDialogPayPeriod !== null}\n onClose={() => {\n setSkipDialogPayPeriod(null)\n }}\n onPrimaryActionClick={handleConfirmSkip}\n isDestructive\n title={t('skipDialog.title', {\n dateRange: skipDialogPayPeriod ? formatDateRange(skipDialogPayPeriod) : '',\n })}\n primaryActionLabel={t('skipDialog.confirmCta')}\n closeActionLabel={t('skipDialog.cancelCta')}\n >\n {t('skipDialog.body')}\n </Dialog>\n </Flex>\n )\n}\n"],"names":["TransitionPayrollAlertPresentation","groupedPayPeriods","onRunPayroll","onSkipPayroll","showSkipSuccessAlert","onDismissSkipSuccessAlert","skippingPayPeriod","useI18n","useTranslation","Alert","Button","Text","Dialog","useComponentContext","dateFormatter","useDateFormatter","skipDialogPayPeriod","setSkipDialogPayPeriod","useState","formatDateRange","payPeriod","handleConfirmSkip","hasMultipleGroups","jsxs","Flex","jsx","group","groupIndex","dateRange","isSkipping"],"mappings":"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"}
|
|
@@ -1,52 +1,38 @@
|
|
|
1
|
-
import { useState as M, useRef as
|
|
1
|
+
import { useState as M, useRef as y, useMemo as _, useCallback as f, useEffect as b } from "react";
|
|
2
2
|
import { usePayrollsPrepareMutation as L } from "@gusto/embedded-api/react-query/payrollsPrepare";
|
|
3
3
|
import { usePaySchedulesGet as D } from "@gusto/embedded-api/react-query/paySchedulesGet";
|
|
4
4
|
import { UnprocessableEntityError as T } from "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
5
|
-
import "react/jsx-runtime";
|
|
6
|
-
import "react-error-boundary";
|
|
7
|
-
import "react-i18next";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
5
|
import { useBase as w } from "../Base/useBase.js";
|
|
10
|
-
import "@gusto/embedded-api/models/errors/apierror";
|
|
11
|
-
import "@gusto/embedded-api/models/errors/gustoembeddederror";
|
|
12
|
-
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
13
|
-
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
14
|
-
import "dompurify";
|
|
15
|
-
import "../../contexts/LocaleProvider/useLocale.js";
|
|
16
|
-
import "../../shared/constants.js";
|
|
17
|
-
import "classnames";
|
|
18
|
-
import "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
19
|
-
import "../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
20
6
|
import { retryAsync as x } from "../../helpers/retryAsync.js";
|
|
21
|
-
const q = 4, v = 1500, B = (e) => e instanceof T ? e.errors.some((r) => r.category === "invalid_operation") : !1,
|
|
7
|
+
const q = 4, v = 1500, B = (e) => e instanceof T ? e.errors.some((r) => r.category === "invalid_operation") : !1, G = ({
|
|
22
8
|
companyId: e,
|
|
23
9
|
payrollId: r,
|
|
24
|
-
employeeUuids:
|
|
25
|
-
sortBy:
|
|
10
|
+
employeeUuids: t,
|
|
11
|
+
sortBy: i,
|
|
26
12
|
onDataReady: l
|
|
27
13
|
}) => {
|
|
28
|
-
const { mutateAsync:
|
|
14
|
+
const { mutateAsync: c, isPending: u } = L(), [s, m] = M(), a = y(!1), d = y(!1), { baseSubmitHandler: p } = w(), h = _(() => t?.join(",") ?? "", [t]), { data: S, isLoading: E } = D(
|
|
29
15
|
{
|
|
30
16
|
companyId: e,
|
|
31
|
-
payScheduleId:
|
|
17
|
+
payScheduleId: s?.payPeriod?.payScheduleUuid || ""
|
|
32
18
|
},
|
|
33
19
|
{
|
|
34
|
-
enabled: !!
|
|
20
|
+
enabled: !!s?.payPeriod?.payScheduleUuid
|
|
35
21
|
}
|
|
36
|
-
), P =
|
|
37
|
-
const
|
|
22
|
+
), P = f(async () => {
|
|
23
|
+
const n = await c({
|
|
38
24
|
request: {
|
|
39
25
|
companyId: e,
|
|
40
26
|
payrollId: r,
|
|
41
|
-
sortBy:
|
|
27
|
+
sortBy: i,
|
|
42
28
|
requestBody: {
|
|
43
|
-
employeeUuids:
|
|
29
|
+
employeeUuids: t
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
32
|
});
|
|
47
|
-
|
|
48
|
-
}, [e, r,
|
|
49
|
-
await
|
|
33
|
+
m(n.payrollPrepared), n.payrollPrepared && (a.current = !0, l?.(n.payrollPrepared));
|
|
34
|
+
}, [e, r, c, h, i, l]), o = f(async () => {
|
|
35
|
+
await p(
|
|
50
36
|
null,
|
|
51
37
|
() => x(P, {
|
|
52
38
|
maxAttempts: q,
|
|
@@ -54,21 +40,21 @@ const q = 4, v = 1500, B = (e) => e instanceof T ? e.errors.some((r) => r.catego
|
|
|
54
40
|
shouldRetry: B
|
|
55
41
|
})
|
|
56
42
|
);
|
|
57
|
-
}, [
|
|
43
|
+
}, [p, P]);
|
|
58
44
|
b(() => {
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
const g =
|
|
45
|
+
d.current || (d.current = !0, o());
|
|
46
|
+
}, [o]);
|
|
47
|
+
const g = u && !a.current, R = u && a.current, A = g || E;
|
|
62
48
|
return {
|
|
63
|
-
handlePreparePayroll:
|
|
64
|
-
preparedPayroll:
|
|
49
|
+
handlePreparePayroll: o,
|
|
50
|
+
preparedPayroll: s,
|
|
65
51
|
paySchedule: S?.payScheduleShow,
|
|
66
52
|
isLoading: A,
|
|
67
53
|
isPaginating: R,
|
|
68
|
-
hasInitialData:
|
|
54
|
+
hasInitialData: a.current
|
|
69
55
|
};
|
|
70
56
|
};
|
|
71
57
|
export {
|
|
72
|
-
|
|
58
|
+
G as usePreparedPayrollData
|
|
73
59
|
};
|
|
74
60
|
//# sourceMappingURL=usePreparedPayrollData.js.map
|
|
@@ -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
|