@gusto/embedded-react-sdk 0.30.0 → 0.31.0-rc.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 +37 -0
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +2 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +48 -36
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- 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/ComboBox/ComboBox.d.ts +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +73 -66
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +5 -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/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.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.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.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.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/Industry/Industry.js +1 -1
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- 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 +14 -14
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +31 -31
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
- 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.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.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.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/PaymentMethod/BankAccountForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -99
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +35 -31
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +22 -23
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +8 -7
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +51 -48
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +58 -66
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.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/PaymentSummaryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Contractor/index.d.ts +5 -0
- package/dist/components/Contractor/index.js +21 -11
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +11 -10
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +12 -11
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +12 -11
- 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/DocumentSigner/DocumentList/Actions.js +7 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +24 -24
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.d.ts +0 -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/DocumentSigner.d.ts +2 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +40 -19
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +5 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +52 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +10 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +120 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +43 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +51 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.d.ts +4 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js +199 -0
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
- package/dist/components/Employee/{EmploymentEligibility → DocumentSigner/EmploymentEligibility}/index.d.ts +0 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +107 -0
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +284 -0
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.module.scss.js +10 -0
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.module.scss.js.map +1 -0
- 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/DocumentSigner/documentSignerStateMachine.d.ts +6 -0
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js +33 -14
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.d.ts +1 -0
- package/dist/components/Employee/DocumentSigner/stateMachine.js +41 -23
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.d.ts +10 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js +55 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +18 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +116 -0
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
- package/dist/components/Employee/EmployeeDocuments/index.d.ts +2 -0
- 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.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 +31 -26
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +2 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +23 -21
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +68 -49
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
- 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.js +10 -11
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +11 -11
- package/dist/components/Employee/Profile/Profile.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/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +3 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +43 -30
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +23 -17
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +36 -46
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +7 -7
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/index.d.ts +3 -0
- package/dist/components/Employee/index.js +20 -16
- package/dist/components/Employee/index.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 +63 -52
- 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.js +9 -9
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +29 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +13 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +45 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -0
- package/dist/components/Payroll/OffCycle/index.d.ts +3 -0
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.d.ts +6 -0
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +58 -0
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -0
- package/dist/components/Payroll/OffCycle/offCycleStateMachine.test.d.ts +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +2 -0
- package/dist/components/Payroll/{PayPeriodDateForm/PayPeriodDateFormTypes.d.ts → OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts} +5 -19
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/index.d.ts +2 -0
- package/dist/components/Payroll/{PayPeriodDateForm/usePayPeriodDateValidation.d.ts → OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts} +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +2 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +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/PayrollConfiguration.js +51 -49
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +93 -90
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +26 -25
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +38 -39
- 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 +23 -21
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +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/helpers.d.ts +5 -0
- package/dist/components/Payroll/helpers.js +41 -40
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +3 -2
- package/dist/components/Payroll/index.js +16 -16
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +6 -6
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/i18n/I18n.js +5 -5
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +1 -1
- package/dist/i18n/en/Employee.EmployeeDocuments.json.js +12 -0
- package/dist/i18n/en/Employee.EmployeeDocuments.json.js.map +1 -0
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js +15 -19
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -1
- package/dist/i18n/en/Employee.I9SignatureForm.json.js +78 -0
- package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCycle.json.js +8 -0
- package/dist/i18n/en/Payroll.OffCycle.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +18 -0
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
- package/dist/shared/constants.d.ts +9 -0
- package/dist/shared/constants.js +60 -53
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +110 -41
- package/package.json +14 -14
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +0 -3
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -37
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +0 -2
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +0 -35
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +0 -1
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +0 -2
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +0 -65
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +0 -1
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +0 -18
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +0 -1
- package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +0 -3
- package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +0 -32
- package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.31.0
|
|
4
|
+
|
|
5
|
+
### Features & Enhancements
|
|
6
|
+
|
|
7
|
+
- Add EmploymentEligibility I-9 form to DocumentSigner and SelfOnboardingFlow
|
|
8
|
+
- Add I-9 signature form with preparer support
|
|
9
|
+
- Add EmployeeDocuments component for onboarding document configuration
|
|
10
|
+
- Add OffCycle flow skeleton with state machine
|
|
11
|
+
|
|
12
|
+
### Fixes
|
|
13
|
+
|
|
14
|
+
- Refactor EmployeeDocuments event handling and onboarding status guards
|
|
15
|
+
- Test fest followups
|
|
16
|
+
- Fix link in documentation
|
|
17
|
+
- Fix raw HTML displaying in RFI modal
|
|
18
|
+
- Fix apostrophe not escaped on employee self onboarding company name
|
|
19
|
+
- Remove disabled continue button from DocumentSigner
|
|
20
|
+
|
|
21
|
+
### Chores & Maintenance
|
|
22
|
+
|
|
23
|
+
- Add I-9 component documentation to employee onboarding guides
|
|
24
|
+
- Clean up PayPeriodDateForm and add payroll type labeling
|
|
25
|
+
- Upgrade @gusto/embedded-api to 0.12.0
|
|
26
|
+
- Bump @gusto/embedded-api from 0.12.0 to 0.12.1
|
|
27
|
+
- Bump @storybook/addon-a11y from 10.2.10 to 10.2.12
|
|
28
|
+
- Bump @storybook/addon-docs from 10.2.10 to 10.2.12
|
|
29
|
+
- Bump @storybook/addon-onboarding from 10.2.10 to 10.2.11
|
|
30
|
+
- Bump @storybook/react-vite from 10.2.10 to 10.2.12
|
|
31
|
+
- Bump eslint-plugin-storybook from 10.2.10 to 10.2.12
|
|
32
|
+
- Bump storybook from 10.2.11 to 10.2.12
|
|
33
|
+
- Bump typescript-eslint from 8.56.0 to 8.56.1
|
|
34
|
+
- Bump i18next from 25.8.11 to 25.8.13
|
|
35
|
+
- Bump react-hook-form from 7.71.1 to 7.71.2
|
|
36
|
+
- Bump eslint from 9.39.2 to 9.39.3
|
|
37
|
+
- Bump @commitlint/cli from 20.4.1 to 20.4.2
|
|
38
|
+
- Bump @commitlint/config-conventional from 20.4.1 to 20.4.2
|
|
39
|
+
|
|
3
40
|
## 0.30.0
|
|
4
41
|
|
|
5
42
|
### Features & Enhancements
|
|
@@ -2,9 +2,10 @@ import { UseFieldProps } from '../hooks/useField';
|
|
|
2
2
|
import { ComboBoxProps, ComboBoxOption } from '../../UI/ComboBox/ComboBoxTypes';
|
|
3
3
|
import { OptionWithGenericValue } from '../hooks/useStringifyGenericFieldValue';
|
|
4
4
|
type GenericComboBoxOption<TValue> = OptionWithGenericValue<TValue, ComboBoxOption>;
|
|
5
|
-
export interface ComboBoxFieldProps<TValue> extends Omit<ComboBoxProps, 'name' | 'value' | 'onChange' | 'options' | 'isInvalid'>, UseFieldProps<TValue> {
|
|
5
|
+
export interface ComboBoxFieldProps<TValue> extends Omit<ComboBoxProps, 'name' | 'value' | 'onChange' | 'options' | 'isInvalid' | 'allowsCustomValue'>, UseFieldProps<TValue> {
|
|
6
6
|
options: GenericComboBoxOption<TValue>[];
|
|
7
7
|
convertValueToString?: (value: TValue) => string;
|
|
8
|
+
allowsCustomValue?: TValue extends string ? boolean : never;
|
|
8
9
|
}
|
|
9
10
|
export declare const ComboBoxField: <TValue = string>({ rules, defaultValue, name, errorMessage, isRequired, onChange: onChangeFromProps, transform, options, convertValueToString, description, onBlur, inputRef, ...comboBoxProps }: ComboBoxFieldProps<TValue>) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,42 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useField as
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { useField as V } from "../hooks/useField.js";
|
|
3
3
|
import { useComponentContext as b } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
|
-
import { useStringifyGenericFieldValue as
|
|
5
|
-
const
|
|
6
|
-
rules:
|
|
7
|
-
defaultValue:
|
|
8
|
-
name:
|
|
9
|
-
errorMessage:
|
|
10
|
-
isRequired:
|
|
11
|
-
onChange:
|
|
12
|
-
transform:
|
|
13
|
-
options:
|
|
14
|
-
convertValueToString:
|
|
15
|
-
description:
|
|
16
|
-
onBlur:
|
|
17
|
-
inputRef:
|
|
18
|
-
...
|
|
4
|
+
import { useStringifyGenericFieldValue as j } from "../hooks/useStringifyGenericFieldValue.js";
|
|
5
|
+
const O = ({
|
|
6
|
+
rules: n,
|
|
7
|
+
defaultValue: r,
|
|
8
|
+
name: t,
|
|
9
|
+
errorMessage: i,
|
|
10
|
+
isRequired: s,
|
|
11
|
+
onChange: m,
|
|
12
|
+
transform: l,
|
|
13
|
+
options: C,
|
|
14
|
+
convertValueToString: a,
|
|
15
|
+
description: f,
|
|
16
|
+
onBlur: p,
|
|
17
|
+
inputRef: u,
|
|
18
|
+
...o
|
|
19
19
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
name:
|
|
22
|
-
rules:
|
|
23
|
-
defaultValue:
|
|
24
|
-
errorMessage:
|
|
25
|
-
isRequired:
|
|
26
|
-
onChange:
|
|
27
|
-
transform:
|
|
28
|
-
description:
|
|
29
|
-
onBlur:
|
|
30
|
-
inputRef:
|
|
31
|
-
}),
|
|
32
|
-
options:
|
|
33
|
-
value:
|
|
34
|
-
onChange:
|
|
35
|
-
convertValueToString:
|
|
36
|
-
})
|
|
37
|
-
|
|
20
|
+
const d = b(), { value: g, onChange: e, ...c } = V({
|
|
21
|
+
name: t,
|
|
22
|
+
rules: n,
|
|
23
|
+
defaultValue: r,
|
|
24
|
+
errorMessage: i,
|
|
25
|
+
isRequired: s,
|
|
26
|
+
onChange: m,
|
|
27
|
+
transform: l,
|
|
28
|
+
description: f,
|
|
29
|
+
onBlur: p,
|
|
30
|
+
inputRef: u
|
|
31
|
+
}), h = j({
|
|
32
|
+
options: C,
|
|
33
|
+
value: g,
|
|
34
|
+
onChange: e,
|
|
35
|
+
convertValueToString: a
|
|
36
|
+
}), x = o.allowsCustomValue ? {
|
|
37
|
+
onChange: (F) => {
|
|
38
|
+
e(F);
|
|
39
|
+
}
|
|
40
|
+
} : {};
|
|
41
|
+
return /* @__PURE__ */ v(
|
|
42
|
+
d.ComboBox,
|
|
43
|
+
{
|
|
44
|
+
...o,
|
|
45
|
+
...c,
|
|
46
|
+
...h,
|
|
47
|
+
...x
|
|
48
|
+
}
|
|
49
|
+
);
|
|
38
50
|
};
|
|
39
51
|
export {
|
|
40
|
-
|
|
52
|
+
O as ComboBoxField
|
|
41
53
|
};
|
|
42
54
|
//# sourceMappingURL=ComboBoxField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBoxField.js","sources":["../../../../../src/components/Common/Fields/ComboBoxField/ComboBoxField.tsx"],"sourcesContent":["import { useField, type UseFieldProps } from '@/components/Common/Fields/hooks/useField'\nimport type { ComboBoxProps, ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport {\n useStringifyGenericFieldValue,\n type OptionWithGenericValue,\n} from '@/components/Common/Fields/hooks/useStringifyGenericFieldValue'\n\ntype GenericComboBoxOption<TValue> = OptionWithGenericValue<TValue, ComboBoxOption>\n\nexport interface ComboBoxFieldProps<TValue>\n extends\n Omit
|
|
1
|
+
{"version":3,"file":"ComboBoxField.js","sources":["../../../../../src/components/Common/Fields/ComboBoxField/ComboBoxField.tsx"],"sourcesContent":["import { useField, type UseFieldProps } from '@/components/Common/Fields/hooks/useField'\nimport type { ComboBoxProps, ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport {\n useStringifyGenericFieldValue,\n type OptionWithGenericValue,\n} from '@/components/Common/Fields/hooks/useStringifyGenericFieldValue'\n\ntype GenericComboBoxOption<TValue> = OptionWithGenericValue<TValue, ComboBoxOption>\n\nexport interface ComboBoxFieldProps<TValue>\n extends\n Omit<\n ComboBoxProps,\n 'name' | 'value' | 'onChange' | 'options' | 'isInvalid' | 'allowsCustomValue'\n >,\n UseFieldProps<TValue> {\n options: GenericComboBoxOption<TValue>[]\n convertValueToString?: (value: TValue) => string\n allowsCustomValue?: TValue extends string ? boolean : never\n}\n\nexport const ComboBoxField = <TValue = string,>({\n rules,\n defaultValue,\n name,\n errorMessage,\n isRequired,\n onChange: onChangeFromProps,\n transform,\n options,\n convertValueToString,\n description,\n onBlur,\n inputRef,\n ...comboBoxProps\n}: ComboBoxFieldProps<TValue>) => {\n const Components = useComponentContext()\n const { value, onChange, ...fieldProps } = useField<TValue>({\n name,\n rules,\n defaultValue,\n errorMessage,\n isRequired,\n onChange: onChangeFromProps,\n transform,\n description,\n onBlur,\n inputRef,\n })\n\n const stringFieldProps = useStringifyGenericFieldValue<TValue, ComboBoxOption>({\n options,\n value,\n onChange,\n convertValueToString,\n })\n\n // useStringifyGenericFieldValue's onChange only fires for matched options, dropping freeform input.\n // Override with a direct pass-through. Cast is safe: allowsCustomValue constrains TValue extends string.\n const freeformOverride = comboBoxProps.allowsCustomValue\n ? {\n onChange: (val: string) => {\n onChange(val as TValue)\n },\n }\n : {}\n\n return (\n <Components.ComboBox\n {...comboBoxProps}\n {...fieldProps}\n {...stringFieldProps}\n {...freeformOverride}\n />\n )\n}\n"],"names":["ComboBoxField","rules","defaultValue","name","errorMessage","isRequired","onChangeFromProps","transform","options","convertValueToString","description","onBlur","inputRef","comboBoxProps","Components","useComponentContext","value","onChange","fieldProps","useField","stringFieldProps","useStringifyGenericFieldValue","freeformOverride","val","jsx"],"mappings":";;;;AAsBO,MAAMA,IAAgB,CAAmB;AAAA,EAC9C,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AAAA,EACV,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IAAaC,EAAA,GACb,EAAE,OAAAC,GAAO,UAAAC,GAAU,GAAGC,EAAA,IAAeC,EAAiB;AAAA,IAC1D,MAAAhB;AAAA,IACA,OAAAF;AAAA,IACA,cAAAC;AAAA,IACA,cAAAE;AAAA,IACA,YAAAC;AAAA,IACA,UAAUC;AAAA,IACV,WAAAC;AAAA,IACA,aAAAG;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,EAAA,CACD,GAEKQ,IAAmBC,EAAsD;AAAA,IAC7E,SAAAb;AAAA,IACA,OAAAQ;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAR;AAAA,EAAA,CACD,GAIKa,IAAmBT,EAAc,oBACnC;AAAA,IACE,UAAU,CAACU,MAAgB;AACzB,MAAAN,EAASM,CAAa;AAAA,IACxB;AAAA,EAAA,IAEF,CAAA;AAEJ,SACE,gBAAAC;AAAA,IAACV,EAAW;AAAA,IAAX;AAAA,MACE,GAAGD;AAAA,MACH,GAAGK;AAAA,MACH,GAAGE;AAAA,MACH,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -2,29 +2,30 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { z as o } from "zod";
|
|
3
3
|
import { useForm as s, FormProvider as a } from "react-hook-form";
|
|
4
4
|
import { zodResolver as l } from "@hookform/resolvers/zod";
|
|
5
|
-
import
|
|
5
|
+
import e from "./SignatureForm.module.scss.js";
|
|
6
6
|
import { Form as u } from "../Form/Form.js";
|
|
7
7
|
import { Flex as c } from "../Flex/Flex.js";
|
|
8
|
-
import "react-i18next";
|
|
9
8
|
import "classnames";
|
|
9
|
+
import "../../../shared/constants.js";
|
|
10
|
+
import "react-i18next";
|
|
10
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
12
|
import "react";
|
|
12
|
-
const
|
|
13
|
+
const p = o.object({
|
|
13
14
|
signature: o.string().min(1),
|
|
14
15
|
confirmSignature: o.literal(!0)
|
|
15
|
-
}),
|
|
16
|
+
}), f = {
|
|
16
17
|
signature: ""
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
resolver: l(
|
|
21
|
-
defaultValues:
|
|
19
|
+
function V({ onSubmit: m, children: i, formProps: n }) {
|
|
20
|
+
const t = s({
|
|
21
|
+
resolver: l(p),
|
|
22
|
+
defaultValues: f,
|
|
22
23
|
...n
|
|
23
24
|
});
|
|
24
|
-
return /* @__PURE__ */ r(a, { ...
|
|
25
|
+
return /* @__PURE__ */ r(a, { ...t, children: /* @__PURE__ */ r(u, { onSubmit: t.handleSubmit(m), className: e.container, children: /* @__PURE__ */ r("div", { className: e.formFields, children: /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: i }) }) }) });
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
V as SignatureForm,
|
|
29
|
+
p as SignatureFormSchema
|
|
29
30
|
};
|
|
30
31
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;;;;;;AAOO,MAAMA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAYT,CAAmB;AAAA,IACzC,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACE,gBAAAI,EAACC,GAAA,EAAc,GAAGJ,GAChB,UAAA,gBAAAG,EAACE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,EAAA,CACH,EAAA,CACF,EAAA,CACF,GACF;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "../../../shared/constants.js";
|
|
3
|
-
import "react-i18next";
|
|
4
3
|
import "classnames";
|
|
5
4
|
import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import "react-i18next";
|
|
6
6
|
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
import "react";
|
|
8
8
|
function y({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../../shared/constants.js";
|
|
3
|
-
import "react-i18next";
|
|
4
3
|
import "classnames";
|
|
4
|
+
import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
|
|
5
|
+
import "react-i18next";
|
|
5
6
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
7
|
import "react";
|
|
7
|
-
import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
|
|
8
8
|
import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
|
|
9
9
|
function b({
|
|
10
10
|
signatureLabel: e,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ComboBoxProps } from './ComboBoxTypes';
|
|
2
|
-
export declare const ComboBox: ({ className, description, errorMessage, id, isDisabled, isInvalid, isRequired, label, onChange, onBlur, options, placeholder, value, inputRef, shouldVisuallyHideLabel, name, ...props }: ComboBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const ComboBox: ({ allowsCustomValue, className, description, errorMessage, id, isDisabled, isInvalid, isRequired, label, onChange, onBlur, options, placeholder, value, inputRef, shouldVisuallyHideLabel, name, ...props }: ComboBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,80 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ComboBox as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import
|
|
6
|
-
import { useFieldIds as
|
|
7
|
-
import
|
|
8
|
-
import { FieldLayout as
|
|
9
|
-
import { useTheme as
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { ComboBox as j, Input as w, Button as z, Popover as D, Virtualizer as E, ListLayout as P, ListBox as H, ListBoxItem as K } from "react-aria-components";
|
|
3
|
+
import { useTranslation as M } from "react-i18next";
|
|
4
|
+
import { useMemo as U } from "react";
|
|
5
|
+
import u from "classnames";
|
|
6
|
+
import { useFieldIds as V } from "../hooks/useFieldIds.js";
|
|
7
|
+
import t from "./ComboBox.module.scss.js";
|
|
8
|
+
import { FieldLayout as _ } from "../../FieldLayout/FieldLayout.js";
|
|
9
|
+
import { useTheme as $ } from "../../../../contexts/ThemeProvider/useTheme.js";
|
|
10
10
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
import q from "../../../../assets/icons/alert-circle.svg.js";
|
|
12
|
+
import G from "../../../../assets/icons/caret-down.svg.js";
|
|
13
|
+
const tr = ({
|
|
14
|
+
allowsCustomValue: i,
|
|
15
|
+
className: f,
|
|
16
|
+
description: m,
|
|
17
|
+
errorMessage: a,
|
|
18
|
+
id: h,
|
|
19
|
+
isDisabled: x,
|
|
20
|
+
isInvalid: n,
|
|
21
|
+
isRequired: B,
|
|
22
|
+
label: s,
|
|
23
|
+
onChange: c,
|
|
24
|
+
onBlur: b,
|
|
25
|
+
options: l,
|
|
26
|
+
placeholder: I,
|
|
27
|
+
value: e,
|
|
28
|
+
inputRef: g,
|
|
29
|
+
shouldVisuallyHideLabel: C,
|
|
30
|
+
name: y,
|
|
31
|
+
...L
|
|
31
32
|
}) => {
|
|
32
|
-
const { t:
|
|
33
|
-
inputId:
|
|
34
|
-
errorMessage:
|
|
35
|
-
description:
|
|
36
|
-
}), { container:
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
33
|
+
const { t: N } = M(), { inputId: d, errorMessageId: S, descriptionId: v, ariaDescribedBy: T } = V({
|
|
34
|
+
inputId: h,
|
|
35
|
+
errorMessage: a,
|
|
36
|
+
description: m
|
|
37
|
+
}), { container: A } = $(), F = U(() => l.map((r) => ({ name: r.label, id: r.value })), [l]);
|
|
38
|
+
return /* @__PURE__ */ o(
|
|
39
|
+
_,
|
|
39
40
|
{
|
|
40
|
-
label:
|
|
41
|
-
htmlFor:
|
|
42
|
-
errorMessage:
|
|
43
|
-
errorMessageId:
|
|
44
|
-
descriptionId:
|
|
45
|
-
isRequired:
|
|
46
|
-
description:
|
|
47
|
-
shouldVisuallyHideLabel:
|
|
48
|
-
className:
|
|
41
|
+
label: s,
|
|
42
|
+
htmlFor: d,
|
|
43
|
+
errorMessage: a,
|
|
44
|
+
errorMessageId: S,
|
|
45
|
+
descriptionId: v,
|
|
46
|
+
isRequired: B,
|
|
47
|
+
description: m,
|
|
48
|
+
shouldVisuallyHideLabel: C,
|
|
49
|
+
className: u(t.root, f),
|
|
49
50
|
withErrorIcon: !1,
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
|
|
51
|
+
children: /* @__PURE__ */ p(
|
|
52
|
+
j,
|
|
52
53
|
{
|
|
53
|
-
"aria-label":
|
|
54
|
-
"aria-describedby":
|
|
54
|
+
"aria-label": s,
|
|
55
|
+
"aria-describedby": T,
|
|
55
56
|
className: "react-aria-ComboBox-root",
|
|
56
|
-
isDisabled:
|
|
57
|
-
isInvalid:
|
|
57
|
+
isDisabled: x,
|
|
58
|
+
isInvalid: n,
|
|
58
59
|
menuTrigger: "focus",
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
allowsCustomValue: i,
|
|
61
|
+
...i ? {
|
|
62
|
+
inputValue: e ?? "",
|
|
63
|
+
onInputChange: (r) => c?.(r)
|
|
64
|
+
} : {
|
|
65
|
+
selectedKey: e || void 0,
|
|
66
|
+
onSelectionChange: (r) => {
|
|
67
|
+
r && c?.(r.toString());
|
|
68
|
+
}
|
|
61
69
|
},
|
|
62
|
-
id:
|
|
63
|
-
|
|
64
|
-
name: I,
|
|
70
|
+
id: d,
|
|
71
|
+
name: y,
|
|
65
72
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ o(w, { ref: g, placeholder: I, onBlur: b, ...L }),
|
|
74
|
+
/* @__PURE__ */ o(z, { children: /* @__PURE__ */ p("div", { "aria-hidden": "true", className: t.icons, children: [
|
|
75
|
+
n && /* @__PURE__ */ o(q, { fontSize: 16 }),
|
|
76
|
+
/* @__PURE__ */ o(G, { title: N("icons.selectArrow") })
|
|
70
77
|
] }) }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
78
|
+
/* @__PURE__ */ o(
|
|
79
|
+
D,
|
|
73
80
|
{
|
|
74
|
-
className:
|
|
75
|
-
UNSTABLE_portalContainer:
|
|
81
|
+
className: u(t.popover, "react-aria-Popover"),
|
|
82
|
+
UNSTABLE_portalContainer: A.current,
|
|
76
83
|
maxHeight: 320,
|
|
77
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ o(E, { layout: P, children: /* @__PURE__ */ o(H, { items: F, children: (r) => /* @__PURE__ */ o(K, { children: r.name }, r.id) }) })
|
|
78
85
|
}
|
|
79
86
|
)
|
|
80
87
|
]
|
|
@@ -84,6 +91,6 @@ const er = ({
|
|
|
84
91
|
);
|
|
85
92
|
};
|
|
86
93
|
export {
|
|
87
|
-
|
|
94
|
+
tr as ComboBox
|
|
88
95
|
};
|
|
89
96
|
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n allowsCustomValue,\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n allowsCustomValue={allowsCustomValue}\n {...(allowsCustomValue\n ? {\n inputValue: value ?? '',\n onInputChange: (inputVal: string) => onChange?.(inputVal),\n }\n : {\n selectedKey: value ? (value as Key) : undefined,\n onSelectionChange: (key: Key | null) => {\n if (key) onChange?.(key.toString())\n },\n })}\n id={inputId}\n name={name}\n >\n <Input ref={inputRef} placeholder={placeholder} onBlur={onBlur} {...props} />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n )\n}\n"],"names":["ComboBox","allowsCustomValue","className","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","inputRef","shouldVisuallyHideLabel","name","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","items","useMemo","option","jsx","FieldLayout","classNames","styles","jsxs","AriaComboBox","inputVal","key","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","ListLayout","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAsBO,MAAMA,KAAW,CAAC;AAAA,EACvB,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AACnB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASpB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GACK,EAAE,WAAAuB,EAAA,IAAcC,EAAA,GAEhBC,IAAQC,EAAQ,MACbjB,EAAQ,IAAI,CAAAkB,OAAW,EAAE,MAAMA,EAAO,OAAO,IAAIA,EAAO,MAAA,EAAQ,GACtE,CAAClB,CAAO,CAAC;AAEZ,SACE,gBAAAmB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAvB;AAAA,MACA,SAASY;AAAA,MACT,cAAAjB;AAAA,MACA,gBAAAkB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAf;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAa;AAAA,MACA,WAAWiB,EAAWC,EAAO,MAAMhC,CAAS;AAAA,MAC5C,eAAe;AAAA,MAEf,UAAA,gBAAAiC;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY3B;AAAA,UACZ,oBAAkBe;AAAA,UAClB,WAAW;AAAA,UACX,YAAAlB;AAAA,UACA,WAAAC;AAAA,UACA,aAAY;AAAA,UACZ,mBAAAN;AAAA,UACC,GAAIA,IACD;AAAA,YACE,YAAYa,KAAS;AAAA,YACrB,eAAe,CAACuB,MAAqB3B,IAAW2B,CAAQ;AAAA,UAAA,IAE1D;AAAA,YACE,aAAavB,KAAyB;AAAA,YACtC,mBAAmB,CAACwB,MAAoB;AACtC,cAAIA,KAAK5B,IAAW4B,EAAI,SAAA,CAAU;AAAA,YACpC;AAAA,UAAA;AAAA,UAEN,IAAIjB;AAAA,UACJ,MAAAJ;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAc,EAACQ,KAAM,KAAKxB,GAAU,aAAAF,GAA0B,QAAAF,GAAiB,GAAGO,GAAO;AAAA,YAC3E,gBAAAa,EAACS,KACC,UAAA,gBAAAL,EAAC,OAAA,EAAI,eAAY,QAAO,WAAWD,EAAO,OACvC,UAAA;AAAA,cAAA3B,KAAa,gBAAAwB,EAACU,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,cACzC,gBAAAV,EAACW,GAAA,EAAU,OAAOvB,EAAE,mBAAmB,EAAA,CAAG;AAAA,YAAA,EAAA,CAC5C,EAAA,CACF;AAAA,YAEA,gBAAAY;AAAA,cAACY;AAAA,cAAA;AAAA,gBACC,WAAWV,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BR,EAAU;AAAA,gBACpC,WAAW;AAAA,gBAEX,UAAA,gBAAAK,EAACa,GAAA,EAAY,QAAQC,GACnB,4BAACC,GAAA,EAAQ,OAAAlB,GACN,UAAA,CAAAmB,MAAQ,gBAAAhB,EAACiB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,GACjD,EAAA,CACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -43,4 +43,9 @@ export interface ComboBoxProps extends SharedFieldLayoutProps, Pick<InputHTMLAtt
|
|
|
43
43
|
* React ref for the combo box input element
|
|
44
44
|
*/
|
|
45
45
|
inputRef?: Ref<HTMLInputElement>;
|
|
46
|
+
/**
|
|
47
|
+
* Allows the user to type any value, not just options in the list.
|
|
48
|
+
* The options list becomes a suggestion helper rather than a strict constraint.
|
|
49
|
+
*/
|
|
50
|
+
allowsCustomValue?: boolean;
|
|
46
51
|
}
|
|
@@ -8,8 +8,8 @@ import { AssignSignatorySelection as u } from "./AssignSignatorySelection.js";
|
|
|
8
8
|
import { SignatoryAssignmentMode as m, AssignSignatoryProvider as E } from "./useAssignSignatory.js";
|
|
9
9
|
import { companyEvents as i } from "../../../shared/constants.js";
|
|
10
10
|
import { Flex as C } from "../../Common/Flex/Flex.js";
|
|
11
|
-
import "react-i18next";
|
|
12
11
|
import "classnames";
|
|
12
|
+
import "react-i18next";
|
|
13
13
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
14
|
import "react";
|
|
15
15
|
import { BaseComponent as M } from "../../Base/Base.js";
|
|
@@ -4,9 +4,9 @@ import { useAssignSignatory as s, SignatoryAssignmentMode as o } from "./useAssi
|
|
|
4
4
|
import r from "./AssignSignatorySelection.module.scss.js";
|
|
5
5
|
import "../../../shared/constants.js";
|
|
6
6
|
import "classnames";
|
|
7
|
+
import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
7
8
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
9
|
import "react";
|
|
9
|
-
import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
10
10
|
const f = () => {
|
|
11
11
|
const { t: n } = e("Company.AssignSignatory"), { onSignatoryAssignmentModeChange: t } = s();
|
|
12
12
|
return /* @__PURE__ */ i("section", { className: r.container, children: /* @__PURE__ */ i(
|
|
@@ -16,10 +16,10 @@ import { useI18n as W } from "../../../../i18n/I18n.js";
|
|
|
16
16
|
import { BaseComponent as X } from "../../../Base/Base.js";
|
|
17
17
|
import { useBase as Z } from "../../../Base/useBase.js";
|
|
18
18
|
import { Flex as $ } from "../../../Common/Flex/Flex.js";
|
|
19
|
+
import { companyEvents as c } from "../../../../shared/constants.js";
|
|
19
20
|
import "react-i18next";
|
|
20
21
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
21
22
|
import "react";
|
|
22
|
-
import { companyEvents as c } from "../../../../shared/constants.js";
|
|
23
23
|
import { formatDateToStringDate as V } from "../../../../helpers/dateFormatting.js";
|
|
24
24
|
import { useMaskedTransform as tt, commonMasks as et } from "../../../../helpers/mask.js";
|
|
25
25
|
function Rt(r) {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useCreateSignatory as
|
|
2
|
+
import { useTranslation as c } from "react-i18next";
|
|
3
|
+
import { useCreateSignatory as p } from "./useCreateSignatory.js";
|
|
4
4
|
import { Flex as o } from "../../../Common/Flex/Flex.js";
|
|
5
5
|
import { Grid as n } from "../../../Common/Grid/Grid.js";
|
|
6
|
-
import "classnames";
|
|
7
|
-
import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
import "react";
|
|
9
|
-
import { STATES_ABBR as g } from "../../../../shared/constants.js";
|
|
10
|
-
import { usePlaceholderSSN as h, normalizeSSN as f } from "../../../../helpers/ssn.js";
|
|
11
|
-
import { TitleSelect as y } from "../TitleSelect.js";
|
|
12
|
-
import { useMaskedTransform as b, commonMasks as S } from "../../../../helpers/mask.js";
|
|
13
6
|
import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
14
|
-
import { DatePickerField as
|
|
7
|
+
import { DatePickerField as u } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
8
|
+
import { useComponentContext as g } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import { STATES_ABBR as h } from "../../../../shared/constants.js";
|
|
11
|
+
import { usePlaceholderSSN as f, normalizeSSN as y } from "../../../../helpers/ssn.js";
|
|
12
|
+
import { TitleSelect as b } from "../TitleSelect.js";
|
|
13
|
+
import { useMaskedTransform as S, commonMasks as D } from "../../../../helpers/mask.js";
|
|
15
14
|
import { SelectField as M } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
16
|
-
const
|
|
17
|
-
const i =
|
|
15
|
+
const A = () => {
|
|
16
|
+
const i = g(), { currentSignatory: t } = p(), { t: e } = c("Company.AssignSignatory"), d = f(t?.hasSsn), m = S(D.phoneMask);
|
|
18
17
|
return /* @__PURE__ */ a(o, { flexDirection: "column", gap: 32, children: [
|
|
19
18
|
/* @__PURE__ */ a(o, { flexDirection: "column", gap: 12, children: [
|
|
20
19
|
/* @__PURE__ */ a("header", { children: [
|
|
@@ -50,7 +49,7 @@ const E = () => {
|
|
|
50
49
|
isDisabled: !!t
|
|
51
50
|
}
|
|
52
51
|
),
|
|
53
|
-
/* @__PURE__ */ r(
|
|
52
|
+
/* @__PURE__ */ r(b, {}),
|
|
54
53
|
/* @__PURE__ */ r(
|
|
55
54
|
s,
|
|
56
55
|
{
|
|
@@ -68,12 +67,12 @@ const E = () => {
|
|
|
68
67
|
label: e("signatoryDetails.ssn"),
|
|
69
68
|
errorMessage: e("validations.ssn", { ns: "common" }),
|
|
70
69
|
isRequired: !t?.hasSsn,
|
|
71
|
-
transform:
|
|
70
|
+
transform: y,
|
|
72
71
|
placeholder: d
|
|
73
72
|
}
|
|
74
73
|
),
|
|
75
74
|
/* @__PURE__ */ r(
|
|
76
|
-
|
|
75
|
+
u,
|
|
77
76
|
{
|
|
78
77
|
name: "birthday",
|
|
79
78
|
label: e("signatoryDetails.birthday"),
|
|
@@ -112,7 +111,7 @@ const E = () => {
|
|
|
112
111
|
M,
|
|
113
112
|
{
|
|
114
113
|
name: "state",
|
|
115
|
-
options:
|
|
114
|
+
options: h.map((l) => ({
|
|
116
115
|
label: e(`statesHash.${l}`, { ns: "common" }),
|
|
117
116
|
value: l
|
|
118
117
|
})),
|
|
@@ -136,6 +135,6 @@ const E = () => {
|
|
|
136
135
|
] });
|
|
137
136
|
};
|
|
138
137
|
export {
|
|
139
|
-
|
|
138
|
+
A as CreateSignatoryForm
|
|
140
139
|
};
|
|
141
140
|
//# sourceMappingURL=CreateSignatoryForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { z } from 'zod'\nimport { useCreateSignatory } from './useCreateSignatory'\nimport type { generateCreateSignatorySchema } from './Schema'\nimport { TextInputField, Grid, Flex, SelectField, DatePickerField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type CreateSignatoryInputs = z.infer<ReturnType<typeof generateCreateSignatorySchema>>\n\nexport const CreateSignatoryForm = () => {\n const Components = useComponentContext()\n const { currentSignatory } = useCreateSignatory()\n const { t } = useTranslation('Company.AssignSignatory')\n const placeholderSSN = usePlaceholderSSN(currentSignatory?.hasSsn)\n const transformPhone = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('signatoryDetails.title')}</Components.Heading>\n <Components.Text>{t('signatoryDetails.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"firstName\"\n label={t('signatoryDetails.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('signatoryDetails.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TextInputField\n name=\"email\"\n label={t('signatoryDetails.email')}\n isRequired\n errorMessage={t('validations.email')}\n isDisabled={Boolean(currentSignatory)}\n />\n <TitleSelect />\n <TextInputField\n name=\"phone\"\n label={t('signatoryDetails.phone')}\n isRequired\n errorMessage={t('validations.phone')}\n transform={transformPhone}\n />\n <TextInputField\n name=\"ssn\"\n label={t('signatoryDetails.ssn')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n isRequired={!currentSignatory?.hasSsn}\n transform={normalizeSSN}\n placeholder={placeholderSSN}\n />\n <DatePickerField\n name=\"birthday\"\n label={t('signatoryDetails.birthday')}\n errorMessage={t('validations.dob')}\n isRequired\n />\n </Grid>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('address.title')}</Components.Heading>\n <Components.Text>{t('address.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('address.street1')}\n isRequired\n errorMessage={t('validations.address.street1')}\n />\n <TextInputField name=\"street2\" label={t('address.street2')} />\n <TextInputField\n name=\"city\"\n label={t('address.city')}\n isRequired\n errorMessage={t('validations.address.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('address.state')}\n placeholder={t('address.statePlaceholder')}\n errorMessage={t('validations.address.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n label={t('address.zip')}\n isRequired\n errorMessage={t('validations.address.zip')}\n />\n </Grid>\n </Flex>\n </Flex>\n )\n}\n"],"names":["CreateSignatoryForm","Components","useComponentContext","currentSignatory","useCreateSignatory","t","useTranslation","placeholderSSN","usePlaceholderSSN","transformPhone","useMaskedTransform","commonMasks","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect","normalizeSSN","DatePickerField","SelectField","STATES_ABBR","stateAbbr"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreateSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { z } from 'zod'\nimport { useCreateSignatory } from './useCreateSignatory'\nimport type { generateCreateSignatorySchema } from './Schema'\nimport { TextInputField, Grid, Flex, SelectField, DatePickerField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type CreateSignatoryInputs = z.infer<ReturnType<typeof generateCreateSignatorySchema>>\n\nexport const CreateSignatoryForm = () => {\n const Components = useComponentContext()\n const { currentSignatory } = useCreateSignatory()\n const { t } = useTranslation('Company.AssignSignatory')\n const placeholderSSN = usePlaceholderSSN(currentSignatory?.hasSsn)\n const transformPhone = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('signatoryDetails.title')}</Components.Heading>\n <Components.Text>{t('signatoryDetails.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"firstName\"\n label={t('signatoryDetails.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('signatoryDetails.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TextInputField\n name=\"email\"\n label={t('signatoryDetails.email')}\n isRequired\n errorMessage={t('validations.email')}\n isDisabled={Boolean(currentSignatory)}\n />\n <TitleSelect />\n <TextInputField\n name=\"phone\"\n label={t('signatoryDetails.phone')}\n isRequired\n errorMessage={t('validations.phone')}\n transform={transformPhone}\n />\n <TextInputField\n name=\"ssn\"\n label={t('signatoryDetails.ssn')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n isRequired={!currentSignatory?.hasSsn}\n transform={normalizeSSN}\n placeholder={placeholderSSN}\n />\n <DatePickerField\n name=\"birthday\"\n label={t('signatoryDetails.birthday')}\n errorMessage={t('validations.dob')}\n isRequired\n />\n </Grid>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('address.title')}</Components.Heading>\n <Components.Text>{t('address.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('address.street1')}\n isRequired\n errorMessage={t('validations.address.street1')}\n />\n <TextInputField name=\"street2\" label={t('address.street2')} />\n <TextInputField\n name=\"city\"\n label={t('address.city')}\n isRequired\n errorMessage={t('validations.address.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('address.state')}\n placeholder={t('address.statePlaceholder')}\n errorMessage={t('validations.address.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n label={t('address.zip')}\n isRequired\n errorMessage={t('validations.address.zip')}\n />\n </Grid>\n </Flex>\n </Flex>\n )\n}\n"],"names":["CreateSignatoryForm","Components","useComponentContext","currentSignatory","useCreateSignatory","t","useTranslation","placeholderSSN","usePlaceholderSSN","transformPhone","useMaskedTransform","commonMasks","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect","normalizeSSN","DatePickerField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;;;;;;;AAaO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,kBAAAC,EAAA,IAAqBC,EAAA,GACvB,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAiBC,EAAkBL,GAAkB,MAAM,GAC3DM,IAAiBC,EAAmBC,EAAY,SAAS;AAE/D,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAD,EAAC,UAAA,EACC,UAAA;AAAA,QAAA,gBAAAE,EAACb,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAI,EAAE,wBAAwB,GAAE;AAAA,0BACxDJ,EAAW,MAAX,EAAiB,UAAAI,EAAE,8BAA8B,EAAA,CAAE;AAAA,MAAA,GACtD;AAAA,MAEA,gBAAAO,EAACG,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,4BAA4B;AAAA,YACrC,YAAU;AAAA,YACV,cAAcA,EAAE,uBAAuB;AAAA,UAAA;AAAA,QAAA;AAAA,QAEzC,gBAAAS;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,2BAA2B;AAAA,YACpC,YAAU;AAAA,YACV,cAAcA,EAAE,sBAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAExC,gBAAAS;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,wBAAwB;AAAA,YACjC,YAAU;AAAA,YACV,cAAcA,EAAE,mBAAmB;AAAA,YACnC,YAAY,EAAQF;AAAA,UAAgB;AAAA,QAAA;AAAA,0BAErCc,GAAA,EAAY;AAAA,QACb,gBAAAH;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,wBAAwB;AAAA,YACjC,YAAU;AAAA,YACV,cAAcA,EAAE,mBAAmB;AAAA,YACnC,WAAWI;AAAA,UAAA;AAAA,QAAA;AAAA,QAEb,gBAAAK;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,sBAAsB;AAAA,YAC/B,cAAcA,EAAE,mBAAmB,EAAE,IAAI,UAAU;AAAA,YACnD,YAAY,CAACF,GAAkB;AAAA,YAC/B,WAAWe;AAAA,YACX,aAAaX;AAAA,UAAA;AAAA,QAAA;AAAA,QAEf,gBAAAO;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOd,EAAE,2BAA2B;AAAA,YACpC,cAAcA,EAAE,iBAAiB;AAAA,YACjC,YAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACZ,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAO,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAD,EAAC,UAAA,EACC,UAAA;AAAA,QAAA,gBAAAE,EAACb,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAI,EAAE,eAAe,GAAE;AAAA,0BAC/CJ,EAAW,MAAX,EAAiB,UAAAI,EAAE,qBAAqB,EAAA,CAAE;AAAA,MAAA,GAC7C;AAAA,MAEA,gBAAAO,EAACG,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,iBAAiB;AAAA,YAC1B,YAAU;AAAA,YACV,cAAcA,EAAE,6BAA6B;AAAA,UAAA;AAAA,QAAA;AAAA,0BAE9CW,GAAA,EAAe,MAAK,WAAU,OAAOX,EAAE,iBAAiB,GAAG;AAAA,QAC5D,gBAAAS;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,cAAc;AAAA,YACvB,YAAU;AAAA,YACV,cAAcA,EAAE,0BAA0B;AAAA,UAAA;AAAA,QAAA;AAAA,QAE5C,gBAAAS;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASC,EAAY,IAAI,CAACC,OAA6C;AAAA,cACrE,OAAOjB,EAAE,cAAciB,CAAS,IAAI,EAAE,IAAI,UAAU;AAAA,cACpD,OAAOA;AAAA,YAAA,EACP;AAAA,YACF,OAAOjB,EAAE,eAAe;AAAA,YACxB,aAAaA,EAAE,0BAA0B;AAAA,YACzC,cAAcA,EAAE,2BAA2B;AAAA,YAC3C,YAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAEZ,gBAAAS;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,aAAa;AAAA,YACtB,YAAU;AAAA,YACV,cAAcA,EAAE,yBAAyB;AAAA,UAAA;AAAA,QAAA;AAAA,MAC3C,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|