@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayScheduleList.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleList.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport styles from './PayScheduleList.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden, ActionsLayout } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleListProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleList({ companyId, onEvent }: PayScheduleListProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const dataViewProps = useDataView({\n data: paySchedules.paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection=\"column\" gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n onEvent(componentEvents.PAY_SCHEDULE_UPDATE, { uuid: schedule.uuid })\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n ),\n })\n\n return (\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey=\"listDescription\"\n t={t}\n components={{ ScheduleLink: <Components.Link /> }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey=\"listDescription2\"\n t={t}\n components={{ PaymentLawLink: <Components.Link /> }}\n />\n </Components.Text>\n </header>\n </Flex>\n <DataView label=\"test\" {...dataViewProps} />\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.PAY_SCHEDULE_CREATE)\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["PayScheduleList","companyId","onEvent","useTranslation","Components","useComponentContext","paySchedules","usePaySchedulesGetAllSuspense","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","componentEvents","PencilSvg","Trans","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;;AAeO,SAASA,EAAgB,EAAE,WAAAC,GAAW,SAAAC,KAAiC;AAC5E,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAN,GAAW,GAEpEO,IAAgBC,EAAY;AAAA,IAChC,MAAMH,EAAa,gBAAgB,CAAA;AAAA,IACnC,SAAS;AA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AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQkB,EAAgB,iBAAiB;AAAA,UAC3C;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayScheduleList.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { state as o, transition as e, reduce as l } from "robot3";
|
|
2
|
+
import { PayScheduleFormContextual as S, PayScheduleListContextual as E } from "./PayScheduleComponents.js";
|
|
3
|
+
import { componentEvents as d } from "../../../shared/constants.js";
|
|
4
|
+
const c = l(
|
|
5
|
+
(t) => ({
|
|
6
|
+
...t,
|
|
7
|
+
component: E,
|
|
8
|
+
payScheduleId: void 0
|
|
9
|
+
})
|
|
10
|
+
), a = {
|
|
11
|
+
listSchedules: o(
|
|
12
|
+
e(
|
|
13
|
+
d.PAY_SCHEDULE_CREATE,
|
|
14
|
+
"addSchedule",
|
|
15
|
+
l(
|
|
16
|
+
(t) => ({
|
|
17
|
+
...t,
|
|
18
|
+
component: S,
|
|
19
|
+
payScheduleId: void 0
|
|
20
|
+
})
|
|
21
|
+
)
|
|
22
|
+
),
|
|
23
|
+
e(
|
|
24
|
+
d.PAY_SCHEDULE_UPDATE,
|
|
25
|
+
"editSchedule",
|
|
26
|
+
l(
|
|
27
|
+
(t, u) => ({
|
|
28
|
+
...t,
|
|
29
|
+
component: S,
|
|
30
|
+
payScheduleId: u.payload.uuid
|
|
31
|
+
})
|
|
32
|
+
)
|
|
33
|
+
),
|
|
34
|
+
e(d.PAY_SCHEDULE_DONE, "done")
|
|
35
|
+
),
|
|
36
|
+
addSchedule: o(
|
|
37
|
+
e(d.PAY_SCHEDULE_CREATED, "listSchedules", c),
|
|
38
|
+
e(d.CANCEL, "listSchedules", c)
|
|
39
|
+
),
|
|
40
|
+
editSchedule: o(
|
|
41
|
+
e(d.PAY_SCHEDULE_UPDATED, "listSchedules", c),
|
|
42
|
+
e(d.CANCEL, "listSchedules", c)
|
|
43
|
+
),
|
|
44
|
+
done: o()
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
a as payScheduleStateMachine
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=payScheduleStateMachine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payScheduleStateMachine.js","sources":["../../../../src/components/Company/PaySchedule/payScheduleStateMachine.ts"],"sourcesContent":["import { reduce, state, state as final, transition } from 'robot3'\nimport type { ComponentType } from 'react'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.PAY_SCHEDULE_UPDATE]: { uuid: string }\n [componentEvents.PAY_SCHEDULE_CREATED]: undefined\n [componentEvents.PAY_SCHEDULE_UPDATED]: undefined\n}\n\nconst toList = reduce(\n (ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleListContextual as ComponentType,\n payScheduleId: undefined,\n }),\n)\n\nexport const payScheduleStateMachine = {\n listSchedules: state<MachineTransition>(\n transition(\n componentEvents.PAY_SCHEDULE_CREATE,\n 'addSchedule',\n reduce(\n (ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.PAY_SCHEDULE_UPDATE,\n 'editSchedule',\n reduce(\n (\n ctx: PayScheduleContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.PAY_SCHEDULE_UPDATE>,\n ): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: ev.payload.uuid,\n }),\n ),\n ),\n transition(componentEvents.PAY_SCHEDULE_DONE, 'done'),\n ),\n addSchedule: state<MachineTransition>(\n transition(componentEvents.PAY_SCHEDULE_CREATED, 'listSchedules', toList),\n transition(componentEvents.CANCEL, 'listSchedules', toList),\n ),\n editSchedule: state<MachineTransition>(\n transition(componentEvents.PAY_SCHEDULE_UPDATED, 'listSchedules', toList),\n transition(componentEvents.CANCEL, 'listSchedules', toList),\n ),\n done: final(),\n}\n"],"names":["toList","reduce","ctx","PayScheduleListContextual","payScheduleStateMachine","state","transition","componentEvents","PayScheduleFormContextual","ev","final"],"mappings":";;;AAaA,MAAMA,IAASC;AAAA,EACb,CAACC,OAAmE;AAAA,IAClE,GAAGA;AAAA,IACH,WAAWC;AAAA,IACX,eAAe;AAAA,EAAA;AAEnB,GAEaC,IAA0B;AAAA,EACrC,eAAeC;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN;AAAA,QACE,CAACC,OAAmE;AAAA,UAClE,GAAGA;AAAA,UACH,WAAWM;AAAA,UACX,eAAe;AAAA,QAAA;AAAA,MACjB;AAAA,IACF;AAAA,IAEFF;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN;AAAA,QACE,CACEC,GACAO,OACiC;AAAA,UACjC,GAAGP;AAAA,UACH,WAAWM;AAAA,UACX,eAAeC,EAAG,QAAQ;AAAA,QAAA;AAAA,MAC5B;AAAA,IACF;AAAA,IAEFH,EAAWC,EAAgB,mBAAmB,MAAM;AAAA,EAAA;AAAA,EAEtD,aAAaF;AAAA,IACXC,EAAWC,EAAgB,sBAAsB,iBAAiBP,CAAM;AAAA,IACxEM,EAAWC,EAAgB,QAAQ,iBAAiBP,CAAM;AAAA,EAAA;AAAA,EAE5D,cAAcK;AAAA,IACZC,EAAWC,EAAgB,sBAAsB,iBAAiBP,CAAM;AAAA,IACxEM,EAAWC,EAAgB,QAAQ,iBAAiBP,CAAM;AAAA,EAAA;AAAA,EAE5D,MAAMU,EAAA;AACR;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TextInputHookFieldProps } from '../../form/fields/TextInputHookField';
|
|
2
|
-
import { SelectHookFieldProps } from '../../form/fields/SelectHookField';
|
|
3
|
-
import { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField';
|
|
4
|
-
import { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField';
|
|
5
|
-
import { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField';
|
|
6
1
|
import { PayScheduleErrorCodes, PayScheduleFrequency } from './payScheduleSchema';
|
|
7
|
-
import {
|
|
2
|
+
import { TextInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/TextInputHookField';
|
|
3
|
+
import { SelectHookFieldProps } from '../../../../../partner-hook-utils/form/fields/SelectHookField';
|
|
4
|
+
import { RadioGroupHookFieldProps } from '../../../../../partner-hook-utils/form/fields/RadioGroupHookField';
|
|
5
|
+
import { DatePickerHookFieldProps } from '../../../../../partner-hook-utils/form/fields/DatePickerHookField';
|
|
6
|
+
import { NumberInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/NumberInputHookField';
|
|
7
|
+
import { HookFieldProps } from '../../../../../partner-hook-utils/types';
|
|
8
8
|
export type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED;
|
|
9
9
|
export type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE'];
|
|
10
10
|
export type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { NumberInputHookField as n } from "
|
|
3
|
-
import { DatePickerHookField as r } from "
|
|
4
|
-
import { RadioGroupHookField as t } from "
|
|
5
|
-
import { SelectHookField as i } from "
|
|
6
|
-
import { TextInputHookField as m } from "
|
|
2
|
+
import { NumberInputHookField as n } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
3
|
+
import { DatePickerHookField as r } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
|
|
4
|
+
import { RadioGroupHookField as t } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
5
|
+
import { SelectHookField as i } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
6
|
+
import { TextInputHookField as m } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
7
7
|
function F(e) {
|
|
8
8
|
return /* @__PURE__ */ o(m, { ...e, name: "customName" });
|
|
9
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/fields.tsx"],"sourcesContent":["import type { PayScheduleErrorCodes, PayScheduleFrequency } from './payScheduleSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { RadioGroupHookFieldProps } from '@/partner-hook-utils/form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '@/partner-hook-utils/form/fields/DatePickerHookField'\nimport type { NumberInputHookFieldProps } from '@/partner-hook-utils/form/fields/NumberInputHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n RadioGroupHookField,\n DatePickerHookField,\n NumberInputHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\nexport type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED\nexport type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE']\n\nexport type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function CustomNameField(props: CustomNameFieldProps) {\n return <TextInputHookField {...props} name=\"customName\" />\n}\n\nexport type FrequencyFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PayScheduleFrequency>\n>\n\nexport function FrequencyField(props: FrequencyFieldProps) {\n return <SelectHookField {...props} name=\"frequency\" />\n}\n\nexport type CustomTwicePerMonthFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>\n\nexport function CustomTwicePerMonthField(props: CustomTwicePerMonthFieldProps) {\n return <RadioGroupHookField {...props} name=\"customTwicePerMonth\" />\n}\n\nexport type AnchorPayDateFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>\n\nexport function AnchorPayDateField(props: AnchorPayDateFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorPayDate\" />\n}\n\nexport type AnchorEndOfPayPeriodFieldProps = HookFieldProps<\n DatePickerHookFieldProps<RequiredValidation>\n>\n\nexport function AnchorEndOfPayPeriodField(props: AnchorEndOfPayPeriodFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorEndOfPayPeriod\" />\n}\n\nexport type Day1FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\nexport function Day1Field(props: Day1FieldProps) {\n return <NumberInputHookField {...props} name=\"day1\" min={1} max={31} />\n}\n\nexport type Day2FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\nexport function Day2Field(props: Day2FieldProps) {\n return <NumberInputHookField {...props} name=\"day2\" min={1} max={31} />\n}\n"],"names":["CustomNameField","props","jsx","TextInputHookField","FrequencyField","SelectHookField","CustomTwicePerMonthField","RadioGroupHookField","AnchorPayDateField","DatePickerHookField","AnchorEndOfPayPeriodField","Day1Field","NumberInputHookField","Day2Field"],"mappings":";;;;;;AAoBO,SAASA,EAAgBC,GAA6B;AAC3D,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,cAAa;AAC1D;AAMO,SAASG,EAAeH,GAA4B;AACzD,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,aAAY;AACtD;AAIO,SAASK,EAAyBL,GAAsC;AAC7E,SAAO,gBAAAC,EAACK,GAAA,EAAqB,GAAGN,GAAO,MAAK,uBAAsB;AACpE;AAIO,SAASO,EAAmBP,GAAgC;AACjE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,iBAAgB;AAC9D;AAMO,SAASS,EAA0BT,GAAuC;AAC/E,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,wBAAuB;AACrE;AAIO,SAASU,EAAUV,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;AAIO,SAASY,EAAUZ,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
2
|
export { usePayScheduleForm } from './usePayScheduleForm';
|
|
3
3
|
export type { PayScheduleOptionalFieldsToRequire, UsePayScheduleFormProps, UsePayScheduleFormResult, UsePayScheduleFormReady, PayScheduleFieldsMetadata, PayScheduleFormFields, } from './usePayScheduleForm';
|
|
4
|
-
export { PayScheduleForm } from './PayScheduleForm';
|
|
5
|
-
export type { PayScheduleFormProps } from './PayScheduleForm';
|
|
6
4
|
export { createPayScheduleSchema, PayScheduleErrorCodes, type PayScheduleErrorCode, type PayScheduleFormData, type PayScheduleFormOutputs, type PayScheduleField, type PayScheduleFrequency, } from './payScheduleSchema';
|
|
7
5
|
export type { RequiredValidation as PayScheduleRequiredValidation, DayValidation, CustomNameFieldProps, FrequencyFieldProps, CustomTwicePerMonthFieldProps, AnchorPayDateFieldProps, AnchorEndOfPayPeriodFieldProps, Day1FieldProps, Day2FieldProps, } from './fields';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { OptionalFieldsToRequire } from '
|
|
2
|
+
import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
|
|
3
3
|
export declare const PayScheduleErrorCodes: {
|
|
4
4
|
readonly REQUIRED: "REQUIRED";
|
|
5
5
|
readonly DAY_RANGE: "DAY_RANGE";
|
|
@@ -38,7 +38,7 @@ interface PayScheduleSchemaOptions {
|
|
|
38
38
|
mode?: 'create' | 'update';
|
|
39
39
|
optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire;
|
|
40
40
|
}
|
|
41
|
-
export declare function createPayScheduleSchema(options?: PayScheduleSchemaOptions): import('
|
|
41
|
+
export declare function createPayScheduleSchema(options?: PayScheduleSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
|
|
42
42
|
customName: z.ZodString;
|
|
43
43
|
frequency: z.ZodEnum<{
|
|
44
44
|
"Every week": "Every week";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as o } from "zod";
|
|
2
|
-
import { buildFormSchema as d } from "
|
|
3
|
-
import { coerceNaN as n, coerceToISODate as t } from "
|
|
2
|
+
import { buildFormSchema as d } from "../../../../../partner-hook-utils/form/buildFormSchema.js";
|
|
3
|
+
import { coerceNaN as n, coerceToISODate as t } from "../../../../../partner-hook-utils/form/preprocessors.js";
|
|
4
4
|
const c = {
|
|
5
5
|
REQUIRED: "REQUIRED",
|
|
6
6
|
DAY_RANGE: "DAY_RANGE"
|
package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payScheduleSchema.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceNaN, coerceToISODate } from '@/partner-hook-utils/form/preprocessors'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const PayScheduleErrorCodes = {\n REQUIRED: 'REQUIRED',\n DAY_RANGE: 'DAY_RANGE',\n} as const\n\nexport type PayScheduleErrorCode =\n (typeof PayScheduleErrorCodes)[keyof typeof PayScheduleErrorCodes]\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst FREQUENCY_VALUES = ['Every week', 'Every other week', 'Twice per month', 'Monthly'] as const\nexport type PayScheduleFrequency = (typeof FREQUENCY_VALUES)[number]\n\nconst fieldValidators = {\n customName: z.string(),\n frequency: z.enum(FREQUENCY_VALUES),\n customTwicePerMonth: z.string(),\n anchorPayDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n anchorEndOfPayPeriod: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n day1: z.preprocess(coerceNaN(0), z.number()),\n day2: z.preprocess(coerceNaN(0), z.number()),\n}\n\nexport type PayScheduleField = keyof typeof fieldValidators\n\nexport type PayScheduleFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type PayScheduleFormOutputs = PayScheduleFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\nfunction needsDay1(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Monthly' || (freq === 'Twice per month' && custom === 'custom')\n}\n\nfunction needsDay2(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Twice per month' && custom === 'custom'\n}\n\nconst requiredFieldsConfig = {\n customTwicePerMonth: 'never',\n day1: needsDay1,\n day2: needsDay2,\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * coerceNaN(0) maps empty inputs to 0, which `isEmpty` does not catch\n * (it only recognizes undefined/null/blank-string). This superRefine\n * enforces the 1–31 range when the field is applicable, which also\n * rejects the 0 sentinel from empty inputs.\n */\nfunction validateDayRanges(data: PayScheduleFormData, ctx: z.RefinementCtx) {\n if (needsDay1(data) && (data.day1 < 1 || data.day1 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day1'],\n message: data.day1 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n if (needsDay2(data) && (data.day2 < 1 || data.day2 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day2'],\n message: data.day2 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n}\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\nexport type PayScheduleOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\ninterface PayScheduleSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire\n}\n\nexport function createPayScheduleSchema(options: PayScheduleSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: PayScheduleErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n superRefine: validateDayRanges,\n })\n}\n"],"names":["PayScheduleErrorCodes","FREQUENCY_VALUES","fieldValidators","z","coerceToISODate","coerceNaN","needsDay1","data","freq","custom","needsDay2","requiredFieldsConfig","validateDayRanges","ctx","createPayScheduleSchema","options","mode","optionalFieldsToRequire","buildFormSchema"],"mappings":";;;AAUO,MAAMA,IAAwB;AAAA,EACnC,UAAU;AAAA,EACV,WAAW;AACb,GAOMC,IAAmB,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,GAGlFC,IAAkB;AAAA,EACtB,YAAYC,EAAE,OAAA;AAAA,EACd,WAAWA,EAAE,KAAKF,CAAgB;AAAA,EAClC,qBAAqBE,EAAE,OAAA;AAAA,EACvB,eAAeA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EACpE,sBAAsBA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EAC3E,MAAMA,EAAE,WAAWE,EAAU,CAAC,GA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gusto/embedded-api/models/components/payschedule';
|
|
3
|
+
import { PaySchedulePreviewPayPeriod } from '@gusto/embedded-api/models/components/payschedulepreviewpayperiod';
|
|
4
|
+
import { PayScheduleOptionalFieldsToRequire, PayScheduleFormData } from './payScheduleSchema';
|
|
5
|
+
import { BaseFormHookReady, FieldsMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
|
|
6
|
+
export type { PayScheduleOptionalFieldsToRequire } from './payScheduleSchema';
|
|
7
|
+
export interface UsePayScheduleFormProps {
|
|
8
|
+
companyId: string;
|
|
9
|
+
payScheduleId?: string;
|
|
10
|
+
optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire;
|
|
11
|
+
defaultValues?: Partial<PayScheduleFormData>;
|
|
12
|
+
validationMode?: UseFormProps['mode'];
|
|
13
|
+
shouldFocusError?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UsePayScheduleFormReady extends BaseFormHookReady<FieldsMetadata, PayScheduleFormData> {
|
|
16
|
+
data: {
|
|
17
|
+
paySchedule: PaySchedule | null;
|
|
18
|
+
payPeriodPreview: PaySchedulePreviewPayPeriod[] | null;
|
|
19
|
+
payPreviewLoading: boolean;
|
|
20
|
+
paymentSpeedDays: number | null;
|
|
21
|
+
};
|
|
22
|
+
status: {
|
|
23
|
+
isPending: boolean;
|
|
24
|
+
mode: 'create' | 'update';
|
|
25
|
+
};
|
|
26
|
+
actions: {
|
|
27
|
+
onSubmit: () => Promise<HookSubmitResult<PaySchedule> | undefined>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export declare function usePayScheduleForm({ companyId, payScheduleId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UsePayScheduleFormProps): HookLoadingResult | UsePayScheduleFormReady;
|
|
31
|
+
export type UsePayScheduleFormResult = HookLoadingResult | UsePayScheduleFormReady;
|
|
32
|
+
export type PayScheduleFieldsMetadata = UsePayScheduleFormReady['form']['fieldsMetadata'];
|
|
33
|
+
export type PayScheduleFormFields = UsePayScheduleFormReady['form']['Fields'];
|
|
@@ -7,15 +7,15 @@ import { usePaySchedulesCreateMutation as se } from "@gusto/embedded-api/react-q
|
|
|
7
7
|
import { usePaySchedulesUpdateMutation as ie } from "@gusto/embedded-api/react-query/paySchedulesUpdate";
|
|
8
8
|
import { usePaymentConfigsGet as de } from "@gusto/embedded-api/react-query/paymentConfigsGet";
|
|
9
9
|
import { RFCDate as d } from "@gusto/embedded-api/types/rfcdate";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useBaseSubmit as ve } from "
|
|
17
|
-
import { parsePaymentSpeedDays as De } from "
|
|
18
|
-
import { formatDateToStringDate as Me } from "
|
|
10
|
+
import { createPayScheduleSchema as ue } from "./payScheduleSchema.js";
|
|
11
|
+
import { Day2Field as me, Day1Field as ye, AnchorEndOfPayPeriodField as he, AnchorPayDateField as Pe, CustomTwicePerMonthField as le, FrequencyField as fe, CustomNameField as we } from "./fields.js";
|
|
12
|
+
import { useDeriveFieldsMetadata as pe } from "../../../../../partner-hook-utils/form/useDeriveFieldsMetadata.js";
|
|
13
|
+
import { createGetFormSubmissionValues as Ee } from "../../../../../partner-hook-utils/form/getFormSubmissionValues.js";
|
|
14
|
+
import { withOptions as q } from "../../../../../partner-hook-utils/form/withOptions.js";
|
|
15
|
+
import { composeErrorHandler as Se } from "../../../../../partner-hook-utils/composeErrorHandler.js";
|
|
16
|
+
import { useBaseSubmit as ve } from "../../../../Base/useBaseSubmit.js";
|
|
17
|
+
import { parsePaymentSpeedDays as De } from "../../../../../hooks/useCompanyPaymentSpeed.js";
|
|
18
|
+
import { formatDateToStringDate as Me } from "../../../../../helpers/dateFormatting.js";
|
|
19
19
|
const F = [
|
|
20
20
|
{ value: "Every week", label: "Every week" },
|
|
21
21
|
{ value: "Every other week", label: "Every other week" },
|
|
@@ -43,7 +43,7 @@ function ze({
|
|
|
43
43
|
{ companyId: e, payScheduleId: s ?? "" },
|
|
44
44
|
{ enabled: !!s }
|
|
45
45
|
), m = de({ companyUuid: e }), o = h.data?.paySchedule ?? null, V = m.data?.paymentConfigs?.paymentSpeed, _ = De(V), P = !o, p = P ? "create" : "update", [E, k] = oe(
|
|
46
|
-
() =>
|
|
46
|
+
() => ue({ mode: p, optionalFieldsToRequire: u }),
|
|
47
47
|
[p, u]
|
|
48
48
|
), S = {
|
|
49
49
|
customName: o?.customName ?? n?.customName ?? "",
|
|
@@ -86,14 +86,18 @@ function ze({
|
|
|
86
86
|
day2: G || void 0
|
|
87
87
|
},
|
|
88
88
|
{ enabled: v }
|
|
89
|
-
), W = D.data?.paySchedulePreview?.payPeriods, B = D.isLoading && v, M = se(), T = ie(), I = M.isPending || T.isPending, {
|
|
89
|
+
), W = D.data?.paySchedulePreview?.payPeriods, B = D.isLoading && v, M = se(), T = ie(), I = M.isPending || T.isPending, {
|
|
90
|
+
baseSubmitHandler: Y,
|
|
91
|
+
error: x,
|
|
92
|
+
setError: z
|
|
93
|
+
} = ve("PayScheduleForm"), N = Se(s ? [h, m] : [m], { submitError: x, setSubmitError: z }), j = r === "Twice per month", J = r === "Monthly" || r === "Twice per month" && y === "custom", K = r === "Twice per month" && y === "custom", c = pe(k, t.control), X = {
|
|
90
94
|
customName: c.customName,
|
|
91
|
-
frequency:
|
|
95
|
+
frequency: q(
|
|
92
96
|
c.frequency,
|
|
93
97
|
F,
|
|
94
98
|
Te
|
|
95
99
|
),
|
|
96
|
-
customTwicePerMonth:
|
|
100
|
+
customTwicePerMonth: q(
|
|
97
101
|
c.customTwicePerMonth,
|
|
98
102
|
A,
|
|
99
103
|
Ne
|
|
@@ -108,14 +112,14 @@ function ze({
|
|
|
108
112
|
t.handleSubmit(
|
|
109
113
|
async ($) => {
|
|
110
114
|
await Y($, async (a) => {
|
|
111
|
-
const
|
|
115
|
+
const b = a.anchorPayDate ?? "", g = a.anchorEndOfPayPeriod ?? "";
|
|
112
116
|
P ? w = { mode: "create", data: (await M.mutateAsync({
|
|
113
117
|
request: {
|
|
114
118
|
companyId: e,
|
|
115
119
|
payScheduleCreateRequest: {
|
|
116
120
|
frequency: a.frequency,
|
|
117
|
-
anchorPayDate: new d(
|
|
118
|
-
anchorEndOfPayPeriod: new d(
|
|
121
|
+
anchorPayDate: new d(b),
|
|
122
|
+
anchorEndOfPayPeriod: new d(g),
|
|
119
123
|
customName: a.customName,
|
|
120
124
|
day1: a.day1 || void 0,
|
|
121
125
|
day2: a.day2 || void 0
|
|
@@ -127,8 +131,8 @@ function ze({
|
|
|
127
131
|
companyId: e,
|
|
128
132
|
payScheduleUpdateRequest: {
|
|
129
133
|
frequency: a.frequency,
|
|
130
|
-
anchorPayDate: new d(
|
|
131
|
-
anchorEndOfPayPeriod: new d(
|
|
134
|
+
anchorPayDate: new d(b),
|
|
135
|
+
anchorEndOfPayPeriod: new d(g),
|
|
132
136
|
customName: a.customName,
|
|
133
137
|
day1: a.day1 || void 0,
|
|
134
138
|
day2: a.day2 || void 0,
|
|
@@ -160,17 +164,17 @@ function ze({
|
|
|
160
164
|
errorHandling: N,
|
|
161
165
|
form: {
|
|
162
166
|
Fields: {
|
|
163
|
-
CustomName:
|
|
164
|
-
Frequency:
|
|
165
|
-
CustomTwicePerMonth: j ?
|
|
166
|
-
AnchorPayDate:
|
|
167
|
-
AnchorEndOfPayPeriod:
|
|
168
|
-
Day1: J ?
|
|
169
|
-
Day2: K ?
|
|
167
|
+
CustomName: we,
|
|
168
|
+
Frequency: fe,
|
|
169
|
+
CustomTwicePerMonth: j ? le : void 0,
|
|
170
|
+
AnchorPayDate: Pe,
|
|
171
|
+
AnchorEndOfPayPeriod: he,
|
|
172
|
+
Day1: J ? ye : void 0,
|
|
173
|
+
Day2: K ? me : void 0
|
|
170
174
|
},
|
|
171
175
|
fieldsMetadata: X,
|
|
172
176
|
hookFormInternals: { formMethods: t },
|
|
173
|
-
getFormSubmissionValues:
|
|
177
|
+
getFormSubmissionValues: Ee(t, E)
|
|
174
178
|
}
|
|
175
179
|
};
|
|
176
180
|
}
|
package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePayScheduleForm.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { PaySchedule } from '@gusto/embedded-api/models/components/payschedule'\nimport type { PaySchedulePreviewPayPeriod } from '@gusto/embedded-api/models/components/payschedulepreviewpayperiod'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaymentConfigsGet } from '@gusto/embedded-api/react-query/paymentConfigsGet'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport {\n createPayScheduleSchema,\n type PayScheduleOptionalFieldsToRequire,\n type PayScheduleFormData,\n type PayScheduleFormOutputs,\n type PayScheduleFrequency,\n} from './payScheduleSchema'\nimport {\n CustomNameField,\n FrequencyField,\n CustomTwicePerMonthField,\n AnchorPayDateField,\n AnchorEndOfPayPeriodField,\n Day1Field,\n Day2Field,\n} from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { parsePaymentSpeedDays } from '@/hooks/useCompanyPaymentSpeed'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nexport type { PayScheduleOptionalFieldsToRequire } from './payScheduleSchema'\n\nexport interface UsePayScheduleFormProps {\n companyId: string\n payScheduleId?: string\n optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire\n defaultValues?: Partial<PayScheduleFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface UsePayScheduleFormReady extends BaseFormHookReady<\n FieldsMetadata,\n PayScheduleFormData\n> {\n data: {\n paySchedule: PaySchedule | null\n payPeriodPreview: PaySchedulePreviewPayPeriod[] | null\n payPreviewLoading: boolean\n paymentSpeedDays: number | null\n }\n status: { isPending: boolean; mode: 'create' | 'update' }\n actions: {\n onSubmit: () => Promise<HookSubmitResult<PaySchedule> | undefined>\n }\n}\n\nconst FREQUENCY_OPTIONS: Array<{ value: PayScheduleFrequency; label: string }> = [\n { value: 'Every week', label: 'Every week' },\n { value: 'Every other week', label: 'Every other week' },\n { value: 'Twice per month', label: 'Twice per month' },\n { value: 'Monthly', label: 'Monthly' },\n]\n\nconst FREQUENCY_ENTRIES: PayScheduleFrequency[] = FREQUENCY_OPTIONS.map(o => o.value)\n\nconst TWICE_PER_MONTH_OPTIONS = [\n { value: '1st15th', label: '15th and Last day of the month' },\n { value: 'custom', label: 'Custom' },\n]\n\nconst TWICE_PER_MONTH_ENTRIES = TWICE_PER_MONTH_OPTIONS.map(o => o.value)\n\nfunction formatWatchedDate(value: unknown): string {\n if (value instanceof Date) return formatDateToStringDate(value) || ''\n if (typeof value === 'string' && value) return value\n return ''\n}\n\nfunction deriveCustomTwicePerMonth(\n frequency: string | undefined,\n day1: number | undefined,\n day2: number | undefined,\n): string {\n if (frequency !== 'Twice per month') return ''\n if (day1 === 15 && day2 === 31) return '1st15th'\n return 'custom'\n}\n\nexport function usePayScheduleForm({\n companyId,\n payScheduleId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UsePayScheduleFormProps): HookLoadingResult | UsePayScheduleFormReady {\n const payScheduleQuery = usePaySchedulesGet(\n { companyId, payScheduleId: payScheduleId ?? '' },\n { enabled: !!payScheduleId },\n )\n\n const paymentConfigsQuery = usePaymentConfigsGet({ companyUuid: companyId })\n\n const currentPaySchedule = payScheduleQuery.data?.paySchedule ?? null\n const paymentSpeed = paymentConfigsQuery.data?.paymentConfigs?.paymentSpeed\n const paymentSpeedDays = parsePaymentSpeedDays(paymentSpeed)\n\n const isCreateMode = !currentPaySchedule\n const mode = isCreateMode ? 'create' : 'update'\n\n const [schema, metadataConfig] = useMemo(\n () => createPayScheduleSchema({ mode, optionalFieldsToRequire }),\n [mode, optionalFieldsToRequire],\n )\n\n const resolvedDefaults: PayScheduleFormData = {\n customName: currentPaySchedule?.customName ?? partnerDefaults?.customName ?? '',\n frequency: (currentPaySchedule?.frequency ??\n partnerDefaults?.frequency ??\n 'Every week') as PayScheduleFrequency,\n customTwicePerMonth: deriveCustomTwicePerMonth(\n currentPaySchedule?.frequency ?? partnerDefaults?.frequency,\n currentPaySchedule?.day1 ?? partnerDefaults?.day1 ?? undefined,\n currentPaySchedule?.day2 ?? partnerDefaults?.day2 ?? undefined,\n ),\n anchorPayDate:\n currentPaySchedule?.anchorPayDate?.toString() ?? partnerDefaults?.anchorPayDate ?? null,\n anchorEndOfPayPeriod:\n currentPaySchedule?.anchorEndOfPayPeriod?.toString() ??\n partnerDefaults?.anchorEndOfPayPeriod ??\n null,\n day1: currentPaySchedule?.day1 ?? partnerDefaults?.day1 ?? NaN,\n day2: currentPaySchedule?.day2 ?? partnerDefaults?.day2 ?? NaN,\n }\n\n const formMethods = useForm<PayScheduleFormData, unknown, PayScheduleFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const watchedFrequency = useWatch({ control: formMethods.control, name: 'frequency' })\n const watchedCustomTwicePerMonth = useWatch({\n control: formMethods.control,\n name: 'customTwicePerMonth',\n })\n const watchedAnchorPayDate = useWatch({ control: formMethods.control, name: 'anchorPayDate' })\n const watchedAnchorEndOfPayPeriod = useWatch({\n control: formMethods.control,\n name: 'anchorEndOfPayPeriod',\n })\n const watchedDay1 = useWatch({ control: formMethods.control, name: 'day1' })\n const watchedDay2 = useWatch({ control: formMethods.control, name: 'day2' })\n\n useEffect(() => {\n if (watchedFrequency === 'Twice per month' && watchedCustomTwicePerMonth === '1st15th') {\n formMethods.setValue('day1', 15)\n formMethods.setValue('day2', 31)\n }\n }, [watchedFrequency, watchedCustomTwicePerMonth, formMethods.setValue])\n\n const formattedAnchorPayDate = formatWatchedDate(watchedAnchorPayDate)\n const formattedAnchorEndOfPayPeriod = formatWatchedDate(watchedAnchorEndOfPayPeriod)\n\n const previewEnabled = Boolean(formattedAnchorPayDate && formattedAnchorEndOfPayPeriod)\n\n const previewQuery = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: watchedFrequency,\n ...(formattedAnchorPayDate && { anchorPayDate: new RFCDate(formattedAnchorPayDate) }),\n ...(formattedAnchorEndOfPayPeriod && {\n anchorEndOfPayPeriod: new RFCDate(formattedAnchorEndOfPayPeriod),\n }),\n day1: watchedDay1 || undefined,\n day2: watchedDay2 || undefined,\n } as Parameters<typeof usePaySchedulesGetPreview>[0],\n { enabled: previewEnabled },\n )\n\n const payPeriodPreview: PaySchedulePreviewPayPeriod[] | undefined =\n previewQuery.data?.paySchedulePreview?.payPeriods\n const payPreviewLoading = previewQuery.isLoading && previewEnabled\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const isPending = createPayScheduleMutation.isPending || updatePayScheduleMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('PayScheduleForm')\n\n const queries = payScheduleId ? [payScheduleQuery, paymentConfigsQuery] : [paymentConfigsQuery]\n const errorHandling = composeErrorHandler(queries, { submitError, setSubmitError })\n\n const showCustomTwicePerMonth = watchedFrequency === 'Twice per month'\n const showDay1 =\n watchedFrequency === 'Monthly' ||\n (watchedFrequency === 'Twice per month' && watchedCustomTwicePerMonth === 'custom')\n const showDay2 = watchedFrequency === 'Twice per month' && watchedCustomTwicePerMonth === 'custom'\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const fieldsMetadata = {\n customName: baseMetadata.customName,\n frequency: withOptions<PayScheduleFrequency>(\n baseMetadata.frequency,\n FREQUENCY_OPTIONS,\n FREQUENCY_ENTRIES,\n ),\n customTwicePerMonth: withOptions<string>(\n baseMetadata.customTwicePerMonth,\n TWICE_PER_MONTH_OPTIONS,\n TWICE_PER_MONTH_ENTRIES,\n ),\n anchorPayDate: baseMetadata.anchorPayDate,\n anchorEndOfPayPeriod: baseMetadata.anchorEndOfPayPeriod,\n day1: baseMetadata.day1,\n day2: baseMetadata.day2,\n }\n\n const onSubmit = async (): Promise<HookSubmitResult<PaySchedule> | undefined> => {\n let submitResult: HookSubmitResult<PaySchedule> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: PayScheduleFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const anchorPayDate = payload.anchorPayDate ?? ''\n const anchorEndOfPayPeriod = payload.anchorEndOfPayPeriod ?? ''\n\n if (isCreateMode) {\n const result = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n payScheduleCreateRequest: {\n frequency: payload.frequency,\n anchorPayDate: new RFCDate(anchorPayDate),\n anchorEndOfPayPeriod: new RFCDate(anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1 || undefined,\n day2: payload.day2 || undefined,\n },\n },\n })\n\n submitResult = { mode: 'create', data: result.paySchedule! }\n } else {\n const result = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule.uuid,\n companyId,\n payScheduleUpdateRequest: {\n frequency: payload.frequency,\n anchorPayDate: new RFCDate(anchorPayDate),\n anchorEndOfPayPeriod: new RFCDate(anchorEndOfPayPeriod),\n customName: payload.customName,\n day1: payload.day1 || undefined,\n day2: payload.day2 || undefined,\n version: currentPaySchedule.version!,\n },\n },\n })\n\n submitResult = { mode: 'update', data: result.paySchedule! }\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading =\n paymentConfigsQuery.isLoading || (payScheduleId ? payScheduleQuery.isLoading : false)\n\n if (isDataLoading) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n paySchedule: currentPaySchedule,\n payPeriodPreview: payPeriodPreview ?? null,\n payPreviewLoading,\n paymentSpeedDays,\n },\n status: {\n isPending,\n mode: isCreateMode ? ('create' as const) : ('update' as const),\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n CustomName: CustomNameField,\n Frequency: FrequencyField,\n CustomTwicePerMonth: showCustomTwicePerMonth ? CustomTwicePerMonthField : undefined,\n AnchorPayDate: AnchorPayDateField,\n AnchorEndOfPayPeriod: AnchorEndOfPayPeriodField,\n Day1: showDay1 ? Day1Field : undefined,\n Day2: showDay2 ? Day2Field : undefined,\n },\n fieldsMetadata,\n hookFormInternals: { formMethods },\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UsePayScheduleFormResult = HookLoadingResult | UsePayScheduleFormReady\nexport type PayScheduleFieldsMetadata = UsePayScheduleFormReady['form']['fieldsMetadata']\nexport type PayScheduleFormFields = UsePayScheduleFormReady['form']['Fields']\n"],"names":["FREQUENCY_OPTIONS","FREQUENCY_ENTRIES","o","TWICE_PER_MONTH_OPTIONS","TWICE_PER_MONTH_ENTRIES","formatWatchedDate","value","formatDateToStringDate","deriveCustomTwicePerMonth","frequency","day1","day2","usePayScheduleForm","companyId","payScheduleId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","payScheduleQuery","usePaySchedulesGet","paymentConfigsQuery","usePaymentConfigsGet","currentPaySchedule","paymentSpeed","paymentSpeedDays","parsePaymentSpeedDays","isCreateMode","mode","schema","metadataConfig","useMemo","createPayScheduleSchema","resolvedDefaults","formMethods","useForm","zodResolver","watchedFrequency","useWatch","watchedCustomTwicePerMonth","watchedAnchorPayDate","watchedAnchorEndOfPayPeriod","watchedDay1","watchedDay2","useEffect","formattedAnchorPayDate","formattedAnchorEndOfPayPeriod","previewEnabled","previewQuery","usePaySchedulesGetPreview","RFCDate","payPeriodPreview","payPreviewLoading","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","showCustomTwicePerMonth","showDay1","showDay2","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","withOptions","onSubmit","submitResult","resolve","data","payload","anchorPayDate","anchorEndOfPayPeriod","CustomNameField","FrequencyField","CustomTwicePerMonthField","AnchorPayDateField","AnchorEndOfPayPeriodField","Day1Field","Day2Field","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;AAqEA,MAAMA,IAA2E;AAAA,EAC/E,EAAE,OAAO,cAAc,OAAO,aAAA;AAAA,EAC9B,EAAE,OAAO,oBAAoB,OAAO,mBAAA;AAAA,EACpC,EAAE,OAAO,mBAAmB,OAAO,kBAAA;AAAA,EACnC,EAAE,OAAO,WAAW,OAAO,UAAA;AAC7B,GAEMC,KAA4CD,EAAkB,IAAI,CAAAE,MAAKA,EAAE,KAAK,GAE9EC,IAA0B;AAAA,EAC9B,EAAE,OAAO,WAAW,OAAO,iCAAA;AAAA,EAC3B,EAAE,OAAO,UAAU,OAAO,SAAA;AAC5B,GAEMC,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,IAEF,QAAQ;AAAA,MACN,WAAAgC;AAAA,MACA,MAAM9B,IAAgB,WAAsB;AAAA,IAAA;AAAA,IAE9C,SAAS,EAAE,UAAA4C,EAAA;AAAA,IACX,eAAAT;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,YAAYgB;AAAA,QACZ,WAAWC;AAAA,QACX,qBAAqBf,IAA0BgB,KAA2B;AAAA,QAC1E,eAAeC;AAAA,QACf,sBAAsBC;AAAA,QACtB,MAAMjB,IAAWkB,KAAY;AAAA,QAC7B,MAAMjB,IAAWkB,KAAY;AAAA,MAAA;AAAA,MAE/B,gBAAAf;AAAA,MACA,mBAAmB,EAAE,aAAAnC,EAAA;AAAA,MACrB,yBAAyBmD,GAA8BnD,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
@@ -2,9 +2,10 @@ import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as a } from "react-i18next";
|
|
3
3
|
import { useStateTaxesForm as s } from "./context.js";
|
|
4
4
|
import "../../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
5
6
|
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
function
|
|
8
|
+
function y() {
|
|
8
9
|
const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: r, isPending: e } = s(), o = c();
|
|
9
10
|
return /* @__PURE__ */ i(m, { children: [
|
|
10
11
|
/* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: r, children: t("cancelCta") }),
|
|
@@ -12,6 +13,6 @@ function x() {
|
|
|
12
13
|
] });
|
|
13
14
|
}
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
y as Actions
|
|
16
17
|
};
|
|
17
18
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAM,EAACH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -10,11 +10,12 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
10
10
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
|
+
import "classnames";
|
|
13
14
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [d, u] = t("StateTaxesFormContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
u as StateTaxesFormProvider,
|
|
19
|
+
d as useStateTaxesForm
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
|
|
@@ -2,13 +2,14 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as i } from "react-i18next";
|
|
3
3
|
import { useStateTaxesList as e } from "./context.js";
|
|
4
4
|
import "../../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
5
6
|
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
6
7
|
import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
function
|
|
8
|
+
function x() {
|
|
8
9
|
const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
|
|
9
10
|
return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
x as Actions
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
|
|
@@ -2,13 +2,14 @@ import { jsx as s, Fragment as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as o } from "react-i18next";
|
|
3
3
|
import { useStateTaxesList as l } from "./context.js";
|
|
4
4
|
import "../../../../shared/constants.js";
|
|
5
|
+
import "classnames";
|
|
5
6
|
import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
|
|
6
7
|
import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
8
|
import { useDataView as d } from "../../../Common/DataView/useDataView.js";
|
|
8
9
|
import { DataView as C } from "../../../Common/DataView/DataView.js";
|
|
9
|
-
const
|
|
10
|
-
const { stateTaxRequirements:
|
|
11
|
-
data:
|
|
10
|
+
const b = () => {
|
|
11
|
+
const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
|
|
12
|
+
data: r,
|
|
12
13
|
columns: [
|
|
13
14
|
{
|
|
14
15
|
key: "state",
|
|
@@ -26,7 +27,7 @@ const k = () => {
|
|
|
26
27
|
{
|
|
27
28
|
variant: "secondary",
|
|
28
29
|
onClick: () => {
|
|
29
|
-
e.state &&
|
|
30
|
+
e.state && n(e.state);
|
|
30
31
|
},
|
|
31
32
|
children: e.setupComplete ? t("editStateTaxCta") : t("continueStateTaxSetupCta")
|
|
32
33
|
}
|
|
@@ -36,6 +37,6 @@ const k = () => {
|
|
|
36
37
|
return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
|
|
37
38
|
};
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
b as List
|
|
40
41
|
};
|
|
41
42
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n if (requirement.state) handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n if (requirement.state) handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAIM,EAAY,SAAOR,EAAaQ,EAAY,KAAK;AAAA,QACvD;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
|
|
@@ -10,11 +10,12 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
10
10
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../shared/constants.js";
|
|
13
|
+
import "classnames";
|
|
13
14
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [d, u] = t("StateTaxesListContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
u as StateTaxesListProvider,
|
|
19
|
+
d as useStateTaxesList
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { TaxRequirementStatesList } from '@gusto/embedded-api/models/components/taxrequirementstateslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: TaxRequirementStatesList[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { OnboardingFlow } from '../OnboardingFlow/OnboardingFlow';
|
|
2
|
+
export { OnboardingOverview } from '../OnboardingOverview/OnboardingOverview';
|
|
3
|
+
export { DocumentSigner } from '../DocumentSigner';
|
|
4
|
+
export { DocumentList } from '../DocumentSigner/DocumentList';
|
|
5
|
+
export { SignatureForm } from '../DocumentSigner/SignatureForm';
|
|
6
|
+
export { Industry } from '../Industry';
|
|
7
|
+
export { BankAccount } from '../BankAccount/BankAccount';
|
|
8
|
+
export { Locations } from '../Locations/Locations';
|
|
9
|
+
export { PaySchedule } from '../PaySchedule';
|
|
10
|
+
export { FederalTaxes } from '../FederalTaxes';
|
|
11
|
+
export { StateTaxes } from '../StateTaxes/StateTaxes';
|
|
12
|
+
export { AssignSignatory } from '../AssignSignatory';
|
|
13
|
+
export { CreateSignatory } from '../AssignSignatory/CreateSignatory';
|
|
14
|
+
export { InviteSignatory } from '../AssignSignatory/InviteSignatory';
|