@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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as t, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as L } from "robot3";
|
|
3
|
+
import { useMachine as b } from "react-robot";
|
|
4
|
+
import { useState as R, useCallback as p, useMemo as Q, Suspense as U } from "react";
|
|
5
|
+
import { useTranslation as P } from "react-i18next";
|
|
6
|
+
import { informationRequestsMachine as g } from "./informationRequestsStateMachine.js";
|
|
7
|
+
import { BaseBoundaries as j } from "../Base/Base.js";
|
|
8
|
+
import "../Base/useBase.js";
|
|
9
|
+
import { Flex as k } from "../Common/Flex/Flex.js";
|
|
10
|
+
import "classnames";
|
|
11
|
+
import { informationRequestEvents as s } from "../../shared/constants.js";
|
|
12
|
+
import { useComponentContext as B } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import { FlowContext as $ } from "../Flow/useFlow.js";
|
|
14
|
+
import { useComponentDictionary as w, useI18n as z } from "../../i18n/I18n.js";
|
|
15
|
+
import { InformationRequestList as Y } from "./InformationRequestList/InformationRequestList.js";
|
|
16
|
+
const E = "informationRequestResponded";
|
|
17
|
+
function ie({
|
|
18
|
+
companyId: r,
|
|
19
|
+
dictionary: I,
|
|
20
|
+
filterByPayrollBlocking: O = !1,
|
|
21
|
+
withAlert: a = !0,
|
|
22
|
+
onEvent: M = () => {
|
|
23
|
+
}
|
|
24
|
+
}) {
|
|
25
|
+
w("InformationRequests", I), z("InformationRequests");
|
|
26
|
+
const { t: m } = P("InformationRequests"), { Modal: x, LoadingSpinner: c, Alert: h, Text: A } = B(), [C, i] = R(!1), [F, f] = R({
|
|
27
|
+
nextAlertId: 0,
|
|
28
|
+
alerts: []
|
|
29
|
+
}), N = p((e) => {
|
|
30
|
+
f((o) => ({
|
|
31
|
+
...o,
|
|
32
|
+
alerts: o.alerts.filter((D) => D.id !== e)
|
|
33
|
+
}));
|
|
34
|
+
}, []), T = p(() => {
|
|
35
|
+
f((e) => ({
|
|
36
|
+
nextAlertId: e.nextAlertId + 1,
|
|
37
|
+
alerts: [{ id: e.nextAlertId }, ...e.alerts]
|
|
38
|
+
}));
|
|
39
|
+
}, []), _ = Q(
|
|
40
|
+
() => L(
|
|
41
|
+
"list",
|
|
42
|
+
g,
|
|
43
|
+
() => ({
|
|
44
|
+
component: null,
|
|
45
|
+
companyId: r,
|
|
46
|
+
onEvent: n
|
|
47
|
+
})
|
|
48
|
+
),
|
|
49
|
+
[r]
|
|
50
|
+
), [u, S] = b(_);
|
|
51
|
+
function n(e, o) {
|
|
52
|
+
S({ type: e, payload: o }), e === s.INFORMATION_REQUEST_RESPOND && i(!0), (e === s.INFORMATION_REQUEST_FORM_CANCEL || e === s.INFORMATION_REQUEST_FORM_DONE) && i(!1), e === s.INFORMATION_REQUEST_FORM_DONE && a && T(), M(e, o);
|
|
53
|
+
}
|
|
54
|
+
const q = () => {
|
|
55
|
+
i(!1);
|
|
56
|
+
}, l = u.context.component, d = l?.Footer || void 0;
|
|
57
|
+
return /* @__PURE__ */ t(
|
|
58
|
+
$.Provider,
|
|
59
|
+
{
|
|
60
|
+
value: {
|
|
61
|
+
...u.context,
|
|
62
|
+
onEvent: n
|
|
63
|
+
},
|
|
64
|
+
children: /* @__PURE__ */ v(k, { flexDirection: "column", gap: 32, children: [
|
|
65
|
+
a && F.alerts.map((e) => /* @__PURE__ */ t(
|
|
66
|
+
h,
|
|
67
|
+
{
|
|
68
|
+
status: "success",
|
|
69
|
+
label: m(`alerts.${E}.title`),
|
|
70
|
+
onDismiss: () => {
|
|
71
|
+
N(e.id);
|
|
72
|
+
},
|
|
73
|
+
children: /* @__PURE__ */ t(A, { children: m(`alerts.${E}.description`) })
|
|
74
|
+
},
|
|
75
|
+
e.id
|
|
76
|
+
)),
|
|
77
|
+
/* @__PURE__ */ t(U, { fallback: /* @__PURE__ */ t(c, {}), children: /* @__PURE__ */ t(
|
|
78
|
+
Y,
|
|
79
|
+
{
|
|
80
|
+
companyId: r,
|
|
81
|
+
filterByPayrollBlocking: O,
|
|
82
|
+
onEvent: n
|
|
83
|
+
}
|
|
84
|
+
) }),
|
|
85
|
+
/* @__PURE__ */ t(
|
|
86
|
+
x,
|
|
87
|
+
{
|
|
88
|
+
isOpen: C,
|
|
89
|
+
onClose: q,
|
|
90
|
+
footer: d && /* @__PURE__ */ t(j, { LoaderComponent: () => /* @__PURE__ */ t(c, { size: "sm" }), children: /* @__PURE__ */ t(d, { onEvent: n }) }),
|
|
91
|
+
children: l && /* @__PURE__ */ t(l, {})
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
] })
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
ie as InformationRequestsFlow
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=InformationRequests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InformationRequests.js","sources":["../../../src/components/InformationRequests/InformationRequests.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMachine } from 'react-robot'\nimport { Suspense, useCallback, useMemo, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { InformationRequestList } from './InformationRequestList'\nimport { informationRequestsMachine } from './informationRequestsStateMachine'\nimport { type InformationRequestsContextInterface } from './InformationRequestsComponents'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FlowContext } from '@/components/Flow/useFlow'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { informationRequestEvents, type EventType } from '@/shared/constants'\n\ninterface SubmissionAlert {\n id: number\n}\n\ninterface SubmissionAlertState {\n nextAlertId: number\n alerts: SubmissionAlert[]\n}\n\nexport interface InformationRequestsFlowProps extends Omit<\n BaseComponentInterface<'InformationRequests'>,\n 'onEvent'\n> {\n companyId: string\n filterByPayrollBlocking?: boolean\n /**\n * When true (default), the submission success alert is rendered at the top of this component.\n * Set to false when embedding in a parent (e.g. PayrollBlockerList) that renders the alert elsewhere.\n */\n withAlert?: boolean\n onEvent?: BaseComponentInterface['onEvent']\n}\n\nconst ALERT_TYPE = 'informationRequestResponded' as const\n\nexport function InformationRequestsFlow({\n companyId,\n dictionary,\n filterByPayrollBlocking = false,\n withAlert = true,\n onEvent = () => {},\n}: InformationRequestsFlowProps) {\n useComponentDictionary('InformationRequests', dictionary)\n useI18n('InformationRequests')\n const { t } = useTranslation('InformationRequests')\n const { Modal, LoadingSpinner, Alert, Text } = useComponentContext()\n const [isModalOpen, setIsModalOpen] = useState(false)\n const [alertState, setAlertState] = useState<SubmissionAlertState>({\n nextAlertId: 0,\n alerts: [],\n })\n\n const handleDismissAlert = useCallback((alertId: number) => {\n setAlertState(prev => ({\n ...prev,\n alerts: prev.alerts.filter(alert => alert.id !== alertId),\n }))\n }, [])\n\n const addSubmissionAlert = useCallback(() => {\n setAlertState(prev => ({\n nextAlertId: prev.nextAlertId + 1,\n alerts: [{ id: prev.nextAlertId }, ...prev.alerts],\n }))\n }, [])\n\n const informationRequestsMachineInstance = useMemo(\n () =>\n createMachine(\n 'list',\n informationRequestsMachine,\n (): InformationRequestsContextInterface => ({\n component: null,\n companyId,\n onEvent: handleEvent,\n }),\n ),\n [companyId],\n )\n const [current, send] = useMachine(informationRequestsMachineInstance)\n\n function handleEvent(type: EventType, data?: unknown) {\n send({ type, payload: data })\n\n if (type === informationRequestEvents.INFORMATION_REQUEST_RESPOND) {\n setIsModalOpen(true)\n }\n\n if (\n type === informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL ||\n type === informationRequestEvents.INFORMATION_REQUEST_FORM_DONE\n ) {\n setIsModalOpen(false)\n }\n\n if (type === informationRequestEvents.INFORMATION_REQUEST_FORM_DONE && withAlert) {\n addSubmissionAlert()\n }\n\n onEvent(type, data)\n }\n\n const handleCloseModal = () => {\n setIsModalOpen(false)\n }\n\n const CurrentComponent = current.context.component\n const Footer = CurrentComponent?.Footer || undefined\n\n return (\n <FlowContext.Provider\n value={{\n ...current.context,\n onEvent: handleEvent,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {withAlert &&\n alertState.alerts.map(alert => (\n <Alert\n key={alert.id}\n status=\"success\"\n label={t(`alerts.${ALERT_TYPE}.title`)}\n onDismiss={() => {\n handleDismissAlert(alert.id)\n }}\n >\n <Text>{t(`alerts.${ALERT_TYPE}.description`)}</Text>\n </Alert>\n ))}\n\n <Suspense fallback={<LoadingSpinner />}>\n <InformationRequestList\n companyId={companyId}\n filterByPayrollBlocking={filterByPayrollBlocking}\n onEvent={handleEvent}\n />\n </Suspense>\n <Modal\n isOpen={isModalOpen}\n onClose={handleCloseModal}\n footer={\n Footer && (\n <BaseBoundaries LoaderComponent={() => <LoadingSpinner size=\"sm\" />}>\n <Footer onEvent={handleEvent} />\n </BaseBoundaries>\n )\n }\n >\n {CurrentComponent && <CurrentComponent />}\n </Modal>\n </Flex>\n </FlowContext.Provider>\n )\n}\n"],"names":["ALERT_TYPE","InformationRequestsFlow","companyId","dictionary","filterByPayrollBlocking","withAlert","onEvent","useComponentDictionary","useI18n","t","useTranslation","Modal","LoadingSpinner","Alert","Text","useComponentContext","isModalOpen","setIsModalOpen","useState","alertState","setAlertState","handleDismissAlert","useCallback","alertId","prev","alert","addSubmissionAlert","informationRequestsMachineInstance","useMemo","createMachine","informationRequestsMachine","handleEvent","current","send","useMachine","type","data","informationRequestEvents","handleCloseModal","CurrentComponent","Footer","jsx","FlowContext","jsxs","Flex","Suspense","InformationRequestList","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAMA,IAAa;AAEZ,SAASC,GAAwB;AAAA,EACtC,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,WAAAC,IAAY;AAAA,EACZ,SAAAC,IAAU,MAAM;AAAA,EAAC;AACnB,GAAiC;AAC/B,EAAAC,EAAuB,uBAAuBJ,CAAU,GACxDK,EAAQ,q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AAAA,EAAA;AAGN;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FlowContextInterface } from '
|
|
2
|
-
import { CommonComponentInterface } from '
|
|
3
|
-
import { EventType } from '
|
|
4
|
-
import { OnEventType } from '
|
|
1
|
+
import { FlowContextInterface } from '../Flow/useFlow';
|
|
2
|
+
import { CommonComponentInterface } from '../Base';
|
|
3
|
+
import { EventType } from '../../types/Helpers';
|
|
4
|
+
import { OnEventType } from '../Base/useBase';
|
|
5
5
|
export interface InformationRequestsContextInterface extends FlowContextInterface {
|
|
6
6
|
companyId: string;
|
|
7
7
|
selectedRequestId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { useFlow as n } from "
|
|
3
|
-
import { ensureRequired as u } from "
|
|
2
|
+
import { useFlow as n } from "../Flow/useFlow.js";
|
|
3
|
+
import { ensureRequired as u } from "../../helpers/ensureRequired.js";
|
|
4
4
|
import { InformationRequestForm as o } from "./InformationRequestForm/InformationRequestForm.js";
|
|
5
5
|
function s() {
|
|
6
6
|
const { companyId: e, selectedRequestId: r, onEvent: t } = n();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InformationRequestsComponents.js","sources":["../../../src/components/InformationRequests/InformationRequestsComponents.tsx"],"sourcesContent":["import { InformationRequestForm } from './InformationRequestForm'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { CommonComponentInterface } from '@/components/Base'\nimport type { EventType } from '@/types/Helpers'\nimport type { OnEventType } from '@/components/Base/useBase'\n\nexport interface InformationRequestsContextInterface extends FlowContextInterface {\n companyId: string\n selectedRequestId?: string\n component:\n | (React.ComponentType<CommonComponentInterface> & {\n Footer?: React.ComponentType<{\n onEvent: OnEventType<EventType, unknown>\n }>\n })\n | null\n}\n\nexport function InformationRequestFormContextual() {\n const { companyId, selectedRequestId, onEvent } = useFlow<InformationRequestsContextInterface>()\n\n return (\n <InformationRequestForm\n companyId={companyId}\n requestId={ensureRequired(selectedRequestId)}\n onEvent={onEvent}\n />\n )\n}\n\nInformationRequestFormContextual.Footer = InformationRequestForm.Footer\n"],"names":["InformationRequestFormContextual","companyId","selectedRequestId","onEvent","useFlow","jsx","InformationRequestForm","ensureRequired"],"mappings":";;;;AAoBO,SAASA,IAAmC;AACjD,QAAM,EAAE,WAAAC,GAAW,mBAAAC,GAAmB,SAAAC,EAAA,IAAYC,EAAA;AAElD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAL;AAAA,MACA,WAAWM,EAAeL,CAAiB;AAAA,MAC3C,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAH,EAAiC,SAASM,EAAuB;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InformationRequestsFlow as t } from "./InformationRequests.js";
|
|
2
|
+
import { InformationRequestList as m } from "./InformationRequestList/InformationRequestList.js";
|
|
3
|
+
import { InformationRequestForm as n } from "./InformationRequestForm/InformationRequestForm.js";
|
|
4
|
+
export {
|
|
5
|
+
n as InformationRequestForm,
|
|
6
|
+
m as InformationRequestList,
|
|
7
|
+
t as InformationRequestsFlow
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { state as t, transition as o, reduce as n } from "robot3";
|
|
2
2
|
import { InformationRequestFormContextual as r } from "./InformationRequestsComponents.js";
|
|
3
|
-
import { informationRequestEvents as s } from "
|
|
3
|
+
import { informationRequestEvents as s } from "../../shared/constants.js";
|
|
4
4
|
const d = {
|
|
5
5
|
list: t(
|
|
6
6
|
o(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"informationRequestsStateMachine.js","sources":["../../../src/components/InformationRequests/informationRequestsStateMachine.tsx"],"sourcesContent":["import { state, transition, reduce } from 'robot3'\nimport type { InformationRequestsContextInterface } from './InformationRequestsComponents'\nimport { InformationRequestFormContextual } from './InformationRequestsComponents'\nimport { informationRequestEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\nexport type EventPayloads = {\n [informationRequestEvents.INFORMATION_REQUEST_RESPOND]: {\n requestId: string\n }\n [informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL]: undefined\n [informationRequestEvents.INFORMATION_REQUEST_FORM_DONE]: undefined\n}\n\nexport const informationRequestsMachine = {\n list: state<MachineTransition>(\n transition(\n informationRequestEvents.INFORMATION_REQUEST_RESPOND,\n 'form',\n reduce(\n (\n ctx: InformationRequestsContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof informationRequestEvents.INFORMATION_REQUEST_RESPOND\n >,\n ): InformationRequestsContextInterface => ({\n ...ctx,\n component: InformationRequestFormContextual,\n selectedRequestId: ev.payload.requestId,\n }),\n ),\n ),\n ),\n form: state<MachineTransition>(\n transition(\n informationRequestEvents.INFORMATION_REQUEST_FORM_DONE,\n 'list',\n reduce(\n (ctx: InformationRequestsContextInterface): InformationRequestsContextInterface => ({\n ...ctx,\n component: null,\n selectedRequestId: undefined,\n }),\n ),\n ),\n transition(\n informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL,\n 'list',\n reduce(\n (ctx: InformationRequestsContextInterface): InformationRequestsContextInterface => ({\n ...ctx,\n component: null,\n selectedRequestId: undefined,\n }),\n ),\n ),\n ),\n final: state<MachineTransition>(),\n}\n"],"names":["informationRequestsMachine","state","transition","informationRequestEvents","reduce","ctx","ev","InformationRequestFormContextual"],"mappings":";;;AAcO,MAAMA,IAA6B;AAAA,EACxC,MAAMC;AAAA,IACJC;AAAA,MACEC,EAAyB;AAAA,MACzB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OAIyC;AAAA,UACzC,GAAGD;AAAA,UACH,WAAWE;AAAA,UACX,mBAAmBD,EAAG,QAAQ;AAAA,QAAA;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AAAA,EAEF,MAAML;AAAA,IACJC;AAAA,MACEC,EAAyB;AAAA,MACzB;AAAA,MACAC;AAAA,QACE,CAACC,OAAmF;AAAA,UAClF,GAAGA;AAAA,UACH,WAAW;AAAA,UACX,mBAAmB;AAAA,QAAA;AAAA,MACrB;AAAA,IACF;AAAA,IAEFH;AAAA,MACEC,EAAyB;AAAA,MACzB;AAAA,MACAC;AAAA,QACE,CAACC,OAAmF;AAAA,UAClF,GAAGA;AAAA,UACH,WAAW;AAAA,UACX,mBAAmB;AAAA,QAAA;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AAAA,EAEF,OAAOJ,EAAA;AACT;"}
|
|
@@ -1,96 +1,106 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useWireInRequestsListSuspense as
|
|
4
|
-
import { usePayrollsListSuspense as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { BaseComponent as
|
|
1
|
+
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as v } from "react-i18next";
|
|
3
|
+
import { useWireInRequestsListSuspense as M } from "@gusto/embedded-api/react-query/wireInRequestsList";
|
|
4
|
+
import { usePayrollsListSuspense as N } from "@gusto/embedded-api/react-query/payrollsList";
|
|
5
|
+
import { useState as Z, useEffect as _ } from "react";
|
|
6
|
+
import { BaseComponent as j } from "../../../Base/Base.js";
|
|
7
7
|
import "../../../Base/useBase.js";
|
|
8
|
-
import { useComponentContext as
|
|
9
|
-
import { useComponentDictionary as
|
|
8
|
+
import { useComponentContext as k } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
|
+
import { useComponentDictionary as E, useI18n as G } from "../../../../i18n/I18n.js";
|
|
10
10
|
import { Flex as g } from "../../../Common/Flex/Flex.js";
|
|
11
|
-
import { useDateFormatter as
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
import { useDateFormatter as z } from "../../../../hooks/useDateFormatter.js";
|
|
12
|
+
import H from "../../../../hooks/useNumberFormatter.js";
|
|
13
|
+
function ie(i) {
|
|
14
|
+
return /* @__PURE__ */ n(j, { ...i, children: /* @__PURE__ */ n(J, { ...i, children: i.children }) });
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const J = ({
|
|
16
17
|
wireInId: i,
|
|
17
18
|
companyId: u,
|
|
18
|
-
dictionary:
|
|
19
|
-
confirmationAlert:
|
|
20
|
-
onStartWireTransfer:
|
|
19
|
+
dictionary: D,
|
|
20
|
+
confirmationAlert: l,
|
|
21
|
+
onStartWireTransfer: C
|
|
21
22
|
}) => {
|
|
22
|
-
|
|
23
|
-
const { t: s } =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
const { data:
|
|
23
|
+
E("Payroll.ConfirmWireDetailsBanner", D), G("Payroll.ConfirmWireDetailsBanner");
|
|
24
|
+
const { t: s } = v("Payroll.ConfirmWireDetailsBanner"), { Alert: P, Banner: L, Button: R, UnorderedList: b, Text: c } = k(), q = z(), [w, d] = Z(!1), S = H("currency");
|
|
25
|
+
_(() => {
|
|
26
|
+
l && d(!1);
|
|
27
|
+
}, [l]);
|
|
28
|
+
const { data: B } = M({
|
|
28
29
|
companyUuid: u
|
|
29
|
-
}), { data:
|
|
30
|
+
}), { data: W } = N({
|
|
30
31
|
companyId: u,
|
|
31
32
|
processed: !0
|
|
32
|
-
}),
|
|
33
|
-
(
|
|
34
|
-
),
|
|
35
|
-
const
|
|
33
|
+
}), p = (B.wireInRequestList || []).filter(
|
|
34
|
+
(e) => e.status === "awaiting_funds"
|
|
35
|
+
), x = i ? p.filter((e) => e.uuid === i) : p, A = W.payrollList || [], r = x.map((e) => {
|
|
36
|
+
const t = A.find((o) => o.payrollUuid === e.paymentUuid), a = t?.payPeriod ? q.formatPayPeriodRange(t.payPeriod.startDate, t.payPeriod.endDate) : "";
|
|
36
37
|
return {
|
|
37
|
-
wireInRequest:
|
|
38
|
-
payroll:
|
|
39
|
-
payrollRange:
|
|
38
|
+
wireInRequest: e,
|
|
39
|
+
payroll: t,
|
|
40
|
+
payrollRange: a,
|
|
41
|
+
paymentType: e.paymentType,
|
|
42
|
+
requestedAmount: e.requestedAmount ?? ""
|
|
40
43
|
};
|
|
41
|
-
}), f =
|
|
42
|
-
if (!f && !
|
|
44
|
+
}), f = r.length > 0 && (r.length > 1 || r[0]?.wireInRequest), y = !w && l;
|
|
45
|
+
if (!f && !y)
|
|
43
46
|
return null;
|
|
44
|
-
const
|
|
45
|
-
const
|
|
47
|
+
const T = (e) => {
|
|
48
|
+
const t = new Date(e), o = t.toLocaleTimeString("en-US", {
|
|
46
49
|
hour: "numeric",
|
|
47
|
-
minute:
|
|
50
|
+
minute: t.getMinutes() === 0 ? void 0 : "2-digit",
|
|
48
51
|
hour12: !0,
|
|
49
52
|
timeZone: "America/Los_Angeles",
|
|
50
53
|
timeZoneName: "short"
|
|
51
|
-
}).replace(/\s?(AM|PM)/i, (
|
|
54
|
+
}).replace(/\s?(AM|PM)/i, (F) => F.trim().toLowerCase()), m = t.toLocaleDateString("en-US", {
|
|
52
55
|
month: "long",
|
|
53
56
|
day: "numeric",
|
|
54
57
|
year: "numeric",
|
|
55
58
|
timeZone: "America/Los_Angeles"
|
|
56
59
|
});
|
|
57
|
-
return { time:
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
if (i &&
|
|
62
|
-
const { time:
|
|
63
|
-
return s("banner.title", { time:
|
|
60
|
+
return { time: o, date: m };
|
|
61
|
+
}, I = () => {
|
|
62
|
+
const e = r.length === 1, { wireInRequest: t, payrollRange: a } = r[0] || {};
|
|
63
|
+
if (e) {
|
|
64
|
+
if (i && t?.wireInDeadline) {
|
|
65
|
+
const { time: o, date: m } = T(t.wireInDeadline);
|
|
66
|
+
return s("banner.title", { time: o, date: m });
|
|
64
67
|
}
|
|
65
|
-
return s("banner.titleWithPayroll", { payrollRange:
|
|
68
|
+
return s("banner.titleWithPayroll", { payrollRange: a });
|
|
66
69
|
}
|
|
67
|
-
return s("banner.titleMultiple", { count:
|
|
70
|
+
return s("banner.titleMultiple", { count: r.length });
|
|
71
|
+
}, U = () => {
|
|
72
|
+
if (r.length > 1)
|
|
73
|
+
return /* @__PURE__ */ n(
|
|
74
|
+
b,
|
|
75
|
+
{
|
|
76
|
+
items: r.map(
|
|
77
|
+
({ paymentType: e, payrollRange: t, requestedAmount: a }, o) => e === "Payroll" ? /* @__PURE__ */ n(c, { children: s("banner.requestLabelPayroll", { payrollRange: t }) }, o) : /* @__PURE__ */ n(c, { children: s("banner.requestLabelContractorPaymentGroup", {
|
|
78
|
+
requestedAmount: S(Number(a))
|
|
79
|
+
}) }, o)
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
);
|
|
68
83
|
};
|
|
69
84
|
return /* @__PURE__ */ h(g, { flexDirection: "column", gap: 16, children: [
|
|
70
|
-
|
|
71
|
-
|
|
85
|
+
y && /* @__PURE__ */ n(
|
|
86
|
+
P,
|
|
72
87
|
{
|
|
73
88
|
status: "success",
|
|
74
|
-
label:
|
|
89
|
+
label: l.title,
|
|
75
90
|
onDismiss: () => {
|
|
76
|
-
|
|
91
|
+
d(!0);
|
|
77
92
|
},
|
|
78
|
-
children:
|
|
93
|
+
children: l.content
|
|
79
94
|
}
|
|
80
95
|
),
|
|
81
|
-
f && /* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
items: n.map(({ payrollRange: t }, e) => /* @__PURE__ */ r(S, { children: t }, e))
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ r(C, { variant: "secondary", onClick: D, children: s("cta.startWireTransfer") })
|
|
96
|
+
f && /* @__PURE__ */ n(L, { status: "warning", title: I(), children: /* @__PURE__ */ h(g, { flexDirection: "column", gap: 16, alignItems: "flex-start", children: [
|
|
97
|
+
/* @__PURE__ */ n("div", { children: s("banner.description") }),
|
|
98
|
+
U(),
|
|
99
|
+
/* @__PURE__ */ n(R, { variant: "secondary", onClick: C, children: s("cta.startWireTransfer") })
|
|
90
100
|
] }) })
|
|
91
101
|
] });
|
|
92
102
|
};
|
|
93
103
|
export {
|
|
94
|
-
|
|
104
|
+
ie as ConfirmWireDetailsBanner
|
|
95
105
|
};
|
|
96
106
|
//# sourceMappingURL=ConfirmWireDetailsBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmWireDetailsBanner.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api/react-query/payrollsList'\nimport { useState, useEffect } from 'react'\nimport type { ConfirmationAlert } from '../types'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface ConfirmWireDetailsBannerProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsBanner'> {\n wireInId?: string\n companyId: string\n confirmationAlert?: ConfirmationAlert\n onStartWireTransfer: () => void\n}\n\nexport function ConfirmWireDetailsBanner(props: ConfirmWireDetailsBannerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n confirmationAlert,\n onStartWireTransfer,\n}: ConfirmWireDetailsBannerProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsBanner', dictionary)\n useI18n('Payroll.ConfirmWireDetailsBanner')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsBanner')\n const { Alert, Banner, Button, UnorderedList, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const [isConfirmationAlertDismissed, setIsConfirmationAlertDismissed] = useState<boolean>(false)\n\n useEffect(() => {\n if (confirmationAlert) {\n setIsConfirmationAlertDismissed(false)\n }\n }, [confirmationAlert])\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n request => request.status === 'awaiting_funds',\n )\n const wireInRequests = wireInId\n ? activeWireInRequests.filter(request => request.uuid === wireInId)\n : activeWireInRequests\n\n const payrolls = payrollsData.payrollList || []\n\n const wireInRequestsWithPayrolls = wireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(payroll.payPeriod.startDate, payroll.payPeriod.endDate)\n : ''\n return {\n wireInRequest,\n payroll,\n payrollRange,\n }\n })\n\n const shouldShowBanner =\n wireInRequestsWithPayrolls.length > 0 &&\n (wireInRequestsWithPayrolls.length > 1 || wireInRequestsWithPayrolls[0]?.wireInRequest)\n\n const shouldShowConfirmationAlert = !isConfirmationAlertDismissed && confirmationAlert\n\n if (!shouldShowBanner && !shouldShowConfirmationAlert) {\n return null\n }\n\n const formatDeadline = (deadline: string) => {\n const date = new Date(deadline)\n\n const timeRaw = date.toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: date.getMinutes() === 0 ? undefined : '2-digit',\n hour12: true,\n timeZone: 'America/Los_Angeles',\n timeZoneName: 'short',\n })\n\n const time = timeRaw.replace(/\\s?(AM|PM)/i, match => match.trim().toLowerCase())\n\n const dateString = date.toLocaleDateString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'America/Los_Angeles',\n })\n\n return { time, date: dateString }\n }\n\n const getBannerTitle = () => {\n const isSingleWireInRequest = wireInRequestsWithPayrolls.length === 1\n const { wireInRequest, payrollRange } = wireInRequestsWithPayrolls[0] || {}\n\n if (isSingleWireInRequest) {\n if (wireInId && wireInRequest?.wireInDeadline) {\n const { time, date } = formatDeadline(wireInRequest.wireInDeadline)\n return t('banner.title', { time, date })\n }\n return t('banner.titleWithPayroll', { payrollRange })\n }\n return t('banner.titleMultiple', { count: wireInRequestsWithPayrolls.length })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {shouldShowConfirmationAlert && (\n <Alert\n status=\"success\"\n label={confirmationAlert.title}\n onDismiss={() => {\n setIsConfirmationAlertDismissed(true)\n }}\n >\n {confirmationAlert.content}\n </Alert>\n )}\n {shouldShowBanner && (\n <Banner status=\"warning\" title={getBannerTitle()}>\n <Flex flexDirection=\"column\" gap={16} alignItems=\"flex-start\">\n <div>{t('banner.description')}</div>\n {wireInRequestsWithPayrolls.length > 1 && (\n <UnorderedList\n items={wireInRequestsWithPayrolls.map(({ payrollRange }, index) => (\n <Text key={index}>{payrollRange}</Text>\n ))}\n />\n )}\n <Button variant=\"secondary\" onClick={onStartWireTransfer}>\n {t('cta.startWireTransfer')}\n </Button>\n </Flex>\n </Banner>\n )}\n </Flex>\n )\n}\n"],"names":["ConfirmWireDetailsBanner","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","confirmationAlert","onStartWireTransfer","useComponentDictionary","useI18n","t","useTranslation","Alert","Banner","Button","UnorderedList","Text","useComponentContext","dateFormatter","useDateFormatter","isConfirmationAlertDismissed","setIsConfirmationAlertDismissed","useState","useEffect","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","request","wireInRequests","payrolls","wireInRequestsWithPayrolls","wireInRequest","payroll","p","payrollRange","shouldShowBanner","shouldShowConfirmationAlert","formatDeadline","deadline","date","time","match","dateString","get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,OAAOsB,EAA2B,QAAQ;AAAA,EAC/E;AAEA,SACE,gBAAAe,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,IAAAV,KACC,gBAAAtC;AAAA,MAACY;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,OAAON,EAAkB;AAAA,QACzB,WAAW,MAAM;AACf,UAAAe,EAAgC,EAAI;AAAA,QACtC;AAAA,QAEC,UAAAf,EAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAGtB+B,KACC,gBAAArC,EAACa,GAAA,EAAO,QAAO,WAAU,OAAOgC,EAAA,GAC9B,UAAA,gBAAAE,EAACC,KAAK,eAAc,UAAS,KAAK,IAAI,YAAW,cAC/C,UAAA;AAAA,MAAA,gBAAAhD,EAAC,OAAA,EAAK,UAAAU,EAAE,oBAAoB,EAAA,CAAE;AAAA,MAC7BsB,EAA2B,SAAS,KACnC,gBAAAhC;AAAA,QAACe;AAAA,QAAA;AAAA,UACC,OAAOiB,EAA2B,IAAI,CAAC,EAAE,cAAAI,EAAA,GAAgBa,MACvD,gBAAAjD,EAACgB,GAAA,EAAkB,UAAAoB,EAAA,GAARa,CAAqB,CACjC;AAAA,QAAA;AAAA,MAAA;AAAA,MAGL,gBAAAjD,EAACc,KAAO,SAAQ,aAAY,SAASP,GAClC,UAAAG,EAAE,uBAAuB,EAAA,CAC5B;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsBanner.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api/react-query/payrollsList'\nimport { useState, useEffect } from 'react'\nimport type { ConfirmationAlert } from '../types'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\ninterface ConfirmWireDetailsBannerProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsBanner'> {\n wireInId?: string\n companyId: string\n confirmationAlert?: ConfirmationAlert\n onStartWireTransfer: () => void\n}\n\nexport function ConfirmWireDetailsBanner(props: ConfirmWireDetailsBannerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n confirmationAlert,\n onStartWireTransfer,\n}: ConfirmWireDetailsBannerProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsBanner', dictionary)\n useI18n('Payroll.ConfirmWireDetailsBanner')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsBanner')\n const { Alert, Banner, Button, UnorderedList, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const [isConfirmationAlertDismissed, setIsConfirmationAlertDismissed] = useState<boolean>(false)\n const currencyFormatter = useNumberFormatter('currency')\n\n useEffect(() => {\n if (confirmationAlert) {\n setIsConfirmationAlertDismissed(false)\n }\n }, [confirmationAlert])\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n request => request.status === 'awaiting_funds',\n )\n const wireInRequests = wireInId\n ? activeWireInRequests.filter(request => request.uuid === wireInId)\n : activeWireInRequests\n\n const payrolls = payrollsData.payrollList || []\n\n const wireInRequestsWithPayrolls = wireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(payroll.payPeriod.startDate, payroll.payPeriod.endDate)\n : ''\n return {\n wireInRequest,\n payroll,\n payrollRange,\n paymentType: wireInRequest.paymentType,\n requestedAmount: wireInRequest.requestedAmount ?? '',\n }\n })\n\n const shouldShowBanner =\n wireInRequestsWithPayrolls.length > 0 &&\n (wireInRequestsWithPayrolls.length > 1 || wireInRequestsWithPayrolls[0]?.wireInRequest)\n\n const shouldShowConfirmationAlert = !isConfirmationAlertDismissed && confirmationAlert\n\n if (!shouldShowBanner && !shouldShowConfirmationAlert) {\n return null\n }\n\n const formatDeadline = (deadline: string) => {\n const date = new Date(deadline)\n\n const timeRaw = date.toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: date.getMinutes() === 0 ? undefined : '2-digit',\n hour12: true,\n timeZone: 'America/Los_Angeles',\n timeZoneName: 'short',\n })\n\n const time = timeRaw.replace(/\\s?(AM|PM)/i, match => match.trim().toLowerCase())\n\n const dateString = date.toLocaleDateString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'America/Los_Angeles',\n })\n\n return { time, date: dateString }\n }\n\n const getBannerTitle = () => {\n const isSingleWireInRequest = wireInRequestsWithPayrolls.length === 1\n const { wireInRequest, payrollRange } = wireInRequestsWithPayrolls[0] || {}\n\n if (isSingleWireInRequest) {\n if (wireInId && wireInRequest?.wireInDeadline) {\n const { time, date } = formatDeadline(wireInRequest.wireInDeadline)\n return t('banner.title', { time, date })\n }\n return t('banner.titleWithPayroll', { payrollRange })\n }\n return t('banner.titleMultiple', { count: wireInRequestsWithPayrolls.length })\n }\n\n const getBannerContent = () => {\n if (wireInRequestsWithPayrolls.length > 1) {\n return (\n <UnorderedList\n items={wireInRequestsWithPayrolls.map(\n ({ paymentType, payrollRange, requestedAmount }, index) =>\n paymentType === 'Payroll' ? (\n <Text key={index}>{t('banner.requestLabelPayroll', { payrollRange })}</Text>\n ) : (\n <Text key={index}>\n {t('banner.requestLabelContractorPaymentGroup', {\n requestedAmount: currencyFormatter(Number(requestedAmount)),\n })}\n </Text>\n ),\n )}\n />\n )\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {shouldShowConfirmationAlert && (\n <Alert\n status=\"success\"\n label={confirmationAlert.title}\n onDismiss={() => {\n setIsConfirmationAlertDismissed(true)\n }}\n >\n {confirmationAlert.content}\n </Alert>\n )}\n {shouldShowBanner && (\n <Banner status=\"warning\" title={getBannerTitle()}>\n <Flex flexDirection=\"column\" gap={16} alignItems=\"flex-start\">\n <div>{t('banner.description')}</div>\n {getBannerContent()}\n <Button variant=\"secondary\" onClick={onStartWireTransfer}>\n {t('cta.startWireTransfer')}\n </Button>\n </Flex>\n </Banner>\n )}\n </Flex>\n )\n}\n"],"names":["ConfirmWireDetailsBanner","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","confirmationAlert","onStartWireTransfer","useComponentDictionary","useI18n","t","useTranslation","Alert","Banner","Button","UnorderedList","Text","useComponentContext","dateFormatter","useDateFormatter","isConfirmationAlertDismissed","setIsConfirmationAlertDismissed","useState","currencyFormatter","useNumberFormatter","useEffect","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","request","wireInRequests","payrolls","wireInRequestsWithPayrolls","wireInRequest","payroll","p","payrollRange","shouldShowBanner","shouldShowConfirmationAlert","formatDeadline","deadline","date","time","match","dateString","getBannerTitle","isSingleWireInRequest","getBannerContent","paymentType","requestedAmount","index","jsxs","Flex"],"mappings":";;;;;;;;;;;;AAmBO,SAASA,GAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,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C,MAC/CF,MAAgB,YACd,gBAAAlD,EAACgB,GAAA,EAAkB,YAAE,8BAA8B,EAAE,cAAAsB,GAAc,EAAA,GAAxDc,CAA0D,IAErE,gBAAApD,EAACgB,GAAA,EACE,UAAAN,EAAE,6CAA6C;AAAA,cAC9C,iBAAiBa,EAAkB,OAAO4B,CAAe,CAAC;AAAA,YAAA,CAC3D,KAHQC,CAIX;AAAA,UAAA;AAAA,QAEN;AAAA,MAAA;AAAA,EAIR;AAEA,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,IAAAd,KACC,gBAAAxC;AAAA,MAACY;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,OAAON,EAAkB;AAAA,QACzB,WAAW,MAAM;AACf,UAAAe,EAAgC,EAAI;AAAA,QACtC;AAAA,QAEC,UAAAf,EAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAGtBiC,KACC,gBAAAvC,EAACa,GAAA,EAAO,QAAO,WAAU,OAAOkC,EAAA,GAC9B,UAAA,gBAAAM,EAACC,KAAK,eAAc,UAAS,KAAK,IAAI,YAAW,cAC/C,UAAA;AAAA,MAAA,gBAAAtD,EAAC,OAAA,EAAK,UAAAU,EAAE,oBAAoB,EAAA,CAAE;AAAA,MAC7BuC,EAAA;AAAA,MACD,gBAAAjD,EAACc,KAAO,SAAQ,aAAY,SAASP,GAClC,UAAAG,EAAE,uBAAuB,EAAA,CAC5B;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js
CHANGED
|
@@ -16,12 +16,12 @@ import { useComponentDictionary as z, useI18n as g } from "../../../../i18n/I18n
|
|
|
16
16
|
import { Flex as p, FlexItem as f } from "../../../Common/Flex/Flex.js";
|
|
17
17
|
import { payrollWireEvents as N } from "../../../../shared/constants.js";
|
|
18
18
|
import "classnames";
|
|
19
|
-
import "
|
|
20
|
-
import {
|
|
21
|
-
import { useDateFormatter as J } from "../../../../hooks/useDateFormatter.js";
|
|
19
|
+
import { TextInputField as V } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
20
|
+
import { DatePickerField as J } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
22
21
|
import { NumberInputField as Q } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
22
|
+
import "react";
|
|
23
|
+
import { TextAreaField as X } from "../../../Common/Fields/TextAreaField/TextAreaField.js";
|
|
24
|
+
import { useDateFormatter as Z } from "../../../../hooks/useDateFormatter.js";
|
|
25
25
|
const $ = r.object({
|
|
26
26
|
amountSent: r.number().positive(),
|
|
27
27
|
dateSent: r.date(),
|
|
@@ -43,7 +43,7 @@ const oe = ({
|
|
|
43
43
|
modalContainerRef: y
|
|
44
44
|
}) => {
|
|
45
45
|
z("Payroll.ConfirmWireDetailsForm", i), g("Payroll.ConfirmWireDetailsForm");
|
|
46
|
-
const { onEvent: a, baseSubmitHandler: I } = Y(), { t } = F("Payroll.ConfirmWireDetailsForm"), { Heading: v, Text: b } = S(), R =
|
|
46
|
+
const { onEvent: a, baseSubmitHandler: I } = Y(), { t } = F("Payroll.ConfirmWireDetailsForm"), { Heading: v, Text: b } = S(), R = Z(), { data: P } = U({
|
|
47
47
|
wireInRequestUuid: o
|
|
48
48
|
}), W = P.wireInRequest, { data: q } = G({
|
|
49
49
|
companyId: n,
|
|
@@ -95,7 +95,7 @@ const oe = ({
|
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
97
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
98
|
+
J,
|
|
99
99
|
{
|
|
100
100
|
name: "dateSent",
|
|
101
101
|
label: t("dateLabel"),
|
|
@@ -105,7 +105,7 @@ const oe = ({
|
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
|
-
|
|
108
|
+
V,
|
|
109
109
|
{
|
|
110
110
|
name: "bankName",
|
|
111
111
|
label: t("bankNameLabel"),
|
|
@@ -115,7 +115,7 @@ const oe = ({
|
|
|
115
115
|
errorMessage: t("validations.bankName")
|
|
116
116
|
}
|
|
117
117
|
),
|
|
118
|
-
/* @__PURE__ */ e(
|
|
118
|
+
/* @__PURE__ */ e(X, { name: "additionalNotes", label: t("notesLabel"), rows: 3 })
|
|
119
119
|
] })
|
|
120
120
|
}
|
|
121
121
|
) })
|