@gusto/embedded-react-sdk 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +119 -0
- package/dist/assets/icons/icon-file-jpg.svg.js +10 -0
- package/dist/assets/icons/icon-file-jpg.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-pdf.svg.js +10 -0
- package/dist/assets/icons/icon-file-pdf.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-png.svg.js +10 -0
- package/dist/assets/icons/icon-file-png.svg.js.map +1 -0
- package/dist/assets/icons/icon-trashcan.svg.js +10 -0
- package/dist/assets/icons/icon-trashcan.svg.js.map +1 -0
- package/dist/assets/icons/plus-circle.svg.js +5 -5
- package/dist/assets/icons/plus-circle.svg.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.js +23 -23
- package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js +6 -10
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +12 -12
- package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +1 -1
- package/dist/components/Common/InternalError/InternalError.module.scss.js +4 -4
- package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +8 -8
- package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +10 -10
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +10 -10
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
- package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
- package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +4 -4
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +4 -4
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +2 -2
- package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
- package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +27 -25
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Input/Input.module.scss.js +8 -8
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/Modal/Modal.js +41 -40
- package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
- package/dist/components/Common/UI/Radio/Radio.module.scss.js +6 -6
- package/dist/components/Common/UI/Select/Select.module.scss.js +5 -5
- package/dist/components/Common/UI/Table/Table.js +1 -1
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +17 -15
- package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.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/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 +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 +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +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/Locations/LocationForm/Form.js +5 -6
- package/dist/components/Company/Locations/LocationForm/Form.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/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
- package/dist/components/Company/PaySchedule/_parts/Edit.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/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/PaymentMethod/BankAccountForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.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.d.ts +8 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +60 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -55
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +14 -14
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +127 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -47
- 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/ContractorProfileForm.module.scss.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +3 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +145 -137
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +106 -101
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -87
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +2 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +110 -104
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +50 -45
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +30 -30
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +4 -8
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.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/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.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/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
- package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
- 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/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/AdminPersonalDetails.module.scss.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/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.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/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +163 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +98 -0
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
- package/dist/components/InformationRequests/InformationRequests.d.ts +12 -0
- package/dist/components/InformationRequests/InformationRequests.js +101 -0
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
- package/dist/components/InformationRequests/index.d.ts +4 -0
- package/dist/components/InformationRequests/index.js +9 -0
- package/dist/components/InformationRequests/index.js.map +1 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +10 -10
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +2 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +33 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +7 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +39 -0
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -0
- package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +5 -0
- package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +15 -0
- package/dist/components/Payroll/OffCycleReasonSelection/types.js +14 -0
- package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +2 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +35 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +1 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +2 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +65 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +1 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +18 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormTypes.d.ts +53 -0
- package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +3 -0
- package/dist/components/Payroll/PayPeriodDateForm/usePayPeriodDateValidation.d.ts +5 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -22
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +103 -28
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
- 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/PayrollEditEmployeePresentation.module.scss.js +5 -5
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +6 -6
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +29 -29
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +93 -98
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +18 -18
- package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +4 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +34 -28
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +82 -51
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -35
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +67 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +5 -2
- package/dist/components/Payroll/index.js +16 -14
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +8 -3
- package/dist/contexts/ThemeProvider/theme.js +27 -22
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +3 -0
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +12 -11
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/i18n/I18n.js +8 -8
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Employee.Deductions.json.js +157 -161
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
- package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
- package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +20 -0
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
- package/dist/i18n/en/InformationRequests.json.js +8 -0
- package/dist/i18n/en/InformationRequests.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js +12 -0
- package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +32 -0
- package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
- package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +10 -0
- package/dist/shared/constants.js +22 -17
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +290 -40
- package/package.json +17 -17
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
- package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
- package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
- package/dist/i18n/en/Payroll.InformationRequestList.json.js +0 -18
- package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
- /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
- /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import { ModalDefaults as
|
|
1
|
+
import { jsx as s, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as r, useState as S, useLayoutEffect as T } from "react";
|
|
3
|
+
import l from "classnames";
|
|
4
|
+
import { ModalDefaults as B } from "./ModalTypes.js";
|
|
5
5
|
import o from "./Modal.module.scss.js";
|
|
6
|
-
import { applyMissingDefaults as
|
|
7
|
-
import { useContainerBreakpoints as
|
|
8
|
-
import { useOverflowDetection as
|
|
9
|
-
import { useForkRef as
|
|
10
|
-
import { transitionDuration as
|
|
11
|
-
function
|
|
12
|
-
const h =
|
|
6
|
+
import { applyMissingDefaults as E } from "../../../../helpers/applyMissingDefaults.js";
|
|
7
|
+
import { useContainerBreakpoints as M } from "../../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
8
|
+
import { useOverflowDetection as A } from "../../../../hooks/useOverflowDetection/useOverflowDetection.js";
|
|
9
|
+
import { useForkRef as F } from "../../../../hooks/useForkRef/useForkRef.js";
|
|
10
|
+
import { transitionDuration as j } from "../../../../contexts/ThemeProvider/theme.js";
|
|
11
|
+
function U(g) {
|
|
12
|
+
const h = E(g, B), { isOpen: i, onClose: n, shouldCloseOnBackdropClick: v, children: c, footer: f, containerRef: C } = h, m = r(null), d = r(null), R = r(null), u = r(null), b = F(d, C), w = M({
|
|
13
13
|
ref: d
|
|
14
|
-
}), a =
|
|
14
|
+
}), a = A({
|
|
15
15
|
ref: u
|
|
16
|
-
}), [
|
|
17
|
-
|
|
16
|
+
}), [x, p] = S(!1), t = r(null), k = w.includes("small");
|
|
17
|
+
T(() => {
|
|
18
18
|
const e = m.current;
|
|
19
19
|
if (e)
|
|
20
|
-
return
|
|
20
|
+
return t.current && clearTimeout(t.current), i && !e.open ? (e.showModal(), requestAnimationFrame(() => {
|
|
21
21
|
e.setAttribute("data-show", "true");
|
|
22
|
-
})) : !
|
|
22
|
+
})) : !i && e.open && (p(!0), t.current = setTimeout(() => {
|
|
23
23
|
e.close(), e.removeAttribute("data-show"), p(!1);
|
|
24
|
-
},
|
|
25
|
-
|
|
24
|
+
}, j)), () => {
|
|
25
|
+
t.current && clearTimeout(t.current);
|
|
26
26
|
};
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
e.target === e.currentTarget && v &&
|
|
30
|
-
},
|
|
31
|
-
e.key === "Escape" &&
|
|
32
|
-
},
|
|
33
|
-
|
|
27
|
+
}, [i]);
|
|
28
|
+
const y = (e) => {
|
|
29
|
+
e.target === e.currentTarget && v && n?.();
|
|
30
|
+
}, D = (e) => {
|
|
31
|
+
e.key === "Escape" && n?.();
|
|
32
|
+
}, N = () => {
|
|
33
|
+
n && n();
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ s(
|
|
36
36
|
"dialog",
|
|
37
37
|
{
|
|
38
38
|
ref: m,
|
|
39
39
|
className: o.dialog,
|
|
40
|
-
onClose:
|
|
41
|
-
"data-exiting":
|
|
42
|
-
children: /* @__PURE__ */
|
|
40
|
+
onClose: N,
|
|
41
|
+
"data-exiting": x || void 0,
|
|
42
|
+
children: /* @__PURE__ */ s(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
ref: b,
|
|
46
|
-
className:
|
|
46
|
+
className: l(o.backdrop, {
|
|
47
47
|
[o.backdropSmall]: k
|
|
48
48
|
}),
|
|
49
|
-
onClick:
|
|
50
|
-
onKeyDown:
|
|
49
|
+
onClick: y,
|
|
50
|
+
onKeyDown: D,
|
|
51
51
|
role: "presentation",
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ O(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
56
|
-
className:
|
|
55
|
+
ref: R,
|
|
56
|
+
className: l(o.modal, {
|
|
57
57
|
[o.modalSmall]: k,
|
|
58
58
|
[o.modalOverflowing]: a
|
|
59
59
|
}),
|
|
60
60
|
children: [
|
|
61
|
-
c && /* @__PURE__ */
|
|
61
|
+
c && /* @__PURE__ */ s(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
|
|
64
|
+
ref: u,
|
|
65
|
+
className: l(o.content, {
|
|
65
66
|
[o.contentScrollable]: a
|
|
66
67
|
}),
|
|
67
68
|
children: c
|
|
68
69
|
}
|
|
69
70
|
),
|
|
70
|
-
f && /* @__PURE__ */
|
|
71
|
+
f && /* @__PURE__ */ s(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
|
-
className:
|
|
74
|
+
className: l(o.footer, {
|
|
74
75
|
[o.footerFixed]: a
|
|
75
76
|
}),
|
|
76
77
|
children: f
|
|
@@ -85,6 +86,6 @@ function Q(g) {
|
|
|
85
86
|
);
|
|
86
87
|
}
|
|
87
88
|
export {
|
|
88
|
-
|
|
89
|
+
U as Modal
|
|
89
90
|
};
|
|
90
91
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../../../src/components/Common/UI/Modal/Modal.tsx"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport classNames from 'classnames'\nimport { type ModalProps, ModalDefaults } from './ModalTypes'\nimport styles from './Modal.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useOverflowDetection } from '@/hooks/useOverflowDetection/useOverflowDetection'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport { transitionDuration } from '@/contexts/ThemeProvider/theme'\n\nexport function Modal(rawProps: ModalProps) {\n const resolvedProps = applyMissingDefaults(rawProps, ModalDefaults)\n const { isOpen, onClose, shouldCloseOnBackdropClick, children, footer, containerRef } =\n resolvedProps\n\n const dialogRef = useRef<HTMLDialogElement>(null)\n const internalBackdropRef = useRef<HTMLDivElement>(null)\n const modalRef = useRef<HTMLDivElement>(null)\n\n // Use callback ref to sync both internal and external refs\n const backdropCallbackRef = useForkRef(internalBackdropRef, containerRef)\n\n const breakpoints = useContainerBreakpoints({\n ref: internalBackdropRef,\n })\n\n const isOverflowing = useOverflowDetection({\n ref:
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../../../src/components/Common/UI/Modal/Modal.tsx"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport classNames from 'classnames'\nimport { type ModalProps, ModalDefaults } from './ModalTypes'\nimport styles from './Modal.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useOverflowDetection } from '@/hooks/useOverflowDetection/useOverflowDetection'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport { transitionDuration } from '@/contexts/ThemeProvider/theme'\n\nexport function Modal(rawProps: ModalProps) {\n const resolvedProps = applyMissingDefaults(rawProps, ModalDefaults)\n const { isOpen, onClose, shouldCloseOnBackdropClick, children, footer, containerRef } =\n resolvedProps\n\n const dialogRef = useRef<HTMLDialogElement>(null)\n const internalBackdropRef = useRef<HTMLDivElement>(null)\n const modalRef = useRef<HTMLDivElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n // Use callback ref to sync both internal and external refs\n const backdropCallbackRef = useForkRef(internalBackdropRef, containerRef)\n\n const breakpoints = useContainerBreakpoints({\n ref: internalBackdropRef,\n })\n\n const isOverflowing = useOverflowDetection({\n ref: contentRef,\n })\n\n const [isExiting, setIsExiting] = useState(false)\n const transitionTimeoutRef = useRef<NodeJS.Timeout | null>(null)\n const isSmallOrLarger = breakpoints.includes('small')\n\n useLayoutEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n\n if (isOpen && !dialog.open) {\n dialog.showModal()\n requestAnimationFrame(() => {\n dialog.setAttribute('data-show', 'true')\n })\n } else if (!isOpen && dialog.open) {\n setIsExiting(true)\n transitionTimeoutRef.current = setTimeout(() => {\n dialog.close()\n dialog.removeAttribute('data-show')\n setIsExiting(false)\n }, transitionDuration)\n }\n\n return () => {\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n }\n }, [isOpen])\n\n const handleBackdropClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget && shouldCloseOnBackdropClick) {\n onClose?.()\n }\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n onClose?.()\n }\n }\n\n const handleClose = () => {\n if (onClose) {\n onClose()\n }\n }\n\n return (\n <dialog\n ref={dialogRef}\n className={styles.dialog}\n onClose={handleClose}\n data-exiting={isExiting || undefined}\n >\n <div\n ref={backdropCallbackRef}\n className={classNames(styles.backdrop, {\n [styles.backdropSmall as string]: isSmallOrLarger,\n })}\n onClick={handleBackdropClick}\n onKeyDown={handleKeyDown}\n role=\"presentation\"\n >\n <div\n ref={modalRef}\n className={classNames(styles.modal, {\n [styles.modalSmall as string]: isSmallOrLarger,\n [styles.modalOverflowing as string]: isOverflowing,\n })}\n >\n {children && (\n <div\n ref={contentRef}\n className={classNames(styles.content, {\n [styles.contentScrollable as string]: isOverflowing,\n })}\n >\n {children}\n </div>\n )}\n {footer && (\n <div\n className={classNames(styles.footer, {\n [styles.footerFixed as string]: isOverflowing,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n </dialog>\n )\n}\n"],"names":["Modal","rawProps","resolvedProps","applyMissingDefaults","ModalDefaults","isOpen","onClose","shouldCloseOnBackdropClick","children","footer","containerRef","dialogRef","useRef","internalBackdropRef","modalRef","contentRef","backdropCallbackRef","useForkRef","breakpoints","useContainerBreakpoints","isOverflowing","useOverflowDetection","isExiting","setIsExiting","useState","transitionTimeoutRef","isSmallOrLarger","useLayoutEffect","dialog","transitionDuration","handleBackdropClick","event","handleKeyDown","handleClose","jsx","styles","classNames","jsxs"],"mappings":"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"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_dialog_32mr1_1", l = "_backdrop_32mr1_21", t = "_backdropSmall_32mr1_31", _ = "_modal_32mr1_35", a = "_modalSmall_32mr1_58", r = "_modalOverflowing_32mr1_62", c = "_content_32mr1_66", n = "_contentScrollable_32mr1_73", m = "_footer_32mr1_80", e = "_footerFixed_32mr1_90", d = {
|
|
2
2
|
dialog: o,
|
|
3
3
|
backdrop: l,
|
|
4
4
|
backdropSmall: t,
|
|
5
5
|
modal: _,
|
|
6
6
|
modalSmall: a,
|
|
7
|
-
modalOverflowing:
|
|
8
|
-
content:
|
|
9
|
-
contentScrollable:
|
|
10
|
-
footer:
|
|
11
|
-
footerFixed:
|
|
7
|
+
modalOverflowing: r,
|
|
8
|
+
content: c,
|
|
9
|
+
contentScrollable: n,
|
|
10
|
+
footer: m,
|
|
11
|
+
footerFixed: e
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
l as backdrop,
|
|
15
15
|
t as backdropSmall,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
c as content,
|
|
17
|
+
n as contentScrollable,
|
|
18
|
+
d as default,
|
|
19
19
|
o as dialog,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
m as footer,
|
|
21
|
+
e as footerFixed,
|
|
22
22
|
_ as modal,
|
|
23
|
-
|
|
23
|
+
r as modalOverflowing,
|
|
24
24
|
a as modalSmall
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=Modal.module.scss.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_radioWrapper_zeu1h_1", r = "_radio_zeu1h_1", a = "_checked_zeu1h_21", e = "_radioDot_zeu1h_26", d = "_radioInput_zeu1h_33", t = {
|
|
2
2
|
radioWrapper: o,
|
|
3
3
|
radio: r,
|
|
4
4
|
checked: a,
|
|
5
|
-
radioDot:
|
|
6
|
-
radioInput:
|
|
5
|
+
radioDot: e,
|
|
6
|
+
radioInput: d
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
a as checked,
|
|
10
|
-
|
|
10
|
+
t as default,
|
|
11
11
|
r as radio,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
e as radioDot,
|
|
13
|
+
d as radioInput,
|
|
14
14
|
o as radioWrapper
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=Radio.module.scss.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_1s9ch_1", s = "_icons_1s9ch_17", c = "_popover_1s9ch_68", t = {
|
|
2
2
|
root: o,
|
|
3
|
-
icons:
|
|
4
|
-
popover:
|
|
3
|
+
icons: s,
|
|
4
|
+
popover: c
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
t as default,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
s as icons,
|
|
9
|
+
c as popover,
|
|
10
10
|
o as root
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Select.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../../../src/components/Common/UI/Table/Table.tsx"],"sourcesContent":["import {\n Table as AriaTable,\n TableHeader as AriaTableHeader,\n TableBody as AriaTableBody,\n Row,\n Column,\n Cell,\n} from 'react-aria-components'\nimport classnames from 'classnames'\nimport { Text } from '../Text/Text'\nimport type { TableProps } from './TableTypes'\nimport { TableDefaults } from './TableTypes'\nimport styles from './Table.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function Table(rawProps: TableProps) {\n const resolvedProps = applyMissingDefaults(rawProps, TableDefaults)\n const { className, headers, rows, footer, emptyState, variant, hasCheckboxColumn, ...props } =\n resolvedProps\n return (\n <div className={styles.root} data-variant={variant}>\n <AriaTable {...props} className={classnames('react-aria-Table', className)}>\n <AriaTableHeader>\n <Row>\n {headers.map((header, index) => (\n <Column key={header.key} isRowHeader={index === 0}>\n <Text as=\"span\" weight=\"semibold\" size=\"xs\">\n {header.content}\n </Text>\n </Column>\n ))}\n </Row>\n </AriaTableHeader>\n <AriaTableBody>\n {rows.length === 0 && emptyState ? (\n <Row>\n <Cell colSpan={headers.length}>{emptyState}</Cell>\n </Row>\n ) : (\n rows.map(row => (\n <Row key={row.key}>\n {row.data.map((cell, index) => (\n <Cell key={cell.key}>\n <Text\n as=\"span\"\n variant={\n hasCheckboxColumn\n ? index === 1\n ? 'leading'\n : 'supporting'\n : index === 0\n ? 'leading'\n : 'supporting'\n }\n size=\"
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../../../src/components/Common/UI/Table/Table.tsx"],"sourcesContent":["import {\n Table as AriaTable,\n TableHeader as AriaTableHeader,\n TableBody as AriaTableBody,\n Row,\n Column,\n Cell,\n} from 'react-aria-components'\nimport classnames from 'classnames'\nimport { Text } from '../Text/Text'\nimport type { TableProps } from './TableTypes'\nimport { TableDefaults } from './TableTypes'\nimport styles from './Table.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function Table(rawProps: TableProps) {\n const resolvedProps = applyMissingDefaults(rawProps, TableDefaults)\n const { className, headers, rows, footer, emptyState, variant, hasCheckboxColumn, ...props } =\n resolvedProps\n return (\n <div className={styles.root} data-variant={variant}>\n <AriaTable {...props} className={classnames('react-aria-Table', className)}>\n <AriaTableHeader>\n <Row>\n {headers.map((header, index) => (\n <Column key={header.key} isRowHeader={index === 0}>\n <Text as=\"span\" weight=\"semibold\" size=\"xs\">\n {header.content}\n </Text>\n </Column>\n ))}\n </Row>\n </AriaTableHeader>\n <AriaTableBody>\n {rows.length === 0 && emptyState ? (\n <Row>\n <Cell colSpan={headers.length}>{emptyState}</Cell>\n </Row>\n ) : (\n rows.map(row => (\n <Row key={row.key}>\n {row.data.map((cell, index) => (\n <Cell key={cell.key}>\n <Text\n as=\"span\"\n variant={\n hasCheckboxColumn\n ? index === 1\n ? 'leading'\n : 'supporting'\n : index === 0\n ? 'leading'\n : 'supporting'\n }\n size=\"sm\"\n >\n {cell.content}\n </Text>\n </Cell>\n ))}\n </Row>\n ))\n )}\n {footer && footer.length > 0 && (\n <Row key=\"table-footer\" data-footer=\"true\">\n {footer.length === 1 && footer[0] ? (\n <Cell key={footer[0].key} colSpan={headers.length}>\n <Text as=\"span\" variant=\"leading\" size=\"sm\">\n {footer[0].content}\n </Text>\n </Cell>\n ) : (\n footer.map(cell => (\n <Cell key={cell.key}>\n <Text as=\"span\" variant=\"leading\" size=\"sm\">\n {cell.content}\n </Text>\n </Cell>\n ))\n )}\n </Row>\n )}\n </AriaTableBody>\n </AriaTable>\n </div>\n )\n}\n"],"names":["Table","rawProps","resolvedProps","applyMissingDefaults","TableDefaults","className","headers","rows","footer","emptyState","variant","hasCheckboxColumn","props","jsx","styles","jsxs","AriaTable","classnames","AriaTableHeader","Row","header","index","Column","Text","AriaTableBody","Cell","row","cell"],"mappings":";;;;;;;AAeO,SAASA,EAAMC,GAAsB;AAC1C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAa,GAC5D,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,YAAAC,GAAY,SAAAC,GAAS,mBAAAC,GAAmB,GAAGC,EAAA,IACnFV;AACF,SACE,gBAAAW,EAAC,OAAA,EAAI,WAAWC,EAAO,MAAM,gBAAcJ,GACzC,UAAA,gBAAAK,EAACC,GAAA,EAAW,GAAGJ,GAAO,WAAWK,EAAW,oBAAoBZ,CAAS,GACvE,UAAA;AAAA,IAAA,gBAAAQ,EAACK,GAAA,EACC,UAAA,gBAAAL,EAACM,GAAA,EACE,UAAAb,EAAQ,IAAI,CAACc,GAAQC,MACpB,gBAAAR,EAACS,GAAA,EAAwB,aAAaD,MAAU,GAC9C,UAAA,gBAAAR,EAACU,GAAA,EAAK,IAAG,QAAO,QAAO,YAAW,MAAK,MACpC,UAAAH,EAAO,QAAA,CACV,EAAA,GAHWA,EAAO,GAIpB,CACD,EAAA,CACH,GACF;AAAA,sBACCI,GAAA,EACE,UAAA;AAAA,MAAAjB,EAAK,WAAW,KAAKE,IACpB,gBAAAI,EAACM,GAAA,EACC,4BAACM,GAAA,EAAK,SAASnB,EAAQ,QAAS,UAAAG,EAAA,CAAW,EAAA,CAC7C,IAEAF,EAAK,IAAI,CAAAmB,MACP,gBAAAb,EAACM,GAAA,EACE,UAAAO,EAAI,KAAK,IAAI,CAACC,GAAMN,MACnB,gBAAAR,EAACY,GAAA,EACC,UAAA,gBAAAZ;AAAA,QAACU;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH,SACEZ,IACIU,MAAU,IACR,YACA,eACFA,MAAU,IACR,YACA;AAAA,UAER,MAAK;AAAA,UAEJ,UAAAM,EAAK;AAAA,QAAA;AAAA,MAAA,KAdCA,EAAK,GAgBhB,CACD,EAAA,GAnBOD,EAAI,GAoBd,CACD;AAAA,MAEFlB,KAAUA,EAAO,SAAS,KACzB,gBAAAK,EAACM,GAAA,EAAuB,eAAY,QACjC,UAAAX,EAAO,WAAW,KAAKA,EAAO,CAAC,IAC9B,gBAAAK,EAACY,GAAA,EAAyB,SAASnB,EAAQ,QACzC,UAAA,gBAAAO,EAACU,GAAA,EAAK,IAAG,QAAO,SAAQ,WAAU,MAAK,MACpC,UAAAf,EAAO,CAAC,EAAE,QAAA,CACb,EAAA,GAHSA,EAAO,CAAC,EAAE,GAIrB,IAEAA,EAAO,IAAI,CAAAmB,MACT,gBAAAd,EAACY,GAAA,EACC,UAAA,gBAAAZ,EAACU,GAAA,EAAK,IAAG,QAAO,SAAQ,WAAU,MAAK,MACpC,UAAAI,EAAK,QAAA,CACR,EAAA,GAHSA,EAAK,GAIhB,CACD,EAAA,GAdI,cAgBT;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_root_1jn85_1", _ = "_xs_1jn85_6", n = "_sm_1jn85_10", e = "_md_1jn85_14", i = "_lg_1jn85_18", g = {
|
|
2
2
|
root: t,
|
|
3
|
-
|
|
3
|
+
xs: _,
|
|
4
|
+
sm: n,
|
|
4
5
|
md: e,
|
|
5
|
-
lg:
|
|
6
|
-
"weight-regular": "_weight-
|
|
7
|
-
"weight-medium": "_weight-
|
|
8
|
-
"weight-semibold": "_weight-
|
|
9
|
-
"weight-bold": "_weight-
|
|
10
|
-
"textAlign-start": "_textAlign-
|
|
11
|
-
"textAlign-center": "_textAlign-
|
|
12
|
-
"textAlign-end": "_textAlign-
|
|
13
|
-
"variant-leading": "_variant-
|
|
14
|
-
"variant-supporting": "_variant-
|
|
6
|
+
lg: i,
|
|
7
|
+
"weight-regular": "_weight-regular_1jn85_22",
|
|
8
|
+
"weight-medium": "_weight-medium_1jn85_25",
|
|
9
|
+
"weight-semibold": "_weight-semibold_1jn85_28",
|
|
10
|
+
"weight-bold": "_weight-bold_1jn85_31",
|
|
11
|
+
"textAlign-start": "_textAlign-start_1jn85_34",
|
|
12
|
+
"textAlign-center": "_textAlign-center_1jn85_37",
|
|
13
|
+
"textAlign-end": "_textAlign-end_1jn85_40",
|
|
14
|
+
"variant-leading": "_variant-leading_1jn85_43",
|
|
15
|
+
"variant-supporting": "_variant-supporting_1jn85_46"
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
g as default,
|
|
19
|
+
i as lg,
|
|
19
20
|
e as md,
|
|
20
21
|
t as root,
|
|
21
|
-
|
|
22
|
+
n as sm,
|
|
23
|
+
_ as xs
|
|
22
24
|
};
|
|
23
25
|
//# sourceMappingURL=Text.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -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(
|
|
@@ -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":"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"}
|
|
@@ -11,10 +11,11 @@ import "classnames";
|
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
12
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
13
|
import "dompurify";
|
|
14
|
+
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [s, u] = t("CreateSignatoryContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
u as CreateSignatoryProvider,
|
|
19
|
+
s as useCreateSignatory
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useCreateSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -4,13 +4,12 @@ import { useFormContext as u } from "react-hook-form";
|
|
|
4
4
|
import { useTranslation as E } from "react-i18next";
|
|
5
5
|
import { Flex as S } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import { Grid as v } from "../../../Common/Grid/Grid.js";
|
|
7
|
-
import "
|
|
7
|
+
import { TextInputField as a } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
8
|
import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import { nameValidation as l } from "../../../../helpers/validations.js";
|
|
11
11
|
import { TitleSelect as x } from "../TitleSelect.js";
|
|
12
|
-
|
|
13
|
-
const m = "email_mismatch", A = r.object({
|
|
12
|
+
const m = "email_mismatch", z = r.object({
|
|
14
13
|
firstName: l,
|
|
15
14
|
lastName: l,
|
|
16
15
|
email: r.string().min(1).email(),
|
|
@@ -19,7 +18,7 @@ const m = "email_mismatch", A = r.object({
|
|
|
19
18
|
}).refine((i) => i.email === i.confirmEmail, {
|
|
20
19
|
message: m,
|
|
21
20
|
path: ["confirmEmail"]
|
|
22
|
-
}),
|
|
21
|
+
}), A = () => {
|
|
23
22
|
const { t: i } = E("Company.AssignSignatory"), o = y(), {
|
|
24
23
|
setError: c,
|
|
25
24
|
clearErrors: f,
|
|
@@ -76,7 +75,7 @@ const m = "email_mismatch", A = r.object({
|
|
|
76
75
|
] });
|
|
77
76
|
};
|
|
78
77
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
A as InviteSignatoryForm,
|
|
79
|
+
z as InviteSignatorySchema
|
|
81
80
|
};
|
|
82
81
|
//# sourceMappingURL=InviteSignatoryForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { TextInputField, Grid, Flex } from '@/components/Common'\nimport { nameValidation } from '@/helpers/validations'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst emailMismatchError = 'email_mismatch'\n\nexport const InviteSignatorySchema = z\n .object({\n firstName: nameValidation,\n lastName: nameValidation,\n email: z.string().min(1).email(),\n confirmEmail: z.string().min(1).email(),\n title: z.string().min(1),\n })\n .refine(data => data.email === data.confirmEmail, {\n message: emailMismatchError,\n path: ['confirmEmail'],\n })\n\nexport type InviteSignatoryInputs = z.infer<typeof InviteSignatorySchema>\n\nexport const InviteSignatoryForm = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n const Components = useComponentContext()\n\n const {\n setError,\n clearErrors,\n formState: { errors, isSubmitted },\n watch,\n } = useFormContext()\n\n // Some workarounds here to also ensure that modifying the email field\n // sets and clears the confirm_email field error state\n const confirmEmail = watch('confirmEmail')\n\n const handleEmailChange = (value: string) => {\n if (isSubmitted) {\n if (value === confirmEmail) {\n clearErrors('confirmEmail')\n }\n\n if (value !== confirmEmail) {\n setError('confirmEmail', { message: emailMismatchError })\n }\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('inviteSignatory.title')}</Components.Heading>\n <Components.Text>{t('inviteSignatory.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"email\"\n label={t('inviteSignatory.signatoryEmail')}\n isRequired\n errorMessage={t('validations.email')}\n onChange={handleEmailChange}\n />\n <TextInputField\n name=\"confirmEmail\"\n label={t('inviteSignatory.confirmEmail')}\n isRequired\n errorMessage={\n errors.confirmEmail?.message === emailMismatchError\n ? t('validations.emailMismatch')\n : t('validations.email')\n }\n />\n <TextInputField\n name=\"firstName\"\n label={t('inviteSignatory.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('inviteSignatory.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TitleSelect />\n </Grid>\n </Flex>\n )\n}\n"],"names":["emailMismatchError","InviteSignatorySchema","z","nameValidation","data","InviteSignatoryForm","t","useTranslation","Components","useComponentContext","setError","clearErrors","errors","isSubmitted","watch","useFormContext","confirmEmail","handleEmailChange","value","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InviteSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { TextInputField, Grid, Flex } from '@/components/Common'\nimport { nameValidation } from '@/helpers/validations'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst emailMismatchError = 'email_mismatch'\n\nexport const InviteSignatorySchema = z\n .object({\n firstName: nameValidation,\n lastName: nameValidation,\n email: z.string().min(1).email(),\n confirmEmail: z.string().min(1).email(),\n title: z.string().min(1),\n })\n .refine(data => data.email === data.confirmEmail, {\n message: emailMismatchError,\n path: ['confirmEmail'],\n })\n\nexport type InviteSignatoryInputs = z.infer<typeof InviteSignatorySchema>\n\nexport const InviteSignatoryForm = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n const Components = useComponentContext()\n\n const {\n setError,\n clearErrors,\n formState: { errors, isSubmitted },\n watch,\n } = useFormContext()\n\n // Some workarounds here to also ensure that modifying the email field\n // sets and clears the confirm_email field error state\n const confirmEmail = watch('confirmEmail')\n\n const handleEmailChange = (value: string) => {\n if (isSubmitted) {\n if (value === confirmEmail) {\n clearErrors('confirmEmail')\n }\n\n if (value !== confirmEmail) {\n setError('confirmEmail', { message: emailMismatchError })\n }\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('inviteSignatory.title')}</Components.Heading>\n <Components.Text>{t('inviteSignatory.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"email\"\n label={t('inviteSignatory.signatoryEmail')}\n isRequired\n errorMessage={t('validations.email')}\n onChange={handleEmailChange}\n />\n <TextInputField\n name=\"confirmEmail\"\n label={t('inviteSignatory.confirmEmail')}\n isRequired\n errorMessage={\n errors.confirmEmail?.message === emailMismatchError\n ? t('validations.emailMismatch')\n : t('validations.email')\n }\n />\n <TextInputField\n name=\"firstName\"\n label={t('inviteSignatory.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('inviteSignatory.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TitleSelect />\n </Grid>\n </Flex>\n )\n}\n"],"names":["emailMismatchError","InviteSignatorySchema","z","nameValidation","data","InviteSignatoryForm","t","useTranslation","Components","useComponentContext","setError","clearErrors","errors","isSubmitted","watch","useFormContext","confirmEmail","handleEmailChange","value","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect"],"mappings":";;;;;;;;;;;AAQA,MAAMA,IAAqB,kBAEdC,IAAwBC,EAClC,OAAO;AAAA,EACN,WAAWC;AAAA,EACX,UAAUA;AAAA,EACV,OAAOD,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,MAAA;AAAA,EACzB,cAAcA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,MAAA;AAAA,EAChC,OAAOA,EAAE,OAAA,EAAS,IAAI,CAAC;AACzB,CAAC,EACA,OAAO,CAAAE,MAAQA,EAAK,UAAUA,EAAK,cAAc;AAAA,EAChD,SAASJ;AAAA,EACT,MAAM,CAAC,cAAc;AACvB,CAAC,GAIUK,IAAsB,MAAM;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,EAAA,GAEb;AAAA,IACJ,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,aAAAC,EAAA;AAAA,IACrB,OAAAC;AAAA,EAAA,IACEC,EAAA,GAIEC,IAAeF,EAAM,cAAc,GAEnCG,IAAoB,CAACC,MAAkB;AAC3C,IAAIL,MACEK,MAAUF,KACZL,EAAY,cAAc,GAGxBO,MAAUF,KACZN,EAAS,gBAAgB,EAAE,SAASV,EAAA,CAAoB;AAAA,EAG9D;AAEA,SACE,gBAAAmB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAAC,UAAA,EACC,UAAA;AAAA,MAAA,gBAAAE,EAACb,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,uBAAuB,GAAE;AAAA,wBACvDE,EAAW,MAAX,EAAiB,UAAAF,EAAE,6BAA6B,EAAA,CAAE;AAAA,IAAA,GACrD;AAAA,IAEA,gBAAAa,EAACG,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjB,EAAE,gCAAgC;AAAA,UACzC,YAAU;AAAA,UACV,cAAcA,EAAE,mBAAmB;AAAA,UACnC,UAAUW;AAAA,QAAA;AAAA,MAAA;AAAA,MAEZ,gBAAAI;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjB,EAAE,8BAA8B;AAAA,UACvC,YAAU;AAAA,UACV,cACEM,EAAO,cAAc,YAAYZ,IAC7BM,EAAE,2BAA2B,IAC7BA,EAAE,mBAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAG7B,gBAAAe;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjB,EAAE,2BAA2B;AAAA,UACpC,YAAU;AAAA,UACV,cAAcA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEzC,gBAAAe;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjB,EAAE,0BAA0B;AAAA,UACnC,YAAU;AAAA,UACV,cAAcA,EAAE,sBAAsB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAEvCkB,GAAA,CAAA,CAAY;AAAA,IAAA,EAAA,CACf;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -11,10 +11,11 @@ import "classnames";
|
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
12
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
13
|
import "dompurify";
|
|
14
|
+
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [c, d] = t("InviteSignatoryContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
d as InviteSignatoryProvider,
|
|
19
|
+
c as useInviteSignatory
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useInviteSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|