@gusto/embedded-react-sdk 0.44.2 → 0.46.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 +64 -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/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/BankAccount/BankAccountForm/Head.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Head.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/SignatureForm/SignatureForm.js +26 -26
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- 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/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/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/PaySchedule/PayScheduleList.js +18 -18
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- 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/Employee/Compensation/index.d.ts +1 -1
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +230 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
- 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/fields.js +4 -4
- 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 +203 -188
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +16 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +21 -15
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +30 -3
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +138 -130
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +19 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +93 -47
- 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.d.ts +2 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +95 -109
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +19 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +137 -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 +34 -20
- 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 +536 -135
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +8 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
- 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 +19 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +92 -56
- 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 +238 -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.d.ts +12 -5
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -18
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +26 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +61 -38
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.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/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.js +6 -6
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +13 -13
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
- package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
- package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +14 -14
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- 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/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- 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/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- 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/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/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.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 +78 -55
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
- package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
- package/dist/helpers/formattedStrings.d.ts +12 -0
- package/dist/helpers/formattedStrings.js +55 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
- package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
- package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
- package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
- package/dist/i18n/I18n.js +6 -5
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +48 -44
- package/dist/i18n/en/Employee.Compensation.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 +14 -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 +10 -2
- package/dist/shared/constants.js +30 -26
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/assertions.d.ts +16 -0
- package/dist/types/i18next.d.ts +161 -5
- package/dist/types/sdkError.js +58 -47
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +980 -1170
- package/package.json +29 -21
- package/dist/components/Employee/Compensation/Compensation.js +0 -87
- package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
- package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
- package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.d.ts +0 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.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 +1 -1
- /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,86 +1,97 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { EmployeeTable as
|
|
1
|
+
import { jsx as i, jsxs as P, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as S } from "react-i18next";
|
|
3
|
+
import { EmployeeTable as D } from "../EmployeeTable/EmployeeTable.js";
|
|
4
4
|
import "classnames";
|
|
5
5
|
import "../../../../shared/constants.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { EmptyData as L } from "../../../Common/EmptyData/EmptyData.js";
|
|
7
|
+
import { useComponentContext as O } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { useI18n as T } from "../../../../i18n/I18n.js";
|
|
9
|
+
import x from "../../../../assets/icons/plus-circle.svg.js";
|
|
10
|
+
import { DetailViewLayout as A } from "../../../Common/DetailViewLayout/DetailViewLayout.js";
|
|
11
|
+
const v = "employees";
|
|
12
|
+
function w({
|
|
11
13
|
title: l,
|
|
12
|
-
subtitle:
|
|
14
|
+
subtitle: m,
|
|
13
15
|
onBack: c,
|
|
14
|
-
backLabel:
|
|
15
|
-
actions:
|
|
16
|
-
firstTab:
|
|
16
|
+
backLabel: s,
|
|
17
|
+
actions: p,
|
|
18
|
+
firstTab: a,
|
|
17
19
|
selectedTabId: d,
|
|
18
20
|
onTabChange: h,
|
|
19
|
-
employees:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
employees: t,
|
|
22
|
+
onAddEmployee: n,
|
|
23
|
+
removeDialog: o,
|
|
24
|
+
successAlert: r,
|
|
25
|
+
onDismissAlert: u
|
|
23
26
|
}) {
|
|
24
|
-
|
|
25
|
-
const { t } =
|
|
27
|
+
T("Company.TimeOff.PolicyDetail");
|
|
28
|
+
const { t: e } = S("Company.TimeOff.PolicyDetail"), { Alert: y, Dialog: C, Button: f } = O(), E = t.emptyState ?? (n ? () => /* @__PURE__ */ i(L, { title: e("emptyEmployees.title"), children: /* @__PURE__ */ i(
|
|
29
|
+
f,
|
|
26
30
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
variant: "secondary",
|
|
32
|
+
icon: /* @__PURE__ */ i(x, { "aria-hidden": !0 }),
|
|
33
|
+
onClick: n,
|
|
34
|
+
children: e("emptyEmployees.addEmployeeCta")
|
|
35
|
+
}
|
|
36
|
+
) }) : void 0), g = [
|
|
37
|
+
{
|
|
38
|
+
id: a.id,
|
|
39
|
+
label: a.label,
|
|
40
|
+
content: a.content
|
|
30
41
|
},
|
|
31
42
|
{
|
|
32
|
-
id:
|
|
33
|
-
label:
|
|
34
|
-
content: /* @__PURE__ */
|
|
35
|
-
|
|
43
|
+
id: v,
|
|
44
|
+
label: e("tabs.employees"),
|
|
45
|
+
content: /* @__PURE__ */ i(
|
|
46
|
+
D,
|
|
36
47
|
{
|
|
37
|
-
data:
|
|
38
|
-
searchValue:
|
|
39
|
-
onSearchChange:
|
|
40
|
-
onSearchClear:
|
|
41
|
-
searchPlaceholder:
|
|
42
|
-
itemMenu:
|
|
43
|
-
pagination:
|
|
44
|
-
isFetching:
|
|
45
|
-
emptyState:
|
|
46
|
-
additionalColumns:
|
|
47
|
-
hideJobTitle:
|
|
48
|
+
data: t.data,
|
|
49
|
+
searchValue: t.searchValue,
|
|
50
|
+
onSearchChange: t.onSearchChange,
|
|
51
|
+
onSearchClear: t.onSearchClear,
|
|
52
|
+
searchPlaceholder: t.searchPlaceholder,
|
|
53
|
+
itemMenu: t.itemMenu,
|
|
54
|
+
pagination: t.pagination,
|
|
55
|
+
isFetching: t.isFetching,
|
|
56
|
+
emptyState: E,
|
|
57
|
+
additionalColumns: t.additionalColumns,
|
|
58
|
+
hideJobTitle: t.hideJobTitle
|
|
48
59
|
}
|
|
49
|
-
)
|
|
60
|
+
)
|
|
50
61
|
}
|
|
51
62
|
];
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
63
|
+
return /* @__PURE__ */ P(b, { children: [
|
|
64
|
+
r && /* @__PURE__ */ i(y, { status: "success", label: r, onDismiss: u }),
|
|
65
|
+
/* @__PURE__ */ i(
|
|
66
|
+
A,
|
|
56
67
|
{
|
|
57
68
|
title: l,
|
|
58
|
-
subtitle:
|
|
69
|
+
subtitle: m,
|
|
59
70
|
onBack: c,
|
|
60
|
-
backLabel:
|
|
61
|
-
actions:
|
|
62
|
-
tabs:
|
|
71
|
+
backLabel: s,
|
|
72
|
+
actions: p,
|
|
73
|
+
tabs: g,
|
|
63
74
|
selectedTabId: d,
|
|
64
75
|
onTabChange: h
|
|
65
76
|
}
|
|
66
77
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ i(
|
|
68
79
|
C,
|
|
69
80
|
{
|
|
70
|
-
isOpen:
|
|
71
|
-
onClose:
|
|
72
|
-
onPrimaryActionClick:
|
|
73
|
-
isPrimaryActionLoading:
|
|
81
|
+
isOpen: o.isOpen,
|
|
82
|
+
onClose: o.onClose,
|
|
83
|
+
onPrimaryActionClick: o.onConfirm,
|
|
84
|
+
isPrimaryActionLoading: o.isPending,
|
|
74
85
|
isDestructive: !0,
|
|
75
|
-
title:
|
|
76
|
-
primaryActionLabel:
|
|
77
|
-
closeActionLabel:
|
|
78
|
-
children:
|
|
86
|
+
title: e("removeEmployeeDialog.title", { name: o.employeeName }),
|
|
87
|
+
primaryActionLabel: e("removeEmployeeDialog.confirmCta"),
|
|
88
|
+
closeActionLabel: e("removeEmployeeDialog.cancelCta"),
|
|
89
|
+
children: e("removeEmployeeDialog.description", { name: o.employeeName })
|
|
79
90
|
}
|
|
80
91
|
)
|
|
81
92
|
] });
|
|
82
93
|
}
|
|
83
94
|
export {
|
|
84
|
-
|
|
95
|
+
w as PolicyDetailLayout
|
|
85
96
|
};
|
|
86
97
|
//# sourceMappingURL=PolicyDetailLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PolicyDetailLayout.js","sources":["../../../../../src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { EmployeeTableItem } from '../EmployeeTable/EmployeeTableTypes'\nimport { EmployeeTable } from '../EmployeeTable/EmployeeTable'\nimport type { PolicyDetailLayoutProps } from './PolicyDetailLayoutTypes'\nimport { DetailViewLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nconst EMPLOYEES_TAB_ID = 'employees'\n\nexport function PolicyDetailLayout<T extends EmployeeTableItem>({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n firstTab,\n selectedTabId,\n onTabChange,\n employees,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: PolicyDetailLayoutProps<T>) {\n useI18n('Company.TimeOff.PolicyDetail')\n const { t } = useTranslation('Company.TimeOff.PolicyDetail')\n const { Alert, Dialog,
|
|
1
|
+
{"version":3,"file":"PolicyDetailLayout.js","sources":["../../../../../src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { EmployeeTableItem } from '../EmployeeTable/EmployeeTableTypes'\nimport { EmployeeTable } from '../EmployeeTable/EmployeeTable'\nimport type { PolicyDetailLayoutProps } from './PolicyDetailLayoutTypes'\nimport { DetailViewLayout, EmptyData } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nconst EMPLOYEES_TAB_ID = 'employees'\n\nexport function PolicyDetailLayout<T extends EmployeeTableItem>({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n firstTab,\n selectedTabId,\n onTabChange,\n employees,\n onAddEmployee,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: PolicyDetailLayoutProps<T>) {\n useI18n('Company.TimeOff.PolicyDetail')\n const { t } = useTranslation('Company.TimeOff.PolicyDetail')\n const { Alert, Dialog, Button } = useComponentContext()\n\n const emptyEmployeesState =\n employees.emptyState ??\n (onAddEmployee\n ? () => (\n <EmptyData title={t('emptyEmployees.title')}>\n <Button\n variant=\"secondary\"\n icon={<PlusCircleIcon aria-hidden />}\n onClick={onAddEmployee}\n >\n {t('emptyEmployees.addEmployeeCta')}\n </Button>\n </EmptyData>\n )\n : undefined)\n\n const tabs = [\n {\n id: firstTab.id,\n label: firstTab.label,\n content: firstTab.content,\n },\n {\n id: EMPLOYEES_TAB_ID,\n label: t('tabs.employees'),\n content: (\n <EmployeeTable<T>\n data={employees.data}\n searchValue={employees.searchValue}\n onSearchChange={employees.onSearchChange}\n onSearchClear={employees.onSearchClear}\n searchPlaceholder={employees.searchPlaceholder}\n itemMenu={employees.itemMenu}\n pagination={employees.pagination}\n isFetching={employees.isFetching}\n emptyState={emptyEmployeesState}\n additionalColumns={employees.additionalColumns}\n hideJobTitle={employees.hideJobTitle}\n />\n ),\n },\n ]\n\n return (\n <>\n {successAlert && <Alert status=\"success\" label={successAlert} onDismiss={onDismissAlert} />}\n\n <DetailViewLayout\n title={title}\n subtitle={subtitle}\n onBack={onBack}\n backLabel={backLabel}\n actions={actions}\n tabs={tabs}\n selectedTabId={selectedTabId}\n onTabChange={onTabChange}\n />\n\n <Dialog\n isOpen={removeDialog.isOpen}\n onClose={removeDialog.onClose}\n onPrimaryActionClick={removeDialog.onConfirm}\n isPrimaryActionLoading={removeDialog.isPending}\n isDestructive\n title={t('removeEmployeeDialog.title', { name: removeDialog.employeeName })}\n primaryActionLabel={t('removeEmployeeDialog.confirmCta')}\n closeActionLabel={t('removeEmployeeDialog.cancelCta')}\n >\n {t('removeEmployeeDialog.description', { name: removeDialog.employeeName })}\n </Dialog>\n </>\n )\n}\n"],"names":["EMPLOYEES_TAB_ID","PolicyDetailLayout","title","subtitle","onBack","backLabel","actions","firstTab","selectedTabId","onTabChange","employees","onAddEmployee","removeDialog","successAlert","onDismissAlert","useI18n","t","useTranslation","Alert","Dialog","Button","useComponentContext","emptyEmployeesState","EmptyData","jsx","PlusCircleIcon","tabs","EmployeeTable","jsxs","Fragment","DetailViewLayout"],"mappings":";;;;;;;;;;AASA,MAAMA,IAAmB;AAElB,SAASC,EAAgD;AAAA,EAC9D,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,GAA+B;AAC7B,EAAAC,EAAQ,8BAA8B;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,8BAA8B,GACrD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,EAAA,IAAWC,EAAA,GAE5BC,IACJZ,EAAU,eACTC,IACG,wBACGY,GAAA,EAAU,OAAOP,EAAE,sBAAsB,GACxC,UAAA,gBAAAQ;AAAA,IAACJ;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAM,gBAAAI,EAACC,GAAA,EAAe,eAAW,GAAA,CAAC;AAAA,MAClC,SAASd;AAAA,MAER,YAAE,+BAA+B;AAAA,IAAA;AAAA,EAAA,GAEtC,IAEF,SAEAe,IAAO;AAAA,IACX;AAAA,MACE,IAAInB,EAAS;AAAA,MACb,OAAOA,EAAS;AAAA,MAChB,SAASA,EAAS;AAAA,IAAA;AAAA,IAEpB;AAAA,MACE,IAAIP;AAAA,MACJ,OAAOgB,EAAE,gBAAgB;AAAA,MACzB,SACE,gBAAAQ;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAMjB,EAAU;AAAA,UAChB,aAAaA,EAAU;AAAA,UACvB,gBAAgBA,EAAU;AAAA,UAC1B,eAAeA,EAAU;AAAA,UACzB,mBAAmBA,EAAU;AAAA,UAC7B,UAAUA,EAAU;AAAA,UACpB,YAAYA,EAAU;AAAA,UACtB,YAAYA,EAAU;AAAA,UACtB,YAAYY;AAAA,UACZ,mBAAmBZ,EAAU;AAAA,UAC7B,cAAcA,EAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1B;AAAA,EAEJ;AAGF,SACE,gBAAAkB,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAhB,uBAAiBK,GAAA,EAAM,QAAO,WAAU,OAAOL,GAAc,WAAWC,GAAgB;AAAA,IAEzF,gBAAAU;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAA5B;AAAA,QACA,UAAAC;AAAA,QACA,QAAAC;AAAA,QACA,WAAAC;AAAA,QACA,SAAAC;AAAA,QACA,MAAAoB;AAAA,QACA,eAAAlB;AAAA,QACA,aAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAe;AAAA,MAACL;AAAA,MAAA;AAAA,QACC,QAAQP,EAAa;AAAA,QACrB,SAASA,EAAa;AAAA,QACtB,sBAAsBA,EAAa;AAAA,QACnC,wBAAwBA,EAAa;AAAA,QACrC,eAAa;AAAA,QACb,OAAOI,EAAE,8BAA8B,EAAE,MAAMJ,EAAa,cAAc;AAAA,QAC1E,oBAAoBI,EAAE,iCAAiC;AAAA,QACvD,kBAAkBA,EAAE,gCAAgC;AAAA,QAEnD,YAAE,oCAAoC,EAAE,MAAMJ,EAAa,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAC5E,GACF;AAEJ;"}
|
|
@@ -21,6 +21,7 @@ export interface PolicyDetailLayoutProps<T extends EmployeeTableItem> {
|
|
|
21
21
|
selectedTabId: string;
|
|
22
22
|
onTabChange: (id: string) => void;
|
|
23
23
|
employees: Pick<EmployeeTableProps<T>, 'data' | 'searchValue' | 'onSearchChange' | 'onSearchClear' | 'searchPlaceholder' | 'itemMenu' | 'pagination' | 'isFetching' | 'emptyState' | 'additionalColumns' | 'hideJobTitle'>;
|
|
24
|
+
onAddEmployee?: () => void;
|
|
24
25
|
removeDialog: RemoveDialogState;
|
|
25
26
|
successAlert?: string;
|
|
26
27
|
onDismissAlert?: () => void;
|
|
@@ -1,49 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { GustoEmbeddedProvider as
|
|
4
|
-
import { GustoEmbeddedCore as
|
|
5
|
-
import { SDKHooks as
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { QueryClientProvider as E } from "@tanstack/react-query";
|
|
3
|
+
import { GustoEmbeddedProvider as R } from "@gusto/embedded-api/react-query/_context";
|
|
4
|
+
import { GustoEmbeddedCore as q } from "@gusto/embedded-api/core";
|
|
5
|
+
import { SDKHooks as C } from "@gusto/embedded-api/hooks/hooks";
|
|
6
6
|
import { useMemo as a } from "react";
|
|
7
|
-
import { apiVersionHook as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { apiVersionHook as b } from "./apiVersionHook.js";
|
|
8
|
+
import { createSdkQueryClient as g } from "./createSdkQueryClient.js";
|
|
9
|
+
function G({
|
|
10
|
+
url: s,
|
|
11
|
+
headers: i,
|
|
11
12
|
hooks: e,
|
|
12
|
-
children:
|
|
13
|
-
queryClient:
|
|
13
|
+
children: m,
|
|
14
|
+
queryClient: f
|
|
14
15
|
}) {
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
serverURL:
|
|
18
|
-
}),
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
beforeRequest: (
|
|
22
|
-
|
|
16
|
+
const d = a(() => {
|
|
17
|
+
const t = new q({
|
|
18
|
+
serverURL: s
|
|
19
|
+
}), o = t._options.hooks || new C();
|
|
20
|
+
if (o.registerBeforeRequestHook(b), i) {
|
|
21
|
+
const r = {
|
|
22
|
+
beforeRequest: (k, n) => (new Headers(i).forEach((c, H) => {
|
|
23
|
+
c && n.headers.set(H, c);
|
|
23
24
|
}), n)
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
o.registerBeforeRequestHook(r);
|
|
26
27
|
}
|
|
27
|
-
return e?.beforeCreateRequest && e.beforeCreateRequest.forEach((
|
|
28
|
-
|
|
29
|
-
}), e?.beforeRequest && e.beforeRequest.forEach((
|
|
30
|
-
|
|
31
|
-
}), e?.afterSuccess && e.afterSuccess.forEach((
|
|
32
|
-
|
|
33
|
-
}), e?.afterError && e.afterError.forEach((
|
|
34
|
-
|
|
35
|
-
}),
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
return i;
|
|
39
|
-
const r = new H(), t = async () => {
|
|
40
|
-
await r.invalidateQueries({ queryKey: ["@gusto/embedded-api"] });
|
|
41
|
-
};
|
|
42
|
-
return r.setQueryDefaults(["@gusto/embedded-api"], { retry: !1 }), r.setMutationDefaults(["@gusto/embedded-api"], { onSuccess: t, retry: !1 }), r;
|
|
43
|
-
}, [i]);
|
|
44
|
-
return /* @__PURE__ */ c(b, { client: p, children: /* @__PURE__ */ c(g, { client: m, children: d }) });
|
|
28
|
+
return e?.beforeCreateRequest && e.beforeCreateRequest.forEach((r) => {
|
|
29
|
+
o.registerBeforeCreateRequestHook(r);
|
|
30
|
+
}), e?.beforeRequest && e.beforeRequest.forEach((r) => {
|
|
31
|
+
o.registerBeforeRequestHook(r);
|
|
32
|
+
}), e?.afterSuccess && e.afterSuccess.forEach((r) => {
|
|
33
|
+
o.registerAfterSuccessHook(r);
|
|
34
|
+
}), e?.afterError && e.afterError.forEach((r) => {
|
|
35
|
+
o.registerAfterErrorHook(r);
|
|
36
|
+
}), t._options.hooks || (t._options.hooks = o), t;
|
|
37
|
+
}, [s, i, e]), p = a(() => f ?? g(), [f]);
|
|
38
|
+
return /* @__PURE__ */ u(E, { client: p, children: /* @__PURE__ */ u(R, { client: d, children: m }) });
|
|
45
39
|
}
|
|
46
40
|
export {
|
|
47
|
-
|
|
41
|
+
G as ApiProvider
|
|
48
42
|
};
|
|
49
43
|
//# sourceMappingURL=ApiProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport { createSdkQueryClient } from './createSdkQueryClient'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\nexport interface ApiProviderProps {\n url: string\n headers?: HeadersInit\n hooks?: SDKHooks\n children: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n return queryClientFromProps ?? createSdkQueryClient()\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","createSdkQueryClient","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;;AAiBO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf,GAAqB;AACnB,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWR;AAAA,IAAA,CACZ,GAEKS,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAI9C,QAFAD,EAAS,0BAA0BE,CAAc,GAE7CV,GAAS;AACX,YAAMW,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQb,CAAO,EAC3B,QAAQ,CAACc,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAL,EAAS,0BAA0BG,CAAiB;AAAA,IACtD;AAEA,WAAIV,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAe,MAAQ;AACxC,MAAAR,EAAS,gCAAgCQ,CAAI;AAAA,IAC/C,CAAC,GAGCf,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAe,MAAQ;AAClC,MAAAR,EAAS,0BAA0BQ,CAAI;AAAA,IACzC,CAAC,GAGCf,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAe,MAAQ;AACjC,MAAAR,EAAS,yBAAyBQ,CAAI;AAAA,IACxC,CAAC,GAGCf,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAe,MAAQ;AAC/B,MAAAR,EAAS,uBAAuBQ,CAAI;AAAA,IACtC,CAAC,GAGEV,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACP,GAAKC,GAASC,CAAK,CAAC,GAElBgB,IAAcZ,EAAQ,MACnBF,KAAwBe,EAAA,GAC9B,CAACf,CAAoB,CAAC;AAEzB,SACE,gBAAAgB,EAACC,KAAoB,QAAQH,GAC3B,4BAACI,GAAA,EAAsB,QAAQjB,GAAc,UAAAF,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a QueryClient pre-configured with the SDK's defaults for queries and
|
|
4
|
+
* mutations under the `['@gusto/embedded-api']` key:
|
|
5
|
+
*
|
|
6
|
+
* - `retry: false` on both queries and mutations.
|
|
7
|
+
* - On any successful mutation, all SDK queries are invalidated so the next
|
|
8
|
+
* read sees fresh data.
|
|
9
|
+
*
|
|
10
|
+
* `ApiProvider` uses this when no `queryClient` prop is supplied. `GustoTestProvider`
|
|
11
|
+
* uses it so tests faithfully replicate production mutation/refetch behavior.
|
|
12
|
+
*
|
|
13
|
+
* Partners who supply their own `QueryClient` to `ApiProvider` are responsible
|
|
14
|
+
* for configuring equivalent defaults if they want mutations to invalidate
|
|
15
|
+
* cached reads.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createSdkQueryClient(): QueryClient;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QueryClient as t } from "@tanstack/react-query";
|
|
2
|
+
function a() {
|
|
3
|
+
const e = new t();
|
|
4
|
+
return e.setQueryDefaults(["@gusto/embedded-api"], { retry: !1 }), e.setMutationDefaults(["@gusto/embedded-api"], {
|
|
5
|
+
retry: !1,
|
|
6
|
+
onSuccess: async () => {
|
|
7
|
+
await e.invalidateQueries({ queryKey: ["@gusto/embedded-api"] });
|
|
8
|
+
}
|
|
9
|
+
}), e;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
a as createSdkQueryClient
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=createSdkQueryClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSdkQueryClient.js","sources":["../../../src/contexts/ApiProvider/createSdkQueryClient.ts"],"sourcesContent":["import { QueryClient } from '@tanstack/react-query'\n\n/**\n * Creates a QueryClient pre-configured with the SDK's defaults for queries and\n * mutations under the `['@gusto/embedded-api']` key:\n *\n * - `retry: false` on both queries and mutations.\n * - On any successful mutation, all SDK queries are invalidated so the next\n * read sees fresh data.\n *\n * `ApiProvider` uses this when no `queryClient` prop is supplied. `GustoTestProvider`\n * uses it so tests faithfully replicate production mutation/refetch behavior.\n *\n * Partners who supply their own `QueryClient` to `ApiProvider` are responsible\n * for configuring equivalent defaults if they want mutations to invalidate\n * cached reads.\n */\nexport function createSdkQueryClient(): QueryClient {\n const client = new QueryClient()\n client.setQueryDefaults(['@gusto/embedded-api'], { retry: false })\n client.setMutationDefaults(['@gusto/embedded-api'], {\n retry: false,\n onSuccess: async () => {\n await client.invalidateQueries({ queryKey: ['@gusto/embedded-api'] })\n },\n })\n return client\n}\n"],"names":["createSdkQueryClient","client","QueryClient"],"mappings":";AAiBO,SAASA,IAAoC;AAClD,QAAMC,IAAS,IAAIC,EAAA;AACnB,SAAAD,EAAO,iBAAiB,CAAC,qBAAqB,GAAG,EAAE,OAAO,IAAO,GACjEA,EAAO,oBAAoB,CAAC,qBAAqB,GAAG;AAAA,IAClD,OAAO;AAAA,IACP,WAAW,YAAY;AACrB,YAAMA,EAAO,kBAAkB,EAAE,UAAU,CAAC,qBAAqB,GAAG;AAAA,IACtE;AAAA,EAAA,CACD,GACMA;AACT;"}
|
|
@@ -22,6 +22,18 @@ export declare const formatPayRate: ({ rate, paymentUnit, t, locale, }: {
|
|
|
22
22
|
locale?: string;
|
|
23
23
|
}) => string;
|
|
24
24
|
export declare const useFormatPayRate: () => (rate: number, paymentUnit: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Formats a compensation rate as-is, without annualizing weekly or monthly
|
|
27
|
+
* values. Use this for displaying compensation card data where the stored rate
|
|
28
|
+
* should be shown directly (e.g. "$950 per week", "$3,500 per month").
|
|
29
|
+
*/
|
|
30
|
+
export declare const formatCompensationRate: ({ rate, paymentUnit, t, locale, }: {
|
|
31
|
+
rate: number;
|
|
32
|
+
paymentUnit: string;
|
|
33
|
+
t: TFunction;
|
|
34
|
+
locale?: string;
|
|
35
|
+
}) => string;
|
|
36
|
+
export declare const useFormatCompensationRate: () => (rate: number, paymentUnit: string) => string;
|
|
25
37
|
export declare function createMarkup(dirty: string): {
|
|
26
38
|
__html: string;
|
|
27
39
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import m from "dompurify";
|
|
2
|
+
import { useTranslation as i } from "react-i18next";
|
|
3
3
|
import { useCallback as u } from "react";
|
|
4
4
|
import { useLocale as l } from "../contexts/LocaleProvider/useLocale.js";
|
|
5
|
-
const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1),
|
|
5
|
+
const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), S = ({
|
|
6
6
|
first_name: t,
|
|
7
7
|
last_name: e
|
|
8
|
-
}) => `${t ? c(t) : ""}${e ?
|
|
9
|
-
const e =
|
|
8
|
+
}) => `${t ? c(t) : ""}${e ? a(c(e)) : ""}`, a = (t) => t ? ` ${t}` : "", p = (t) => {
|
|
9
|
+
const e = a(t.street1), r = a(t.street2);
|
|
10
10
|
return `${e},${r}`;
|
|
11
|
-
},
|
|
11
|
+
}, D = (t) => [t.street1?.trim(), t.street2?.trim()].filter(
|
|
12
12
|
(r) => !!r
|
|
13
|
-
).join(", "),
|
|
13
|
+
).join(", "), y = (t) => `${a(t.city)}, ${a(t.state)} ${a(t.zip)}`, L = (t) => `${p(t)} ${y(t)}`, f = (t, e) => e ? `${t}%` : `$${t}`, s = (t, e = "en-US") => {
|
|
14
14
|
const r = t.toLocaleString(e, {
|
|
15
15
|
minimumFractionDigits: 2,
|
|
16
16
|
maximumFractionDigits: 2
|
|
17
17
|
});
|
|
18
|
-
return
|
|
19
|
-
},
|
|
18
|
+
return f(r, !1);
|
|
19
|
+
}, A = ({
|
|
20
20
|
rate: t,
|
|
21
21
|
paymentUnit: e,
|
|
22
22
|
t: r,
|
|
23
23
|
locale: n = "en-US"
|
|
24
24
|
}) => {
|
|
25
|
-
const
|
|
25
|
+
const o = s(t, n);
|
|
26
26
|
switch (e) {
|
|
27
27
|
case "Hour":
|
|
28
|
-
return r("payRateFormats.hourly", { amount:
|
|
28
|
+
return r("payRateFormats.hourly", { amount: o, ns: "common" });
|
|
29
29
|
case "Week":
|
|
30
30
|
return r("payRateFormats.weekly", {
|
|
31
31
|
amount: s(t * 52, n),
|
|
@@ -37,41 +37,63 @@ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), L = ({
|
|
|
37
37
|
ns: "common"
|
|
38
38
|
});
|
|
39
39
|
case "Year":
|
|
40
|
-
return r("payRateFormats.yearly", { amount:
|
|
40
|
+
return r("payRateFormats.yearly", { amount: o, ns: "common" });
|
|
41
|
+
case "Paycheck":
|
|
42
|
+
return r("payRateFormats.paycheck", { amount: o, ns: "common" });
|
|
43
|
+
default:
|
|
44
|
+
return o;
|
|
45
|
+
}
|
|
46
|
+
}, $ = ({
|
|
47
|
+
rate: t,
|
|
48
|
+
paymentUnit: e,
|
|
49
|
+
t: r,
|
|
50
|
+
locale: n = "en-US"
|
|
51
|
+
}) => {
|
|
52
|
+
const o = s(t, n);
|
|
53
|
+
switch (e) {
|
|
54
|
+
case "Hour":
|
|
55
|
+
return r("compensationRateFormats.hourly", { amount: o, ns: "common" });
|
|
56
|
+
case "Week":
|
|
57
|
+
return r("compensationRateFormats.weekly", { amount: o, ns: "common" });
|
|
58
|
+
case "Month":
|
|
59
|
+
return r("compensationRateFormats.monthly", { amount: o, ns: "common" });
|
|
60
|
+
case "Year":
|
|
61
|
+
return r("compensationRateFormats.yearly", { amount: o, ns: "common" });
|
|
41
62
|
case "Paycheck":
|
|
42
|
-
return r("
|
|
63
|
+
return r("compensationRateFormats.paycheck", { amount: o, ns: "common" });
|
|
43
64
|
default:
|
|
44
|
-
return
|
|
65
|
+
return o;
|
|
45
66
|
}
|
|
46
|
-
},
|
|
47
|
-
const { t } =
|
|
67
|
+
}, _ = () => {
|
|
68
|
+
const { t } = i("common"), { locale: e } = l();
|
|
48
69
|
return u(
|
|
49
70
|
(r, n) => $({ rate: r, paymentUnit: n, t, locale: e }),
|
|
50
71
|
[t, e]
|
|
51
72
|
);
|
|
52
|
-
},
|
|
53
|
-
function
|
|
54
|
-
return t ? { __html:
|
|
73
|
+
}, h = { ALLOWED_TAGS: ["a", "b", "strong"], ALLOWED_ATTR: ["href", "target"] };
|
|
74
|
+
function b(t) {
|
|
75
|
+
return t ? { __html: m.sanitize(t, h) } : { __html: "" };
|
|
55
76
|
}
|
|
56
|
-
const
|
|
77
|
+
const g = (t) => t.replace(/\D/g, ""), z = (t) => t.replace(/\.value$/, ""), P = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase()), T = (t) => {
|
|
57
78
|
if (!t) return "";
|
|
58
|
-
const e =
|
|
79
|
+
const e = g(String(t));
|
|
59
80
|
return e.length === 10 ? `${e.slice(0, 3)}-${e.slice(3, 6)}-${e.slice(6)}` : e.length === 11 && e.startsWith("1") ? `${e.slice(1, 4)}-${e.slice(4, 7)}-${e.slice(7)}` : e || "";
|
|
60
81
|
};
|
|
61
82
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
83
|
+
L as addressInline,
|
|
84
|
+
f as amountStr,
|
|
85
|
+
b as createMarkup,
|
|
86
|
+
S as firstLastName,
|
|
87
|
+
$ as formatCompensationRate,
|
|
66
88
|
s as formatNumberAsCurrency,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
89
|
+
A as formatPayRate,
|
|
90
|
+
T as formatPhoneNumber,
|
|
91
|
+
D as formatStreetForDisplay,
|
|
92
|
+
y as getCityStateZip,
|
|
71
93
|
p as getStreet,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
94
|
+
z as normalizeErrorKeyForForm,
|
|
95
|
+
g as removeNonDigits,
|
|
96
|
+
P as snakeCaseToCamelCase,
|
|
97
|
+
_ as useFormatCompensationRate
|
|
76
98
|
};
|
|
77
99
|
//# sourceMappingURL=formattedStrings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { type TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useCallback } from 'react'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\nexport const firstLastName = ({\n first_name,\n last_name,\n}: {\n first_name?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\n/** Joins street lines with a comma for display (avoids getStreet’s leading-space/comma quirks). */\nexport const formatStreetForDisplay = (address: EmployeeAddress | Location) => {\n const parts = [address.street1?.trim(), address.street2?.trim()].filter((part): part is string =>\n Boolean(part),\n )\n return parts.join(', ')\n}\n\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\nexport const currentDateString = () => {\n const d = new Date()\n const dateString = `${String(d.getFullYear())}-${('0' + String(d.getMonth() + 1)).slice(-2)}-${('0' + String(d.getDate())).slice(-2)}`\n return dateString\n}\n\nexport function isNumberKey({ which, keyCode }: KeyboardEvent) {\n const charCode = which ? which : keyCode\n if (charCode > 31 && charCode != 46 && (charCode < 48 || charCode > 57)) return false\n return true\n}\n\nexport const booleanToString = (value: boolean) => (value ? 'true' : 'false')\n\nexport const amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\nexport const formatNumberAsCurrency = (amount: number, locale: string = 'en-US') => {\n const formattedNumber = amount.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n return amountStr(formattedNumber, false)\n}\n\nexport const formatPayRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('payRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('payRateFormats.weekly', {\n amount: formatNumberAsCurrency(rate * 52, locale),\n ns: 'common',\n })\n case 'Month':\n return t('payRateFormats.monthly', {\n amount: formatNumberAsCurrency(rate * 12, locale),\n ns: 'common',\n })\n case 'Year':\n return t('payRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('payRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\nexport const useFormatPayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatPayRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\nexport const normalizeErrorKeyForForm = (errorKey: string): string =>\n errorKey.replace(/\\.value$/, '')\n\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n\nexport const formatPhoneNumber = (phoneNumber: string | number | null | undefined): string => {\n if (!phoneNumber) return ''\n\n const digits = removeNonDigits(String(phoneNumber))\n\n if (digits.length === 10) {\n return `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6)}`\n }\n\n if (digits.length === 11 && digits.startsWith('1')) {\n return `${digits.slice(1, 4)}-${digits.slice(4, 7)}-${digits.slice(7)}`\n }\n\n return digits || ''\n}\n"],"names":["capitalize","word","firstLastName","first_name","last_name","maybeString","str","getStreet","address","street1","street2","formatStreetForDisplay","part","getCityStateZip","addressInline","amountStr","amount","isPercentage","formatNumberAsCurrency","locale","formattedNumber","formatPayRate","rate","paymentUnit","t","useFormatPayRate","useTranslation","useLocale","useCallback","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","normalizeErrorKeyForForm","errorKey","snakeCaseToCamelCase","s","_","char","formatPhoneNumber","phoneNumber","digits"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { type TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useCallback } from 'react'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\nexport const firstLastName = ({\n first_name,\n last_name,\n}: {\n first_name?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\n/** Joins street lines with a comma for display (avoids getStreet’s leading-space/comma quirks). */\nexport const formatStreetForDisplay = (address: EmployeeAddress | Location) => {\n const parts = [address.street1?.trim(), address.street2?.trim()].filter((part): part is string =>\n Boolean(part),\n )\n return parts.join(', ')\n}\n\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\nexport const currentDateString = () => {\n const d = new Date()\n const dateString = `${String(d.getFullYear())}-${('0' + String(d.getMonth() + 1)).slice(-2)}-${('0' + String(d.getDate())).slice(-2)}`\n return dateString\n}\n\nexport function isNumberKey({ which, keyCode }: KeyboardEvent) {\n const charCode = which ? which : keyCode\n if (charCode > 31 && charCode != 46 && (charCode < 48 || charCode > 57)) return false\n return true\n}\n\nexport const booleanToString = (value: boolean) => (value ? 'true' : 'false')\n\nexport const amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\nexport const formatNumberAsCurrency = (amount: number, locale: string = 'en-US') => {\n const formattedNumber = amount.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n return amountStr(formattedNumber, false)\n}\n\nexport const formatPayRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('payRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('payRateFormats.weekly', {\n amount: formatNumberAsCurrency(rate * 52, locale),\n ns: 'common',\n })\n case 'Month':\n return t('payRateFormats.monthly', {\n amount: formatNumberAsCurrency(rate * 12, locale),\n ns: 'common',\n })\n case 'Year':\n return t('payRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('payRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\nexport const useFormatPayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatPayRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\n/**\n * Formats a compensation rate as-is, without annualizing weekly or monthly\n * values. Use this for displaying compensation card data where the stored rate\n * should be shown directly (e.g. \"$950 per week\", \"$3,500 per month\").\n */\nexport const formatCompensationRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('compensationRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('compensationRateFormats.weekly', { amount, ns: 'common' })\n case 'Month':\n return t('compensationRateFormats.monthly', { amount, ns: 'common' })\n case 'Year':\n return t('compensationRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('compensationRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\nexport const useFormatCompensationRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatCompensationRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\nexport const normalizeErrorKeyForForm = (errorKey: string): string =>\n errorKey.replace(/\\.value$/, '')\n\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n\nexport const formatPhoneNumber = (phoneNumber: string | number | null | undefined): string => {\n if (!phoneNumber) return ''\n\n const digits = removeNonDigits(String(phoneNumber))\n\n if (digits.length === 10) {\n return `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6)}`\n }\n\n if (digits.length === 11 && digits.startsWith('1')) {\n return `${digits.slice(1, 4)}-${digits.slice(4, 7)}-${digits.slice(7)}`\n }\n\n return digits || ''\n}\n"],"names":["capitalize","word","firstLastName","first_name","last_name","maybeString","str","getStreet","address","street1","street2","formatStreetForDisplay","part","getCityStateZip","addressInline","amountStr","amount","isPercentage","formatNumberAsCurrency","locale","formattedNumber","formatPayRate","rate","paymentUnit","t","formatCompensationRate","useFormatCompensationRate","useTranslation","useLocale","useCallback","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","normalizeErrorKeyForForm","errorKey","snakeCaseToCamelCase","s","_","char","formatPhoneNumber","phoneNumber","digits"],"mappings":"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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PaginationControlProps, PaginationItemsPerPage } from '../../components/Common/PaginationControl/PaginationControlTypes';
|
|
2
|
+
interface UseClientPaginationOptions<TItem> {
|
|
3
|
+
/**
|
|
4
|
+
* Optional substring/fuzzy/etc. predicate run against the debounced,
|
|
5
|
+
* deferred, trimmed search value. The hook owns search state and
|
|
6
|
+
* resets to page 1 once the debounce settles. A trimmed-empty value is
|
|
7
|
+
* treated as "no search" and the predicate is not called. Omit to skip
|
|
8
|
+
* search entirely.
|
|
9
|
+
*/
|
|
10
|
+
searchPredicate?: (item: TItem, query: string) => boolean;
|
|
11
|
+
/** Display rows-per-page. Default 5. */
|
|
12
|
+
defaultItemsPerPage?: PaginationItemsPerPage;
|
|
13
|
+
/**
|
|
14
|
+
* Debounce window (ms) applied to the search value before it reaches
|
|
15
|
+
* the predicate and page reset. Keeps the controlled input responsive
|
|
16
|
+
* while preventing the filter from running on every keystroke for
|
|
17
|
+
* large lists or expensive predicates. Defaults to 120ms. Pass 0 to
|
|
18
|
+
* disable debouncing entirely (useful for tests).
|
|
19
|
+
*/
|
|
20
|
+
searchDebounceMs?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface UseClientPaginationResult<TItem> {
|
|
23
|
+
/** Current-page slice. */
|
|
24
|
+
data: TItem[];
|
|
25
|
+
/** Drop-in `PaginationControlProps` for `useDataView` / `PaginationControl`. */
|
|
26
|
+
pagination: PaginationControlProps;
|
|
27
|
+
/** Current search value (controlled). */
|
|
28
|
+
searchValue: string;
|
|
29
|
+
actions: {
|
|
30
|
+
onSearchChange: (value: string) => void;
|
|
31
|
+
onSearchClear: () => void;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Client-side pagination + optional search over an in-memory array.
|
|
36
|
+
*
|
|
37
|
+
* Returns a `PaginationControlProps`-shaped pagination object that drops
|
|
38
|
+
* straight into `useDataView` / `PaginationControl`. Use this when the
|
|
39
|
+
* caller already has the full list of items and wants to paginate/search
|
|
40
|
+
* it locally. Pair with `usePagination` if you want to page through an
|
|
41
|
+
* API endpoint instead.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useClientPagination<TItem>(allItems: TItem[], options?: UseClientPaginationOptions<TItem>): UseClientPaginationResult<TItem>;
|
|
44
|
+
export {};
|