@gusto/embedded-react-sdk 0.48.3 → 0.49.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 +45 -0
- package/README.md +8 -8
- package/dist/components/Base/Base.d.ts +11 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +21 -21
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +16 -15
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +1 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.js +9 -8
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js +104 -102
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
- package/dist/components/Common/UI/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +87 -80
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +4 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Select/Select.js +28 -28
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +3 -2
- package/dist/components/Common/UI/Tabs/Tabs.js +9 -8
- package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +4 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +9 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.d.ts +3 -2
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +3 -3
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +3 -3
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +3 -3
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -2
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/index.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +6 -5
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js +4 -6
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/index.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.js +12 -18
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +15 -6
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +23 -21
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/index.d.ts +2 -0
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +10 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Industry.d.ts +5 -7
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +11 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/index.d.ts +1 -0
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.d.ts +1 -0
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +20 -20
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.module.scss.js +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +2 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.js +4 -6
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +38 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +14 -3
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +30 -23
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +10 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +4 -3
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +6 -4
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +10 -14
- package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +29 -25
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +11 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +55 -54
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +10 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js +11 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.test.d.ts +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +7 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +5 -7
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +11 -11
- package/dist/components/Contractor/Address/Address.d.ts +14 -8
- package/dist/components/Contractor/Address/Address.js +83 -64
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Address.module.scss.js +8 -0
- package/dist/components/Contractor/Address/Address.module.scss.js.map +1 -0
- package/dist/components/Contractor/Address/index.d.ts +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +59 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js +32 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js.map +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +111 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js +26 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js.map +1 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/index.d.ts +6 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +112 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +133 -0
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -0
- package/dist/components/Contractor/Address/types.d.ts +8 -0
- package/dist/components/Contractor/ContractorList/index.d.ts +4 -4
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.d.ts +29 -0
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +71 -0
- package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -0
- package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +3 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/index.d.ts +2 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +59 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +20 -0
- package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -0
- package/dist/components/Contractor/Landing/Landing.d.ts +19 -0
- package/dist/components/Contractor/Landing/Landing.js +73 -0
- package/dist/components/Contractor/Landing/Landing.js.map +1 -0
- package/dist/components/Contractor/Landing/index.d.ts +2 -0
- package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +1 -0
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +7 -7
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +20 -8
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +4 -4
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.d.ts +23 -0
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +36 -0
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -0
- package/dist/components/Contractor/OnboardingSummary/index.d.ts +2 -0
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +11 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +59 -53
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +70 -91
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +62 -56
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +11 -2
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +7 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +54 -51
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +20 -22
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +109 -102
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +86 -65
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.d.ts +8 -0
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +79 -0
- package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/ContractorProfile.d.ts +52 -10
- package/dist/components/Contractor/Profile/ContractorProfile.js +205 -31
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js +8 -0
- package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js.map +1 -0
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.d.ts +8 -0
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +96 -0
- package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.d.ts +22 -0
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +40 -0
- package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -0
- package/dist/components/Contractor/Profile/index.d.ts +1 -1
- package/dist/components/Contractor/Profile/shared/index.d.ts +2 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +125 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +73 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.test.d.ts +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +312 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +87 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js.map +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/index.d.ts +6 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +151 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +188 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -0
- package/dist/components/Contractor/Submit/Submit.d.ts +4 -4
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/exports/contractorOnboarding.d.ts +6 -3
- package/dist/components/Contractor/exports/contractorOnboarding.js +14 -8
- package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -1
- package/dist/components/Employee/Compensation/management/Compensation.d.ts +4 -7
- package/dist/components/Employee/Compensation/management/Compensation.js +1 -5
- package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -0
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +13 -10
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/management/compensationStateMachine.js +23 -31
- package/dist/components/Employee/Compensation/management/compensationStateMachine.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +1 -0
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +1 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +3 -3
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js +20 -28
- package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +13 -10
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +29 -4
- package/dist/components/Employee/Dashboard/Dashboard.js +1 -4
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +20 -14
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +78 -108
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/management/Deductions.d.ts +4 -7
- package/dist/components/Employee/Deductions/management/Deductions.js +1 -5
- package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.d.ts +1 -0
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts +4 -3
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +1 -4
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js +17 -23
- package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -0
- package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js +25 -35
- package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +40 -37
- package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +1 -0
- package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentManager.d.ts +19 -4
- package/dist/components/Employee/Documents/management/DocumentManager.js +4 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/management/Documents.d.ts +4 -7
- package/dist/components/Employee/Documents/management/Documents.js +1 -5
- package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
- package/dist/components/Employee/Documents/management/documentsStateMachine.js +5 -7
- package/dist/components/Employee/Documents/management/documentsStateMachine.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +2 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +8 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +1 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +3 -2
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.d.ts +1 -4
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +3 -2
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.d.ts +5 -8
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.d.ts +18 -3
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +21 -18
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +2 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +47 -46
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +8 -2
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +5 -7
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +4 -7
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +1 -5
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +4 -5
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +1 -4
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js +14 -20
- package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +4 -3
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +1 -4
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +7 -11
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +1 -5
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.d.ts +1 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.d.ts +7 -9
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +1 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +2 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js +8 -12
- package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.d.ts +10 -4
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +19 -5
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +32 -12
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +19 -17
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +23 -16
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +11 -15
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +10 -4
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +3 -7
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +1 -5
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +15 -21
- package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +4 -7
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +1 -5
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +24 -36
- package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.d.ts +5 -8
- package/dist/components/Employee/Profile/management/Profile.js +1 -5
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.d.ts +1 -0
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.d.ts +5 -6
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -4
- package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
- package/dist/components/Employee/Profile/management/profileStateMachine.js +14 -20
- package/dist/components/Employee/Profile/management/profileStateMachine.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +55 -54
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js +3 -5
- package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/Profile.d.ts +11 -12
- package/dist/components/Employee/Profile/onboarding/Profile.js +1 -5
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +19 -5
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +12 -18
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +4 -9
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +1 -5
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.d.ts +1 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.d.ts +5 -8
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +1 -4
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js +14 -20
- package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +5 -8
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +1 -4
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +29 -29
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +16 -5
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +5 -7
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +7 -11
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +1 -5
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.d.ts +1 -0
- package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.d.ts +7 -9
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +1 -4
- package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +97 -95
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js +8 -12
- package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js.map +1 -1
- package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +1 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +1 -0
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.d.ts +26 -1
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/InformationRequests/informationRequestsStateMachine.js +10 -14
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +3 -4
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +2 -11
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +11 -17
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +1 -3
- package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +25 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +18 -4
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -0
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +1 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +21 -20
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +2 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +28 -3
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -46
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +25 -24
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +13 -3
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +34 -44
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +12 -2
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +8 -10
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.d.ts +2 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +112 -112
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +4 -6
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +2 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +5 -9
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +10 -14
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +27 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +2 -2
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +2 -1
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +2 -2
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +2 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +1 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +28 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +128 -174
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +9 -7
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +2 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +2 -1
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +2 -2
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +2 -2
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/contexts/ThemeProvider/types.d.ts +19 -0
- package/dist/i18n/I18n.js +5 -2
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.AssignSignatory.json.js +1 -1
- package/dist/i18n/en/Company.FederalTaxes.json.js +27 -23
- package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +1 -1
- package/dist/i18n/en/Contractor.Address.json.js +13 -13
- package/dist/i18n/en/Contractor.DocumentsList.json.js +28 -0
- package/dist/i18n/en/Contractor.DocumentsList.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Landing.json.js +18 -0
- package/dist/i18n/en/Contractor.Landing.json.js.map +1 -0
- package/dist/i18n/en/Contractor.NewHireReport.json.js +12 -10
- package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
- package/dist/i18n/en/Contractor.OnboardingSummary.json.js +12 -0
- package/dist/i18n/en/Contractor.OnboardingSummary.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +13 -13
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +10 -6
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +8 -6
- package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +56 -50
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.DeductionsForm.json.js +8 -8
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js +1 -1
- package/dist/i18n/en/Employee.Management.Compensation.json.js +48 -42
- package/dist/i18n/en/Employee.Management.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Management.HomeAddress.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +40 -38
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +1 -0
- package/dist/i18n/en/common.json.js +34 -32
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +239 -205
- package/dist/index.js.map +1 -1
- package/dist/models/external.d.ts +293 -0
- package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js +3 -3
- package/dist/partner-hook-utils/form/buildFormSchema.d.ts +14 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js +41 -40
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/shared/constants.d.ts +10 -1
- package/dist/shared/constants.js +9 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +19 -2
- package/dist/types/i18next.d.ts +66 -5
- package/docs/{reference → appendix}/endpoint-inventory.json +27 -0
- package/package.json +21 -22
- package/dist/components/Contractor/Address/Actions.d.ts +0 -2
- package/dist/components/Contractor/Address/Actions.js +0 -13
- package/dist/components/Contractor/Address/Actions.js.map +0 -1
- package/dist/components/Contractor/Address/Form.d.ts +0 -2
- package/dist/components/Contractor/Address/Form.js +0 -51
- package/dist/components/Contractor/Address/Form.js.map +0 -1
- package/dist/components/Contractor/Address/Head.d.ts +0 -2
- package/dist/components/Contractor/Address/Head.js +0 -17
- package/dist/components/Contractor/Address/Head.js.map +0 -1
- package/dist/components/Contractor/Address/useAddress.d.ts +0 -28
- package/dist/components/Contractor/Address/useAddress.js +0 -31
- package/dist/components/Contractor/Address/useAddress.js.map +0 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +0 -9
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +0 -143
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +0 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +0 -205
- package/dist/components/Contractor/Profile/useContractorProfile.js +0 -237
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +0 -1
|
@@ -1,72 +1,91 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { Form as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import "react-i18next";
|
|
15
|
-
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as c } from "react-i18next";
|
|
3
|
+
import g from "classnames";
|
|
4
|
+
import C from "./Address.module.scss.js";
|
|
5
|
+
import { useContractorAddressForm as E } from "./shared/useContractorAddressForm/useContractorAddressForm.js";
|
|
6
|
+
import { BaseBoundaries as S, BaseLayout as p } from "../../Base/Base.js";
|
|
7
|
+
import "../../Base/useBase.js";
|
|
8
|
+
import { SDKFormProvider as v } from "../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
9
|
+
import { Form as b } from "../../Common/Form/Form.js";
|
|
10
|
+
import { Flex as u } from "../../Common/Flex/Flex.js";
|
|
11
|
+
import { Grid as I } from "../../Common/Grid/Grid.js";
|
|
12
|
+
import { ActionsLayout as T } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
13
|
+
import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
14
|
import "react";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
import { useComponentDictionary as x, useI18n as L } from "../../../i18n/I18n.js";
|
|
16
|
+
import { contractorEvents as f } from "../../../shared/constants.js";
|
|
17
|
+
const _ = {
|
|
18
|
+
update: ["street1", "city", "state", "zip"]
|
|
19
|
+
};
|
|
20
|
+
function G({ onEvent: n, FallbackComponent: a, ...i }) {
|
|
21
|
+
return /* @__PURE__ */ t(S, { componentName: "Contractor.Address", FallbackComponent: a, children: /* @__PURE__ */ t(F, { onEvent: n, ...i }) });
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
function F({
|
|
24
|
+
contractorId: n,
|
|
25
|
+
defaultValues: a,
|
|
26
|
+
onEvent: i,
|
|
27
|
+
dictionary: D,
|
|
28
|
+
className: h
|
|
29
|
+
}) {
|
|
30
|
+
x("Contractor.Address", D), L("Contractor.Address");
|
|
31
|
+
const { t: e } = c("Contractor.Address"), { t: A } = c("common"), d = y(), r = E({
|
|
32
|
+
contractorId: n,
|
|
33
|
+
optionalFieldsToRequire: _,
|
|
34
|
+
defaultValues: a
|
|
35
|
+
});
|
|
36
|
+
if (r.isLoading)
|
|
37
|
+
return /* @__PURE__ */ t(p, { isLoading: !0, error: r.errorHandling.errors });
|
|
38
|
+
const { Fields: o } = r.form, m = r.data.contractorType === "Business", R = async () => {
|
|
39
|
+
const s = await r.actions.onSubmit();
|
|
40
|
+
s && (i(f.CONTRACTOR_ADDRESS_UPDATED, s.data), i(f.CONTRACTOR_ADDRESS_DONE));
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ t("section", { className: g(C.container, h), children: /* @__PURE__ */ t(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ t(v, { formHookResult: r, children: /* @__PURE__ */ t(b, { onSubmit: () => {
|
|
43
|
+
R();
|
|
44
|
+
}, children: /* @__PURE__ */ l(u, { flexDirection: "column", gap: 32, alignItems: "stretch", children: [
|
|
45
|
+
/* @__PURE__ */ t("header", { children: /* @__PURE__ */ l(u, { flexDirection: "column", gap: 4, children: [
|
|
46
|
+
/* @__PURE__ */ t(d.Heading, { as: "h2", children: e(m ? "businessAddressTitle" : "homeAddressTitle") }),
|
|
47
|
+
/* @__PURE__ */ t(d.Text, { variant: "supporting", children: e(m ? "businessAddressDescription" : "homeAddressDescription") })
|
|
48
|
+
] }) }),
|
|
49
|
+
/* @__PURE__ */ l(I, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
|
+
o.Street1,
|
|
52
|
+
{
|
|
53
|
+
label: e("street1"),
|
|
54
|
+
validationMessages: { REQUIRED: e("validations.street1") }
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ t(o.Street2, { label: e("street2") }),
|
|
58
|
+
/* @__PURE__ */ t(
|
|
59
|
+
o.City,
|
|
60
|
+
{
|
|
61
|
+
label: e("city"),
|
|
62
|
+
validationMessages: { REQUIRED: e("validations.city") }
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ t(
|
|
66
|
+
o.State,
|
|
67
|
+
{
|
|
68
|
+
label: e("state"),
|
|
69
|
+
placeholder: e("statePlaceholder"),
|
|
70
|
+
validationMessages: { REQUIRED: e("validations.state") },
|
|
71
|
+
getOptionLabel: (s) => A(`statesHash.${s}`, { defaultValue: s })
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
|
+
o.Zip,
|
|
76
|
+
{
|
|
77
|
+
label: e("zip"),
|
|
78
|
+
validationMessages: {
|
|
79
|
+
REQUIRED: e("validations.zip"),
|
|
80
|
+
INVALID_ZIP: e("validations.zipInvalid")
|
|
46
81
|
}
|
|
47
82
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
51
|
-
};
|
|
52
|
-
return /* @__PURE__ */ t("section", { className: a, children: /* @__PURE__ */ t(
|
|
53
|
-
x,
|
|
54
|
-
{
|
|
55
|
-
value: {
|
|
56
|
-
contractor: D,
|
|
57
|
-
contractorType: C,
|
|
58
|
-
address: o,
|
|
59
|
-
isPending: h
|
|
60
|
-
},
|
|
61
|
-
children: /* @__PURE__ */ t(P, { ...m, children: /* @__PURE__ */ t(N, { onSubmit: m.handleSubmit(l), children: /* @__PURE__ */ t(G, { flexDirection: "column", gap: 32, alignItems: "stretch", children: n || /* @__PURE__ */ F(R, { children: [
|
|
62
|
-
/* @__PURE__ */ t(O, {}),
|
|
63
|
-
/* @__PURE__ */ t(_, {}),
|
|
64
|
-
/* @__PURE__ */ t(B, {})
|
|
65
|
-
] }) }) }) })
|
|
66
|
-
}
|
|
67
|
-
) });
|
|
83
|
+
)
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(d.Button, { type: "submit", isLoading: r.status.isPending, children: e("submit") }) })
|
|
86
|
+
] }) }) }) }) });
|
|
68
87
|
}
|
|
69
88
|
export {
|
|
70
|
-
|
|
89
|
+
G as Address
|
|
71
90
|
};
|
|
72
91
|
//# sourceMappingURL=Address.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Address.js","sources":["../../../../src/components/Contractor/Address/Address.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport styles from './Address.module.scss'\nimport { useContractorAddressForm } from './shared/useContractorAddressForm'\nimport type { ContractorAddressOptionalFieldsToRequire } from './shared/useContractorAddressForm'\nimport type { AddressDefaultValues } from './types'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport type { BaseBoundariesProps } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\nimport { contractorEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n// The hook defaults to the API contract, which treats every address field as\n// optional. The SDK's address form has always required a complete mailing\n// address, so it opts those fields back into being required here.\nconst SDK_REQUIRED_ADDRESS_FIELDS: ContractorAddressOptionalFieldsToRequire = {\n update: ['street1', 'city', 'state', 'zip'],\n}\n\n/**\n * Props for {@link Address}.\n *\n * @public\n */\nexport interface AddressProps {\n /** The associated contractor identifier. */\n contractorId: string\n /** Pre-fill values for address fields. Server data takes precedence when the contractor already has an address on file. */\n defaultValues?: AddressDefaultValues\n /** Callback invoked each time the component emits an event. */\n onEvent: OnEventType<EventType, unknown>\n /** Overrides for the component's i18n strings. */\n dictionary?: ResourceDictionary<'Contractor.Address'>\n /** Optional class applied to the wrapping `<section>`. */\n className?: string\n /** Custom React component rendered when an unhandled error is caught by the component-level error boundary. */\n FallbackComponent?: BaseBoundariesProps['FallbackComponent']\n}\n\n/**\n * Form for collecting and updating a contractor's mailing address. Renders a business or home address title based on the contractor type.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/address/updated` | Fired after the address is saved | The updated `ContractorAddress` entity |\n * | `contractor/address/done` | Fired after a successful save so the parent flow can advance | — |\n *\n * @param props - See {@link AddressProps}.\n * @returns The contractor address form.\n * @public\n *\n * @example\n * ```tsx\n * import { ContractorOnboarding } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <ContractorOnboarding.Address\n * contractorId=\"contractor-uuid\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function Address({ onEvent, FallbackComponent, ...rootProps }: AddressProps) {\n return (\n <BaseBoundaries componentName=\"Contractor.Address\" FallbackComponent={FallbackComponent}>\n <AddressRoot onEvent={onEvent} {...rootProps} />\n </BaseBoundaries>\n )\n}\n\nfunction AddressRoot({\n contractorId,\n defaultValues,\n onEvent,\n dictionary,\n className,\n}: Omit<AddressProps, 'FallbackComponent'>) {\n useComponentDictionary('Contractor.Address', dictionary)\n useI18n('Contractor.Address')\n const { t } = useTranslation('Contractor.Address')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n const contractorAddress = useContractorAddressForm({\n contractorId,\n optionalFieldsToRequire: SDK_REQUIRED_ADDRESS_FIELDS,\n defaultValues,\n })\n\n if (contractorAddress.isLoading) {\n return <BaseLayout isLoading error={contractorAddress.errorHandling.errors} />\n }\n\n const { Fields } = contractorAddress.form\n const isBusiness = contractorAddress.data.contractorType === 'Business'\n\n const handleSubmit = async () => {\n const result = await contractorAddress.actions.onSubmit()\n if (result) {\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_UPDATED, result.data)\n onEvent(contractorEvents.CONTRACTOR_ADDRESS_DONE)\n }\n }\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={contractorAddress.errorHandling.errors}>\n <SDKFormProvider formHookResult={contractorAddress}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={32} alignItems=\"stretch\">\n <header>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {isBusiness ? t('businessAddressTitle') : t('homeAddressTitle')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n {isBusiness ? t('businessAddressDescription') : t('homeAddressDescription')}\n </Components.Text>\n </Flex>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <Fields.Street1\n label={t('street1')}\n validationMessages={{ REQUIRED: t('validations.street1') }}\n />\n <Fields.Street2 label={t('street2')} />\n <Fields.City\n label={t('city')}\n validationMessages={{ REQUIRED: t('validations.city') }}\n />\n <Fields.State\n label={t('state')}\n placeholder={t('statePlaceholder')}\n validationMessages={{ REQUIRED: t('validations.state') }}\n getOptionLabel={(abbr: string) =>\n tCommon(`statesHash.${abbr}`, { defaultValue: abbr })\n }\n />\n <Fields.Zip\n label={t('zip')}\n validationMessages={{\n REQUIRED: t('validations.zip'),\n INVALID_ZIP: t('validations.zipInvalid'),\n }}\n />\n </Grid>\n\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={contractorAddress.status.isPending}>\n {t('submit')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["SDK_REQUIRED_ADDRESS_FIELDS","Address","onEvent","FallbackComponent","rootProps","jsx","BaseBoundaries","AddressRoot","contractorId","defaultValues","dictionary","className","useComponentDictionary","useI18n","t","useTranslation","tCommon","Components","useComponentContext","contractorAddress","useContractorAddressForm","BaseLayout","Fields","isBusiness","handleSubmit","result","contractorEvents","classNames","styles","SDKFormProvider","Form","jsxs","Flex","Grid","abbr","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAMA,IAAwE;AAAA,EAC5E,QAAQ,CAAC,WAAW,QAAQ,SAAS,KAAK;AAC5C;AAiDO,SAASC,EAAQ,EAAE,SAAAC,GAAS,mBAAAC,GAAmB,GAAGC,KAA2B;AAClF,SACE,gBAAAC,EAACC,GAAA,EAAe,eAAc,sBAAqB,mBAAAH,GACjD,4BAACI,GAAA,EAAY,SAAAL,GAAmB,GAAGE,EAAA,CAAW,EAAA,CAChD;AAEJ;AAEA,SAASG,EAAY;AAAA,EACnB,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAP;AAAA,EACA,YAAAQ;AAAA,EACA,WAAAC;AACF,GAA4C;AAC1C,EAAAC,EAAuB,sBAAsBF,CAAU,GACvDG,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3C,EAAE,GAAGC,MAAYD,EAAe,QAAQ,GACxCE,IAAaC,EAAA,GAEbC,IAAoBC,EAAyB;AAAA,IACjD,cAAAZ;AAAA,IACA,yBAAyBR;AAAA,IACzB,eAAAS;AAAA,EAAA,CACD;AAED,MAAIU,EAAkB;AACpB,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAkB,cAAc,QAAQ;AAG9E,QAAM,EAAE,QAAAG,MAAWH,EAAkB,MAC/BI,IAAaJ,EAAkB,KAAK,mBAAmB,YAEvDK,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMN,EAAkB,QAAQ,SAAA;AAC/C,IAAIM,MACFvB,EAAQwB,EAAiB,4BAA4BD,EAAO,IAAI,GAChEvB,EAAQwB,EAAiB,uBAAuB;AAAA,EAEpD;AAEA,SACE,gBAAArB,EAAC,WAAA,EAAQ,WAAWsB,EAAWC,EAAO,WAAWjB,CAAS,GACxD,UAAA,gBAAAN,EAACgB,GAAA,EAAW,OAAOF,EAAkB,cAAc,QACjD,UAAA,gBAAAd,EAACwB,GAAA,EAAgB,gBAAgBV,GAC/B,UAAA,gBAAAd,EAACyB,GAAA,EAAK,UAAU,MAAA;AAAM,IAAKN;KACzB,UAAA,gBAAAO,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAAI,YAAW,WAC/C,UAAA;AAAA,IAAA,gBAAA3B,EAAC,YACC,UAAA,gBAAA0B,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAA3B,EAACY,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAaH,EAAbS,IAAe,yBAA4B,kBAAN,EAAwB,CAChE;AAAA,MACA,gBAAAlB,EAACY,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAaH,EAAbS,IAAe,+BAAkC,wBAAN,EAA8B,CAC5E;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,IAEA,gBAAAQ,EAACE,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,MAAA,gBAAA5B;AAAA,QAACiB,EAAO;AAAA,QAAP;AAAA,UACC,OAAOR,EAAE,SAAS;AAAA,UAClB,oBAAoB,EAAE,UAAUA,EAAE,qBAAqB,EAAA;AAAA,QAAE;AAAA,MAAA;AAAA,wBAE1DQ,EAAO,SAAP,EAAe,OAAOR,EAAE,SAAS,GAAG;AAAA,MACrC,gBAAAT;AAAA,QAACiB,EAAO;AAAA,QAAP;AAAA,UACC,OAAOR,EAAE,MAAM;AAAA,UACf,oBAAoB,EAAE,UAAUA,EAAE,kBAAkB,EAAA;AAAA,QAAE;AAAA,MAAA;AAAA,MAExD,gBAAAT;AAAA,QAACiB,EAAO;AAAA,QAAP;AAAA,UACC,OAAOR,EAAE,OAAO;AAAA,UAChB,aAAaA,EAAE,kBAAkB;AAAA,UACjC,oBAAoB,EAAE,UAAUA,EAAE,mBAAmB,EAAA;AAAA,UACrD,gBAAgB,CAACoB,MACflB,EAAQ,cAAckB,CAAI,IAAI,EAAE,cAAcA,EAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAGxD,gBAAA7B;AAAA,QAACiB,EAAO;AAAA,QAAP;AAAA,UACC,OAAOR,EAAE,KAAK;AAAA,UACd,oBAAoB;AAAA,YAClB,UAAUA,EAAE,iBAAiB;AAAA,YAC7B,aAAaA,EAAE,wBAAwB;AAAA,UAAA;AAAA,QACzC;AAAA,MAAA;AAAA,IACF,GACF;AAAA,IAEA,gBAAAT,EAAC8B,GAAA,EACC,UAAA,gBAAA9B,EAACY,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWE,EAAkB,OAAO,WAClE,UAAAL,EAAE,QAAQ,GACb,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Address.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
|
|
3
|
+
/**
|
|
4
|
+
* Validation error codes emitted by the contractor address form schema. Map
|
|
5
|
+
* these codes to localized copy in `validationMessages` when composing the
|
|
6
|
+
* hook.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const ContractorAddressErrorCodes: {
|
|
11
|
+
readonly REQUIRED: "REQUIRED";
|
|
12
|
+
readonly INVALID_ZIP: "INVALID_ZIP";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Union of validation error code strings emitted by the contractor address
|
|
16
|
+
* form schema.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export type ContractorAddressErrorCode = (typeof ContractorAddressErrorCodes)[keyof typeof ContractorAddressErrorCodes];
|
|
21
|
+
/**
|
|
22
|
+
* Field names accepted by the contractor address form.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export type ContractorAddressField = "street1" | "street2" | "city" | "state" | "zip";
|
|
27
|
+
/**
|
|
28
|
+
* Shape of the values managed by the contractor address form.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export type ContractorAddressFormData = { street1: string; street2: string; city: string; state: string; zip: string; };
|
|
33
|
+
/**
|
|
34
|
+
* Shape of the validated values produced by the contractor address form on
|
|
35
|
+
* submit.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export type ContractorAddressFormOutputs = ContractorAddressFormData;
|
|
40
|
+
/**
|
|
41
|
+
* Keys of optional contractor address fields that can be promoted to required
|
|
42
|
+
* via the hook's `optionalFieldsToRequire` option.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export type ContractorAddressOptionalFieldsToRequire = { create?: ("street1" | "street2" | "city" | "state" | "zip")[] | undefined; update?: ("street1" | "street2" | "city" | "state" | "zip")[] | undefined; };
|
|
47
|
+
/** @internal */
|
|
48
|
+
interface ContractorAddressSchemaOptions {
|
|
49
|
+
optionalFieldsToRequire?: ContractorAddressOptionalFieldsToRequire;
|
|
50
|
+
}
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare function createContractorAddressSchema(options?: ContractorAddressSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
|
|
53
|
+
street1: z.ZodString;
|
|
54
|
+
street2: z.ZodString;
|
|
55
|
+
city: z.ZodString;
|
|
56
|
+
state: z.ZodString;
|
|
57
|
+
zip: z.ZodString;
|
|
58
|
+
}>;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { buildFormSchema as s } from "../../../../../partner-hook-utils/form/buildFormSchema.js";
|
|
3
|
+
const r = {
|
|
4
|
+
REQUIRED: "REQUIRED",
|
|
5
|
+
INVALID_ZIP: "INVALID_ZIP"
|
|
6
|
+
}, i = /(^\d{5}$)|(^\d{5}-\d{4}$)/, n = {
|
|
7
|
+
street1: e.string(),
|
|
8
|
+
street2: e.string(),
|
|
9
|
+
city: e.string(),
|
|
10
|
+
state: e.string(),
|
|
11
|
+
zip: e.string().regex(i, { message: r.INVALID_ZIP })
|
|
12
|
+
}, d = {
|
|
13
|
+
street1: "never",
|
|
14
|
+
street2: "never",
|
|
15
|
+
city: "never",
|
|
16
|
+
state: "never",
|
|
17
|
+
zip: "never"
|
|
18
|
+
};
|
|
19
|
+
function a(t = {}) {
|
|
20
|
+
const { optionalFieldsToRequire: o } = t;
|
|
21
|
+
return s(n, {
|
|
22
|
+
requiredFieldsConfig: d,
|
|
23
|
+
requiredErrorCode: r.REQUIRED,
|
|
24
|
+
mode: "update",
|
|
25
|
+
optionalFieldsToRequire: o
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
r as ContractorAddressErrorCodes,
|
|
30
|
+
a as createContractorAddressSchema
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=contractorAddressSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractorAddressSchema.js","sources":["../../../../../../src/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\n/**\n * Validation error codes emitted by the contractor address form schema. Map\n * these codes to localized copy in `validationMessages` when composing the\n * hook.\n *\n * @public\n */\nexport const ContractorAddressErrorCodes = {\n REQUIRED: 'REQUIRED',\n INVALID_ZIP: 'INVALID_ZIP',\n} as const\n\n/**\n * Union of validation error code strings emitted by the contractor address\n * form schema.\n *\n * @public\n */\nexport type ContractorAddressErrorCode =\n (typeof ContractorAddressErrorCodes)[keyof typeof ContractorAddressErrorCodes]\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst ZIP_REGEX = /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/\n\nconst fieldValidators = {\n street1: z.string(),\n street2: z.string(),\n city: z.string(),\n state: z.string(),\n zip: z.string().regex(ZIP_REGEX, { message: ContractorAddressErrorCodes.INVALID_ZIP }),\n}\n\n/**\n * Field names accepted by the contractor address form.\n *\n * @public\n */\nexport type ContractorAddressField = keyof typeof fieldValidators\n\n/**\n * Shape of the values managed by the contractor address form.\n *\n * @public\n */\nexport type ContractorAddressFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n/**\n * Shape of the validated values produced by the contractor address form on\n * submit.\n *\n * @public\n */\nexport type ContractorAddressFormOutputs = ContractorAddressFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\n// The contractor address API treats every address field as optional — only\n// `version` is required, and that is not a form field. The hook mirrors that\n// contract so partners get API-aligned defaults; consumers that need stricter\n// requiredness (e.g. the SDK's own Address component) opt in via\n// `optionalFieldsToRequire`.\nconst requiredFieldsConfig = {\n street1: 'never',\n street2: 'never',\n city: 'never',\n state: 'never',\n zip: 'never',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\n/**\n * Keys of optional contractor address fields that can be promoted to required\n * via the hook's `optionalFieldsToRequire` option.\n *\n * @public\n */\nexport type ContractorAddressOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\n/** @internal */\ninterface ContractorAddressSchemaOptions {\n optionalFieldsToRequire?: ContractorAddressOptionalFieldsToRequire\n}\n\n/** @internal */\nexport function createContractorAddressSchema(options: ContractorAddressSchemaOptions = {}) {\n const { optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: ContractorAddressErrorCodes.REQUIRED,\n mode: 'update',\n optionalFieldsToRequire,\n })\n}\n"],"names":["ContractorAddressErrorCodes","ZIP_REGEX","fieldValidators","z","requiredFieldsConfig","createContractorAddressSchema","options","optionalFieldsToRequire","buildFormSchema"],"mappings":";;AAgBO,MAAMA,IAA8B;AAAA,EACzC,UAAU;AAAA,EACV,aAAa;AACf,GAaMC,IAAY,6BAEZC,IAAkB;AAAA,EACtB,SAASC,EAAE,OAAA;AAAA,EACX,SAASA,EAAE,OAAA;AAAA,EACX,MAAMA,EAAE,OAAA;AAAA,EACR,OAAOA,EAAE,OAAA;AAAA,EACT,KAAKA,EAAE,SAAS,MAAMF,GAAW,EAAE,SAASD,EAA4B,YAAA,CAAa;AACvF,GAgCMI,IAAuB;AAAA,EAC3B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AACP;AAoBO,SAASC,EAA8BC,IAA0C,IAAI;AAC1F,QAAM,EAAE,yBAAAC,MAA4BD;AAEpC,SAAOE,EAAgBN,GAAiB;AAAA,IACtC,sBAAAE;AAAA,IACA,mBAAmBJ,EAA4B;AAAA,IAC/C,MAAM;AAAA,IACN,yBAAAO;AAAA,EAAA,CACD;AACH;"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ContractorAddressErrorCodes } from './contractorAddressSchema';
|
|
2
|
+
import { TextInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/TextInputHookField';
|
|
3
|
+
import { SelectHookFieldProps } from '../../../../../partner-hook-utils/form/fields/SelectHookField';
|
|
4
|
+
import { HookFieldProps } from '../../../../../partner-hook-utils/types';
|
|
5
|
+
/**
|
|
6
|
+
* The required-field error code produced by {@link useContractorAddressForm} fields that only emit `REQUIRED`.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Used as the `validationMessages` key for the street, city, and state fields.
|
|
10
|
+
* See {@link ContractorAddressErrorCodes}.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export type RequiredValidation = typeof ContractorAddressErrorCodes.REQUIRED;
|
|
15
|
+
/**
|
|
16
|
+
* Validation error codes emitted by the `zip` field of {@link useContractorAddressForm}.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Use these as keys in `validationMessages` on `Fields.Zip`. See
|
|
20
|
+
* {@link ContractorAddressErrorCodes}.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type ZipValidation = (typeof ContractorAddressErrorCodes)['REQUIRED' | 'INVALID_ZIP'];
|
|
25
|
+
/**
|
|
26
|
+
* Props accepted by {@link useContractorAddressForm}'s `Fields.Street1` component.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export type Street1FieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
31
|
+
/**
|
|
32
|
+
* Text input bound to the `street1` field of {@link useContractorAddressForm}.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Available on the hook result as `form.Fields.Street1`. Required.
|
|
36
|
+
*
|
|
37
|
+
* @param props - {@link Street1FieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
|
|
38
|
+
* @returns The rendered text input bound to `street1`.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export declare function Street1Field(props: Street1FieldProps): import("react").JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Props accepted by {@link useContractorAddressForm}'s `Fields.Street2` component.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type Street2FieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
48
|
+
/**
|
|
49
|
+
* Text input bound to the `street2` field of {@link useContractorAddressForm}.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Available on the hook result as `form.Fields.Street2`. Optional.
|
|
53
|
+
*
|
|
54
|
+
* @param props - {@link Street2FieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
|
|
55
|
+
* @returns The rendered text input bound to `street2`.
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export declare function Street2Field(props: Street2FieldProps): import("react").JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Props accepted by {@link useContractorAddressForm}'s `Fields.City` component.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export type CityFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
65
|
+
/**
|
|
66
|
+
* Text input bound to the `city` field of {@link useContractorAddressForm}.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Available on the hook result as `form.Fields.City`. Required.
|
|
70
|
+
*
|
|
71
|
+
* @param props - {@link CityFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
|
|
72
|
+
* @returns The rendered text input bound to `city`.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export declare function CityField(props: CityFieldProps): import("react").JSX.Element;
|
|
76
|
+
/**
|
|
77
|
+
* Props accepted by {@link useContractorAddressForm}'s `Fields.State` component.
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export type StateFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, string>>;
|
|
82
|
+
/**
|
|
83
|
+
* Select bound to the `state` field of {@link useContractorAddressForm}.
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* Available on the hook result as `form.Fields.State`. Options are the
|
|
87
|
+
* standard two-letter US state abbreviations. Required.
|
|
88
|
+
*
|
|
89
|
+
* @param props - {@link StateFieldProps} — accepts the standard hook field props plus `getOptionLabel` to localize state names.
|
|
90
|
+
* @returns The rendered select bound to `state`.
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
export declare function StateField(props: StateFieldProps): import("react").JSX.Element;
|
|
94
|
+
/**
|
|
95
|
+
* Props accepted by {@link useContractorAddressForm}'s `Fields.Zip` component.
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
export type ZipFieldProps = HookFieldProps<TextInputHookFieldProps<ZipValidation>>;
|
|
100
|
+
/**
|
|
101
|
+
* Text input bound to the `zip` field of {@link useContractorAddressForm}.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* Available on the hook result as `form.Fields.Zip`. Required; also validates
|
|
105
|
+
* ZIP code format and emits `INVALID_ZIP` when the value does not match.
|
|
106
|
+
*
|
|
107
|
+
* @param props - {@link ZipFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
|
|
108
|
+
* @returns The rendered text input bound to `zip`.
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export declare function ZipField(props: ZipFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { TextInputHookField as n } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
3
|
+
import { SelectHookField as r } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
4
|
+
function u(e) {
|
|
5
|
+
return /* @__PURE__ */ t(n, { ...e, name: "street1" });
|
|
6
|
+
}
|
|
7
|
+
function f(e) {
|
|
8
|
+
return /* @__PURE__ */ t(n, { ...e, name: "street2" });
|
|
9
|
+
}
|
|
10
|
+
function l(e) {
|
|
11
|
+
return /* @__PURE__ */ t(n, { ...e, name: "city" });
|
|
12
|
+
}
|
|
13
|
+
function a(e) {
|
|
14
|
+
return /* @__PURE__ */ t(r, { ...e, name: "state" });
|
|
15
|
+
}
|
|
16
|
+
function c(e) {
|
|
17
|
+
return /* @__PURE__ */ t(n, { ...e, name: "zip" });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
l as CityField,
|
|
21
|
+
a as StateField,
|
|
22
|
+
u as Street1Field,
|
|
23
|
+
f as Street2Field,
|
|
24
|
+
c as ZipField
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../../src/components/Contractor/Address/shared/useContractorAddressForm/fields.tsx"],"sourcesContent":["import type { ContractorAddressErrorCodes } from './contractorAddressSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport { TextInputHookField, SelectHookField } from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\n/**\n * The required-field error code produced by {@link useContractorAddressForm} fields that only emit `REQUIRED`.\n *\n * @remarks\n * Used as the `validationMessages` key for the street, city, and state fields.\n * See {@link ContractorAddressErrorCodes}.\n *\n * @public\n */\nexport type RequiredValidation = typeof ContractorAddressErrorCodes.REQUIRED\n\n/**\n * Validation error codes emitted by the `zip` field of {@link useContractorAddressForm}.\n *\n * @remarks\n * Use these as keys in `validationMessages` on `Fields.Zip`. See\n * {@link ContractorAddressErrorCodes}.\n *\n * @public\n */\nexport type ZipValidation = (typeof ContractorAddressErrorCodes)['REQUIRED' | 'INVALID_ZIP']\n\n/**\n * Props accepted by {@link useContractorAddressForm}'s `Fields.Street1` component.\n *\n * @public\n */\nexport type Street1FieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\n/**\n * Text input bound to the `street1` field of {@link useContractorAddressForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Street1`. Required.\n *\n * @param props - {@link Street1FieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered text input bound to `street1`.\n * @public\n */\nexport function Street1Field(props: Street1FieldProps) {\n return <TextInputHookField {...props} name=\"street1\" />\n}\n\n/**\n * Props accepted by {@link useContractorAddressForm}'s `Fields.Street2` component.\n *\n * @public\n */\nexport type Street2FieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\n/**\n * Text input bound to the `street2` field of {@link useContractorAddressForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Street2`. Optional.\n *\n * @param props - {@link Street2FieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered text input bound to `street2`.\n * @public\n */\nexport function Street2Field(props: Street2FieldProps) {\n return <TextInputHookField {...props} name=\"street2\" />\n}\n\n/**\n * Props accepted by {@link useContractorAddressForm}'s `Fields.City` component.\n *\n * @public\n */\nexport type CityFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\n/**\n * Text input bound to the `city` field of {@link useContractorAddressForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.City`. Required.\n *\n * @param props - {@link CityFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered text input bound to `city`.\n * @public\n */\nexport function CityField(props: CityFieldProps) {\n return <TextInputHookField {...props} name=\"city\" />\n}\n\n/**\n * Props accepted by {@link useContractorAddressForm}'s `Fields.State` component.\n *\n * @public\n */\nexport type StateFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, string>>\n\n/**\n * Select bound to the `state` field of {@link useContractorAddressForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.State`. Options are the\n * standard two-letter US state abbreviations. Required.\n *\n * @param props - {@link StateFieldProps} — accepts the standard hook field props plus `getOptionLabel` to localize state names.\n * @returns The rendered select bound to `state`.\n * @public\n */\nexport function StateField(props: StateFieldProps) {\n return <SelectHookField {...props} name=\"state\" />\n}\n\n/**\n * Props accepted by {@link useContractorAddressForm}'s `Fields.Zip` component.\n *\n * @public\n */\nexport type ZipFieldProps = HookFieldProps<TextInputHookFieldProps<ZipValidation>>\n\n/**\n * Text input bound to the `zip` field of {@link useContractorAddressForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Zip`. Required; also validates\n * ZIP code format and emits `INVALID_ZIP` when the value does not match.\n *\n * @param props - {@link ZipFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered text input bound to `zip`.\n * @public\n */\nexport function ZipField(props: ZipFieldProps) {\n return <TextInputHookField {...props} name=\"zip\" />\n}\n"],"names":["Street1Field","props","jsx","TextInputHookField","Street2Field","CityField","StateField","SelectHookField","ZipField"],"mappings":";;;AA6CO,SAASA,EAAaC,GAA0B;AACrD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,WAAU;AACvD;AAmBO,SAASG,EAAaH,GAA0B;AACrD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,WAAU;AACvD;AAmBO,SAASI,EAAUJ,GAAuB;AAC/C,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,QAAO;AACpD;AAoBO,SAASK,EAAWL,GAAwB;AACjD,SAAO,gBAAAC,EAACK,GAAA,EAAiB,GAAGN,GAAO,MAAK,SAAQ;AAClD;AAoBO,SAASO,EAASP,GAAsB;AAC7C,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,OAAM;AACnD;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { useContractorAddressForm } from './useContractorAddressForm';
|
|
3
|
+
export type { ContractorAddressSubmitOptions, ContractorAddressOptionalFieldsToRequire, UseContractorAddressFormProps, UseContractorAddressFormResult, UseContractorAddressFormReady, ContractorAddressFieldsMetadata, ContractorAddressFormFields, ContractorAddressFields, } from './useContractorAddressForm';
|
|
4
|
+
export { createContractorAddressSchema, ContractorAddressErrorCodes, type ContractorAddressErrorCode, type ContractorAddressFormData, type ContractorAddressFormOutputs, type ContractorAddressField, } from './contractorAddressSchema';
|
|
5
|
+
export { Street1Field, Street2Field, CityField, StateField, ZipField } from './fields';
|
|
6
|
+
export type { RequiredValidation as ContractorAddressRequiredValidation, ZipValidation as ContractorAddressZipValidation, Street1FieldProps as ContractorAddressStreet1FieldProps, Street2FieldProps as ContractorAddressStreet2FieldProps, CityFieldProps as ContractorAddressCityFieldProps, StateFieldProps as ContractorAddressStateFieldProps, ZipFieldProps as ContractorAddressZipFieldProps, } from './fields';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { UseFormProps } from 'react-hook-form';
|
|
2
|
+
import { Contractor, ContractorType } from '@gusto/embedded-api-v-2025-11-15/models/components/contractor';
|
|
3
|
+
import { ContractorAddress } from '@gusto/embedded-api-v-2025-11-15/models/components/contractoraddress';
|
|
4
|
+
import { ContractorAddressOptionalFieldsToRequire, ContractorAddressFormData } from './contractorAddressSchema';
|
|
5
|
+
import { Street1Field, Street2Field, CityField, StateField, ZipField } from './fields';
|
|
6
|
+
import { BaseFormHookReady, FieldsMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
|
|
7
|
+
export type { ContractorAddressOptionalFieldsToRequire } from './contractorAddressSchema';
|
|
8
|
+
/**
|
|
9
|
+
* Optional overrides passed to {@link UseContractorAddressFormReady.actions.onSubmit | onSubmit}.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface ContractorAddressSubmitOptions {
|
|
14
|
+
/** Override the contractor identifier supplied to the hook. */
|
|
15
|
+
contractorId?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Configuration options for {@link useContractorAddressForm}.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export interface UseContractorAddressFormProps {
|
|
23
|
+
/** UUID of the contractor whose address is being edited. */
|
|
24
|
+
contractorId: string;
|
|
25
|
+
/** Override fields that are optional by default to be required. See `ContractorAddressOptionalFieldsToRequire`. */
|
|
26
|
+
optionalFieldsToRequire?: ContractorAddressOptionalFieldsToRequire;
|
|
27
|
+
/** Pre-fill form values. Server data takes precedence. */
|
|
28
|
+
defaultValues?: Partial<ContractorAddressFormData>;
|
|
29
|
+
/** Passed through to react-hook-form. Defaults to `'onSubmit'`. */
|
|
30
|
+
validationMode?: UseFormProps['mode'];
|
|
31
|
+
/** Auto-focus the first invalid field on submit. Set to `false` when using `composeSubmitHandler` so submit-time focus is coordinated across multiple forms. Defaults to `true`. */
|
|
32
|
+
shouldFocusError?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Pre-bound field components exposed on `useContractorAddressForm().form.Fields`.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export interface ContractorAddressFields {
|
|
40
|
+
/** Street address line 1 text input. Required. */
|
|
41
|
+
Street1: typeof Street1Field;
|
|
42
|
+
/** Street address line 2 text input. Optional. */
|
|
43
|
+
Street2: typeof Street2Field;
|
|
44
|
+
/** City text input. Required. */
|
|
45
|
+
City: typeof CityField;
|
|
46
|
+
/** State selector. Required. */
|
|
47
|
+
State: typeof StateField;
|
|
48
|
+
/** ZIP code text input. Required. */
|
|
49
|
+
Zip: typeof ZipField;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Ready-state shape returned by {@link useContractorAddressForm} once data has loaded.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Discriminated by `isLoading: false`. Extends {@link BaseFormHookReady} with
|
|
56
|
+
* the contractor-address-specific `data`, `status`, `actions`, and `form.Fields` shape.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
export interface UseContractorAddressFormReady extends BaseFormHookReady<FieldsMetadata, ContractorAddressFormData, ContractorAddressFields> {
|
|
61
|
+
/** Static entity data resolved from the API. */
|
|
62
|
+
data: {
|
|
63
|
+
/** The contractor address row loaded for update. */
|
|
64
|
+
contractorAddress: ContractorAddress;
|
|
65
|
+
/** The full contractor entity loaded alongside the address. */
|
|
66
|
+
contractor: Contractor;
|
|
67
|
+
/** The contractor's type — drives whether the address is labelled "home" (Individual) or "business" (Business). */
|
|
68
|
+
contractorType: ContractorType | undefined;
|
|
69
|
+
};
|
|
70
|
+
/** Reactive status flags. */
|
|
71
|
+
status: {
|
|
72
|
+
isPending: boolean;
|
|
73
|
+
mode: 'update';
|
|
74
|
+
};
|
|
75
|
+
/** Available actions. */
|
|
76
|
+
actions: {
|
|
77
|
+
onSubmit: (options?: ContractorAddressSubmitOptions) => Promise<HookSubmitResult<ContractorAddress> | undefined>;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Form hook for editing a contractor's address.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* A contractor always has exactly one address (created with the contractor),
|
|
85
|
+
* so this hook operates only in update mode and issues a PUT on submit. The
|
|
86
|
+
* same address is labelled a "home" address for Individual contractors and a
|
|
87
|
+
* "business" address for Business contractors; the hook exposes `contractorType`
|
|
88
|
+
* so the consuming component can choose the appropriate copy.
|
|
89
|
+
*
|
|
90
|
+
* @param props - See {@link UseContractorAddressFormProps}.
|
|
91
|
+
* @returns A {@link HookLoadingResult} while loading, or a {@link UseContractorAddressFormReady} once ready.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export declare function useContractorAddressForm({ contractorId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseContractorAddressFormProps): HookLoadingResult | UseContractorAddressFormReady;
|
|
95
|
+
/**
|
|
96
|
+
* Discriminated union returned by {@link useContractorAddressForm}.
|
|
97
|
+
*
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
export type UseContractorAddressFormResult = HookLoadingResult | UseContractorAddressFormReady;
|
|
101
|
+
/**
|
|
102
|
+
* Type of `form.fieldsMetadata` returned by {@link useContractorAddressForm}.
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
export type ContractorAddressFieldsMetadata = UseContractorAddressFormReady['form']['fieldsMetadata'];
|
|
107
|
+
/**
|
|
108
|
+
* Type of `form.Fields` returned by {@link useContractorAddressForm}.
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export type ContractorAddressFormFields = UseContractorAddressFormReady['form']['Fields'];
|