@gusto/embedded-react-sdk 0.39.0 → 0.41.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 +127 -0
- package/dist/components/Base/Base.js +3 -2
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Form/Form.d.ts +1 -1
- package/dist/components/Common/Form/Form.js +15 -5
- package/dist/components/Common/Form/Form.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +11 -9
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +12 -10
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +12 -12
- package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +3 -2
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +80 -61
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.d.ts +3 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.js +2 -2
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/index.d.ts +1 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.js +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +33 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +106 -0
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -2
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +7 -6
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -6
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +6 -5
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +4 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +6 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +31 -148
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +10 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js +26 -0
- package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +8 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +199 -0
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +8 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js +103 -0
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -0
- package/dist/components/Company/PaySchedule/{_parts/List.module.scss.js → PayScheduleList.module.scss.js} +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.module.scss.js.map +1 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +6 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +49 -0
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.d.ts +6 -6
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/index.d.ts +0 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.js +2 -2
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -0
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +33 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/usePayScheduleForm.js +30 -26
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +6 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +14 -0
- package/dist/components/Company/exports/companyOnboarding.js +31 -0
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -0
- package/dist/components/Contractor/Address/Address.js +4 -2
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +3 -2
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +3 -2
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -2
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -4
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +14 -13
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +74 -50
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +7 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js +17 -0
- package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -0
- package/dist/components/Employee/Compensation/Actions.js +5 -4
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +23 -22
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.d.ts +8 -8
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/index.d.ts +0 -2
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +43 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/useCompensationForm.js +28 -24
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +79 -79
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +2 -5
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +8 -11
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +8 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +10 -12
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +11 -11
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +6 -9
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +7 -10
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +8 -8
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +3 -2
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -6
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +11 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +23 -22
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -2
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +13 -11
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.d.ts +5 -5
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.js +4 -4
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/index.d.ts +0 -4
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.d.ts +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.js +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +47 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/useSignEmployeeForm.js +66 -59
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -4
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +7 -6
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +3 -2
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminProfile.d.ts +2 -0
- package/dist/components/Employee/Profile/AdminProfile.js +358 -0
- package/dist/components/Employee/Profile/AdminProfile.js.map +1 -0
- package/dist/components/Employee/Profile/AdminProfile.module.scss.js +10 -0
- package/dist/components/Employee/Profile/AdminProfile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/EmployeeProfile.d.ts +2 -0
- package/dist/components/Employee/Profile/EmployeeProfile.js +211 -0
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -0
- package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js +10 -0
- package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/Profile.d.ts +3 -3
- package/dist/components/Employee/Profile/Profile.js +25 -261
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.js +2 -2
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.d.ts +4 -4
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/index.d.ts +0 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +15 -33
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.js +31 -27
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +22 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +36 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +41 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +32 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +5 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +44 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +161 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.d.ts +3 -3
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.js +2 -2
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/index.d.ts +0 -2
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.d.ts +11 -32
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.js +34 -30
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.d.ts +3 -5
- package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.js +7 -9
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -0
- package/dist/components/Employee/StateTaxes/Actions.js +8 -7
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +5 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +5 -5
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +13 -12
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -8
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +3 -2
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.js +7 -7
- package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.js +15 -14
- package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.d.ts +1 -1
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.js +7 -7
- package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +1 -0
- package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeListView.d.ts +1 -1
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js +131 -0
- package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/employee-list/shared/index.d.ts +2 -0
- package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.d.ts +8 -10
- package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.js +32 -28
- package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +1 -0
- package/dist/components/Employee/exports/employeeManagement.d.ts +6 -0
- package/dist/components/Employee/exports/employeeManagement.js +15 -0
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -0
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +14 -0
- package/dist/components/Employee/exports/employeeOnboarding.js +31 -0
- package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -0
- package/dist/components/Employee/index.d.ts +1 -2
- package/dist/components/Employee/index.js +35 -37
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +12 -11
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +18 -17
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +8 -7
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -2
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +11 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +9 -8
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +19 -18
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +2 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +7 -6
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +3 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -7
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +17 -17
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +3 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -4
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +13 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +106 -108
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +13 -12
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +10 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -12
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +96 -62
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +48 -45
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +18 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +166 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsTypes.d.ts +18 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +24 -22
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +3 -2
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/index.js +24 -22
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +11 -10
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/useObservability.js +6 -6
- package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -1
- package/dist/i18n/I18n.js +9 -9
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +15 -13
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +1 -1
- package/dist/i18n/en/Contractor.Submit.json.js +16 -12
- package/dist/i18n/en/Contractor.Submit.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +1 -0
- package/dist/i18n/en/common.json.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +102 -26
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/collectErrors.js.map +1 -0
- package/dist/partner-hook-utils/composeErrorHandler.d.ts +24 -0
- package/dist/partner-hook-utils/composeErrorHandler.js +30 -0
- package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.js +3 -3
- package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.d.ts +2 -2
- package/dist/partner-hook-utils/form/FormFieldsMetadataProvider.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.d.ts +2 -2
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.d.ts +1 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.d.ts +29 -3
- package/dist/partner-hook-utils/form/composeSubmitHandler.js +40 -0
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/CheckboxHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +37 -0
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.d.ts +3 -3
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.js +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/NumberInputHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +43 -0
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +43 -0
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.d.ts +3 -3
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.js +18 -16
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SwitchHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +37 -0
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/TextInputHookField.d.ts +3 -3
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +41 -0
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/index.d.ts +7 -7
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/getFieldWithOptions.js.map +1 -0
- package/dist/partner-hook-utils/form/getFormSubmissionValues.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/index.d.ts +2 -2
- package/dist/partner-hook-utils/form/preprocessors.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.d.ts +2 -2
- package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useDeriveFieldsMetadata.d.ts +1 -1
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.d.ts +2 -2
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/withOptions.js.map +1 -0
- package/dist/partner-hook-utils/index.d.ts +5 -0
- package/dist/{types/sdkHooks.d.ts → partner-hook-utils/types.d.ts} +37 -9
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +15 -16
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +24 -252
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +531 -170
- package/package.json +15 -19
- package/dist/UNSTABLE_Hooks.d.ts +0 -1
- package/dist/UNSTABLE_Hooks.js +0 -71
- package/dist/UNSTABLE_Hooks.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js +0 -35
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js +0 -20
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +0 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +0 -22
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +0 -63
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +0 -134
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +0 -14
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/Head.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +0 -47
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.d.ts +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +0 -57
- package/dist/components/Company/PaySchedule/_parts/List.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +0 -1
- package/dist/components/Company/PaySchedule/_parts/index.d.ts +0 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -39
- package/dist/components/Company/PaySchedule/usePaySchedule.js +0 -30
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +0 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +0 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +0 -130
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +0 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +0 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +0 -1
- package/dist/components/Employee/EmployeeList/index.d.ts +0 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +0 -1
- package/dist/components/Employee/Profile/Actions.d.ts +0 -1
- package/dist/components/Employee/Profile/Actions.js +0 -14
- package/dist/components/Employee/Profile/Actions.js.map +0 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +0 -33
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +0 -59
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +0 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +0 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +0 -1
- package/dist/components/Employee/Profile/Head.d.ts +0 -1
- package/dist/components/Employee/Profile/Head.js +0 -14
- package/dist/components/Employee/Profile/Head.js.map +0 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +0 -31
- package/dist/components/Employee/Profile/HomeAddress.js +0 -128
- package/dist/components/Employee/Profile/HomeAddress.js.map +0 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +0 -49
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +0 -146
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +0 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +0 -16
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +0 -29
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +0 -1
- package/dist/components/Employee/Profile/WorkAddress.d.ts +0 -1
- package/dist/components/Employee/Profile/WorkAddress.js +0 -21
- package/dist/components/Employee/Profile/WorkAddress.js.map +0 -1
- package/dist/components/Employee/Profile/WorkAddress.module.scss.js +0 -8
- package/dist/components/Employee/Profile/WorkAddress.module.scss.js.map +0 -1
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.d.ts +0 -2
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js +0 -8
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +0 -1
- package/dist/components/Employee/Profile/useProfile.d.ts +0 -16
- package/dist/components/Employee/Profile/useProfile.js +0 -20
- package/dist/components/Employee/Profile/useProfile.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +0 -34
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +0 -35
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +0 -41
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +0 -41
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +0 -35
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +0 -39
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +0 -21
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +0 -149
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +0 -102
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +0 -112
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +0 -172
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +0 -69
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +0 -69
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +0 -57
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +0 -101
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +0 -71
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +0 -179
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -151
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +0 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +0 -69
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +0 -12
- package/dist/helpers/buildQueryErrorHandling.d.ts +0 -22
- package/dist/helpers/buildQueryErrorHandling.js +0 -11
- package/dist/helpers/buildQueryErrorHandling.js.map +0 -1
- package/dist/helpers/collectErrors.js.map +0 -1
- package/dist/hooks/useErrorHandling.d.ts +0 -9
- package/dist/hooks/useErrorHandling.js +0 -12
- package/dist/hooks/useErrorHandling.js.map +0 -1
- package/dist/hooks/useErrorHandling.test.d.ts +0 -1
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +0 -58
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +0 -34
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +0 -24
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +0 -20
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +0 -22
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +0 -70
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +0 -1
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +0 -24
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +0 -1
- /package/dist/components/{UNSTABLE_Hooks/hooks/usePayScheduleForm → Company/PaySchedule}/PayScheduleForm.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_Hooks/hooks/usePayScheduleForm → Company/PaySchedule}/PayScheduleForm.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchemaParity.test.d.ts +0 -0
- /package/dist/{helpers → partner-hook-utils}/collectErrors.d.ts +0 -0
- /package/dist/{helpers → partner-hook-utils}/collectErrors.js +0 -0
- /package/dist/{components/Employee/Profile/getEmployeeAddressForProfile.test.d.ts → partner-hook-utils/composeErrorHandler.test.d.ts} +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.test.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.test.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.test.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.d.ts +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.js +0 -0
- /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.js +0 -0
|
@@ -1,153 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { useBase as te } from "../../Base/useBase.js";
|
|
15
|
-
import { Flex as ae } from "../../Common/Flex/Flex.js";
|
|
16
|
-
import { useI18n as ne, useComponentDictionary as ce } from "../../../i18n/I18n.js";
|
|
17
|
-
import { componentEvents as p } from "../../../shared/constants.js";
|
|
18
|
-
import { formatDateToStringDate as l } from "../../../helpers/dateFormatting.js";
|
|
19
|
-
import { normalizeErrorKeyForForm as ie } from "../../../helpers/formattedStrings.js";
|
|
20
|
-
import { Head as de } from "./_parts/Head.js";
|
|
21
|
-
import { List as se } from "./_parts/List.js";
|
|
22
|
-
import { Edit as me } from "./_parts/Edit.js";
|
|
23
|
-
import { Actions as ye } from "./_parts/Actions.js";
|
|
24
|
-
const Re = ({
|
|
25
|
-
companyId: n,
|
|
26
|
-
defaultValues: m,
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as u } from "react";
|
|
3
|
+
import { createMachine as l } from "robot3";
|
|
4
|
+
import { usePaySchedulesGetAllSuspense as p } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
|
|
5
|
+
import { payScheduleStateMachine as h } from "./payScheduleStateMachine.js";
|
|
6
|
+
import { PayScheduleListContextual as S, PayScheduleFormContextual as d } from "./PayScheduleComponents.js";
|
|
7
|
+
import { BaseComponent as f } from "../../Base/Base.js";
|
|
8
|
+
import { useBase as y } from "../../Base/useBase.js";
|
|
9
|
+
import { useI18n as C, useComponentDictionary as P } from "../../../i18n/I18n.js";
|
|
10
|
+
import { Flow as x } from "../../Flow/Flow.js";
|
|
11
|
+
const L = ({
|
|
12
|
+
companyId: e,
|
|
13
|
+
defaultValues: o,
|
|
27
14
|
dictionary: t,
|
|
28
|
-
...
|
|
29
|
-
}) => (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
resolver: J($),
|
|
44
|
-
defaultValues: g
|
|
45
|
-
}), { watch: M, setValue: S, reset: s, clearErrors: N, setError: _ } = D, u = O?.fieldErrors;
|
|
46
|
-
T(() => {
|
|
47
|
-
u && u.length > 0 && u.forEach((o) => {
|
|
48
|
-
const r = ie(o.field);
|
|
49
|
-
_(r, { message: o.message });
|
|
50
|
-
});
|
|
51
|
-
}, [_, u]);
|
|
52
|
-
const e = M(), C = e.anchorPayDate && l(e.anchorPayDate) || "", L = e.anchorEndOfPayPeriod && l(e.anchorEndOfPayPeriod) || "", { data: R, isLoading: F } = Q(
|
|
53
|
-
{
|
|
54
|
-
companyId: n,
|
|
55
|
-
frequency: e.frequency,
|
|
56
|
-
...C && { anchorPayDate: new i(C) },
|
|
57
|
-
...L && {
|
|
58
|
-
anchorEndOfPayPeriod: new i(L)
|
|
59
|
-
},
|
|
60
|
-
day1: e.day1 ?? void 0,
|
|
61
|
-
day2: e.day2 ?? void 0
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
enabled: !!(e.anchorPayDate && e.anchorEndOfPayPeriod && (d === "ADD_PAY_SCHEDULE" || d === "EDIT_PAY_SCHEDULE"))
|
|
65
|
-
}
|
|
15
|
+
...n
|
|
16
|
+
}) => (C("Company.PaySchedule"), P("Company.PaySchedule", t), /* @__PURE__ */ r(f, { ...n, children: /* @__PURE__ */ r(M, { companyId: e, defaultValues: o }) }));
|
|
17
|
+
function M({ companyId: e, defaultValues: o }) {
|
|
18
|
+
const { onEvent: t } = y(), { data: n } = p({ companyId: e }), m = (n.paySchedules?.length ?? 0) > 0, c = m ? "listSchedules" : "addSchedule", i = m ? S : d, a = u(
|
|
19
|
+
() => l(
|
|
20
|
+
c,
|
|
21
|
+
h,
|
|
22
|
+
(s) => ({
|
|
23
|
+
...s,
|
|
24
|
+
component: i,
|
|
25
|
+
companyId: e,
|
|
26
|
+
defaultValues: o
|
|
27
|
+
})
|
|
28
|
+
),
|
|
29
|
+
[e, o, c, i]
|
|
66
30
|
);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, [e.frequency, e.day1, e.day2, S, e.customTwicePerMonth]);
|
|
70
|
-
const b = () => {
|
|
71
|
-
P("ADD_PAY_SCHEDULE"), s({});
|
|
72
|
-
}, x = () => {
|
|
73
|
-
P("LIST_PAY_SCHEDULES"), s({}), N(), U(null);
|
|
74
|
-
}, B = (o) => {
|
|
75
|
-
s({
|
|
76
|
-
frequency: o.frequency,
|
|
77
|
-
anchorPayDate: o.anchorPayDate ? new Date(o.anchorPayDate.toString()) : void 0,
|
|
78
|
-
anchorEndOfPayPeriod: o.anchorEndOfPayPeriod ? new Date(o.anchorEndOfPayPeriod.toString()) : void 0,
|
|
79
|
-
day1: o.day1 ?? void 0,
|
|
80
|
-
day2: o.day2 ?? void 0,
|
|
81
|
-
customName: o.customName ?? ""
|
|
82
|
-
}), Y(o), P("EDIT_PAY_SCHEDULE");
|
|
83
|
-
}, I = () => {
|
|
84
|
-
f(p.PAY_SCHEDULE_DONE);
|
|
85
|
-
}, j = async (o) => {
|
|
86
|
-
await y(o, async (r) => {
|
|
87
|
-
const h = (c) => c && l(c) || "";
|
|
88
|
-
if (d === "ADD_PAY_SCHEDULE") {
|
|
89
|
-
const c = await v.mutateAsync({
|
|
90
|
-
request: {
|
|
91
|
-
companyId: n,
|
|
92
|
-
payScheduleCreateRequest: {
|
|
93
|
-
frequency: r.frequency,
|
|
94
|
-
anchorPayDate: new i(h(r.anchorPayDate)),
|
|
95
|
-
anchorEndOfPayPeriod: new i(h(r.anchorEndOfPayPeriod)),
|
|
96
|
-
customName: r.customName,
|
|
97
|
-
day1: r.day1,
|
|
98
|
-
day2: r.day2
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
f(p.PAY_SCHEDULE_CREATED, c), s();
|
|
103
|
-
} else if (d === "EDIT_PAY_SCHEDULE") {
|
|
104
|
-
const c = E?.version, k = await A.mutateAsync({
|
|
105
|
-
request: {
|
|
106
|
-
payScheduleId: E?.uuid,
|
|
107
|
-
companyId: n,
|
|
108
|
-
payScheduleUpdateRequest: {
|
|
109
|
-
frequency: r.frequency,
|
|
110
|
-
anchorPayDate: new i(h(r.anchorPayDate)),
|
|
111
|
-
anchorEndOfPayPeriod: new i(h(r.anchorEndOfPayPeriod)),
|
|
112
|
-
customName: r.customName,
|
|
113
|
-
day1: r.day1,
|
|
114
|
-
day2: r.day2,
|
|
115
|
-
version: c
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
f(p.PAY_SCHEDULE_UPDATED, k), s();
|
|
120
|
-
}
|
|
121
|
-
P("LIST_PAY_SCHEDULES");
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
return /* @__PURE__ */ a(
|
|
125
|
-
V,
|
|
126
|
-
{
|
|
127
|
-
value: {
|
|
128
|
-
companyId: n,
|
|
129
|
-
handleAdd: b,
|
|
130
|
-
handleEdit: B,
|
|
131
|
-
handleCancel: x,
|
|
132
|
-
handleContinue: I,
|
|
133
|
-
mode: d,
|
|
134
|
-
isPending: v.isPending || A.isPending,
|
|
135
|
-
paySchedules: w.paySchedules,
|
|
136
|
-
payPeriodPreview: R?.paySchedulePreview?.payPeriods,
|
|
137
|
-
payPreviewLoading: F,
|
|
138
|
-
currentPaySchedule: E,
|
|
139
|
-
paymentSpeedDays: H
|
|
140
|
-
},
|
|
141
|
-
children: /* @__PURE__ */ a("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ a(K, { ...D, children: /* @__PURE__ */ a(oe, { onSubmit: D.handleSubmit(j), children: m || /* @__PURE__ */ z(ae, { flexDirection: "column", children: [
|
|
142
|
-
/* @__PURE__ */ a(de, {}),
|
|
143
|
-
/* @__PURE__ */ a(se, {}),
|
|
144
|
-
/* @__PURE__ */ a(me, {}),
|
|
145
|
-
/* @__PURE__ */ a(ye, {})
|
|
146
|
-
] }) }) }) })
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
};
|
|
31
|
+
return /* @__PURE__ */ r(x, { machine: a, onEvent: t });
|
|
32
|
+
}
|
|
150
33
|
export {
|
|
151
|
-
|
|
34
|
+
L as PaySchedule
|
|
152
35
|
};
|
|
153
36
|
//# sourceMappingURL=PaySchedule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PaySchedule as PayScheduleType } from '@gusto/embedded-api/models/components/payschedule'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { useCompanyPaymentSpeed } from '@/hooks/useCompanyPaymentSpeed'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { normalizeErrorKeyForForm } from '@/helpers/formattedStrings'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, error, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const { paymentSpeedDays } = useCompanyPaymentSpeed(companyId)\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.paySchedules?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n const fieldErrors = error?.fieldErrors\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(fieldError => {\n const key = normalizeErrorKeyForForm(fieldError.field)\n setError(key as keyof PayScheduleInputs, { message: fieldError.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n ...(formattedAnchorPayDate && { anchorPayDate: new RFCDate(formattedAnchorPayDate) }),\n ...(formattedAnchorEndOfPayPeriod && {\n anchorEndOfPayPeriod: new RFCDate(formattedAnchorEndOfPayPeriod),\n }),\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n } as Parameters<typeof usePaySchedulesGetPreview>[0],\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as PayScheduleInputs['frequency'],\n anchorPayDate: schedule.anchorPayDate\n ? new Date(schedule.anchorPayDate.toString())\n : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod.toString())\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n payScheduleCreateRequest: {\n frequency: payload.frequency,\n anchorPayDate: new RFCDate(formatPayloadDate(payload.anchorPayDate)),\n anchorEndOfPayPeriod: new RFCDate(formatPayloadDate(payload.anchorEndOfPayPeriod)),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n payScheduleUpdateRequest: {\n frequency: payload.frequency,\n anchorPayDate: new RFCDate(formatPayloadDate(payload.anchorPayDate)),\n anchorEndOfPayPeriod: new RFCDate(formatPayloadDate(payload.anchorEndOfPayPeriod)),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n isPending: createPayScheduleMutation.isPending || updatePayScheduleMutation.isPending,\n paySchedules: paySchedules.paySchedules,\n payPeriodPreview: payPreviewData?.paySchedulePreview?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n paymentSpeedDays,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","error","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","paymentSpeedDays","useCompanyPaymentSpeed","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","fieldErrors","useEffect","fieldError","key","normalizeErrorKeyForForm","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","RFCDate","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;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AAA,EAAK;AAAA,0BACLC,IAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport { payScheduleStateMachine } from './payScheduleStateMachine'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype PayScheduleDefaultFields = {\n [K in keyof Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >]: NonNullable<PayScheduleCreateUpdate[K]>\n}\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, defaultValues }: PayScheduleProps) {\n const { onEvent } = useBase()\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const hasSchedules = (paySchedules.paySchedules?.length ?? 0) > 0\n const initialState = hasSchedules ? 'listSchedules' : 'addSchedule'\n const initialComponent = hasSchedules ? PayScheduleListContextual : PayScheduleFormContextual\n\n const machine = useMemo(\n () =>\n createMachine(\n initialState,\n payScheduleStateMachine,\n (initialContext: PayScheduleContextInterface) => ({\n ...initialContext,\n component: initialComponent,\n companyId,\n defaultValues,\n }),\n ),\n [companyId, defaultValues, initialState, initialComponent],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","onEvent","useBase","paySchedules","usePaySchedulesGetAllSuspense","hasSchedules","initialState","initialComponent","PayScheduleListContextual","PayScheduleFormContextual","machine","useMemo","createMachine","payScheduleStateMachine","initialContext","Flow"],"mappings":";;;;;;;;;;AA4BO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,EAAQ,qBAAqB,GAC7BC,EAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,KAAe,GAAGJ,GACjB,4BAACK,GAAA,EAAK,WAAAR,GAAsB,eAAAC,GAA8B,EAAA,CAC5D;AAIJ,SAASO,EAAK,EAAE,WAAAR,GAAW,eAAAC,KAAmC;AAC5D,QAAM,EAAE,SAAAQ,EAAA,IAAYC,EAAA,GACd,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAZ,GAAW,GAEpEa,KAAgBF,EAAa,cAAc,UAAU,KAAK,GAC1DG,IAAeD,IAAe,kBAAkB,eAChDE,IAAmBF,IAAeG,IAA4BC,GAE9DC,IAAUC;AAAA,IACd,MACEC;AAAA,MACEN;AAAA,MACAO;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWP;AAAA,QACX,WAAAf;AAAA,QACA,eAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACD,GAAWC,GAAea,GAAcC,CAAgB;AAAA,EAAA;AAG3D,SAAO,gBAAAT,EAACiB,GAAA,EAAK,SAAAL,GAAkB,SAAAT,EAAA,CAAkB;AACnD;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PayScheduleDefaultValues } from './PaySchedule';
|
|
2
|
+
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
3
|
+
export interface PayScheduleContextInterface extends FlowContextInterface {
|
|
4
|
+
companyId: string;
|
|
5
|
+
payScheduleId?: string;
|
|
6
|
+
defaultValues?: PayScheduleDefaultValues;
|
|
7
|
+
component: React.ComponentType | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function PayScheduleListContextual(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function PayScheduleFormContextual(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { PayScheduleList as a } from "./PayScheduleList.js";
|
|
3
|
+
import { PayScheduleForm as c } from "./PayScheduleForm.js";
|
|
4
|
+
import { useFlow as n } from "../../Flow/useFlow.js";
|
|
5
|
+
import { ensureRequired as r } from "../../../helpers/ensureRequired.js";
|
|
6
|
+
function f() {
|
|
7
|
+
const { companyId: o, onEvent: e } = n();
|
|
8
|
+
return /* @__PURE__ */ t(a, { onEvent: e, companyId: r(o) });
|
|
9
|
+
}
|
|
10
|
+
function s() {
|
|
11
|
+
const { companyId: o, payScheduleId: e, defaultValues: m, onEvent: u } = n();
|
|
12
|
+
return /* @__PURE__ */ t(
|
|
13
|
+
c,
|
|
14
|
+
{
|
|
15
|
+
companyId: r(o),
|
|
16
|
+
payScheduleId: e,
|
|
17
|
+
defaultValues: m,
|
|
18
|
+
onEvent: u
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
s as PayScheduleFormContextual,
|
|
24
|
+
f as PayScheduleListContextual
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=PayScheduleComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayScheduleComponents.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleComponents.tsx"],"sourcesContent":["import type { PayScheduleDefaultValues } from './PaySchedule'\nimport { PayScheduleList } from './PayScheduleList'\nimport { PayScheduleForm } from './PayScheduleForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport interface PayScheduleContextInterface extends FlowContextInterface {\n companyId: string\n payScheduleId?: string\n defaultValues?: PayScheduleDefaultValues\n component: React.ComponentType | null\n}\n\nexport function PayScheduleListContextual() {\n const { companyId, onEvent } = useFlow<PayScheduleContextInterface>()\n return <PayScheduleList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\nexport function PayScheduleFormContextual() {\n const { companyId, payScheduleId, defaultValues, onEvent } =\n useFlow<PayScheduleContextInterface>()\n\n return (\n <PayScheduleForm\n companyId={ensureRequired(companyId)}\n payScheduleId={payScheduleId}\n defaultValues={defaultValues}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PayScheduleListContextual","companyId","onEvent","useFlow","PayScheduleList","ensureRequired","PayScheduleFormContextual","payScheduleId","defaultValues","jsx","PayScheduleForm"],"mappings":";;;;;AAaO,SAASA,IAA4B;AAC1C,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAgB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAClF;AAEO,SAASK,IAA4B;AAC1C,QAAM,EAAE,WAAAL,GAAW,eAAAM,GAAe,eAAAC,GAAe,SAAAN,EAAA,IAC/CC,EAAA;AAEF,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWL,EAAeJ,CAAS;AAAA,MACnC,eAAAM;AAAA,MACA,eAAAC;AAAA,MACA,SAAAN;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UsePayScheduleFormProps } from './shared/usePayScheduleForm';
|
|
2
|
+
import { EventType } from '../../../shared/constants';
|
|
3
|
+
import { OnEventType } from '../../Base/useBase';
|
|
4
|
+
interface PayScheduleFormProps extends UsePayScheduleFormProps {
|
|
5
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w } from "react";
|
|
3
|
+
import { useTranslation as C } from "react-i18next";
|
|
4
|
+
import { usePayScheduleForm as q } from "./shared/usePayScheduleForm/usePayScheduleForm.js";
|
|
5
|
+
import l from "./PayScheduleForm.module.scss.js";
|
|
6
|
+
import { BaseBoundaries as F, BaseLayout as h } from "../../Base/Base.js";
|
|
7
|
+
import "../../Base/useBase.js";
|
|
8
|
+
import { SDKFormProvider as E } from "../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
9
|
+
import { Form as M } from "../../Common/Form/Form.js";
|
|
10
|
+
import { Flex as m } from "../../Common/Flex/Flex.js";
|
|
11
|
+
import { Grid as x } from "../../Common/Grid/Grid.js";
|
|
12
|
+
import "classnames";
|
|
13
|
+
import { ActionsLayout as N } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
14
|
+
import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
+
import { useDateFormatter as T } from "../../../hooks/useDateFormatter.js";
|
|
16
|
+
import { componentEvents as p } from "../../../shared/constants.js";
|
|
17
|
+
import { TextInputField as O } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
18
|
+
import { SelectField as A } from "../../Common/Fields/SelectField/SelectField.js";
|
|
19
|
+
import { RadioGroupField as L } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
20
|
+
import { NumberInputField as f } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
21
|
+
import { DatePickerField as P } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
22
|
+
function ie({ onEvent: d, ...u }) {
|
|
23
|
+
return /* @__PURE__ */ r(F, { componentName: "Company.PayScheduleForm", children: /* @__PURE__ */ r(k, { onEvent: d, ...u }) });
|
|
24
|
+
}
|
|
25
|
+
function k({ onEvent: d, ...u }) {
|
|
26
|
+
const { t: e } = C("Company.PaySchedule"), i = R(), v = T(), a = q(u), [o, D] = w(0);
|
|
27
|
+
if (a.isLoading)
|
|
28
|
+
return /* @__PURE__ */ r(h, { isLoading: !0, error: a.errorHandling.errors });
|
|
29
|
+
const g = async () => {
|
|
30
|
+
const t = await a.actions.onSubmit();
|
|
31
|
+
t && d(
|
|
32
|
+
t.mode === "create" ? p.PAY_SCHEDULE_CREATED : p.PAY_SCHEDULE_UPDATED,
|
|
33
|
+
{ paySchedule: t.data }
|
|
34
|
+
);
|
|
35
|
+
}, { Fields: y } = a.form, { paymentSpeedDays: b, payPreviewLoading: S } = a.data, n = a.data.payPeriodPreview ?? void 0;
|
|
36
|
+
return /* @__PURE__ */ r(h, { error: a.errorHandling.errors, children: /* @__PURE__ */ r(E, { formHookResult: a, children: /* @__PURE__ */ r(M, { onSubmit: () => void g(), children: /* @__PURE__ */ s(m, { flexDirection: "column", children: [
|
|
37
|
+
/* @__PURE__ */ r(m, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ r("header", { children: /* @__PURE__ */ r(i.Heading, { as: "h2", children: a.status.mode === "create" ? e("headings.addPaySchedule") : e("headings.editPaySchedule") }) }) }),
|
|
38
|
+
/* @__PURE__ */ r("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ s(x, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
|
|
39
|
+
/* @__PURE__ */ r("div", { className: l.payScheduleForm, children: /* @__PURE__ */ s(m, { flexDirection: "column", children: [
|
|
40
|
+
/* @__PURE__ */ r(
|
|
41
|
+
O,
|
|
42
|
+
{
|
|
43
|
+
name: "customName",
|
|
44
|
+
label: e("labels.name"),
|
|
45
|
+
isRequired: !0,
|
|
46
|
+
errorMessage: e("validations.name")
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ r(
|
|
50
|
+
A,
|
|
51
|
+
{
|
|
52
|
+
name: "frequency",
|
|
53
|
+
label: e("labels.frequency"),
|
|
54
|
+
options: [
|
|
55
|
+
{ value: "Every week", label: e("frequencies.everyWeek") },
|
|
56
|
+
{ value: "Every other week", label: e("frequencies.everyOtherWeek") },
|
|
57
|
+
{ value: "Twice per month", label: e("frequencies.twicePerMonth") },
|
|
58
|
+
{ value: "Monthly", label: e("frequencies.monthly") }
|
|
59
|
+
],
|
|
60
|
+
isRequired: !0,
|
|
61
|
+
errorMessage: e("validations.frequency")
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
y.CustomTwicePerMonth !== void 0 && /* @__PURE__ */ r(
|
|
65
|
+
L,
|
|
66
|
+
{
|
|
67
|
+
name: "customTwicePerMonth",
|
|
68
|
+
label: e("labels.frequencyOptions"),
|
|
69
|
+
description: e("descriptions.frequencyOptionsDescription"),
|
|
70
|
+
options: [
|
|
71
|
+
{ value: "1st15th", label: e("frequencyOptions.15thAndLast") },
|
|
72
|
+
{ value: "custom", label: e("frequencyOptions.custom") }
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ r(
|
|
77
|
+
P,
|
|
78
|
+
{
|
|
79
|
+
name: "anchorPayDate",
|
|
80
|
+
label: e("labels.firstPayDate"),
|
|
81
|
+
description: e("descriptions.anchorPayDateDescription", {
|
|
82
|
+
count: b
|
|
83
|
+
}),
|
|
84
|
+
isRequired: !0,
|
|
85
|
+
errorMessage: e("validations.firstPayDate"),
|
|
86
|
+
minDate: /* @__PURE__ */ new Date()
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ r(
|
|
90
|
+
P,
|
|
91
|
+
{
|
|
92
|
+
name: "anchorEndOfPayPeriod",
|
|
93
|
+
label: e("labels.firstPayPeriodEndDate"),
|
|
94
|
+
description: e("descriptions.anchorEndOfPayPeriodDescription"),
|
|
95
|
+
isRequired: !0,
|
|
96
|
+
errorMessage: e("validations.firstPayPeriodEndDate")
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ r("div", { className: y.Day1 !== void 0 ? "" : l.visuallyHidden, children: /* @__PURE__ */ r(
|
|
100
|
+
f,
|
|
101
|
+
{
|
|
102
|
+
name: "day1",
|
|
103
|
+
label: e("labels.firstPayDayOfTheMonth"),
|
|
104
|
+
isRequired: !0,
|
|
105
|
+
errorMessage: e("validations.firstPayDayOfTheMonth")
|
|
106
|
+
}
|
|
107
|
+
) }),
|
|
108
|
+
/* @__PURE__ */ r("div", { className: y.Day2 !== void 0 ? "" : l.visuallyHidden, children: /* @__PURE__ */ r(
|
|
109
|
+
f,
|
|
110
|
+
{
|
|
111
|
+
name: "day2",
|
|
112
|
+
label: e("labels.lastPayDayOfTheMonth"),
|
|
113
|
+
isRequired: !0,
|
|
114
|
+
errorMessage: e("validations.lastPayDayOfTheMonth")
|
|
115
|
+
}
|
|
116
|
+
) })
|
|
117
|
+
] }) }),
|
|
118
|
+
/* @__PURE__ */ r(m, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: n && n[o] ? /* @__PURE__ */ s("div", { className: l.calendarContainer, children: [
|
|
119
|
+
!S && /* @__PURE__ */ r(
|
|
120
|
+
i.Select,
|
|
121
|
+
{
|
|
122
|
+
label: e("labels.preview"),
|
|
123
|
+
isRequired: !0,
|
|
124
|
+
options: n.map((t, c) => ({
|
|
125
|
+
value: String(c),
|
|
126
|
+
label: v.formatPayPeriodRange(
|
|
127
|
+
t.startDate.toString(),
|
|
128
|
+
t.endDate.toString()
|
|
129
|
+
)
|
|
130
|
+
})),
|
|
131
|
+
value: String(o),
|
|
132
|
+
onChange: (t) => {
|
|
133
|
+
const c = Number(t);
|
|
134
|
+
isNaN(c) || D(c);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ r(
|
|
139
|
+
i.CalendarPreview,
|
|
140
|
+
{
|
|
141
|
+
dateRange: {
|
|
142
|
+
start: new Date(
|
|
143
|
+
n[o].startDate.toString()
|
|
144
|
+
),
|
|
145
|
+
end: new Date(
|
|
146
|
+
n[o].endDate.toString()
|
|
147
|
+
),
|
|
148
|
+
label: e("payPreview.payPeriod") || "Pay Period"
|
|
149
|
+
},
|
|
150
|
+
highlightDates: [
|
|
151
|
+
{
|
|
152
|
+
date: new Date(
|
|
153
|
+
n[o].checkDate.toString()
|
|
154
|
+
),
|
|
155
|
+
highlightColor: "primary",
|
|
156
|
+
label: e("payPreview.payday") || "Payday"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
date: new Date(
|
|
160
|
+
n[o].runPayrollBy.toString()
|
|
161
|
+
),
|
|
162
|
+
highlightColor: "secondary",
|
|
163
|
+
label: e("payPreview.payrollDeadline") || "Payroll Deadline"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
o
|
|
168
|
+
)
|
|
169
|
+
] }) : /* @__PURE__ */ r("div", { className: l.calendarContainer, children: /* @__PURE__ */ r(
|
|
170
|
+
i.Alert,
|
|
171
|
+
{
|
|
172
|
+
status: "info",
|
|
173
|
+
label: e("previewAlert.title", "Pay Schedule Preview"),
|
|
174
|
+
children: /* @__PURE__ */ r(i.Text, { children: e(
|
|
175
|
+
"previewAlert.description",
|
|
176
|
+
"Complete all the required fields on the left to see a preview of your pay schedule."
|
|
177
|
+
) })
|
|
178
|
+
}
|
|
179
|
+
) }) })
|
|
180
|
+
] }) }),
|
|
181
|
+
/* @__PURE__ */ s(N, { children: [
|
|
182
|
+
/* @__PURE__ */ r(
|
|
183
|
+
i.Button,
|
|
184
|
+
{
|
|
185
|
+
variant: "secondary",
|
|
186
|
+
onClick: () => {
|
|
187
|
+
d(p.CANCEL);
|
|
188
|
+
},
|
|
189
|
+
children: e("actions.cancel")
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
/* @__PURE__ */ r(i.Button, { type: "submit", isLoading: a.status.isPending, children: e("actions.save") })
|
|
193
|
+
] })
|
|
194
|
+
] }) }) }) });
|
|
195
|
+
}
|
|
196
|
+
export {
|
|
197
|
+
ie as PayScheduleForm
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=PayScheduleForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayScheduleForm.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { usePayScheduleForm } from './shared/usePayScheduleForm'\nimport type { UsePayScheduleFormProps } from './shared/usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport {\n Flex,\n Grid,\n TextInputField,\n SelectField,\n RadioGroupField,\n DatePickerField,\n NumberInputField,\n ActionsLayout,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleFormProps extends UsePayScheduleFormProps {\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"Company.PayScheduleForm\">\n <PayScheduleFormRoot onEvent={onEvent} {...hookProps} />\n </BaseBoundaries>\n )\n}\n\nfunction PayScheduleFormRoot({ onEvent, ...hookProps }: PayScheduleFormProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n { paySchedule: result.data },\n )\n }\n }\n\n const { Fields } = paySchedule.form\n const { paymentSpeedDays, payPreviewLoading } = paySchedule.data\n const payPeriodPreview = paySchedule.data.payPeriodPreview ?? undefined\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create'\n ? t('headings.addPaySchedule')\n : t('headings.editPaySchedule')}\n </Components.Heading>\n </header>\n </Flex>\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <TextInputField\n name=\"customName\"\n label={t('labels.name')}\n isRequired\n errorMessage={t('validations.name')}\n />\n <SelectField\n name=\"frequency\"\n label={t('labels.frequency')}\n options={[\n { value: 'Every week', label: t('frequencies.everyWeek') },\n { value: 'Every other week', label: t('frequencies.everyOtherWeek') },\n { value: 'Twice per month', label: t('frequencies.twicePerMonth') },\n { value: 'Monthly', label: t('frequencies.monthly') },\n ]}\n isRequired\n errorMessage={t('validations.frequency')}\n />\n {Fields.CustomTwicePerMonth !== undefined && (\n <RadioGroupField\n name=\"customTwicePerMonth\"\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n options={[\n { value: '1st15th', label: t('frequencyOptions.15thAndLast') },\n { value: 'custom', label: t('frequencyOptions.custom') },\n ]}\n />\n )}\n <DatePickerField\n name=\"anchorPayDate\"\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n isRequired\n errorMessage={t('validations.firstPayDate')}\n minDate={new Date()}\n />\n <DatePickerField\n name=\"anchorEndOfPayPeriod\"\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n isRequired\n errorMessage={t('validations.firstPayPeriodEndDate')}\n />\n <div className={Fields.Day1 !== undefined ? '' : style.visuallyHidden}>\n <NumberInputField\n name=\"day1\"\n label={t('labels.firstPayDayOfTheMonth')}\n isRequired\n errorMessage={t('validations.firstPayDayOfTheMonth')}\n />\n </div>\n <div className={Fields.Day2 !== undefined ? '' : style.visuallyHidden}>\n <NumberInputField\n name=\"day2\"\n label={t('labels.lastPayDayOfTheMonth')}\n isRequired\n errorMessage={t('validations.lastPayDayOfTheMonth')}\n />\n </div>\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(\n payPeriodPreview[selectedPayPeriodIndex].startDate.toString(),\n ),\n end: new Date(\n payPeriodPreview[selectedPayPeriodIndex].endDate.toString(),\n ),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].checkDate.toString(),\n ),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].runPayrollBy.toString(),\n ),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["PayScheduleForm","onEvent","hookProps","jsx","BaseBoundaries","PayScheduleFormRoot","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","handleSubmit","result","componentEvents","Fields","paymentSpeedDays","payPreviewLoading","payPeriodPreview","SDKFormProvider","Form","jsxs","Flex","style","Grid","TextInputField","SelectField","RadioGroupField","DatePickerField","NumberInputField","period","index","value","numericValue","ActionsLayout"],"mappings":";;;;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,EAAC,OAAA,EAAI,WAAW0B,EAAM,mBACpB,UAAA,gBAAA1B;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,QAAO;AAAA,UACP,OAAOF,EAAE,sBAAsB,sBAAsB;AAAA,UAErD,UAAA,gBAAAH,EAACK,EAAW,MAAX,EACE,UAAAF;AAAA,YACC;AAAA,YACA;AAAA,UAAA,EACF,CACF;AAAA,QAAA;AAAA,MAAA,GAEJ,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,sBACCkC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAArC;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAP,EAAQmB,EAAgB,MAAM;AAAA,UAChC;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAjB,EAACK,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAY,OAAO,WAC5D,UAAAN,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventType } from '../../../shared/constants';
|
|
2
|
+
import { OnEventType } from '../../Base/useBase';
|
|
3
|
+
interface PayScheduleListProps {
|
|
4
|
+
companyId: string;
|
|
5
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare function PayScheduleList({ companyId, onEvent }: PayScheduleListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as f, Trans as m } from "react-i18next";
|
|
3
|
+
import { usePaySchedulesGetAllSuspense as S } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
|
|
4
|
+
import d from "./PayScheduleList.module.scss.js";
|
|
5
|
+
import { Flex as o } from "../../Common/Flex/Flex.js";
|
|
6
|
+
import "classnames";
|
|
7
|
+
import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
8
|
+
import L from "../../../assets/icons/pencil.svg.js";
|
|
9
|
+
import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
|
+
import { componentEvents as s } from "../../../shared/constants.js";
|
|
11
|
+
import { VisuallyHidden as D } from "../../Common/VisuallyHidden/VisuallyHidden.js";
|
|
12
|
+
import { HamburgerMenu as v } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
13
|
+
import { useDataView as P } from "../../Common/DataView/useDataView.js";
|
|
14
|
+
import { DataView as x } from "../../Common/DataView/DataView.js";
|
|
15
|
+
function F({ companyId: u, onEvent: c }) {
|
|
16
|
+
const { t } = f("Company.PaySchedule"), i = g(), { data: p } = S({ companyId: u }), h = P({
|
|
17
|
+
data: p.paySchedules || [],
|
|
18
|
+
columns: [
|
|
19
|
+
{
|
|
20
|
+
title: t("payScheduleList.name"),
|
|
21
|
+
key: "customName",
|
|
22
|
+
render: (n) => {
|
|
23
|
+
const l = !!n.name;
|
|
24
|
+
let a = l ? n.name : n.customName;
|
|
25
|
+
a && a.length > 1 ? a = a.charAt(0).toUpperCase() + a.slice(1) : a = n.customName;
|
|
26
|
+
const y = n.customName;
|
|
27
|
+
return /* @__PURE__ */ e(o, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ r("div", { className: d.content, children: [
|
|
28
|
+
/* @__PURE__ */ e("div", { children: a }),
|
|
29
|
+
l && /* @__PURE__ */ e("div", { children: y })
|
|
30
|
+
] }) });
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: /* @__PURE__ */ e(D, { children: t("payScheduleList.active") }),
|
|
35
|
+
key: "active",
|
|
36
|
+
render: (n) => /* @__PURE__ */ e(o, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: d.content, children: n.active ? /* @__PURE__ */ e(i.Badge, { status: "success", children: t("payScheduleList.active") }) : /* @__PURE__ */ e(i.Badge, { status: "info", children: t("payScheduleList.inactive") }) }) })
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
itemMenu: (n) => /* @__PURE__ */ e(
|
|
40
|
+
v,
|
|
41
|
+
{
|
|
42
|
+
triggerLabel: "Actions",
|
|
43
|
+
items: [
|
|
44
|
+
{
|
|
45
|
+
label: t("payScheduleList.edit"),
|
|
46
|
+
onClick: () => {
|
|
47
|
+
c(s.PAY_SCHEDULE_UPDATE, { uuid: n.uuid });
|
|
48
|
+
},
|
|
49
|
+
icon: /* @__PURE__ */ e(L, { "aria-hidden": !0 })
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
});
|
|
55
|
+
return /* @__PURE__ */ r(o, { flexDirection: "column", children: [
|
|
56
|
+
/* @__PURE__ */ e(o, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ r("header", { children: [
|
|
57
|
+
/* @__PURE__ */ e(i.Heading, { as: "h2", children: t("headings.pageTitle") }),
|
|
58
|
+
/* @__PURE__ */ e(i.Text, { children: /* @__PURE__ */ e(
|
|
59
|
+
m,
|
|
60
|
+
{
|
|
61
|
+
i18nKey: "listDescription",
|
|
62
|
+
t,
|
|
63
|
+
components: { ScheduleLink: /* @__PURE__ */ e(i.Link, {}) }
|
|
64
|
+
}
|
|
65
|
+
) }),
|
|
66
|
+
/* @__PURE__ */ e(i.Text, { children: /* @__PURE__ */ e(
|
|
67
|
+
m,
|
|
68
|
+
{
|
|
69
|
+
i18nKey: "listDescription2",
|
|
70
|
+
t,
|
|
71
|
+
components: { PaymentLawLink: /* @__PURE__ */ e(i.Link, {}) }
|
|
72
|
+
}
|
|
73
|
+
) })
|
|
74
|
+
] }) }),
|
|
75
|
+
/* @__PURE__ */ e(x, { label: "test", ...h }),
|
|
76
|
+
/* @__PURE__ */ r(C, { children: [
|
|
77
|
+
/* @__PURE__ */ e(
|
|
78
|
+
i.Button,
|
|
79
|
+
{
|
|
80
|
+
variant: "secondary",
|
|
81
|
+
onClick: () => {
|
|
82
|
+
c(s.PAY_SCHEDULE_CREATE);
|
|
83
|
+
},
|
|
84
|
+
children: t("addAnotherPayScheduleCta")
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ e(
|
|
88
|
+
i.Button,
|
|
89
|
+
{
|
|
90
|
+
variant: "primary",
|
|
91
|
+
onClick: () => {
|
|
92
|
+
c(s.PAY_SCHEDULE_DONE);
|
|
93
|
+
},
|
|
94
|
+
children: t("continueCta")
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
F as PayScheduleList
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=PayScheduleList.js.map
|