@gusto/embedded-react-sdk 0.48.1 → 0.48.2
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 +23 -0
- package/dist/components/Common/DocumentList/DocumentList.js +12 -12
- package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js +3 -5
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes.d.ts +1 -0
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +7 -3
- package/dist/components/Common/PayrollLoading/PayrollLoadingTypes.d.ts +1 -0
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +1 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +1 -0
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
- package/dist/components/Common/UI/Banner/BannerTypes.d.ts +1 -0
- package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
- package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -2
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +3 -2
- package/dist/components/Common/UI/Card/CardTypes.d.ts +1 -0
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +1 -0
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +2 -0
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -0
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/Dialog/DialogTypes.d.ts +1 -0
- package/dist/components/Common/UI/Dialog/DialogTypes.js.map +1 -1
- package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +1 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -1
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -0
- package/dist/components/Common/UI/Link/LinkTypes.d.ts +4 -3
- package/dist/components/Common/UI/List/ListTypes.d.ts +13 -4
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +1 -0
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +2 -0
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/Modal/ModalTypes.d.ts +1 -0
- package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -0
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +1 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +1 -0
- package/dist/components/Common/UI/Radio/RadioTypes.d.ts +1 -0
- package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -0
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +1 -0
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -0
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -0
- package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -0
- package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +1 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -0
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +18 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +18 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +20 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +7 -6
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +18 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +18 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +27 -12
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +21 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +18 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +18 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +19 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +3 -2
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +18 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +18 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +20 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +3 -2
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +3 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +29 -21
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/management/Compensation.js +3 -2
- package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js +9 -8
- package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js +3 -2
- package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +3 -2
- package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +3 -2
- package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.js +3 -2
- package/dist/components/Employee/Compensation/management/CompensationEditPendingJobForm/CompensationEditPendingJobForm.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/Compensation.js +3 -2
- package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +3 -2
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/management/Deductions.js +3 -2
- package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +3 -2
- package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
- package/dist/components/Employee/Documents/management/Documents.js +3 -2
- package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +25 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/index.d.ts +3 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +18 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +12 -11
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +16 -16
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +28 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/index.d.ts +3 -0
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +26 -5
- package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/Documents/shared/SignatureForm/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +10 -9
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +3 -2
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +9 -8
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +14 -13
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +3 -2
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +7 -6
- package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +7 -6
- package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.js +12 -11
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +13 -12
- package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +11 -10
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +3 -2
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
- package/dist/components/Employee/Profile/onboarding/Profile.js +12 -11
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +10 -9
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +7 -6
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +3 -2
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +3 -2
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +10 -10
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +7 -6
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -0
- package/dist/components/Employee/exports/employeeOnboarding.js +28 -22
- package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +36 -2
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/index.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +22 -2
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +8 -7
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/index.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequests.d.ts +29 -2
- package/dist/components/InformationRequests/InformationRequests.js +8 -7
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +2 -0
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
- package/dist/components/InformationRequests/index.d.ts +3 -3
- package/dist/components/InformationRequests/informationRequestsStateMachine.d.ts +2 -0
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +36 -3
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +22 -17
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +3 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +14 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -8
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +11 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -2
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +23 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +18 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +15 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +24 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +7 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +2 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -1
- package/dist/components/Payroll/Dismissal/index.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +33 -25
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +5 -0
- package/dist/components/Payroll/GrossUpModal/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +31 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +20 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +20 -0
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -0
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +24 -0
- package/dist/components/Payroll/OffCycleCreation/index.d.ts +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +16 -0
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/types.d.ts +13 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +18 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +0 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +15 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +1 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +43 -0
- package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.d.ts +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModalTypes.d.ts +5 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +0 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.d.ts +1 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +14 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +0 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.d.ts +3 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +19 -5
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +17 -11
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +0 -2
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +31 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +1 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +2 -0
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +42 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +1 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +0 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +8 -6
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +0 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +65 -0
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +38 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +27 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +25 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +1 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +33 -4
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +1 -2
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +19 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.d.ts +32 -13
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +65 -68
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +39 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +26 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +8 -12
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +0 -2
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +26 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +2 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +21 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +7 -6
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +5 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/index.d.ts +0 -1
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +5 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +5 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +21 -0
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +23 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +2 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +20 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +7 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +10 -10
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +27 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +5 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +157 -26
- package/dist/components/Payroll/helpers.js +0 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +11 -2
- package/dist/components/Payroll/payrollTypes.d.ts +24 -0
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +12 -0
- package/dist/components/Payroll/usePreparedPayrollData.js +34 -22
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.d.ts +7 -0
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +19 -0
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +3 -2
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +44 -0
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +3 -2
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +4 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +28 -2
- package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +0 -2
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +26 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +10 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +25 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +3 -2
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +22 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +14 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +31 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +23 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +10 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +42 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +26 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +15 -2
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js +1 -6
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +29 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +59 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -3
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +43 -42
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +3 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +25 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +14 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +97 -6
- package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +1 -5
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +23 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +22 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -1
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +22 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -1
- package/dist/components/TimeOff/index.d.ts +8 -2
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +48 -49
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +66 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +28 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +0 -1
- package/dist/components/TimeOff/shared/holidayHelpers.d.ts +5 -0
- package/dist/components/TimeOff/shared/holidayHelpers.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +4 -4
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +39 -39
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +42 -42
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +206 -205
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +1 -1
- package/dist/shared/constants.d.ts +12 -1
- package/dist/shared/constants.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +55 -0
- package/package.json +6 -5
- package/dist/assets/icons/feature-icon-check.svg.js +0 -10
- package/dist/assets/icons/feature-icon-check.svg.js.map +0 -1
- package/dist/components/Payroll/PayrollEditEmployee/index.d.ts +0 -4
- package/dist/components/Payroll/PayrollFlow/index.d.ts +0 -3
- package/dist/components/TimeOff/TimeOffFlow/index.d.ts +0 -3
- package/dist/components/TimeOff/shared/EmployeeTable/index.d.ts +0 -4
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-error-boundary";
|
|
4
|
+
import "react-i18next";
|
|
5
|
+
import "@tanstack/react-query";
|
|
6
|
+
import "../../../../../Base/useBase.js";
|
|
7
|
+
import "@gusto/embedded-api-v-2025-11-15/models/errors/apierror";
|
|
8
|
+
import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
|
|
9
|
+
import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
|
|
10
|
+
import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
|
|
11
|
+
import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
|
|
12
|
+
import "dompurify";
|
|
13
|
+
import "../../../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
|
+
import "../../../../../../shared/constants.js";
|
|
15
|
+
import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
1
16
|
import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
|
|
2
|
-
const [
|
|
17
|
+
const [f, v] = t("DocumentListContext");
|
|
3
18
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
19
|
+
v as DocumentListProvider,
|
|
20
|
+
f as useDocumentList
|
|
6
21
|
};
|
|
7
22
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api-v-2025-11-15/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api-v-2025-11-15/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { createMachine as
|
|
2
|
+
import { createMachine as f } from "robot3";
|
|
3
3
|
import { useMemo as l } from "react";
|
|
4
4
|
import { useEmployeesGetSuspense as g } from "@gusto/embedded-api-v-2025-11-15/react-query/employeesGet";
|
|
5
5
|
import { useEmployeeFormsListSuspense as D } from "@gusto/embedded-api-v-2025-11-15/react-query/employeeFormsList";
|
|
@@ -7,29 +7,30 @@ import { EmploymentEligibilityContextual as d, DocumentListContextual as y } fro
|
|
|
7
7
|
import { documentSignerMachine as E } from "./stateMachine.js";
|
|
8
8
|
import { Flow as S } from "../../../../Flow/Flow.js";
|
|
9
9
|
import { BaseComponent as x } from "../../../../Base/Base.js";
|
|
10
|
+
import "../../../../Base/useBase.js";
|
|
10
11
|
import { useComponentDictionary as C } from "../../../../../i18n/I18n.js";
|
|
11
12
|
import { I9_FORM_NAME as F } from "../../../../../shared/constants.js";
|
|
12
|
-
function
|
|
13
|
+
function O(o) {
|
|
13
14
|
return /* @__PURE__ */ n(x, { ...o, children: /* @__PURE__ */ n(M, { ...o }) });
|
|
14
15
|
}
|
|
15
|
-
function M({ employeeId: o, onEvent: i, dictionary: s, withEmployeeI9:
|
|
16
|
+
function M({ employeeId: o, onEvent: i, dictionary: s, withEmployeeI9: t = !1 }) {
|
|
16
17
|
C("Employee.DocumentSigner", s);
|
|
17
|
-
const { data: a } = g({ employeeId: o }), { data: c } = D({ employeeId: o }), u = a.employee?.onboardingDocumentsConfig?.i9Document === !0, m = c.forms?.find((
|
|
18
|
-
() =>
|
|
18
|
+
const { data: a } = g({ employeeId: o }), { data: c } = D({ employeeId: o }), u = a.employee?.onboardingDocumentsConfig?.i9Document === !0, m = c.forms?.find((e) => e.name === F), r = t && u && (!m || m.requiresSigning === !0), p = l(
|
|
19
|
+
() => f(
|
|
19
20
|
r ? "employmentEligibility" : "index",
|
|
20
21
|
E,
|
|
21
|
-
(
|
|
22
|
-
...
|
|
22
|
+
(e) => ({
|
|
23
|
+
...e,
|
|
23
24
|
component: r ? d : y,
|
|
24
25
|
employeeId: o,
|
|
25
|
-
withEmployeeI9:
|
|
26
|
+
withEmployeeI9: t
|
|
26
27
|
})
|
|
27
28
|
),
|
|
28
|
-
[o,
|
|
29
|
+
[o, t]
|
|
29
30
|
);
|
|
30
|
-
return /* @__PURE__ */ n(S, { machine:
|
|
31
|
+
return /* @__PURE__ */ n(S, { machine: p, onEvent: i });
|
|
31
32
|
}
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
O as DocumentSigner
|
|
34
35
|
};
|
|
35
36
|
//# sourceMappingURL=DocumentSigner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSigner.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/employeesGet'\nimport { useEmployeeFormsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/employeeFormsList'\nimport {\n DocumentListContextual,\n EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { I9_FORM_NAME } from '@/shared/constants'\n\n/**\n * Props for {@link DocumentSigner}.\n *\n * @public\n */\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n /** The associated employee identifier. */\n employeeId: string\n /** When `true`, the flow routes through I-9 employment eligibility before listing documents for signing. Defaults to `false`. */\n withEmployeeI9?: boolean\n}\n\n/**\n * Onboarding step for signing employee documents.\n *\n * @remarks\n * Lists the employee's pending forms and routes through the signing UI for each\n * one. When `withEmployeeI9` is `true` and the employee's I-9 has not been\n * signed, the flow starts on the I-9 employment eligibility step before\n * presenting the document list.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/employmentEligibility/done` | Fired after I-9 employment eligibility is captured | The updated I-9 authorization |\n * | `employee/forms/view` | Fired when a form's \"Sign\" action is selected from the document list | `{ uuid: string; name?: string }` |\n * | `employee/forms/sign` | Fired after a form is successfully signed | {@link Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `employee/forms/done` | Fired when all required forms have been signed and the parent flow can advance | — |\n * | `cancel` | Fired when the user cancels signing a form and returns to the document list | — |\n *\n * @param props - See {@link DocumentSignerProps}.\n * @returns The document signer flow.\n * @public\n */\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const { data: employeeData } = useEmployeesGetSuspense({ employeeId })\n const { data: formsData } = useEmployeeFormsListSuspense({ employeeId })\n\n const employeeHasI9Enabled = employeeData.employee?.onboardingDocumentsConfig?.i9Document === true\n\n const i9Form = formsData.forms?.find(form => form.name === I9_FORM_NAME)\n const needsI9Form =\n withEmployeeI9 && employeeHasI9Enabled && (!i9Form || i9Form.requiresSigning === true)\n\n const machine = useMemo(\n () =>\n createMachine(\n needsI9Form ? 'employmentEligibility' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: needsI9Form ? EmploymentEligibilityContextual : DocumentListContextual,\n employeeId,\n withEmployeeI9,\n }),\n ),\n [employeeId, withEmployeeI9],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","props","jsx","BaseComponent","Root","employeeId","onEvent","dictionary","withEmployeeI9","useComponentDictionary","employeeData","useEmployeesGetSuspense","formsData","useEmployeeFormsListSuspense","employeeHasI9Enabled","i9Form","form","I9_FORM_NAME","needsI9Form","machine","useMemo","createMachine","documentSignerMachine","initialContext","EmploymentEligibilityContextual","DocumentListContextual","Flow"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentSigner.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/employeesGet'\nimport { useEmployeeFormsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/employeeFormsList'\nimport {\n DocumentListContextual,\n EmploymentEligibilityContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { I9_FORM_NAME } from '@/shared/constants'\n\n/**\n * Props for {@link DocumentSigner}.\n *\n * @public\n */\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n /** The associated employee identifier. */\n employeeId: string\n /** When `true`, the flow routes through I-9 employment eligibility before listing documents for signing. Defaults to `false`. */\n withEmployeeI9?: boolean\n}\n\n/**\n * Onboarding step for signing employee documents.\n *\n * @remarks\n * Lists the employee's pending forms and routes through the signing UI for each\n * one. When `withEmployeeI9` is `true` and the employee's I-9 has not been\n * signed, the flow starts on the I-9 employment eligibility step before\n * presenting the document list.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/employmentEligibility/done` | Fired after I-9 employment eligibility is captured | The updated I-9 authorization |\n * | `employee/forms/view` | Fired when a form's \"Sign\" action is selected from the document list | `{ uuid: string; name?: string }` |\n * | `employee/forms/sign` | Fired after a form is successfully signed | {@link Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `employee/forms/done` | Fired when all required forms have been signed and the parent flow can advance | — |\n * | `cancel` | Fired when the user cancels signing a form and returns to the document list | — |\n *\n * @param props - See {@link DocumentSignerProps}.\n * @returns The document signer flow.\n * @public\n */\nexport function DocumentSigner(props: DocumentSignerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, onEvent, dictionary, withEmployeeI9 = false }: DocumentSignerProps) {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const { data: employeeData } = useEmployeesGetSuspense({ employeeId })\n const { data: formsData } = useEmployeeFormsListSuspense({ employeeId })\n\n const employeeHasI9Enabled = employeeData.employee?.onboardingDocumentsConfig?.i9Document === true\n\n const i9Form = formsData.forms?.find(form => form.name === I9_FORM_NAME)\n const needsI9Form =\n withEmployeeI9 && employeeHasI9Enabled && (!i9Form || i9Form.requiresSigning === true)\n\n const machine = useMemo(\n () =>\n createMachine(\n needsI9Form ? 'employmentEligibility' : 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: needsI9Form ? EmploymentEligibilityContextual : DocumentListContextual,\n employeeId,\n withEmployeeI9,\n }),\n ),\n [employeeId, withEmployeeI9],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","props","jsx","BaseComponent","Root","employeeId","onEvent","dictionary","withEmployeeI9","useComponentDictionary","employeeData","useEmployeesGetSuspense","formsData","useEmployeeFormsListSuspense","employeeHasI9Enabled","i9Form","form","I9_FORM_NAME","needsI9Form","machine","useMemo","createMachine","documentSignerMachine","initialContext","EmploymentEligibilityContextual","DocumentListContextual","Flow"],"mappings":";;;;;;;;;;;;AAiDO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,GAAY,gBAAAC,IAAiB,MAA8B;AAC9F,EAAAC,EAAuB,2BAA2BF,CAAU;AAE5D,QAAM,EAAE,MAAMG,EAAA,IAAiBC,EAAwB,EAAE,YAAAN,GAAY,GAC/D,EAAE,MAAMO,EAAA,IAAcC,EAA6B,EAAE,YAAAR,GAAY,GAEjES,IAAuBJ,EAAa,UAAU,2BAA2B,eAAe,IAExFK,IAASH,EAAU,OAAO,KAAK,CAAAI,MAAQA,EAAK,SAASC,CAAY,GACjEC,IACJV,KAAkBM,MAAyB,CAACC,KAAUA,EAAO,oBAAoB,KAE7EI,IAAUC;AAAA,IACd,MACEC;AAAA,MACEH,IAAc,0BAA0B;AAAA,MACxCI;AAAA,MACA,CAACC,OAAoD;AAAA,QACnD,GAAGA;AAAA,QACH,WAAWL,IAAcM,IAAkCC;AAAA,QAC3D,YAAApB;AAAA,QACA,gBAAAG;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACH,GAAYG,CAAc;AAAA,EAAA;AAG7B,SAAO,gBAAAN,EAACwB,GAAA,EAAK,SAAAP,GAAkB,SAAAb,EAAA,CAAkB;AACnD;"}
|
|
@@ -8,14 +8,14 @@ import { generateEmploymentEligibilitySchema as k } from "./EmploymentEligibilit
|
|
|
8
8
|
import { COUNTRIES as P } from "./countries.js";
|
|
9
9
|
import { Flex as b } from "../../../../../Common/Flex/Flex.js";
|
|
10
10
|
import { ActionsLayout as V } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
11
|
+
import { useComponentContext as B } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { ComboBoxField as H } from "../../../../../Common/Fields/ComboBoxField/ComboBoxField.js";
|
|
13
|
+
import { Form as K } from "../../../../../Common/Form/Form.js";
|
|
14
|
+
import { useI18n as M } from "../../../../../../i18n/I18n.js";
|
|
15
|
+
import { SelectField as G } from "../../../../../Common/Fields/SelectField/SelectField.js";
|
|
16
|
+
import { RadioGroupField as U } from "../../../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
17
|
+
import { TextInputField as W } from "../../../../../Common/Fields/TextInputField/TextInputField.js";
|
|
18
|
+
import { DatePickerField as J } from "../../../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
19
19
|
const Q = {
|
|
20
20
|
citizen: "statusDescriptions.citizen",
|
|
21
21
|
permanent_resident: "statusDescriptions.permanent_resident",
|
|
@@ -27,8 +27,8 @@ const Q = {
|
|
|
27
27
|
hasDocumentNumber: y,
|
|
28
28
|
isPending: g
|
|
29
29
|
}) => {
|
|
30
|
-
|
|
31
|
-
const { Heading: D, Text: x, Alert: E, Button: z, Link: N } =
|
|
30
|
+
M("Employee.EmploymentEligibility");
|
|
31
|
+
const { Heading: D, Text: x, Alert: E, Button: z, Link: N } = B(), { t: e } = L("Employee.EmploymentEligibility"), [m, a] = I(!!y), r = $({
|
|
32
32
|
resolver: q(k(m)),
|
|
33
33
|
defaultValues: f
|
|
34
34
|
}), { control: l, setValue: u, clearErrors: c } = r, o = d({ control: l, name: "authorizationStatus" }), s = d({ control: l, name: "documentType" }), _ = Object.values(w).map((i) => ({
|
|
@@ -45,7 +45,7 @@ const Q = {
|
|
|
45
45
|
uscis_alien_registration_number: 9,
|
|
46
46
|
form_i94: 11
|
|
47
47
|
};
|
|
48
|
-
return /* @__PURE__ */ t(j, { ...r, children: /* @__PURE__ */ t(
|
|
48
|
+
return /* @__PURE__ */ t(j, { ...r, children: /* @__PURE__ */ t(K, { onSubmit: r.handleSubmit(h), children: /* @__PURE__ */ p(b, { flexDirection: "column", gap: 16, children: [
|
|
49
49
|
/* @__PURE__ */ p(b, { flexDirection: "column", gap: 2, children: [
|
|
50
50
|
/* @__PURE__ */ t(D, { as: "h2", children: e("title") }),
|
|
51
51
|
/* @__PURE__ */ t(x, { variant: "supporting", children: /* @__PURE__ */ t(
|
|
@@ -60,7 +60,7 @@ const Q = {
|
|
|
60
60
|
) })
|
|
61
61
|
] }),
|
|
62
62
|
/* @__PURE__ */ t(
|
|
63
|
-
|
|
63
|
+
G,
|
|
64
64
|
{
|
|
65
65
|
name: "authorizationStatus",
|
|
66
66
|
label: e("select.label"),
|
|
@@ -79,9 +79,9 @@ const Q = {
|
|
|
79
79
|
disableScrollIntoView: !0
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
|
-
o === "alien" && /* @__PURE__ */ t(
|
|
82
|
+
o === "alien" && /* @__PURE__ */ t(J, { name: "expirationDate", label: e("expirationDate.label") }),
|
|
83
83
|
F && /* @__PURE__ */ t(
|
|
84
|
-
|
|
84
|
+
U,
|
|
85
85
|
{
|
|
86
86
|
name: "documentType",
|
|
87
87
|
label: e("authorizationDocument.label"),
|
|
@@ -91,7 +91,7 @@ const Q = {
|
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
93
|
R && n && /* @__PURE__ */ t(
|
|
94
|
-
|
|
94
|
+
W,
|
|
95
95
|
{
|
|
96
96
|
name: "documentNumber",
|
|
97
97
|
label: e(`documentNumber.${n}.label`),
|
|
@@ -102,7 +102,7 @@ const Q = {
|
|
|
102
102
|
}
|
|
103
103
|
),
|
|
104
104
|
s === "foreign_passport" && o === "alien" && /* @__PURE__ */ t(
|
|
105
|
-
|
|
105
|
+
H,
|
|
106
106
|
{
|
|
107
107
|
name: "country",
|
|
108
108
|
label: e("country.label"),
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import { BaseComponentInterface
|
|
2
|
-
|
|
1
|
+
import { BaseComponentInterface } from '../../../../../Base/Base';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link I9SignatureForm}.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface I9SignatureFormProps extends BaseComponentInterface {
|
|
8
|
+
/** The associated employee identifier. */
|
|
3
9
|
employeeId: string;
|
|
10
|
+
/** The identifier of the I-9 form to sign. */
|
|
4
11
|
formId: string;
|
|
5
12
|
}
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Presents the employee's I-9 form for review and signature.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Renders the I-9 PDF, surfaces the current employment-eligibility status, and
|
|
18
|
+
* collects the employee's signature along with any preparer or translator
|
|
19
|
+
* details. On successful submission the signed form is emitted.
|
|
20
|
+
*
|
|
21
|
+
* | Event | Description | Data |
|
|
22
|
+
* | ----- | ----------- | ---- |
|
|
23
|
+
* | `employee/forms/sign` | Fired after the I-9 is successfully signed | {@link Form} |
|
|
24
|
+
* | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |
|
|
25
|
+
* | `cancel` | Fired when the user cancels signing and returns to the document list | — |
|
|
26
|
+
*
|
|
27
|
+
* @param props - See {@link I9SignatureFormProps}.
|
|
28
|
+
* @returns The employee I-9 signature form.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare function I9SignatureForm(props: I9SignatureFormProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I9SignatureForm.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport type { AuthorizationStatus } from '@gusto/embedded-api-v-2025-11-15/models/components/i9authorization'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api-v-2025-11-15/react-query/i9VerificationGetAuthorization'\nimport { useSignEmployeeForm, type PreparerFieldGroup } from '../../../shared/useSignEmployeeForm'\nimport styles from './I9SignatureForm.module.scss'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { Form } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface I9SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\n/** @internal */\nexport function I9SignatureForm(props: I9SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className }: I9SignatureFormProps) {\n useI18n('Employee.I9SignatureForm')\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useSignEmployeeForm({ employeeId, formId })\n\n const { data: i9AuthData } = useI9VerificationGetAuthorization({ employeeId })\n const authorizationStatus = i9AuthData?.i9Authorization?.authorizationStatus\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { form, pdfUrl } = hookResult.data\n const { isPending } = hookResult.status\n const { Fields, preparers } = hookResult.form\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleChangeEligibility = () => {\n onEvent(componentEvents.EMPLOYEE_CHANGE_ELIGIBILITY_STATUS)\n }\n\n const handleSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, result.data)\n }\n }\n\n const preparerFieldGroups = [\n Fields.Preparer1,\n Fields.Preparer2,\n Fields.Preparer3,\n Fields.Preparer4,\n ].filter(Group => Group !== undefined)\n\n return (\n <section className={className}>\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={20}>\n <section>\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey=\"description\"\n t={t}\n components={{\n viewFormLink: pdfUrl ? (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ) : (\n <span />\n ),\n }}\n />\n </Components.Text>\n </section>\n\n {authorizationStatus && (\n <EligibilityStatusAlert\n authorizationStatus={authorizationStatus}\n onChangeStatus={handleChangeEligibility}\n />\n )}\n\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n\n <Flex flexDirection=\"column\" gap={12}>\n <Fields.Signature\n label={t('signatureLabel')}\n description={t('signatureDescription')}\n validationMessages={{ REQUIRED: t('signatureError') }}\n />\n <Fields.ConfirmSignature\n label={t('confirmationLabel')}\n validationMessages={{ REQUIRED: t('confirmationError') }}\n />\n </Flex>\n\n {Fields.UsedPreparer && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.UsedPreparer\n label={t('preparerQuestion')}\n validationMessages={{ REQUIRED: t('preparerQuestionError') }}\n />\n\n {preparerFieldGroups.map((PreparerFields, index) => {\n const isLast = index === preparerFieldGroups.length - 1\n return (\n <Flex flexDirection=\"column\" gap={0} key={index}>\n <div className={styles.preparerAlert}>\n <Components.Alert\n label={t('preparerNote')}\n status=\"info\"\n disableScrollIntoView\n />\n </div>\n <PreparerSection\n PreparerFields={PreparerFields}\n showAddButton={isLast && (preparers?.canAdd ?? false)}\n showRemoveButton={\n isLast &&\n (preparers?.canRemove ?? false) &&\n preparerFieldGroups.length > 1\n }\n onAdd={() => hookResult.actions.addPreparer?.()}\n onRemove={() => hookResult.actions.removePreparer?.()}\n />\n </Flex>\n )\n })}\n </Flex>\n )}\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('signCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n\ninterface EligibilityStatusAlertProps {\n authorizationStatus: AuthorizationStatus\n onChangeStatus: () => void\n}\n\nfunction EligibilityStatusAlert({\n authorizationStatus,\n onChangeStatus,\n}: EligibilityStatusAlertProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const Components = useComponentContext()\n\n const alertLabelKeys = {\n citizen: 'eligibilityAlertLabel_citizen',\n permanent_resident: 'eligibilityAlertLabel_permanent_resident',\n noncitizen: 'eligibilityAlertLabel_noncitizen',\n alien: 'eligibilityAlertLabel_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n const alertDescriptionKeys = {\n citizen: 'eligibilityAlertDescription_citizen',\n permanent_resident: 'eligibilityAlertDescription_permanent_resident',\n noncitizen: 'eligibilityAlertDescription_noncitizen',\n alien: 'eligibilityAlertDescription_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n return (\n <Components.Alert\n status=\"info\"\n label={t(alertLabelKeys[authorizationStatus])}\n disableScrollIntoView\n >\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Text>{t(alertDescriptionKeys[authorizationStatus])}</Components.Text>\n <div>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onChangeStatus}>\n {t('eligibilityAlertChangeStatusCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )\n}\n\ninterface PreparerSectionProps {\n PreparerFields: PreparerFieldGroup\n showRemoveButton: boolean\n showAddButton: boolean\n onAdd: () => void\n onRemove: () => void\n}\n\nfunction PreparerSection({\n PreparerFields,\n showRemoveButton,\n showAddButton,\n onAdd,\n onRemove,\n}: PreparerSectionProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <Components.Heading as=\"h3\">{t('preparerSectionTitle')}</Components.Heading>\n\n <PreparerFields.FirstName\n label={t('preparerFirstNameLabel')}\n validationMessages={{ REQUIRED: t('preparerFirstNameError') }}\n />\n <PreparerFields.LastName\n label={t('preparerLastNameLabel')}\n validationMessages={{ REQUIRED: t('preparerLastNameError') }}\n />\n <PreparerFields.Street1\n label={t('preparerStreet1Label')}\n validationMessages={{ REQUIRED: t('preparerStreet1Error') }}\n />\n <PreparerFields.Street2 label={t('preparerStreet2Label')} />\n <PreparerFields.City\n label={t('preparerCityLabel')}\n validationMessages={{ REQUIRED: t('preparerCityError') }}\n />\n <PreparerFields.State\n label={t('preparerStateLabel')}\n placeholder={t('preparerStatePlaceholder')}\n validationMessages={{ REQUIRED: t('preparerStateError') }}\n getOptionLabel={(abbr: string) => tCommon(`statesHash.${abbr}`, { defaultValue: abbr })}\n />\n <PreparerFields.Zip\n label={t('preparerZipLabel')}\n validationMessages={{ REQUIRED: t('preparerZipError') }}\n />\n <PreparerFields.Signature\n label={t('preparerSignatureLabel')}\n description={t('preparerSignatureDescription')}\n validationMessages={{ REQUIRED: t('preparerSignatureError') }}\n />\n <PreparerFields.ConfirmSignature\n label={t('preparerConfirmationLabel')}\n validationMessages={{ REQUIRED: t('preparerConfirmationError') }}\n />\n\n {(showAddButton || showRemoveButton) && (\n <div className={styles.preparerActions}>\n {showAddButton && (\n <Components.Button type=\"button\" variant=\"secondary\" onClick={onAdd}>\n {t('addPreparerCta')}\n </Components.Button>\n )}\n {showRemoveButton && (\n <Components.Button type=\"button\" variant=\"error\" onClick={onRemove}>\n {t('removePreparerCta')}\n </Components.Button>\n )}\n </div>\n )}\n </Flex>\n )\n}\n"],"names":["I9SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","useI18n","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useSignEmployeeForm","i9AuthData","useI9VerificationGetAuthorization","authorizationStatus","BaseLayout","form","pdfUrl","isPending","Fields","preparers","handleBack","componentEvents","handleChangeEligibility","handleSubmit","result","preparerFieldGroups","Group","SDKFormProvider","Form","jsxs","Flex","Trans","EligibilityStatusAlert","DocumentViewer","PreparerFields","index","isLast","styles","PreparerSection","ActionsLayout","onChangeStatus","t","alertLabelKeys","alertDescriptionKeys","showRemoveButton","showAddButton","onAdd","onRemove","tCommon","abbr"],"mappings":";;;;;;;;;;;;;;;;AA0BO,SAASA,GAAgBC,GAAsD;AACpF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,KA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3B,oBAAoB,EAAE,UAAUA,EAAE,kBAAkB,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,IAExD,gBAAA5C;AAAA,MAACqC,EAAe;AAAA,MAAf;AAAA,QACC,OAAOO,EAAE,wBAAwB;AAAA,QACjC,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,oBAAoB,EAAE,UAAUA,EAAE,wBAAwB,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,IAE9D,gBAAA5C;AAAA,MAACqC,EAAe;AAAA,MAAf;AAAA,QACC,OAAOO,EAAE,2BAA2B;AAAA,QACpC,oBAAoB,EAAE,UAAUA,EAAE,2BAA2B,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,KAG/DI,KAAiBD,MACjB,gBAAAf,EAAC,OAAA,EAAI,WAAWQ,EAAO,iBACpB,UAAA;AAAA,MAAAQ,KACC,gBAAAhD,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,aAAY,SAASuC,GAC3D,UAAAL,EAAE,gBAAgB,EAAA,CACrB;AAAA,MAEDG,KACC,gBAAA/C,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,SAAQ,SAASwC,GACvD,UAAAN,EAAE,mBAAmB,EAAA,CACxB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"I9SignatureForm.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport type { AuthorizationStatus } from '@gusto/embedded-api-v-2025-11-15/models/components/i9authorization'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api-v-2025-11-15/react-query/i9VerificationGetAuthorization'\nimport { useSignEmployeeForm, type PreparerFieldGroup } from '../../../shared/useSignEmployeeForm'\nimport styles from './I9SignatureForm.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { Form } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Props for {@link I9SignatureForm}.\n *\n * @public\n */\nexport interface I9SignatureFormProps extends BaseComponentInterface {\n /** The associated employee identifier. */\n employeeId: string\n /** The identifier of the I-9 form to sign. */\n formId: string\n}\n\n/**\n * Presents the employee's I-9 form for review and signature.\n *\n * @remarks\n * Renders the I-9 PDF, surfaces the current employment-eligibility status, and\n * collects the employee's signature along with any preparer or translator\n * details. On successful submission the signed form is emitted.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/forms/sign` | Fired after the I-9 is successfully signed | {@link Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `cancel` | Fired when the user cancels signing and returns to the document list | — |\n *\n * @param props - See {@link I9SignatureFormProps}.\n * @returns The employee I-9 signature form.\n * @public\n */\nexport function I9SignatureForm(props: I9SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className }: I9SignatureFormProps) {\n useI18n('Employee.I9SignatureForm')\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useSignEmployeeForm({ employeeId, formId })\n\n const { data: i9AuthData } = useI9VerificationGetAuthorization({ employeeId })\n const authorizationStatus = i9AuthData?.i9Authorization?.authorizationStatus\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { form, pdfUrl } = hookResult.data\n const { isPending } = hookResult.status\n const { Fields, preparers } = hookResult.form\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleChangeEligibility = () => {\n onEvent(componentEvents.EMPLOYEE_CHANGE_ELIGIBILITY_STATUS)\n }\n\n const handleSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, result.data)\n }\n }\n\n const preparerFieldGroups = [\n Fields.Preparer1,\n Fields.Preparer2,\n Fields.Preparer3,\n Fields.Preparer4,\n ].filter(Group => Group !== undefined)\n\n return (\n <section className={className}>\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={20}>\n <section>\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey=\"description\"\n t={t}\n components={{\n viewFormLink: pdfUrl ? (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ) : (\n <span />\n ),\n }}\n />\n </Components.Text>\n </section>\n\n {authorizationStatus && (\n <EligibilityStatusAlert\n authorizationStatus={authorizationStatus}\n onChangeStatus={handleChangeEligibility}\n />\n )}\n\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n\n <Flex flexDirection=\"column\" gap={12}>\n <Fields.Signature\n label={t('signatureLabel')}\n description={t('signatureDescription')}\n validationMessages={{ REQUIRED: t('signatureError') }}\n />\n <Fields.ConfirmSignature\n label={t('confirmationLabel')}\n validationMessages={{ REQUIRED: t('confirmationError') }}\n />\n </Flex>\n\n {Fields.UsedPreparer && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.UsedPreparer\n label={t('preparerQuestion')}\n validationMessages={{ REQUIRED: t('preparerQuestionError') }}\n />\n\n {preparerFieldGroups.map((PreparerFields, index) => {\n const isLast = index === preparerFieldGroups.length - 1\n return (\n <Flex flexDirection=\"column\" gap={0} key={index}>\n <div className={styles.preparerAlert}>\n <Components.Alert\n label={t('preparerNote')}\n status=\"info\"\n disableScrollIntoView\n />\n </div>\n <PreparerSection\n PreparerFields={PreparerFields}\n showAddButton={isLast && (preparers?.canAdd ?? false)}\n showRemoveButton={\n isLast &&\n (preparers?.canRemove ?? false) &&\n preparerFieldGroups.length > 1\n }\n onAdd={() => hookResult.actions.addPreparer?.()}\n onRemove={() => hookResult.actions.removePreparer?.()}\n />\n </Flex>\n )\n })}\n </Flex>\n )}\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('signCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n\ninterface EligibilityStatusAlertProps {\n authorizationStatus: AuthorizationStatus\n onChangeStatus: () => void\n}\n\nfunction EligibilityStatusAlert({\n authorizationStatus,\n onChangeStatus,\n}: EligibilityStatusAlertProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const Components = useComponentContext()\n\n const alertLabelKeys = {\n citizen: 'eligibilityAlertLabel_citizen',\n permanent_resident: 'eligibilityAlertLabel_permanent_resident',\n noncitizen: 'eligibilityAlertLabel_noncitizen',\n alien: 'eligibilityAlertLabel_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n const alertDescriptionKeys = {\n citizen: 'eligibilityAlertDescription_citizen',\n permanent_resident: 'eligibilityAlertDescription_permanent_resident',\n noncitizen: 'eligibilityAlertDescription_noncitizen',\n alien: 'eligibilityAlertDescription_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n return (\n <Components.Alert\n status=\"info\"\n label={t(alertLabelKeys[authorizationStatus])}\n disableScrollIntoView\n >\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Text>{t(alertDescriptionKeys[authorizationStatus])}</Components.Text>\n <div>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onChangeStatus}>\n {t('eligibilityAlertChangeStatusCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )\n}\n\ninterface PreparerSectionProps {\n PreparerFields: PreparerFieldGroup\n showRemoveButton: boolean\n showAddButton: boolean\n onAdd: () => void\n onRemove: () => void\n}\n\nfunction PreparerSection({\n PreparerFields,\n showRemoveButton,\n showAddButton,\n onAdd,\n onRemove,\n}: PreparerSectionProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <Components.Heading as=\"h3\">{t('preparerSectionTitle')}</Components.Heading>\n\n <PreparerFields.FirstName\n label={t('preparerFirstNameLabel')}\n validationMessages={{ REQUIRED: t('preparerFirstNameError') }}\n />\n <PreparerFields.LastName\n label={t('preparerLastNameLabel')}\n validationMessages={{ REQUIRED: t('preparerLastNameError') }}\n />\n <PreparerFields.Street1\n label={t('preparerStreet1Label')}\n validationMessages={{ REQUIRED: t('preparerStreet1Error') }}\n />\n <PreparerFields.Street2 label={t('preparerStreet2Label')} />\n <PreparerFields.City\n label={t('preparerCityLabel')}\n validationMessages={{ REQUIRED: t('preparerCityError') }}\n />\n <PreparerFields.State\n label={t('preparerStateLabel')}\n placeholder={t('preparerStatePlaceholder')}\n validationMessages={{ REQUIRED: t('preparerStateError') }}\n getOptionLabel={(abbr: string) => tCommon(`statesHash.${abbr}`, { defaultValue: abbr })}\n />\n <PreparerFields.Zip\n label={t('preparerZipLabel')}\n validationMessages={{ REQUIRED: t('preparerZipError') }}\n />\n <PreparerFields.Signature\n label={t('preparerSignatureLabel')}\n description={t('preparerSignatureDescription')}\n validationMessages={{ REQUIRED: t('preparerSignatureError') }}\n />\n <PreparerFields.ConfirmSignature\n label={t('preparerConfirmationLabel')}\n validationMessages={{ REQUIRED: t('preparerConfirmationError') }}\n />\n\n {(showAddButton || showRemoveButton) && (\n <div className={styles.preparerActions}>\n {showAddButton && (\n <Components.Button type=\"button\" variant=\"secondary\" onClick={onAdd}>\n {t('addPreparerCta')}\n </Components.Button>\n )}\n {showRemoveButton && (\n <Components.Button type=\"button\" variant=\"error\" onClick={onRemove}>\n {t('removePreparerCta')}\n </Components.Button>\n )}\n </div>\n )}\n </Flex>\n )\n}\n"],"names":["I9SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","useI18n","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useSignEmployeeForm","i9AuthData","useI9VerificationGetAuthorization","authorizationStatus","BaseLayout","form","pdfUrl","isPending","Fields","preparers","handleBack","componentEvents","handleChangeEligibility","handleSubmit","result","preparerFieldGroups","Group","SDKFormProvider","Form","jsxs","Flex","Trans","EligibilityStatusAlert","DocumentViewer","PreparerFields","index","isLast","styles","PreparerSection","ActionsLayout","onChangeStatus","t","alertLabelKeys","alertDescriptionKeys","showRemoveButton","showAddButton","onAdd","onRemove","tCommon","abbr"],"mappings":";;;;;;;;;;;;;;;;AA8CO,SAASA,GAAgBC,GAA6B;AAC3D,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,KAAmC;AACrE,EAAAC,EAAQ,0BAA0B;AAClC,QAAM,EAAE,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEbC,IAAaC,EAAoB,EAAE,YAAAV,GAAY,QAAAC,GAAQ,GAEvD,EAAE,MAAMU,EAAA,IAAeC,EAAkC,EAAE,YAAAZ,GAAY,GACvEa,IAAsBF,GAAY,iBAAiB;AAEzD,MAAIF,EAAW;AACb,6BAAQK,GAAA,EAAW,WAAS,IAAC,OAAOL,EAAW,cAAc,QAAQ;AA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AoB,EAAE,UAAUA,EAAE,2BAA2B,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,KAG/DI,KAAiBD,MACjB,gBAAAf,EAAC,OAAA,EAAI,WAAWQ,EAAO,iBACpB,UAAA;AAAA,MAAAQ,KACC,gBAAAhD,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,aAAY,SAASuC,GAC3D,UAAAL,EAAE,gBAAgB,EAAA,CACrB;AAAA,MAEDG,KACC,gBAAA/C,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,SAAQ,SAASwC,GACvD,UAAAN,EAAE,mBAAmB,EAAA,CACxB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
-
import { BaseComponentInterface
|
|
2
|
-
|
|
1
|
+
import { BaseComponentInterface } from '../../../../Base/Base';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link SignatureForm}.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface SignatureFormProps extends BaseComponentInterface {
|
|
8
|
+
/** The associated employee identifier. */
|
|
3
9
|
employeeId: string;
|
|
10
|
+
/** The identifier of the form to sign. */
|
|
4
11
|
formId: string;
|
|
5
12
|
}
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Presents a single employee document for review and signature.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Renders the form's PDF and collects the employee's signature. On successful
|
|
18
|
+
* submission the signed form is emitted; cancelling returns to the document list.
|
|
19
|
+
*
|
|
20
|
+
* | Event | Description | Data |
|
|
21
|
+
* | ----- | ----------- | ---- |
|
|
22
|
+
* | `employee/forms/sign` | Fired after the form is successfully signed | {@link Form} |
|
|
23
|
+
* | `cancel` | Fired when the user cancels signing and returns to the document list | — |
|
|
24
|
+
*
|
|
25
|
+
* @param props - See {@link SignatureFormProps}.
|
|
26
|
+
* @returns The employee signature form.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare function SignatureForm(props: SignatureFormProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../../src/components/Employee/Documents/shared/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport { useSignEmployeeForm } from '../useSignEmployeeForm'\nimport {
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../../src/components/Employee/Documents/shared/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport { useSignEmployeeForm } from '../useSignEmployeeForm'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Props for {@link SignatureForm}.\n *\n * @public\n */\nexport interface SignatureFormProps extends BaseComponentInterface {\n /** The associated employee identifier. */\n employeeId: string\n /** The identifier of the form to sign. */\n formId: string\n}\n\n/**\n * Presents a single employee document for review and signature.\n *\n * @remarks\n * Renders the form's PDF and collects the employee's signature. On successful\n * submission the signed form is emitted; cancelling returns to the document list.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/forms/sign` | Fired after the form is successfully signed | {@link Form} |\n * | `cancel` | Fired when the user cancels signing and returns to the document list | — |\n *\n * @param props - See {@link SignatureFormProps}.\n * @returns The employee signature form.\n * @public\n */\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { t } = useTranslation('Employee.DocumentSigner')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useSignEmployeeForm({ employeeId, formId })\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { form, pdfUrl } = hookResult.data\n const { isPending } = hookResult.status\n const { Fields } = hookResult.form\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, result.data)\n }\n }\n\n return (\n <section className={className}>\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <section>\n <Components.Heading as=\"h2\">\n {t('signatureFormTitle', { formTitle: form.title })}\n </Components.Heading>\n {pdfUrl && (\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"downloadPrompt\"\n values={{ description: form.description }}\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n </section>\n\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadAndReviewInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n\n <Flex flexDirection=\"column\" gap={12}>\n <Fields.Signature\n label={t('signatureFieldLabel')}\n description={t('signatureFieldDescription')}\n validationMessages={{ REQUIRED: t('signatureFieldError') }}\n />\n <Fields.ConfirmSignature\n label={t('confirmSignatureCheckboxLabel')}\n validationMessages={{ REQUIRED: t('confirmSignatureError') }}\n />\n </Flex>\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('backCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('signFormCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","useI18n","t","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useSignEmployeeForm","BaseLayout","form","pdfUrl","isPending","Fields","handleBack","componentEvents","handleSubmit","result","SDKFormProvider","Form","jsxs","Flex","Trans","DocumentViewer","ActionsLayout"],"mappings":";;;;;;;;;;;;;;AAyCO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,KAAiC;AACnE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEbC,IAAaC,EAAoB,EAAE,YAAAX,GAAY,QAAAC,GAAQ;AAE7D,MAAIS,EAAW;AACb,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAW,cAAc,QAAQ;AAGvE,QAAM,EAAE,MAAAG,GAAM,QAAAC,EAAA,IAAWJ,EAAW,MAC9B,EAAE,WAAAK,MAAcL,EAAW,QAC3B,EAAE,QAAAM,MAAWN,EAAW,MAExBO,IAAa,MAAM;AACvB,IAAAX,EAAQY,EAAgB,MAAM;AAAA,EAChC,GAEMC,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMV,EAAW,QAAQ,SAAA;AACxC,IAAIU,KACFd,EAAQY,EAAgB,oBAAoBE,EAAO,IAAI;AAAA,EAE3D;AAEA,SACE,gBAAAvB,EAAC,aAAQ,WAAAK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AAE,UAAUA,EAAE,qBAAqB,EAAA;AAAA,QAAE;AAAA,MAAA;AAAA,MAE3D,gBAAAP;AAAA,QAACmB,EAAO;AAAA,QAAP;AAAA,UACC,OAAOZ,EAAE,+BAA+B;AAAA,UACxC,oBAAoB,EAAE,UAAUA,EAAE,uBAAuB,EAAA;AAAA,QAAE;AAAA,MAAA;AAAA,IAC7D,GACF;AAAA,sBAECuB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAA9B,EAACW,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASS,GAC3D,UAAAb,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAP,EAACW,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWO,GACzC,UAAAX,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { createMachine as
|
|
2
|
+
import { createMachine as n } from "robot3";
|
|
3
3
|
import { useMemo as t } from "react";
|
|
4
4
|
import { FederalTaxesCardContextual as i } from "./FederalTaxesComponents.js";
|
|
5
5
|
import { federalTaxesStateMachine as s } from "./federalTaxesStateMachine.js";
|
|
6
6
|
import { Flow as l } from "../../../Flow/Flow.js";
|
|
7
|
-
import { BaseBoundaries as
|
|
8
|
-
import
|
|
7
|
+
import { BaseBoundaries as p } from "../../../Base/Base.js";
|
|
8
|
+
import "../../../Base/useBase.js";
|
|
9
|
+
import { useComponentDictionary as c, useI18n as f } from "../../../../i18n/I18n.js";
|
|
9
10
|
function u({ employeeId: e, onEvent: r }) {
|
|
10
11
|
f("Employee.Management.FederalTaxes");
|
|
11
12
|
const o = t(
|
|
12
|
-
() =>
|
|
13
|
-
...
|
|
13
|
+
() => n("card", s, (m) => ({
|
|
14
|
+
...m,
|
|
14
15
|
component: i,
|
|
15
16
|
employeeId: e,
|
|
16
17
|
successAlert: null
|
|
@@ -19,13 +20,13 @@ function u({ employeeId: e, onEvent: r }) {
|
|
|
19
20
|
);
|
|
20
21
|
return /* @__PURE__ */ a(l, { machine: o, onEvent: r });
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function E({
|
|
23
24
|
dictionary: e,
|
|
24
25
|
FallbackComponent: r,
|
|
25
26
|
...o
|
|
26
27
|
}) {
|
|
27
|
-
return
|
|
28
|
-
|
|
28
|
+
return c("Employee.Management.FederalTaxes", e), /* @__PURE__ */ a(
|
|
29
|
+
p,
|
|
29
30
|
{
|
|
30
31
|
componentName: "Employee.Management.FederalTaxes",
|
|
31
32
|
FallbackComponent: r,
|
|
@@ -34,6 +35,6 @@ function C({
|
|
|
34
35
|
);
|
|
35
36
|
}
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
E as FederalTaxes
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=FederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxes.js","sources":["../../../../../src/components/Employee/FederalTaxes/management/FederalTaxes.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n FederalTaxesCardContextual,\n type FederalTaxesContextInterface,\n} from './FederalTaxesComponents'\nimport { federalTaxesStateMachine } from './federalTaxesStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport {\n BaseBoundaries,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { useI18n } from '@/i18n'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n/**\n * Props for {@link FederalTaxes}.\n *\n * @public\n */\nexport interface FederalTaxesProps extends CommonComponentInterface<'Employee.Management.FederalTaxes'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the block emits an event. See the events table on {@link FederalTaxes} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\nfunction FederalTaxesFlow({ employeeId, onEvent }: FederalTaxesProps) {\n useI18n('Employee.Management.FederalTaxes')\n\n const machine = useMemo(\n () =>\n createMachine('card', federalTaxesStateMachine, (ctx: FederalTaxesContextInterface) => ({\n ...ctx,\n component: FederalTaxesCardContextual,\n employeeId,\n successAlert: null,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n\n/**\n * Self-contained block for viewing and editing an employee's federal tax (W-4) withholdings — the same experience the dashboard surfaces, but as a drop-in component that doesn't require the surrounding dashboard chrome.\n *\n * @remarks\n * Renders a read-only card showing filing status, multiple-jobs flag, dependents, other income, deductions, and extra withholding, with an Edit CTA that swaps to the edit form. Submitting the form returns to the card; cancelling returns without saving. Wraps everything in error and suspense boundaries.\n *\n * The card and form surfaces ({@link FederalTaxesCard}, {@link FederalTaxesEditForm}) are also exported individually for cases where that orchestration is the wrong fit — for example, when the form needs to render in a modal or drawer, when the card needs to appear read-only with no edit affordance, or when the swap is driven by a router. Using them directly means owning the swap and any cross-component state yourself.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/federalTaxes/card/editRequested` | Fired when the card's Edit CTA is clicked; the block opens the edit form | `{ employeeId: string }` |\n * | `employee/management/federalTaxes/editForm/submitted` | Fired after the edit form is saved; the block returns to the card view | The updated `EmployeeFederalTax` entity |\n * | `employee/management/federalTaxes/editForm/cancelled` | Fired when the user cancels the edit form; the block returns to the card view | — |\n * | `employee/management/federalTaxes/alertDismissed` | Fired when the user dismisses an alert above the card | `null` |\n *\n * @param props - See {@link FederalTaxesProps}.\n * @returns The rendered federal taxes block.\n * @public\n * @group Block Components\n */\nexport function FederalTaxes({\n dictionary,\n FallbackComponent,\n ...props\n}: FederalTaxesProps & BaseComponentInterface<'Employee.Management.FederalTaxes'>) {\n useComponentDictionary('Employee.Management.FederalTaxes', dictionary)\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.FederalTaxes\"\n FallbackComponent={FallbackComponent}\n >\n <FederalTaxesFlow {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["FederalTaxesFlow","employeeId","onEvent","useI18n","machine","useMemo","createMachine","federalTaxesStateMachine","ctx","FederalTaxesCardContextual","jsx","Flow","FederalTaxes","dictionary","FallbackComponent","props","useComponentDictionary","BaseBoundaries"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FederalTaxes.js","sources":["../../../../../src/components/Employee/FederalTaxes/management/FederalTaxes.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n FederalTaxesCardContextual,\n type FederalTaxesContextInterface,\n} from './FederalTaxesComponents'\nimport { federalTaxesStateMachine } from './federalTaxesStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport {\n BaseBoundaries,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { useI18n } from '@/i18n'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n/**\n * Props for {@link FederalTaxes}.\n *\n * @public\n */\nexport interface FederalTaxesProps extends CommonComponentInterface<'Employee.Management.FederalTaxes'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the block emits an event. See the events table on {@link FederalTaxes} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\nfunction FederalTaxesFlow({ employeeId, onEvent }: FederalTaxesProps) {\n useI18n('Employee.Management.FederalTaxes')\n\n const machine = useMemo(\n () =>\n createMachine('card', federalTaxesStateMachine, (ctx: FederalTaxesContextInterface) => ({\n ...ctx,\n component: FederalTaxesCardContextual,\n employeeId,\n successAlert: null,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n\n/**\n * Self-contained block for viewing and editing an employee's federal tax (W-4) withholdings — the same experience the dashboard surfaces, but as a drop-in component that doesn't require the surrounding dashboard chrome.\n *\n * @remarks\n * Renders a read-only card showing filing status, multiple-jobs flag, dependents, other income, deductions, and extra withholding, with an Edit CTA that swaps to the edit form. Submitting the form returns to the card; cancelling returns without saving. Wraps everything in error and suspense boundaries.\n *\n * The card and form surfaces ({@link FederalTaxesCard}, {@link FederalTaxesEditForm}) are also exported individually for cases where that orchestration is the wrong fit — for example, when the form needs to render in a modal or drawer, when the card needs to appear read-only with no edit affordance, or when the swap is driven by a router. Using them directly means owning the swap and any cross-component state yourself.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/federalTaxes/card/editRequested` | Fired when the card's Edit CTA is clicked; the block opens the edit form | `{ employeeId: string }` |\n * | `employee/management/federalTaxes/editForm/submitted` | Fired after the edit form is saved; the block returns to the card view | The updated `EmployeeFederalTax` entity |\n * | `employee/management/federalTaxes/editForm/cancelled` | Fired when the user cancels the edit form; the block returns to the card view | — |\n * | `employee/management/federalTaxes/alertDismissed` | Fired when the user dismisses an alert above the card | `null` |\n *\n * @param props - See {@link FederalTaxesProps}.\n * @returns The rendered federal taxes block.\n * @public\n * @group Block Components\n */\nexport function FederalTaxes({\n dictionary,\n FallbackComponent,\n ...props\n}: FederalTaxesProps & BaseComponentInterface<'Employee.Management.FederalTaxes'>) {\n useComponentDictionary('Employee.Management.FederalTaxes', dictionary)\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.FederalTaxes\"\n FallbackComponent={FallbackComponent}\n >\n <FederalTaxesFlow {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["FederalTaxesFlow","employeeId","onEvent","useI18n","machine","useMemo","createMachine","federalTaxesStateMachine","ctx","FederalTaxesCardContextual","jsx","Flow","FederalTaxes","dictionary","FallbackComponent","props","useComponentDictionary","BaseBoundaries"],"mappings":";;;;;;;;;AA8BA,SAASA,EAAiB,EAAE,YAAAC,GAAY,SAAAC,KAA8B;AACpE,EAAAC,EAAQ,kCAAkC;AAE1C,QAAMC,IAAUC;AAAA,IACd,MACEC,EAAc,QAAQC,GAA0B,CAACC,OAAuC;AAAA,MACtF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,MACA,cAAc;AAAA,IAAA,EACd;AAAA,IACJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAAAP,GAAkB,SAAAF,EAAA,CAAkB;AACnD;AAsBO,SAASU,EAAa;AAAA,EAC3B,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,GAAGC;AACL,GAAmF;AACjF,SAAAC,EAAuB,oCAAoCH,CAAU,GAEnE,gBAAAH;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAH;AAAA,MAEA,UAAA,gBAAAJ,EAACV,GAAA,EAAkB,GAAGe,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
|
|
@@ -4,12 +4,13 @@ import { FederalTaxesView as f } from "../shared/FederalTaxesView.js";
|
|
|
4
4
|
import { useFederalTaxesForm as x } from "../shared/useFederalTaxesForm/useFederalTaxesForm.js";
|
|
5
5
|
import { useManagementFederalTaxesViewDictionary as M } from "./useViewDictionary.js";
|
|
6
6
|
import { BaseBoundaries as y, BaseLayout as _ } from "../../../Base/Base.js";
|
|
7
|
+
import "../../../Base/useBase.js";
|
|
7
8
|
import { ActionsLayout as g } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
8
9
|
import { useComponentContext as A } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
10
|
import "react";
|
|
10
11
|
import { useI18n as L, useComponentDictionary as C } from "../../../../i18n/I18n.js";
|
|
11
12
|
import { componentEvents as m } from "../../../../shared/constants.js";
|
|
12
|
-
function
|
|
13
|
+
function G({
|
|
13
14
|
FallbackComponent: t,
|
|
14
15
|
...n
|
|
15
16
|
}) {
|
|
@@ -62,6 +63,6 @@ function h({
|
|
|
62
63
|
);
|
|
63
64
|
}
|
|
64
65
|
export {
|
|
65
|
-
|
|
66
|
+
G as FederalTaxesEditForm
|
|
66
67
|
};
|
|
67
68
|
//# sourceMappingURL=FederalTaxesEditForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxesEditForm.js","sources":["../../../../../src/components/Employee/FederalTaxes/management/FederalTaxesEditForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { FederalTaxesView } from '../shared/FederalTaxesView'\nimport {\n useFederalTaxesForm,\n type UseFederalTaxesFormProps,\n type FederalTaxesFormData,\n} from '../shared/useFederalTaxesForm'\nimport { useManagementFederalTaxesViewDictionary } from './useViewDictionary'\nimport {\n BaseBoundaries,\n BaseLayout,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { ActionsLayout } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Props for {@link FederalTaxesEditForm}.\n *\n * @public\n */\nexport interface FederalTaxesEditFormProps extends CommonComponentInterface<'Employee.Management.FederalTaxes'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Pre-fill form values. Server data takes precedence when the employee already has values on file. */\n defaultValues?: Partial<FederalTaxesFormData>\n /** Callback invoked when the form emits an event. See the events table on {@link FederalTaxesEditForm} for the available event types and payloads. */\n onEvent: BaseComponentInterface['onEvent']\n}\n\n/**\n * Standalone form for editing an employee's federal tax (W-4) withholdings — filing status, multiple-jobs flag, dependents, other income, deductions, and extra withholding.\n *\n * @remarks\n * Pair with {@link FederalTaxesCard} to route its `employee/management/federalTaxes/card/editRequested` event to this form. {@link FederalTaxes} bundles the card, this form, and the swap wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit (for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/federalTaxes/editForm/submitted` | Fired after the form is saved; use it to return to the card | The updated `EmployeeFederalTax` entity |\n * | `employee/management/federalTaxes/editForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link FederalTaxesEditFormProps}.\n * @returns The rendered federal taxes edit form.\n * @public\n * @group Block Components\n */\nexport function FederalTaxesEditForm({\n FallbackComponent,\n ...props\n}: FederalTaxesEditFormProps & Pick<BaseComponentInterface, 'FallbackComponent'>) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.FederalTaxes\"\n FallbackComponent={FallbackComponent}\n >\n <FederalTaxesEditFormRoot {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction FederalTaxesEditFormRoot({\n employeeId,\n className,\n children,\n dictionary,\n defaultValues,\n onEvent,\n}: FederalTaxesEditFormProps) {\n useI18n('Employee.Management.FederalTaxes')\n useComponentDictionary('Employee.Management.FederalTaxes', dictionary)\n const { t } = useTranslation('Employee.Management.FederalTaxes')\n const Components = useComponentContext()\n const viewDictionary = useManagementFederalTaxesViewDictionary()\n\n const federalTaxes = useFederalTaxesForm({\n employeeId,\n defaultValues,\n optionalFieldsToRequire: {\n update: ['twoJobs', 'dependentsAmount', 'otherIncome', 'deductions', 'extraWithholding'],\n },\n } satisfies UseFederalTaxesFormProps)\n\n if (federalTaxes.isLoading) {\n return <BaseLayout isLoading error={federalTaxes.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await federalTaxes.actions.onSubmit()\n if (!result) return\n\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_SUBMITTED, result.data)\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_CANCELLED)\n }\n\n return (\n <FederalTaxesView\n federalTaxes={federalTaxes}\n onSubmit={handleSubmit}\n actions={\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={federalTaxes.status.isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n }\n className={className}\n dictionary={viewDictionary}\n >\n {children}\n </FederalTaxesView>\n )\n}\n"],"names":["FederalTaxesEditForm","FallbackComponent","props","jsx","BaseBoundaries","FederalTaxesEditFormRoot","employeeId","className","children","dictionary","defaultValues","onEvent","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","viewDictionary","useManagementFederalTaxesViewDictionary","federalTaxes","useFederalTaxesForm","BaseLayout","handleSubmit","result","componentEvents","handleCancel","FederalTaxesView","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FederalTaxesEditForm.js","sources":["../../../../../src/components/Employee/FederalTaxes/management/FederalTaxesEditForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { FederalTaxesView } from '../shared/FederalTaxesView'\nimport {\n useFederalTaxesForm,\n type UseFederalTaxesFormProps,\n type FederalTaxesFormData,\n} from '../shared/useFederalTaxesForm'\nimport { useManagementFederalTaxesViewDictionary } from './useViewDictionary'\nimport {\n BaseBoundaries,\n BaseLayout,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { ActionsLayout } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Props for {@link FederalTaxesEditForm}.\n *\n * @public\n */\nexport interface FederalTaxesEditFormProps extends CommonComponentInterface<'Employee.Management.FederalTaxes'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Pre-fill form values. Server data takes precedence when the employee already has values on file. */\n defaultValues?: Partial<FederalTaxesFormData>\n /** Callback invoked when the form emits an event. See the events table on {@link FederalTaxesEditForm} for the available event types and payloads. */\n onEvent: BaseComponentInterface['onEvent']\n}\n\n/**\n * Standalone form for editing an employee's federal tax (W-4) withholdings — filing status, multiple-jobs flag, dependents, other income, deductions, and extra withholding.\n *\n * @remarks\n * Pair with {@link FederalTaxesCard} to route its `employee/management/federalTaxes/card/editRequested` event to this form. {@link FederalTaxes} bundles the card, this form, and the swap wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit (for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/federalTaxes/editForm/submitted` | Fired after the form is saved; use it to return to the card | The updated `EmployeeFederalTax` entity |\n * | `employee/management/federalTaxes/editForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link FederalTaxesEditFormProps}.\n * @returns The rendered federal taxes edit form.\n * @public\n * @group Block Components\n */\nexport function FederalTaxesEditForm({\n FallbackComponent,\n ...props\n}: FederalTaxesEditFormProps & Pick<BaseComponentInterface, 'FallbackComponent'>) {\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.FederalTaxes\"\n FallbackComponent={FallbackComponent}\n >\n <FederalTaxesEditFormRoot {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction FederalTaxesEditFormRoot({\n employeeId,\n className,\n children,\n dictionary,\n defaultValues,\n onEvent,\n}: FederalTaxesEditFormProps) {\n useI18n('Employee.Management.FederalTaxes')\n useComponentDictionary('Employee.Management.FederalTaxes', dictionary)\n const { t } = useTranslation('Employee.Management.FederalTaxes')\n const Components = useComponentContext()\n const viewDictionary = useManagementFederalTaxesViewDictionary()\n\n const federalTaxes = useFederalTaxesForm({\n employeeId,\n defaultValues,\n optionalFieldsToRequire: {\n update: ['twoJobs', 'dependentsAmount', 'otherIncome', 'deductions', 'extraWithholding'],\n },\n } satisfies UseFederalTaxesFormProps)\n\n if (federalTaxes.isLoading) {\n return <BaseLayout isLoading error={federalTaxes.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await federalTaxes.actions.onSubmit()\n if (!result) return\n\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_SUBMITTED, result.data)\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_FEDERAL_TAXES_EDIT_FORM_CANCELLED)\n }\n\n return (\n <FederalTaxesView\n federalTaxes={federalTaxes}\n onSubmit={handleSubmit}\n actions={\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={federalTaxes.status.isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n }\n className={className}\n dictionary={viewDictionary}\n >\n {children}\n </FederalTaxesView>\n )\n}\n"],"names":["FederalTaxesEditForm","FallbackComponent","props","jsx","BaseBoundaries","FederalTaxesEditFormRoot","employeeId","className","children","dictionary","defaultValues","onEvent","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","viewDictionary","useManagementFederalTaxesViewDictionary","federalTaxes","useFederalTaxesForm","BaseLayout","handleSubmit","result","componentEvents","handleCancel","FederalTaxesView","ActionsLayout"],"mappings":";;;;;;;;;;;;AAiDO,SAASA,EAAqB;AAAA,EACnC,mBAAAC;AAAA,EACA,GAAGC;AACL,GAAkF;AAChF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAH;AAAA,MAEA,UAAA,gBAAAE,EAACE,GAAA,EAA0B,GAAGH,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAG3C;AAEA,SAASG,EAAyB;AAAA,EAChC,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC;AACF,GAA8B;AAC5B,EAAAC,EAAQ,kCAAkC,GAC1CC,EAAuB,oCAAoCJ,CAAU;AACrE,QAAM,EAAE,GAAAK,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GACbC,IAAiBC,EAAA,GAEjBC,IAAeC,EAAoB;AAAA,IACvC,YAAAf;AAAA,IACA,eAAAI;AAAA,IACA,yBAAyB;AAAA,MACvB,QAAQ,CAAC,WAAW,oBAAoB,eAAe,cAAc,kBAAkB;AAAA,IAAA;AAAA,EACzF,CACkC;AAEpC,MAAIU,EAAa;AACf,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAa,cAAc,QAAQ;AAGzE,QAAMG,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMJ,EAAa,QAAQ,SAAA;AAC1C,IAAKI,KAELb,EAAQc,EAAgB,uDAAuDD,EAAO,IAAI;AAAA,EAC5F,GAEME,IAAe,MAAM;AACzB,IAAAf,EAAQc,EAAgB,qDAAqD;AAAA,EAC/E;AAEA,SACE,gBAAAtB;AAAA,IAACwB;AAAA,IAAA;AAAA,MACC,cAAAP;AAAA,MACA,UAAUG;AAAA,MACV,2BACGK,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAzB,EAACa,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASU,GAC7C,UAAAZ,EAAE,WAAW,EAAA,CAChB;AAAA,QACA,gBAAAX,EAACa,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAa,OAAO,WAC7D,UAAAN,EAAE,SAAS,EAAA,CACd;AAAA,MAAA,GACF;AAAA,MAEF,WAAAP;AAAA,MACA,YAAYW;AAAA,MAEX,UAAAV;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { FederalTaxesView as
|
|
4
|
-
import { useFederalTaxesForm as
|
|
2
|
+
import { useTranslation as p } from "react-i18next";
|
|
3
|
+
import { FederalTaxesView as c } from "../shared/FederalTaxesView.js";
|
|
4
|
+
import { useFederalTaxesForm as l } from "../shared/useFederalTaxesForm/useFederalTaxesForm.js";
|
|
5
5
|
import { useOnboardingFederalTaxesViewDictionary as E } from "./useViewDictionary.js";
|
|
6
6
|
import { BaseBoundaries as f, BaseLayout as T } from "../../../Base/Base.js";
|
|
7
|
+
import "../../../Base/useBase.js";
|
|
7
8
|
import { ActionsLayout as x } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
8
9
|
import { useComponentContext as F } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
10
|
import "react";
|
|
10
11
|
import { useI18n as y, useComponentDictionary as L } from "../../../../i18n/I18n.js";
|
|
11
12
|
import { componentEvents as s } from "../../../../shared/constants.js";
|
|
12
|
-
function
|
|
13
|
+
function N({
|
|
13
14
|
FallbackComponent: o,
|
|
14
15
|
...t
|
|
15
16
|
}) {
|
|
@@ -24,7 +25,7 @@ function b({
|
|
|
24
25
|
onEvent: i
|
|
25
26
|
}) {
|
|
26
27
|
y("Employee.FederalTaxes"), L("Employee.FederalTaxes", m);
|
|
27
|
-
const u = E(), n =
|
|
28
|
+
const u = E(), n = l({
|
|
28
29
|
employeeId: o,
|
|
29
30
|
defaultValues: d,
|
|
30
31
|
optionalFieldsToRequire: {
|
|
@@ -32,7 +33,7 @@ function b({
|
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
35
|
return n.isLoading ? /* @__PURE__ */ e(T, { isLoading: !0, error: n.errorHandling.errors }) : /* @__PURE__ */ e(
|
|
35
|
-
|
|
36
|
+
c,
|
|
36
37
|
{
|
|
37
38
|
federalTaxes: n,
|
|
38
39
|
onSubmit: async () => {
|
|
@@ -47,10 +48,10 @@ function b({
|
|
|
47
48
|
);
|
|
48
49
|
}
|
|
49
50
|
function g({ isPending: o }) {
|
|
50
|
-
const { t } =
|
|
51
|
+
const { t } = p("Employee.FederalTaxes"), r = F();
|
|
51
52
|
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(r.Button, { type: "submit", isLoading: o, children: t("submitCta") }) });
|
|
52
53
|
}
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
N as FederalTaxes
|
|
55
56
|
};
|
|
56
57
|
//# sourceMappingURL=FederalTaxes.js.map
|