@gusto/embedded-react-sdk 0.33.0 → 0.34.0-rc.1
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 +25 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.d.ts +5 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +34 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -0
- package/dist/components/Common/Fields/MultiSelectComboBoxField/index.d.ts +2 -0
- package/dist/components/Common/SignatureForm/SignatureForm.d.ts +1 -7
- package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
- package/dist/components/Common/UI/Menu/Menu.js +2 -3
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.d.ts +2 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +127 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +16 -0
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -0
- package/dist/components/Common/{MultiSelectComboBox → UI/MultiSelectComboBox}/MultiSelectComboBoxTypes.d.ts +6 -5
- package/dist/components/Common/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -17
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +4 -30
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +2 -26
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -7
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +6 -5
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -5
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/Form.js +4 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +7 -13
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +7 -20
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -2
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +7 -18
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- package/dist/components/Contractor/Address/Form.js +7 -8
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.d.ts +1 -13
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/ContractorList/useContractorList.js +4 -4
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +5 -15
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +28 -28
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +7 -20
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +5 -6
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +3 -3
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +19 -67
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +12 -13
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -17
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +27 -26
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +76 -44
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +7 -6
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +28 -22
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +66 -54
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +54 -120
- package/dist/components/Contractor/Profile/useContractorProfile.js +50 -49
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Compensation/useCompensation.d.ts +17 -44
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +4 -22
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +62 -61
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +4 -22
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +36 -35
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +5 -27
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +48 -47
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +7 -26
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +21 -20
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +5 -29
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +8 -8
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +9 -76
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +7 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -5
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +3 -2
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +7 -33
- package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +5 -14
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +5 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +12 -68
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +19 -17
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +17 -82
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -33
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +11 -66
- package/dist/components/Employee/Profile/HomeAddress.js +9 -10
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +15 -64
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +32 -29
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +2 -5
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +8 -37
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +22 -19
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +1 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.d.ts +7 -33
- package/dist/components/Employee/Taxes/FederalForm.js +7 -7
- package/dist/components/Employee/Taxes/StateForm.d.ts +1 -5
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +3 -2
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -16
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
- package/dist/components/InformationRequests/InformationRequests.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -11
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +6 -9
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +84 -56
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +57 -22
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +5 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +2 -22
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +38 -39
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +5 -5
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -12
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +66 -67
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +18 -17
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +3 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +2 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +8 -7
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +27 -26
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +26 -25
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ApiProvider/apiVersionHook.d.ts +2 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js +7 -0
- package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -0
- package/dist/contexts/ApiProvider/apiVersionHook.test.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +60 -58
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.js +23 -23
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/helpers/validations.d.ts +2 -2
- package/dist/i18n/I18n.js +15 -15
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +42 -40
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +9 -9
- package/dist/i18n/en/Payroll.EmployeeSelection.json.js +10 -0
- package/dist/i18n/en/Payroll.EmployeeSelection.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +10 -8
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +11 -1
- package/docs/reference/endpoint-inventory.json +4 -0
- package/package.json +11 -10
- package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBox.d.ts +0 -2
- /package/dist/components/Common/{MultiSelectComboBox → UI/MultiSelectComboBox}/index.d.ts +0 -0
|
@@ -3,10 +3,11 @@ import { useTranslation as m } from "react-i18next";
|
|
|
3
3
|
import { useDocumentList as s } from "./useDocumentList.js";
|
|
4
4
|
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
5
5
|
import "classnames";
|
|
6
|
+
import "../../../../shared/constants.js";
|
|
6
7
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
8
|
import "react";
|
|
8
9
|
import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
|
|
9
|
-
function
|
|
10
|
+
function D() {
|
|
10
11
|
const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
|
|
11
12
|
return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
|
|
12
13
|
u,
|
|
@@ -35,6 +36,6 @@ function S() {
|
|
|
35
36
|
) }) });
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
D as List
|
|
39
40
|
};
|
|
40
41
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
|
|
@@ -9,12 +9,13 @@ import "../../../Base/useBase.js";
|
|
|
9
9
|
import "../../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
12
13
|
import "dompurify";
|
|
13
14
|
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [a, f] = t("DocumentListContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
f as DocumentListProvider,
|
|
19
|
+
a as useDocumentList
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/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/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/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;"}
|
|
@@ -8,28 +8,29 @@ 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 "classnames";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
11
|
+
import "../../../../shared/constants.js";
|
|
12
|
+
import { RadioGroupField as V } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
13
|
+
import { TextInputField as B } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
14
|
+
import { ActionsLayout as H } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
15
|
+
import { DatePickerField as K } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
16
|
+
import { useComponentContext as M } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
|
+
import { ComboBoxField as G } from "../../../Common/Fields/ComboBoxField/ComboBoxField.js";
|
|
18
|
+
import { Form as U } from "../../../Common/Form/Form.js";
|
|
19
|
+
import { useI18n as W } from "../../../../i18n/I18n.js";
|
|
20
|
+
import { SelectField as J } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
20
21
|
const Q = {
|
|
21
22
|
citizen: "statusDescriptions.citizen",
|
|
22
23
|
permanent_resident: "statusDescriptions.permanent_resident",
|
|
23
24
|
noncitizen: "statusDescriptions.noncitizen",
|
|
24
25
|
alien: "statusDescriptions.alien"
|
|
25
|
-
},
|
|
26
|
+
}, ye = ({
|
|
26
27
|
onSubmit: h,
|
|
27
28
|
defaultValues: f,
|
|
28
29
|
hasDocumentNumber: y,
|
|
29
30
|
isPending: g
|
|
30
31
|
}) => {
|
|
31
|
-
|
|
32
|
-
const { Heading: D, Text: x, Alert: z, Button: E, Link: N } =
|
|
32
|
+
W("Employee.EmploymentEligibility");
|
|
33
|
+
const { Heading: D, Text: x, Alert: z, Button: E, Link: N } = M(), { t: e } = L("Employee.EmploymentEligibility"), [m, a] = I(!!y), r = O({
|
|
33
34
|
resolver: j(k(m)),
|
|
34
35
|
defaultValues: f
|
|
35
36
|
}), { control: l, setValue: u, clearErrors: c } = r, o = d({ control: l, name: "authorizationStatus" }), s = d({ control: l, name: "documentType" }), _ = Object.values(q).map((n) => ({
|
|
@@ -46,7 +47,7 @@ const Q = {
|
|
|
46
47
|
uscis_alien_registration_number: 9,
|
|
47
48
|
form_i94: 11
|
|
48
49
|
};
|
|
49
|
-
return /* @__PURE__ */ t($, { ...r, children: /* @__PURE__ */ t(
|
|
50
|
+
return /* @__PURE__ */ t($, { ...r, children: /* @__PURE__ */ t(U, { onSubmit: r.handleSubmit(h), children: /* @__PURE__ */ p(b, { flexDirection: "column", gap: 16, children: [
|
|
50
51
|
/* @__PURE__ */ p(b, { flexDirection: "column", gap: 2, children: [
|
|
51
52
|
/* @__PURE__ */ t(D, { as: "h2", children: e("title") }),
|
|
52
53
|
/* @__PURE__ */ t(x, { variant: "supporting", children: /* @__PURE__ */ t(
|
|
@@ -61,7 +62,7 @@ const Q = {
|
|
|
61
62
|
) })
|
|
62
63
|
] }),
|
|
63
64
|
/* @__PURE__ */ t(
|
|
64
|
-
|
|
65
|
+
J,
|
|
65
66
|
{
|
|
66
67
|
name: "authorizationStatus",
|
|
67
68
|
label: e("select.label"),
|
|
@@ -80,9 +81,9 @@ const Q = {
|
|
|
80
81
|
disableScrollIntoView: !0
|
|
81
82
|
}
|
|
82
83
|
),
|
|
83
|
-
o === "alien" && /* @__PURE__ */ t(
|
|
84
|
+
o === "alien" && /* @__PURE__ */ t(K, { name: "expirationDate", label: e("expirationDate.label") }),
|
|
84
85
|
F && /* @__PURE__ */ t(
|
|
85
|
-
|
|
86
|
+
V,
|
|
86
87
|
{
|
|
87
88
|
name: "documentType",
|
|
88
89
|
label: e("authorizationDocument.label"),
|
|
@@ -92,7 +93,7 @@ const Q = {
|
|
|
92
93
|
}
|
|
93
94
|
),
|
|
94
95
|
R && i && /* @__PURE__ */ t(
|
|
95
|
-
|
|
96
|
+
B,
|
|
96
97
|
{
|
|
97
98
|
name: "documentNumber",
|
|
98
99
|
label: e(`documentNumber.${i}.label`),
|
|
@@ -103,7 +104,7 @@ const Q = {
|
|
|
103
104
|
}
|
|
104
105
|
),
|
|
105
106
|
s === "foreign_passport" && o === "alien" && /* @__PURE__ */ t(
|
|
106
|
-
|
|
107
|
+
G,
|
|
107
108
|
{
|
|
108
109
|
name: "country",
|
|
109
110
|
label: e("country.label"),
|
|
@@ -114,10 +115,10 @@ const Q = {
|
|
|
114
115
|
isRequired: !0
|
|
115
116
|
}
|
|
116
117
|
),
|
|
117
|
-
/* @__PURE__ */ t(
|
|
118
|
+
/* @__PURE__ */ t(H, { children: /* @__PURE__ */ t(E, { type: "submit", isLoading: g, children: e("submit") }) })
|
|
118
119
|
] }) }) });
|
|
119
120
|
};
|
|
120
121
|
export {
|
|
121
|
-
|
|
122
|
+
ye as EmploymentEligibilityPresentation
|
|
122
123
|
};
|
|
123
124
|
//# sourceMappingURL=EmploymentEligibilityPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmploymentEligibilityPresentation.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n AuthorizationStatus,\n I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\nimport {\n generateEmploymentEligibilitySchema,\n type EmploymentEligibilityInputs,\n type EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport { COUNTRIES } from './countries'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n TextInputField,\n DatePickerField,\n ActionsLayout,\n} from '@/components/Common'\nimport { ComboBoxField } from '@/components/Common/Fields/ComboBoxField/ComboBoxField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\ninterface EmploymentEligibilityPresentationProps {\n onSubmit: SubmitHandler<EmploymentEligibilityPayload>\n defaultValues?: Partial<EmploymentEligibilityInputs>\n hasDocumentNumber?: boolean | null\n isPending?: boolean\n}\n\nconst statusDescriptionKeys = {\n citizen: 'statusDescriptions.citizen',\n permanent_resident: 'statusDescriptions.permanent_resident',\n noncitizen: 'statusDescriptions.noncitizen',\n alien: 'statusDescriptions.alien',\n} as const satisfies Record<AuthorizationStatus, string>\n\nexport const EmploymentEligibilityPresentation = ({\n onSubmit,\n defaultValues,\n hasDocumentNumber,\n isPending,\n}: EmploymentEligibilityPresentationProps) => {\n useI18n('Employee.EmploymentEligibility')\n const { Heading, Text, Alert, Button, Link } = useComponentContext()\n const { t } = useTranslation('Employee.EmploymentEligibility')\n\n const [hasExistingDocumentNumber, setHasExistingDocumentNumber] = useState(!!hasDocumentNumber)\n\n const formMethods = useForm<EmploymentEligibilityInputs, unknown, EmploymentEligibilityPayload>({\n resolver: zodResolver(generateEmploymentEligibilitySchema(hasExistingDocumentNumber)),\n defaultValues,\n })\n\n const { control, setValue, clearErrors } = formMethods\n const authorizationStatus = useWatch({ control, name: 'authorizationStatus' })\n const documentType = useWatch({ control, name: 'documentType' })\n\n const statusOptions = Object.values(AuthorizationStatus).map(value => ({\n value,\n label: t(`select.options.${value}`),\n }))\n\n const authorizationDocumentOptions = Object.values(I9AuthorizationDocumentType).map(value => ({\n value,\n label: t(`authorizationDocument.options.${value}`),\n }))\n\n const handleAuthorizationStatusChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const handleDocumentTypeChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const showDocumentTypeRadio = authorizationStatus === 'alien'\n const showDocumentNumberInput =\n authorizationStatus === 'permanent_resident' ||\n (authorizationStatus === 'alien' && !!documentType)\n const activeDocumentType =\n authorizationStatus === 'permanent_resident' ? 'uscis_alien_registration_number' : documentType\n\n const documentNumberMaxLength: Partial<Record<I9AuthorizationDocumentType, number>> = {\n uscis_alien_registration_number: 9,\n form_i94: 11,\n }\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">\n <Trans\n i18nKey={'subtitle'}\n t={t}\n components={{\n formI9Link: <Link />,\n }}\n />\n </Text>\n </Flex>\n\n <SelectField\n name=\"authorizationStatus\"\n label={t('select.label')}\n description={t('select.description')}\n placeholder={t('select.placeholder')}\n options={statusOptions}\n isRequired\n onChange={handleAuthorizationStatusChange}\n />\n\n {authorizationStatus && (\n <Alert\n status=\"info\"\n label={t(statusDescriptionKeys[authorizationStatus])}\n disableScrollIntoView\n />\n )}\n\n {authorizationStatus === 'alien' && (\n <DatePickerField name=\"expirationDate\" label={t('expirationDate.label')} />\n )}\n\n {showDocumentTypeRadio && (\n <RadioGroupField\n name=\"documentType\"\n label={t('authorizationDocument.label')}\n options={authorizationDocumentOptions}\n isRequired\n onChange={handleDocumentTypeChange}\n />\n )}\n\n {showDocumentNumberInput && activeDocumentType && (\n <TextInputField\n name=\"documentNumber\"\n label={t(`documentNumber.${activeDocumentType}.label`)}\n description={\n activeDocumentType !== 'foreign_passport'\n ? t(`documentNumber.${activeDocumentType}.description`)\n : undefined\n }\n placeholder={\n hasExistingDocumentNumber\n ? t(`documentNumber.${activeDocumentType}.placeholder`)\n : undefined\n }\n maxLength={documentNumberMaxLength[activeDocumentType]}\n isRequired\n />\n )}\n\n {documentType === 'foreign_passport' && authorizationStatus === 'alien' && (\n <ComboBoxField\n name=\"country\"\n label={t('country.label')}\n description={t('country.description')}\n options={COUNTRIES}\n placeholder={t('country.placeholder')}\n allowsCustomValue\n isRequired\n />\n )}\n\n <ActionsLayout>\n <Button type=\"submit\" isLoading={isPending}>\n {t('submit')}\n </Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["statusDescriptionKeys","EmploymentEligibilityPresentation","onSubmit","defaultValues","hasDocumentNumber","isPending","useI18n","Heading","Text","Alert","Button","Link","useComponentContext","t","useTranslation","hasExistingDocumentNumber","setHasExistingDocumentNumber","useState","formMethods","useForm","zodResolver","generateEmploymentEligibilitySchema","control","setValue","clearErrors","authorizationStatus","useWatch","documentType","statusOptions","AuthorizationStatus","value","authorizationDocumentOptions","I9AuthorizationDocumentType","handleAuthorizationStatusChange","handleDocumentTypeChange","showDocumentTypeRadio","showDocumentNumberInput","activeDocumentType","documentNumberMaxLength","FormProvider","jsx","Form","jsxs","Flex","Trans","SelectField","DatePickerField","RadioGroupField","TextInputField","ComboBoxField","COUNTRIES","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;AAkCA,MAAMA,IAAwB;AAAA,EAC5B,SAAS;AAAA,EACT,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AACT,GAEaC,KAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,MAA8C;AAC5C,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,EAAA,IAASC,EAAA,GACzC,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GAEvD,CAACC,GAA2BC,CAA4B,IAAIC,EAAS,CAAC,CAACb,CAAiB,GAExFc,IAAcC,EAA4E;AAAA,IAC9F,UAAUC,EAAYC,EAAoCN,CAAyB,CAAC;AAAA,IACpF,eAAAZ;AAAA,EAAA,CACD,GAEK,EAAE,SAAAmB,GAAS,UAAAC,GAAU,aAAAC,EAAA,IAAgBN,GACrCO,IAAsBC,EAAS,EAAE,SAAAJ,GAAS,MAAM,uBAAuB,GACvEK,IAAeD,EAAS,EAAE,SAAAJ,GAAS,MAAM,gBAAgB,GAEzDM,IAAgB,OAAO,OAAOC,CAAmB,EAAE,IAAI,CAAAC,OAAU;AAAA,IACrE,OAAAA;AAAA,IACA,OAAOjB,EAAE,kBAAkBiB,CAAK,EAAE;AAAA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A,gBAAAX,EAAC9B,GAAA,EAAO,MAAK,UAAS,WAAWL,GAC9B,UAAAQ,EAAE,QAAQ,EAAA,CACb,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"EmploymentEligibilityPresentation.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n AuthorizationStatus,\n I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\nimport {\n generateEmploymentEligibilitySchema,\n type EmploymentEligibilityInputs,\n type EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport { COUNTRIES } from './countries'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n TextInputField,\n DatePickerField,\n ActionsLayout,\n} from '@/components/Common'\nimport { ComboBoxField } from '@/components/Common/Fields/ComboBoxField/ComboBoxField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\ninterface EmploymentEligibilityPresentationProps {\n onSubmit: SubmitHandler<EmploymentEligibilityPayload>\n defaultValues?: Partial<EmploymentEligibilityInputs>\n hasDocumentNumber?: boolean | null\n isPending?: boolean\n}\n\nconst statusDescriptionKeys = {\n citizen: 'statusDescriptions.citizen',\n permanent_resident: 'statusDescriptions.permanent_resident',\n noncitizen: 'statusDescriptions.noncitizen',\n alien: 'statusDescriptions.alien',\n} as const satisfies Record<AuthorizationStatus, string>\n\nexport const EmploymentEligibilityPresentation = ({\n onSubmit,\n defaultValues,\n hasDocumentNumber,\n isPending,\n}: EmploymentEligibilityPresentationProps) => {\n useI18n('Employee.EmploymentEligibility')\n const { Heading, Text, Alert, Button, Link } = useComponentContext()\n const { t } = useTranslation('Employee.EmploymentEligibility')\n\n const [hasExistingDocumentNumber, setHasExistingDocumentNumber] = useState(!!hasDocumentNumber)\n\n const formMethods = useForm<EmploymentEligibilityInputs, unknown, EmploymentEligibilityPayload>({\n resolver: zodResolver(generateEmploymentEligibilitySchema(hasExistingDocumentNumber)),\n defaultValues,\n })\n\n const { control, setValue, clearErrors } = formMethods\n const authorizationStatus = useWatch({ control, name: 'authorizationStatus' })\n const documentType = useWatch({ control, name: 'documentType' })\n\n const statusOptions = Object.values(AuthorizationStatus).map(value => ({\n value,\n label: t(`select.options.${value}`),\n }))\n\n const authorizationDocumentOptions = Object.values(I9AuthorizationDocumentType).map(value => ({\n value,\n label: t(`authorizationDocument.options.${value}`),\n }))\n\n const handleAuthorizationStatusChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const handleDocumentTypeChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const showDocumentTypeRadio = authorizationStatus === 'alien'\n const showDocumentNumberInput =\n authorizationStatus === 'permanent_resident' ||\n (authorizationStatus === 'alien' && !!documentType)\n const activeDocumentType =\n authorizationStatus === 'permanent_resident' ? 'uscis_alien_registration_number' : documentType\n\n const documentNumberMaxLength: Partial<Record<I9AuthorizationDocumentType, number>> = {\n uscis_alien_registration_number: 9,\n form_i94: 11,\n }\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">\n <Trans\n i18nKey={'subtitle'}\n t={t}\n components={{\n formI9Link: <Link />,\n }}\n />\n </Text>\n </Flex>\n\n <SelectField\n name=\"authorizationStatus\"\n label={t('select.label')}\n description={t('select.description')}\n placeholder={t('select.placeholder')}\n options={statusOptions}\n isRequired\n onChange={handleAuthorizationStatusChange}\n />\n\n {authorizationStatus && (\n <Alert\n status=\"info\"\n label={t(statusDescriptionKeys[authorizationStatus])}\n disableScrollIntoView\n />\n )}\n\n {authorizationStatus === 'alien' && (\n <DatePickerField name=\"expirationDate\" label={t('expirationDate.label')} />\n )}\n\n {showDocumentTypeRadio && (\n <RadioGroupField\n name=\"documentType\"\n label={t('authorizationDocument.label')}\n options={authorizationDocumentOptions}\n isRequired\n onChange={handleDocumentTypeChange}\n />\n )}\n\n {showDocumentNumberInput && activeDocumentType && (\n <TextInputField\n name=\"documentNumber\"\n label={t(`documentNumber.${activeDocumentType}.label`)}\n description={\n activeDocumentType !== 'foreign_passport'\n ? t(`documentNumber.${activeDocumentType}.description`)\n : undefined\n }\n placeholder={\n hasExistingDocumentNumber\n ? t(`documentNumber.${activeDocumentType}.placeholder`)\n : undefined\n }\n maxLength={documentNumberMaxLength[activeDocumentType]}\n isRequired\n />\n )}\n\n {documentType === 'foreign_passport' && authorizationStatus === 'alien' && (\n <ComboBoxField\n name=\"country\"\n label={t('country.label')}\n description={t('country.description')}\n options={COUNTRIES}\n placeholder={t('country.placeholder')}\n allowsCustomValue\n isRequired\n />\n )}\n\n <ActionsLayout>\n <Button type=\"submit\" isLoading={isPending}>\n {t('submit')}\n </Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["statusDescriptionKeys","EmploymentEligibilityPresentation","onSubmit","defaultValues","hasDocumentNumber","isPending","useI18n","Heading","Text","Alert","Button","Link","useComponentContext","t","useTranslation","hasExistingDocumentNumber","setHasExistingDocumentNumber","useState","formMethods","useForm","zodResolver","generateEmploymentEligibilitySchema","control","setValue","clearErrors","authorizationStatus","useWatch","documentType","statusOptions","AuthorizationStatus","value","authorizationDocumentOptions","I9AuthorizationDocumentType","handleAuthorizationStatusChange","handleDocumentTypeChange","showDocumentTypeRadio","showDocumentNumberInput","activeDocumentType","documentNumberMaxLength","FormProvider","jsx","Form","jsxs","Flex","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A,MAAA;AAAA,IAAA;AAAA,IAIxBA,MAAwB,WACvB,gBAAAe,EAACM,GAAA,EAAgB,MAAK,kBAAiB,OAAOjC,EAAE,sBAAsB,GAAG;AAAA,IAG1EsB,KACC,gBAAAK;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOlC,EAAE,6BAA6B;AAAA,QACtC,SAASkB;AAAA,QACT,YAAU;AAAA,QACV,UAAUG;AAAA,MAAA;AAAA,IAAA;AAAA,IAIbE,KAA2BC,KAC1B,gBAAAG;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOnC,EAAE,kBAAkBwB,CAAkB,QAAQ;AAAA,QACrD,aACEA,MAAuB,qBACnBxB,EAAE,kBAAkBwB,CAAkB,cAAc,IACpD;AAAA,QAEN,aACEtB,IACIF,EAAE,kBAAkBwB,CAAkB,cAAc,IACpD;AAAA,QAEN,WAAWC,EAAwBD,CAAkB;AAAA,QACrD,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAIbV,MAAiB,sBAAsBF,MAAwB,WAC9D,gBAAAe;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpC,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,SAASqC;AAAA,QACT,aAAarC,EAAE,qBAAqB;AAAA,QACpC,mBAAiB;AAAA,QACjB,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAId,gBAAA2B,EAACW,GAAA,EACC,UAAA,gBAAAX,EAAC9B,GAAA,EAAO,MAAK,UAAS,WAAWL,GAC9B,UAAAQ,EAAE,QAAQ,EAAA,CACb,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -1,43 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const generateEmploymentEligibilitySchema: (hasDocumentNumber?: boolean | null) => z.
|
|
3
|
-
authorizationStatus: z.ZodOptional<z.
|
|
2
|
+
export declare const generateEmploymentEligibilitySchema: (hasDocumentNumber?: boolean | null) => z.ZodObject<{
|
|
3
|
+
authorizationStatus: z.ZodOptional<z.ZodEnum<{
|
|
4
4
|
readonly Citizen: "citizen";
|
|
5
5
|
readonly Noncitizen: "noncitizen";
|
|
6
6
|
readonly PermanentResident: "permanent_resident";
|
|
7
7
|
readonly Alien: "alien";
|
|
8
8
|
}>>;
|
|
9
|
-
documentType: z.ZodOptional<z.
|
|
9
|
+
documentType: z.ZodOptional<z.ZodEnum<{
|
|
10
10
|
readonly UscisAlienRegistrationNumber: "uscis_alien_registration_number";
|
|
11
11
|
readonly FormI94: "form_i94";
|
|
12
12
|
readonly ForeignPassport: "foreign_passport";
|
|
13
13
|
}>>;
|
|
14
14
|
documentNumber: z.ZodOptional<z.ZodString>;
|
|
15
|
-
expirationDate: z.ZodOptional<z.
|
|
15
|
+
expirationDate: z.ZodOptional<z.ZodPipe<z.ZodDate, z.ZodTransform<string | undefined, Date>>>;
|
|
16
16
|
country: z.ZodOptional<z.ZodString>;
|
|
17
|
-
},
|
|
18
|
-
expirationDate?: string | undefined;
|
|
19
|
-
documentNumber?: string | undefined;
|
|
20
|
-
country?: string | undefined;
|
|
21
|
-
authorizationStatus?: "citizen" | "permanent_resident" | "noncitizen" | "alien" | undefined;
|
|
22
|
-
documentType?: "uscis_alien_registration_number" | "form_i94" | "foreign_passport" | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
expirationDate?: Date | undefined;
|
|
25
|
-
documentNumber?: string | undefined;
|
|
26
|
-
country?: string | undefined;
|
|
27
|
-
authorizationStatus?: "citizen" | "permanent_resident" | "noncitizen" | "alien" | undefined;
|
|
28
|
-
documentType?: "uscis_alien_registration_number" | "form_i94" | "foreign_passport" | undefined;
|
|
29
|
-
}>, {
|
|
30
|
-
expirationDate?: string | undefined;
|
|
31
|
-
documentNumber?: string | undefined;
|
|
32
|
-
country?: string | undefined;
|
|
33
|
-
authorizationStatus?: "citizen" | "permanent_resident" | "noncitizen" | "alien" | undefined;
|
|
34
|
-
documentType?: "uscis_alien_registration_number" | "form_i94" | "foreign_passport" | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
expirationDate?: Date | undefined;
|
|
37
|
-
documentNumber?: string | undefined;
|
|
38
|
-
country?: string | undefined;
|
|
39
|
-
authorizationStatus?: "citizen" | "permanent_resident" | "noncitizen" | "alien" | undefined;
|
|
40
|
-
documentType?: "uscis_alien_registration_number" | "form_i94" | "foreign_passport" | undefined;
|
|
41
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
42
18
|
export type EmploymentEligibilityInputs = z.input<ReturnType<typeof generateEmploymentEligibilitySchema>>;
|
|
43
19
|
export type EmploymentEligibilityPayload = z.infer<ReturnType<typeof generateEmploymentEligibilitySchema>>;
|
package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z as o } from "zod";
|
|
2
2
|
import { I9AuthorizationDocumentType as i, AuthorizationStatus as r } from "@gusto/embedded-api/models/components/i9authorization";
|
|
3
|
-
const
|
|
4
|
-
authorizationStatus: o.
|
|
5
|
-
documentType: o.
|
|
3
|
+
const t = (u) => /^[Aa]?\d{7,9}$/.test(u), m = (u) => /^\d{9} ?[A-Za-z\d]\d$/.test(u), a = (u) => o.object({
|
|
4
|
+
authorizationStatus: o.enum(r).optional(),
|
|
5
|
+
documentType: o.enum(i).optional(),
|
|
6
6
|
documentNumber: o.string().optional(),
|
|
7
7
|
expirationDate: o.date().transform((e) => e.toISOString().split("T")[0]).optional(),
|
|
8
8
|
country: o.string().optional()
|
|
@@ -15,11 +15,11 @@ const u = (t) => /^[Aa]?\d{7,9}$/.test(t), n = (t) => /^\d{9} ?[A-Za-z\d]\d$/.te
|
|
|
15
15
|
});
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
e.authorizationStatus === "permanent_resident" && (e.documentNumber ?
|
|
18
|
+
e.authorizationStatus === "permanent_resident" && (e.documentNumber ? t(e.documentNumber) || s.addIssue({
|
|
19
19
|
code: o.ZodIssueCode.custom,
|
|
20
20
|
message: "Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)",
|
|
21
21
|
path: ["documentNumber"]
|
|
22
|
-
}) :
|
|
22
|
+
}) : u || s.addIssue({
|
|
23
23
|
code: o.ZodIssueCode.custom,
|
|
24
24
|
message: "Document number is required",
|
|
25
25
|
path: ["documentNumber"]
|
|
@@ -27,15 +27,15 @@ const u = (t) => /^[Aa]?\d{7,9}$/.test(t), n = (t) => /^\d{9} ?[A-Za-z\d]\d$/.te
|
|
|
27
27
|
code: o.ZodIssueCode.custom,
|
|
28
28
|
message: "Authorization document is required",
|
|
29
29
|
path: ["documentType"]
|
|
30
|
-
}), e.documentNumber ? e.documentType === "uscis_alien_registration_number" && !
|
|
30
|
+
}), e.documentNumber ? e.documentType === "uscis_alien_registration_number" && !t(e.documentNumber) ? s.addIssue({
|
|
31
31
|
code: o.ZodIssueCode.custom,
|
|
32
32
|
message: "Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)",
|
|
33
33
|
path: ["documentNumber"]
|
|
34
|
-
}) : e.documentType === "form_i94" && !
|
|
34
|
+
}) : e.documentType === "form_i94" && !m(e.documentNumber) && s.addIssue({
|
|
35
35
|
code: o.ZodIssueCode.custom,
|
|
36
36
|
message: "Enter a valid 11-character Form I-94 admission number",
|
|
37
37
|
path: ["documentNumber"]
|
|
38
|
-
}) :
|
|
38
|
+
}) : u || s.addIssue({
|
|
39
39
|
code: o.ZodIssueCode.custom,
|
|
40
40
|
message: "Document number is required",
|
|
41
41
|
path: ["documentNumber"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.
|
|
1
|
+
{"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../src/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.enum(AuthorizationStatus).optional(),\n documentType: z.enum(I9AuthorizationDocumentType).optional(),\n documentNumber: z.string().optional(),\n expirationDate: z\n .date()\n .transform(date => date.toISOString().split('T')[0])\n .optional(),\n country: z.string().optional(),\n })\n .superRefine((data, ctx) => {\n if (!data.authorizationStatus) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization status is required',\n path: ['authorizationStatus'],\n })\n return\n }\n if (data.authorizationStatus === 'permanent_resident') {\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (!isValidUscisNumber(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n }\n }\n if (data.authorizationStatus === 'alien') {\n if (!data.documentType) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization document is required',\n path: ['documentType'],\n })\n }\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (\n data.documentType === 'uscis_alien_registration_number' &&\n !isValidUscisNumber(data.documentNumber)\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n } else if (data.documentType === 'form_i94' && !isValidI94Number(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a valid 11-character Form I-94 admission number',\n path: ['documentNumber'],\n })\n }\n if (data.documentType === 'foreign_passport' && !data.country) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Country of issuance is required',\n path: ['country'],\n })\n }\n }\n })\n\nexport type EmploymentEligibilityInputs = z.input<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\nexport type EmploymentEligibilityPayload = z.infer<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n"],"names":["isValidUscisNumber","value","isValidI94Number","generateEmploymentEligibilitySchema","hasDocumentNumber","z","AuthorizationStatus","I9AuthorizationDocumentType","date","data","ctx"],"mappings":";;AAMA,MAAMA,IAAqB,CAACC,MAAkB,iBAAiB,KAAKA,CAAK,GACnEC,IAAmB,CAACD,MAAkB,wBAAwB,KAAKA,CAAK,GAEjEE,IAAsC,CAACC,MAClDC,EACG,OAAO;AAAA,EACN,qBAAqBA,EAAE,KAAKC,CAAmB,EAAE,SAAA;AAAA,EACjD,cAAcD,EAAE,KAAKE,CAA2B,EAAE,SAAA;AAAA,EAClD,gBAAgBF,EAAE,OAAA,EAAS,SAAA;AAAA,EAC3B,gBAAgBA,EACb,KAAA,EACA,UAAU,CAAAG,MAAQA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,CAAC,EAClD,SAAA;AAAA,EACH,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AAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,SAAS;AAAA,EAAA,CACjB;AAGP,CAAC;"}
|
|
@@ -9,33 +9,16 @@ declare const preparerSchema: z.ZodObject<{
|
|
|
9
9
|
state: z.ZodString;
|
|
10
10
|
zip: z.ZodString;
|
|
11
11
|
signature: z.ZodString;
|
|
12
|
-
agree: z.
|
|
13
|
-
},
|
|
14
|
-
firstName: string;
|
|
15
|
-
lastName: string;
|
|
16
|
-
street1: string;
|
|
17
|
-
city: string;
|
|
18
|
-
state: string;
|
|
19
|
-
zip: string;
|
|
20
|
-
signature: string;
|
|
21
|
-
agree: boolean;
|
|
22
|
-
street2?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
firstName: string;
|
|
25
|
-
lastName: string;
|
|
26
|
-
street1: string;
|
|
27
|
-
city: string;
|
|
28
|
-
state: string;
|
|
29
|
-
zip: string;
|
|
30
|
-
signature: string;
|
|
31
|
-
agree: boolean;
|
|
32
|
-
street2?: string | undefined;
|
|
33
|
-
}>;
|
|
12
|
+
agree: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strip>;
|
|
34
14
|
export type PreparerInputs = z.infer<typeof preparerSchema>;
|
|
35
15
|
declare const i9SignatureFormSchema: z.ZodObject<{
|
|
36
16
|
signature: z.ZodString;
|
|
37
17
|
agree: z.ZodLiteral<true>;
|
|
38
|
-
usedPreparer: z.ZodEnum<
|
|
18
|
+
usedPreparer: z.ZodEnum<{
|
|
19
|
+
yes: "yes";
|
|
20
|
+
no: "no";
|
|
21
|
+
}>;
|
|
39
22
|
preparers: z.ZodArray<z.ZodObject<{
|
|
40
23
|
firstName: z.ZodString;
|
|
41
24
|
lastName: z.ZodString;
|
|
@@ -45,59 +28,9 @@ declare const i9SignatureFormSchema: z.ZodObject<{
|
|
|
45
28
|
state: z.ZodString;
|
|
46
29
|
zip: z.ZodString;
|
|
47
30
|
signature: z.ZodString;
|
|
48
|
-
agree: z.
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
lastName: string;
|
|
52
|
-
street1: string;
|
|
53
|
-
city: string;
|
|
54
|
-
state: string;
|
|
55
|
-
zip: string;
|
|
56
|
-
signature: string;
|
|
57
|
-
agree: boolean;
|
|
58
|
-
street2?: string | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
firstName: string;
|
|
61
|
-
lastName: string;
|
|
62
|
-
street1: string;
|
|
63
|
-
city: string;
|
|
64
|
-
state: string;
|
|
65
|
-
zip: string;
|
|
66
|
-
signature: string;
|
|
67
|
-
agree: boolean;
|
|
68
|
-
street2?: string | undefined;
|
|
69
|
-
}>, "many">;
|
|
70
|
-
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
signature: string;
|
|
72
|
-
agree: true;
|
|
73
|
-
usedPreparer: "yes" | "no";
|
|
74
|
-
preparers: {
|
|
75
|
-
firstName: string;
|
|
76
|
-
lastName: string;
|
|
77
|
-
street1: string;
|
|
78
|
-
city: string;
|
|
79
|
-
state: string;
|
|
80
|
-
zip: string;
|
|
81
|
-
signature: string;
|
|
82
|
-
agree: boolean;
|
|
83
|
-
street2?: string | undefined;
|
|
84
|
-
}[];
|
|
85
|
-
}, {
|
|
86
|
-
signature: string;
|
|
87
|
-
agree: true;
|
|
88
|
-
usedPreparer: "yes" | "no";
|
|
89
|
-
preparers: {
|
|
90
|
-
firstName: string;
|
|
91
|
-
lastName: string;
|
|
92
|
-
street1: string;
|
|
93
|
-
city: string;
|
|
94
|
-
state: string;
|
|
95
|
-
zip: string;
|
|
96
|
-
signature: string;
|
|
97
|
-
agree: boolean;
|
|
98
|
-
street2?: string | undefined;
|
|
99
|
-
}[];
|
|
100
|
-
}>;
|
|
31
|
+
agree: z.ZodBoolean;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
101
34
|
export type I9SignatureFormInputs = z.infer<typeof i9SignatureFormSchema>;
|
|
102
35
|
interface I9SignatureFormProps extends CommonComponentInterface {
|
|
103
36
|
employeeId: string;
|
|
@@ -14,13 +14,13 @@ import { useI18n as Y } from "../../../../i18n/I18n.js";
|
|
|
14
14
|
import { componentEvents as C, STATES_ABBR as K } from "../../../../shared/constants.js";
|
|
15
15
|
import { Flex as f } from "../../../Common/Flex/Flex.js";
|
|
16
16
|
import "classnames";
|
|
17
|
-
import {
|
|
17
|
+
import { RadioGroupField as U } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
18
|
+
import { TextInputField as c } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
19
|
+
import { ActionsLayout as Z } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
18
20
|
import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
19
21
|
import "react";
|
|
20
|
-
import { Form as
|
|
21
|
-
import { TextInputField as c } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
22
|
+
import { Form as Q } from "../../../Common/Form/Form.js";
|
|
22
23
|
import { CheckboxField as P } from "../../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
23
|
-
import { RadioGroupField as Q } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
24
24
|
import { SelectField as X } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
25
25
|
import { DocumentViewer as J } from "../../../Common/DocumentViewer/DocumentViewer.js";
|
|
26
26
|
const W = 4, ee = l.object({
|
|
@@ -73,7 +73,7 @@ function te({ employeeId: i, formId: a, className: o }) {
|
|
|
73
73
|
n(C.EMPLOYEE_SIGN_FORM, z);
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
return /* @__PURE__ */ e("section", { className: o, children: /* @__PURE__ */ e(q, { ...A, children: /* @__PURE__ */ e(
|
|
76
|
+
return /* @__PURE__ */ e("section", { className: o, children: /* @__PURE__ */ e(q, { ...A, children: /* @__PURE__ */ e(Q, { onSubmit: A.handleSubmit(_), children: /* @__PURE__ */ m(f, { flexDirection: "column", gap: 20, children: [
|
|
77
77
|
/* @__PURE__ */ m("section", { children: [
|
|
78
78
|
/* @__PURE__ */ e(p.Heading, { as: "h2", children: t("title") }),
|
|
79
79
|
/* @__PURE__ */ e(p.Text, { children: /* @__PURE__ */ e(
|
|
@@ -133,7 +133,7 @@ function te({ employeeId: i, formId: a, className: o }) {
|
|
|
133
133
|
)
|
|
134
134
|
] }),
|
|
135
135
|
/* @__PURE__ */ e(ne, {}),
|
|
136
|
-
/* @__PURE__ */ m(
|
|
136
|
+
/* @__PURE__ */ m(Z, { children: [
|
|
137
137
|
/* @__PURE__ */ e(p.Button, { variant: "secondary", type: "button", onClick: $, children: t("cancelCta") }),
|
|
138
138
|
/* @__PURE__ */ e(p.Button, { type: "submit", isLoading: R, children: t("signCta") })
|
|
139
139
|
] })
|
|
@@ -186,7 +186,7 @@ function ne() {
|
|
|
186
186
|
};
|
|
187
187
|
return /* @__PURE__ */ m(f, { flexDirection: "column", gap: 20, children: [
|
|
188
188
|
/* @__PURE__ */ e(
|
|
189
|
-
|
|
189
|
+
U,
|
|
190
190
|
{
|
|
191
191
|
name: "usedPreparer",
|
|
192
192
|
label: i("preparerQuestion"),
|
|
@@ -12,8 +12,8 @@ import { useBase as C } from "../../../Base/useBase.js";
|
|
|
12
12
|
import { useI18n as G } from "../../../../i18n/I18n.js";
|
|
13
13
|
import { componentEvents as i } from "../../../../shared/constants.js";
|
|
14
14
|
import { Flex as M } from "../../../Common/Flex/Flex.js";
|
|
15
|
-
import "react-i18next";
|
|
16
15
|
import "classnames";
|
|
16
|
+
import "react-i18next";
|
|
17
17
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
18
18
|
import "react";
|
|
19
19
|
import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
@@ -9,12 +9,13 @@ import "../../../Base/useBase.js";
|
|
|
9
9
|
import "../../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
12
13
|
import "dompurify";
|
|
13
14
|
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
15
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [d, s] = o("SignatureFormContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
s as SignatureFormProvider,
|
|
19
|
+
d as useSignatureForm
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useSignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const EmployeeDocumentsSchema: z.ZodObject<{
|
|
3
3
|
includeI9: z.ZodBoolean;
|
|
4
|
-
},
|
|
5
|
-
includeI9: boolean;
|
|
6
|
-
}, {
|
|
7
|
-
includeI9: boolean;
|
|
8
|
-
}>;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export type EmployeeDocumentsFormValues = z.infer<typeof EmployeeDocumentsSchema>;
|
|
10
6
|
export interface EmployeeDocumentsPresentationProps {
|
|
11
7
|
isEmployeeSelfOnboarding: boolean;
|
|
@@ -5,6 +5,7 @@ import { zodResolver as E } from "@hookform/resolvers/zod";
|
|
|
5
5
|
import { z as p } from "zod";
|
|
6
6
|
import { Flex as l, FlexItem as o } from "../../Common/Flex/Flex.js";
|
|
7
7
|
import "classnames";
|
|
8
|
+
import "../../../shared/constants.js";
|
|
8
9
|
import { useComponentContext as v } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
10
|
import "react";
|
|
10
11
|
import { Form as w } from "../../Common/Form/Form.js";
|
|
@@ -12,7 +13,7 @@ import { useI18n as C } from "../../../i18n/I18n.js";
|
|
|
12
13
|
import { CheckboxField as F } from "../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
13
14
|
const u = "gusto-sdk-employee-documents-form", T = p.object({
|
|
14
15
|
includeI9: p.boolean()
|
|
15
|
-
}),
|
|
16
|
+
}), Y = ({
|
|
16
17
|
isEmployeeSelfOnboarding: a,
|
|
17
18
|
currentI9Status: g,
|
|
18
19
|
onSubmit: f,
|
|
@@ -110,6 +111,6 @@ const u = "gusto-sdk-employee-documents-form", T = p.object({
|
|
|
110
111
|
] }) });
|
|
111
112
|
};
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
Y as EmployeeDocumentsPresentation
|
|
114
115
|
};
|
|
115
116
|
//# sourceMappingURL=EmployeeDocumentsPresentation.js.map
|