@gusto/embedded-react-sdk 0.20.0 → 0.21.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 +31 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -0
- package/dist/UNSTABLE_Hooks.js +9 -0
- package/dist/UNSTABLE_Hooks.js.map +1 -0
- package/dist/assets/icons/coins-hand.svg.js +10 -0
- package/dist/assets/icons/coins-hand.svg.js.map +1 -0
- package/dist/components/Base/Base.d.ts +19 -4
- package/dist/components/Base/Base.js +67 -61
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/useBase.d.ts +1 -1
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +10 -0
- package/dist/components/Base/useBaseSubmit.js +33 -0
- package/dist/components/Base/useBaseSubmit.js.map +1 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
- package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +14 -11
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +9 -7
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +15 -12
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +23 -22
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
- package/dist/components/Common/UI/Select/Select.d.ts +1 -1
- package/dist/components/Common/UI/Select/Select.js +27 -26
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
- package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
- package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
- package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +12 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +6 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +6 -4
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -9
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +10 -8
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +5 -3
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +7 -6
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +7 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +9 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +8 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +7 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +12 -10
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +16 -15
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +11 -9
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +9 -7
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +5 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +5 -4
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.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/_parts/Head.js +13 -11
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +18 -17
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +7 -5
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +8 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +7 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +15 -15
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -0
- package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/PaymentEdit/PaymentEditPresentation.d.ts +6 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/types.d.ts +4 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +1 -1
- package/dist/components/Contractor/Submit/Submit.js +21 -20
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +14 -13
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/Deductions.js +10 -10
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +165 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -127
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +55 -55
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +53 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.js +49 -29
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +5 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +5 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +5 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +8 -6
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +6 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +7 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +14 -14
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +13 -11
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +11 -10
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -4
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +7 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +9 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +26 -24
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +5 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +10 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +14 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +5 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +23 -21
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +58 -36
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +153 -23
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +195 -22
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +39 -25
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +8 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +27 -28
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +56 -57
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +96 -93
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +81 -72
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +8 -8
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +4 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
- package/dist/components/Payroll/helpers.d.ts +0 -5
- package/dist/components/Payroll/helpers.js +106 -112
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -7
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -5
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +9 -0
- package/dist/helpers/dateFormatting.js +65 -52
- 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 +10 -10
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js +32 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js +32 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js +32 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js.map +1 -0
- package/dist/i18n/en/Payroll.Common.json.js +8 -0
- package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/shared/constants.d.ts +6 -0
- package/dist/shared/constants.js +15 -12
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +183 -8
- package/package.json +11 -7
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
- package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -49
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
import { ConfirmationAlert } from './types';
|
|
1
2
|
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
3
|
+
import { CommonComponentInterface } from '../../Base';
|
|
4
|
+
import { EventType } from '../../../types/Helpers';
|
|
5
|
+
import { OnEventType } from '../../Base/useBase';
|
|
2
6
|
export interface ConfirmWireDetailsContextInterface extends FlowContextInterface {
|
|
3
7
|
companyId: string;
|
|
4
8
|
wireInId?: string;
|
|
9
|
+
selectedWireInId?: string;
|
|
10
|
+
modalContainerRef?: React.RefObject<HTMLDivElement | null>;
|
|
11
|
+
showOnlyCloseButton?: boolean;
|
|
12
|
+
confirmationAlert?: ConfirmationAlert;
|
|
13
|
+
component: (React.ComponentType<CommonComponentInterface> & {
|
|
14
|
+
Footer?: React.ComponentType<{
|
|
15
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
16
|
+
}>;
|
|
17
|
+
}) | null;
|
|
5
18
|
}
|
|
6
19
|
export declare function WireInstructionsContextual(): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare namespace WireInstructionsContextual {
|
|
21
|
+
var Footer: ({ onEvent }: {
|
|
22
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
}
|
|
7
25
|
export declare function ConfirmWireDetailsFormContextual(): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare namespace ConfirmWireDetailsFormContextual {
|
|
27
|
+
var Footer: ({ onEvent }: {
|
|
28
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
}
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useFlow as
|
|
3
|
-
import { ensureRequired as
|
|
4
|
-
import { ConfirmWireDetailsForm as
|
|
5
|
-
import { WireInstructions as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useFlow as m } from "../../Flow/useFlow.js";
|
|
3
|
+
import { ensureRequired as t } from "../../../helpers/ensureRequired.js";
|
|
4
|
+
import { ConfirmWireDetailsForm as I } from "./ConfirmWireDetailsForm/ConfirmWireDetailsForm.js";
|
|
5
|
+
import { WireInstructions as d } from "./WireInstructions/WireInstructions.js";
|
|
6
6
|
function a() {
|
|
7
|
-
const { companyId: o, wireInId: r, onEvent: n } =
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
|
|
10
|
-
function d() {
|
|
11
|
-
const { companyId: o, wireInId: r, onEvent: n } = e();
|
|
12
|
-
return /* @__PURE__ */ t(
|
|
13
|
-
m,
|
|
7
|
+
const { companyId: o, wireInId: r, selectedWireInId: e, onEvent: n, modalContainerRef: s } = m();
|
|
8
|
+
return /* @__PURE__ */ i(
|
|
9
|
+
d,
|
|
14
10
|
{
|
|
15
|
-
companyId:
|
|
11
|
+
companyId: t(o),
|
|
16
12
|
wireInId: r,
|
|
17
|
-
|
|
13
|
+
selectedWireInId: e,
|
|
14
|
+
onEvent: n,
|
|
15
|
+
modalContainerRef: s
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
a.Footer = d.Footer;
|
|
20
|
+
function c() {
|
|
21
|
+
const { selectedWireInId: o, companyId: r, onEvent: e, modalContainerRef: n } = m();
|
|
22
|
+
return /* @__PURE__ */ i(
|
|
23
|
+
I,
|
|
24
|
+
{
|
|
25
|
+
wireInId: t(o),
|
|
26
|
+
companyId: t(r),
|
|
27
|
+
onEvent: e,
|
|
28
|
+
modalContainerRef: n
|
|
18
29
|
}
|
|
19
30
|
);
|
|
20
31
|
}
|
|
32
|
+
c.Footer = I.Footer;
|
|
21
33
|
export {
|
|
22
|
-
|
|
34
|
+
c as ConfirmWireDetailsFormContextual,
|
|
23
35
|
a as WireInstructionsContextual
|
|
24
36
|
};
|
|
25
37
|
//# sourceMappingURL=ConfirmWireDetailsComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmWireDetailsComponents.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.tsx"],"sourcesContent":["import { WireInstructions } from './WireInstructions'\nimport { ConfirmWireDetailsForm } from './ConfirmWireDetailsForm'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\n\nexport interface ConfirmWireDetailsContextInterface extends FlowContextInterface {\n companyId: string\n wireInId?: string\n}\n\nexport function WireInstructionsContextual() {\n const { companyId, wireInId, onEvent }
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsComponents.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.tsx"],"sourcesContent":["import type { ConfirmationAlert } from './types'\nimport { WireInstructions } from './WireInstructions'\nimport { ConfirmWireDetailsForm } from './ConfirmWireDetailsForm'\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 ConfirmWireDetailsContextInterface extends FlowContextInterface {\n companyId: string\n wireInId?: string\n selectedWireInId?: string\n modalContainerRef?: React.RefObject<HTMLDivElement | null>\n showOnlyCloseButton?: boolean\n confirmationAlert?: ConfirmationAlert\n component:\n | (React.ComponentType<CommonComponentInterface> & {\n Footer?: React.ComponentType<{\n onEvent: OnEventType<EventType, unknown>\n }>\n })\n | null\n}\n\nexport function WireInstructionsContextual() {\n const { companyId, wireInId, selectedWireInId, onEvent, modalContainerRef } =\n useFlow<ConfirmWireDetailsContextInterface>()\n\n return (\n <WireInstructions\n companyId={ensureRequired(companyId)}\n wireInId={wireInId}\n selectedWireInId={selectedWireInId}\n onEvent={onEvent}\n modalContainerRef={modalContainerRef}\n />\n )\n}\n\nWireInstructionsContextual.Footer = WireInstructions.Footer\n\nexport function ConfirmWireDetailsFormContextual() {\n const { selectedWireInId, companyId, onEvent, modalContainerRef } =\n useFlow<ConfirmWireDetailsContextInterface>()\n return (\n <ConfirmWireDetailsForm\n wireInId={ensureRequired(selectedWireInId)}\n companyId={ensureRequired(companyId)}\n onEvent={onEvent}\n modalContainerRef={modalContainerRef}\n />\n )\n}\n\nConfirmWireDetailsFormContextual.Footer = ConfirmWireDetailsForm.Footer\n"],"names":["WireInstructionsContextual","companyId","wireInId","selectedWireInId","onEvent","modalContainerRef","useFlow","jsx","WireInstructions","ensureRequired","ConfirmWireDetailsFormContextual","ConfirmWireDetailsForm"],"mappings":";;;;;AA0BO,SAASA,IAA6B;AAC3C,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,kBAAAC,GAAkB,SAAAC,GAAS,mBAAAC,EAAA,IACtDC,EAAA;AAEF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeR,CAAS;AAAA,MACnC,UAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,SAAAC;AAAA,MACA,mBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAL,EAA2B,SAASQ,EAAiB;AAE9C,SAASE,IAAmC;AACjD,QAAM,EAAE,kBAAAP,GAAkB,WAAAF,GAAW,SAAAG,GAAS,mBAAAC,EAAA,IAC5CC,EAAA;AACF,SACE,gBAAAC;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,UAAUF,EAAeN,CAAgB;AAAA,MACzC,WAAWM,EAAeR,CAAS;AAAA,MACnC,SAAAG;AAAA,MACA,mBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAK,EAAiC,SAASC,EAAuB;"}
|
|
@@ -1,10 +1,33 @@
|
|
|
1
|
+
import { default as z } from 'zod';
|
|
1
2
|
import { BaseComponentInterface } from '../../../Base';
|
|
2
3
|
import { EventType } from '../../../../shared/constants';
|
|
3
4
|
import { OnEventType } from '../../../Base/useBase';
|
|
4
5
|
interface ConfirmWireDetailsFormProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {
|
|
6
|
+
wireInId: string;
|
|
5
7
|
companyId: string;
|
|
6
|
-
|
|
7
|
-
onEvent: OnEventType<EventType, unknown>;
|
|
8
|
+
modalContainerRef?: React.RefObject<HTMLDivElement | null>;
|
|
8
9
|
}
|
|
10
|
+
export declare const ConfirmWireDetailsFormSchema: z.ZodObject<{
|
|
11
|
+
amountSent: z.ZodNumber;
|
|
12
|
+
dateSent: z.ZodDate;
|
|
13
|
+
bankName: z.ZodString;
|
|
14
|
+
additionalNotes: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
bankName: string;
|
|
17
|
+
amountSent: number;
|
|
18
|
+
dateSent: Date;
|
|
19
|
+
additionalNotes?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
bankName: string;
|
|
22
|
+
amountSent: number;
|
|
23
|
+
dateSent: Date;
|
|
24
|
+
additionalNotes?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export type ConfirmWireDetailsFormValues = z.infer<typeof ConfirmWireDetailsFormSchema>;
|
|
9
27
|
export declare function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare namespace ConfirmWireDetailsForm {
|
|
29
|
+
var Footer: ({ onEvent }: {
|
|
30
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
31
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
}
|
|
10
33
|
export {};
|
package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js
CHANGED
|
@@ -1,30 +1,160 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as h, Trans as _ } from "react-i18next";
|
|
3
|
+
import r from "zod";
|
|
4
|
+
import { useForm as A, FormProvider as O } from "react-hook-form";
|
|
5
|
+
import { zodResolver as E } from "@hookform/resolvers/zod";
|
|
6
|
+
import { useIsMutating as T } from "@tanstack/react-query";
|
|
7
|
+
import { useWireInRequestsSubmitMutation as j, mutationKeyWireInRequestsSubmit as B } from "@gusto/embedded-api/react-query/wireInRequestsSubmit";
|
|
8
|
+
import { useWireInRequestsGetSuspense as G } from "@gusto/embedded-api/react-query/wireInRequestsGet";
|
|
9
|
+
import { usePayrollsGetSuspense as H } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
10
|
+
import m from "./ConfirmWireDetailsForm.module.scss.js";
|
|
11
|
+
import { Form as K } from "../../../Common/Form/Form.js";
|
|
12
|
+
import { BaseComponent as U } from "../../../Base/Base.js";
|
|
13
|
+
import { useBase as Y } from "../../../Base/useBase.js";
|
|
14
|
+
import { useComponentContext as F } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
+
import { useComponentDictionary as z, useI18n as D } from "../../../../i18n/I18n.js";
|
|
16
|
+
import { Flex as l, FlexItem as c } from "../../../Common/Flex/Flex.js";
|
|
17
|
+
import { payrollWireEvents as S } from "../../../../shared/constants.js";
|
|
18
|
+
import "classnames";
|
|
19
|
+
import { TextInputField as V } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
20
|
+
import { DatePickerField as J } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
21
|
+
import { NumberInputField as Q } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
22
|
+
import "react";
|
|
23
|
+
import { TextAreaField as X } from "../../../Common/Fields/TextAreaField/TextAreaField.js";
|
|
24
|
+
import { useDateFormatter as Z } from "../../../../hooks/useDateFormatter.js";
|
|
25
|
+
const $ = r.object({
|
|
26
|
+
amountSent: r.number().positive(),
|
|
27
|
+
dateSent: r.date(),
|
|
28
|
+
bankName: r.string().nonempty(),
|
|
29
|
+
additionalNotes: r.string().optional()
|
|
30
|
+
}), g = "confirm-wire-details-form", ee = (t) => ({
|
|
31
|
+
amountSent: String(t.amountSent),
|
|
32
|
+
dateSent: t.dateSent.toISOString().split("T")[0] || "",
|
|
33
|
+
bankName: t.bankName,
|
|
34
|
+
additionalNotes: t.additionalNotes || void 0
|
|
35
|
+
});
|
|
36
|
+
function te(t) {
|
|
37
|
+
return /* @__PURE__ */ e(U, { ...t, children: /* @__PURE__ */ e(oe, { ...t, children: t.children }) });
|
|
11
38
|
}
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
const oe = ({
|
|
40
|
+
wireInId: t,
|
|
41
|
+
companyId: n,
|
|
42
|
+
dictionary: i,
|
|
43
|
+
modalContainerRef: u
|
|
44
|
+
}) => {
|
|
45
|
+
z("Payroll.ConfirmWireDetailsForm", i), D("Payroll.ConfirmWireDetailsForm");
|
|
46
|
+
const { onEvent: a, baseSubmitHandler: I } = Y(), { t: o } = h("Payroll.ConfirmWireDetailsForm"), { Heading: N, Text: d } = F(), p = Z(), { data: C } = G({
|
|
47
|
+
wireInRequestUuid: t
|
|
48
|
+
}), P = C.wireInRequest, { data: W } = H({
|
|
49
|
+
companyId: n,
|
|
50
|
+
payrollId: P.paymentUuid
|
|
51
|
+
}), f = W.payrollShow, y = f.payPeriod, b = p.formatPayPeriodRange(
|
|
52
|
+
y?.startDate,
|
|
53
|
+
y?.endDate
|
|
54
|
+
), q = p.formatShortWithYear(f.checkDate), R = A({
|
|
55
|
+
resolver: E($),
|
|
56
|
+
defaultValues: {
|
|
57
|
+
bankName: ""
|
|
58
|
+
}
|
|
59
|
+
}), { mutateAsync: v } = j(), k = async (x) => {
|
|
60
|
+
await I(x, async (w) => {
|
|
61
|
+
const M = ee(w), L = await v({
|
|
62
|
+
request: {
|
|
63
|
+
wireInRequestUuid: t,
|
|
64
|
+
requestBody: M
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
a(S.PAYROLL_WIRE_FORM_DONE, {
|
|
68
|
+
wireInRequest: L.wireInRequest,
|
|
69
|
+
confirmationAlert: {
|
|
70
|
+
title: o("confirmationAlert.title", { payrollRange: b }),
|
|
71
|
+
content: /* @__PURE__ */ e(d, { children: o("confirmationAlert.content", { checkDate: q }) })
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
18
75
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
76
|
+
return /* @__PURE__ */ s(l, { flexDirection: "column", gap: 24, children: [
|
|
77
|
+
/* @__PURE__ */ s(c, { children: [
|
|
78
|
+
/* @__PURE__ */ e(N, { as: "h2", children: /* @__PURE__ */ e(_, { i18nKey: "title", t: o, values: { payrollRange: b } }) }),
|
|
79
|
+
/* @__PURE__ */ e(d, { children: o("description") })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ e(O, { ...R, children: /* @__PURE__ */ e(
|
|
82
|
+
K,
|
|
83
|
+
{
|
|
84
|
+
id: g,
|
|
85
|
+
onSubmit: R.handleSubmit(k),
|
|
86
|
+
className: m.form,
|
|
87
|
+
children: /* @__PURE__ */ s(l, { flexDirection: "column", gap: 20, children: [
|
|
88
|
+
/* @__PURE__ */ e(
|
|
89
|
+
Q,
|
|
90
|
+
{
|
|
91
|
+
name: "amountSent",
|
|
92
|
+
label: o("amountLabel"),
|
|
93
|
+
isRequired: !0,
|
|
94
|
+
format: "currency",
|
|
95
|
+
errorMessage: o("validations.amount")
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
|
+
J,
|
|
100
|
+
{
|
|
101
|
+
name: "dateSent",
|
|
102
|
+
label: o("dateLabel"),
|
|
103
|
+
isRequired: !0,
|
|
104
|
+
errorMessage: o("validations.date"),
|
|
105
|
+
portalContainer: u?.current || void 0
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ e(
|
|
109
|
+
V,
|
|
110
|
+
{
|
|
111
|
+
name: "bankName",
|
|
112
|
+
label: o("bankNameLabel"),
|
|
113
|
+
isRequired: !0,
|
|
114
|
+
description: o("bankNameDescription"),
|
|
115
|
+
placeholder: o("bankNamePlaceholder"),
|
|
116
|
+
errorMessage: o("validations.bankName")
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ e(X, { name: "additionalNotes", label: o("notesLabel"), rows: 3 })
|
|
120
|
+
] })
|
|
121
|
+
}
|
|
122
|
+
) })
|
|
123
|
+
] });
|
|
124
|
+
}, re = ({ onEvent: t }) => {
|
|
125
|
+
D("Payroll.ConfirmWireDetailsForm");
|
|
126
|
+
const { t: n } = h("Payroll.ConfirmWireDetailsForm"), { Button: i } = F(), a = T({
|
|
127
|
+
mutationKey: B()
|
|
128
|
+
}) > 0;
|
|
129
|
+
return /* @__PURE__ */ s(l, { gap: 12, justifyContent: "space-evenly", children: [
|
|
130
|
+
/* @__PURE__ */ e(c, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
131
|
+
i,
|
|
132
|
+
{
|
|
133
|
+
variant: "secondary",
|
|
134
|
+
onClick: () => {
|
|
135
|
+
t(S.PAYROLL_WIRE_FORM_CANCEL);
|
|
136
|
+
},
|
|
137
|
+
isDisabled: a,
|
|
138
|
+
className: m.button,
|
|
139
|
+
children: n("cancelCta")
|
|
140
|
+
}
|
|
141
|
+
) }),
|
|
142
|
+
/* @__PURE__ */ e(c, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
143
|
+
i,
|
|
144
|
+
{
|
|
145
|
+
variant: "primary",
|
|
146
|
+
type: "submit",
|
|
147
|
+
form: g,
|
|
148
|
+
isLoading: a,
|
|
149
|
+
className: m.button,
|
|
150
|
+
children: n("submitCta")
|
|
151
|
+
}
|
|
152
|
+
) })
|
|
25
153
|
] });
|
|
26
154
|
};
|
|
155
|
+
te.Footer = re;
|
|
27
156
|
export {
|
|
28
|
-
|
|
157
|
+
te as ConfirmWireDetailsForm,
|
|
158
|
+
$ as ConfirmWireDetailsFormSchema
|
|
29
159
|
};
|
|
30
160
|
//# sourceMappingURL=ConfirmWireDetailsForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmWireDetailsForm.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\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 { payrollWireEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface ConfirmWireDetailsFormProps\n extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {\n companyId: string\n wireInId?: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, wireInId, dictionary, onEvent }: ConfirmWireDetailsFormProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsForm', dictionary)\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Button } = useComponentContext()\n\n const handleSubmit = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_DONE)\n }\n\n const handleCancel = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL)\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <h2>{t('title')}</h2>\n\n {/* TODO: Form fields will be implemented in subsequent ticket */}\n\n <Flex gap={12} justifyContent=\"flex-end\">\n <Button variant=\"secondary\" onClick={handleCancel}>\n {t('cta.cancel')}\n </Button>\n <Button variant=\"primary\" onClick={handleSubmit}>\n {t('cta.submit')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["ConfirmWireDetailsForm","props","jsx","BaseComponent","Root","companyId","wireInId","dictionary","onEvent","useComponentDictionary","useI18n","t","useTranslation","Button","useComponentContext","handleSubmit","payrollWireEvents","handleCancel","jsxs","Flex"],"mappings":";;;;;;;;AAeO,SAASA,EAAuBC,GAAoC;AACzE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,YAAAC,GAAY,SAAAC,QAA2C;AAC1F,EAAAC,EAAuB,kCAAkCF,CAAU,GACnEG,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,QAAAC,EAAA,IAAWC,EAAA,GAEbC,IAAe,MAAM;AACzB,IAAAP,EAAQQ,EAAkB,sBAAsB;AAAA,EAClD,GAEMC,IAAe,MAAM;AACzB,IAAAT,EAAQQ,EAAkB,wBAAwB;AAAA,EACpD;AAEA,SACE,gBAAAE,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAjB,EAAC,MAAA,EAAI,UAAAS,EAAE,OAAO,EAAA,CAAE;AAAA,IAIhB,gBAAAO,EAACC,GAAA,EAAK,KAAK,IAAI,gBAAe,YAC5B,UAAA;AAAA,MAAA,gBAAAjB,EAACW,KAAO,SAAQ,aAAY,SAASI,GAClC,UAAAN,EAAE,YAAY,GACjB;AAAA,MACA,gBAAAT,EAACW,KAAO,SAAQ,WAAU,SAASE,GAChC,UAAAJ,EAAE,YAAY,EAAA,CACjB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsForm.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport z from 'zod'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useWireInRequestsSubmitMutation,\n mutationKeyWireInRequestsSubmit,\n} from '@gusto/embedded-api/react-query/wireInRequestsSubmit'\nimport { useWireInRequestsGetSuspense } from '@gusto/embedded-api/react-query/wireInRequestsGet'\nimport type { PutWireInRequestsWireInRequestUuidRequest } from '@gusto/embedded-api/models/operations/putwireinrequestswireinrequestuuid'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport styles from './ConfirmWireDetailsForm.module.scss'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex, FlexItem } from '@/components/Common/Flex/Flex'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport { DatePickerField, NumberInputField, TextInputField } from '@/components/Common'\nimport { TextAreaField } from '@/components/Common/Fields/TextAreaField'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface ConfirmWireDetailsFormProps\n extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {\n wireInId: string\n companyId: string\n modalContainerRef?: React.RefObject<HTMLDivElement | null>\n}\n\nexport const ConfirmWireDetailsFormSchema = z.object({\n amountSent: z.number().positive(),\n dateSent: z.date(),\n bankName: z.string().nonempty(),\n additionalNotes: z.string().optional(),\n})\n\nexport type ConfirmWireDetailsFormValues = z.infer<typeof ConfirmWireDetailsFormSchema>\n\nconst CONFIRM_WIRE_FORM_ID = 'confirm-wire-details-form'\n\nconst transformFormDataToPayload = (\n data: ConfirmWireDetailsFormValues,\n): PutWireInRequestsWireInRequestUuidRequest['requestBody'] => {\n return {\n amountSent: String(data.amountSent),\n dateSent: data.dateSent.toISOString().split('T')[0] || '',\n bankName: data.bankName,\n additionalNotes: data.additionalNotes || undefined,\n }\n}\n\nexport function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps) {\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 modalContainerRef,\n}: ConfirmWireDetailsFormProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsForm', dictionary)\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Heading, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const { data } = useWireInRequestsGetSuspense({\n wireInRequestUuid: wireInId,\n })\n const wireInRequest = data.wireInRequest!\n const { data: payroll } = usePayrollsGetSuspense({\n companyId: companyId,\n payrollId: wireInRequest.paymentUuid!,\n })\n const payrollData = payroll.payrollShow!\n const payPeriod = payrollData.payPeriod\n const payPeriodRange = dateFormatter.formatPayPeriodRange(\n payPeriod?.startDate,\n payPeriod?.endDate,\n )\n const checkDate = dateFormatter.formatShortWithYear(payrollData.checkDate)\n const formHandlers = useForm<ConfirmWireDetailsFormValues>({\n resolver: zodResolver(ConfirmWireDetailsFormSchema),\n defaultValues: {\n bankName: '',\n },\n })\n\n const { mutateAsync: submitWireInRequest } = useWireInRequestsSubmitMutation()\n\n const onSubmit = async (data: ConfirmWireDetailsFormValues) => {\n await baseSubmitHandler(data, async innerData => {\n const payload = transformFormDataToPayload(innerData)\n const response = await submitWireInRequest({\n request: {\n wireInRequestUuid: wireInId,\n requestBody: payload,\n },\n })\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_DONE, {\n wireInRequest: response.wireInRequest,\n confirmationAlert: {\n title: t('confirmationAlert.title', { payrollRange: payPeriodRange }),\n content: <Text>{t('confirmationAlert.content', { checkDate })}</Text>,\n },\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <FlexItem>\n <Heading as=\"h2\">\n <Trans i18nKey=\"title\" t={t} values={{ payrollRange: payPeriodRange }} />\n </Heading>\n <Text>{t('description')}</Text>\n </FlexItem>\n\n <FormProvider {...formHandlers}>\n <HtmlForm\n id={CONFIRM_WIRE_FORM_ID}\n onSubmit={formHandlers.handleSubmit(onSubmit)}\n className={styles.form}\n >\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"amountSent\"\n label={t('amountLabel')}\n isRequired\n format=\"currency\"\n errorMessage={t('validations.amount')}\n />\n <DatePickerField\n name=\"dateSent\"\n label={t('dateLabel')}\n isRequired\n errorMessage={t('validations.date')}\n portalContainer={modalContainerRef?.current || undefined}\n />\n <TextInputField\n name=\"bankName\"\n label={t('bankNameLabel')}\n isRequired\n description={t('bankNameDescription')}\n placeholder={t('bankNamePlaceholder')}\n errorMessage={t('validations.bankName')}\n />\n <TextAreaField name=\"additionalNotes\" label={t('notesLabel')} rows={3} />\n </Flex>\n </HtmlForm>\n </FormProvider>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Button } = useComponentContext()\n const isMutating = useIsMutating({\n mutationKey: mutationKeyWireInRequestsSubmit(),\n })\n const isPending = isMutating > 0\n\n return (\n <Flex gap={12} justifyContent=\"space-evenly\">\n <FlexItem flexGrow={1}>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL)\n }}\n isDisabled={isPending}\n className={styles.button}\n >\n {t('cancelCta')}\n </Button>\n </FlexItem>\n <FlexItem flexGrow={1}>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={CONFIRM_WIRE_FORM_ID}\n isLoading={isPending}\n className={styles.button}\n >\n {t('submitCta')}\n </Button>\n </FlexItem>\n </Flex>\n )\n}\nConfirmWireDetailsForm.Footer = Footer\n"],"names":["ConfirmWireDetailsFormSchema","z","CONFIRM_WIRE_FORM_ID","transformFormDataToPayload","data","ConfirmWireDetailsForm","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","modalContainerRef","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","Heading","Text","useComponentContext","dateFormatter","useDateFormatter","useWireInRequestsGetSuspense","wireInRequest","payroll","usePayrollsGetSuspense","payrollData","payPeriod","payPeriodRange","checkDate","formHandlers","useForm","zodResolver","submitWireInRequest","useWireInRequestsSubmitMutation","onSubmit","innerData","payload","response","payrollWireEvents","jsxs","Flex","FlexItem","Trans","FormProvider","HtmlForm","styles","NumberInputField","DatePickerField","TextInputField","TextAreaField","Footer","Button","isPending","useIsMutating","mutationKeyWireInRequestsSubmit"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsForm.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { BaseComponentInterface } from '../../../Base';
|
|
2
|
-
import { EventType } from '../../../../shared/constants';
|
|
3
2
|
import { OnEventType } from '../../../Base/useBase';
|
|
3
|
+
import { EventType } from '../../../../shared/constants';
|
|
4
4
|
interface WireInstructionsProps extends BaseComponentInterface<'Payroll.WireInstructions'> {
|
|
5
5
|
companyId: string;
|
|
6
6
|
wireInId?: string;
|
|
7
|
+
selectedWireInId?: string;
|
|
7
8
|
onEvent: OnEventType<EventType, unknown>;
|
|
9
|
+
modalContainerRef?: React.RefObject<HTMLDivElement | null>;
|
|
8
10
|
}
|
|
9
11
|
export declare function WireInstructions(props: WireInstructionsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace WireInstructions {
|
|
13
|
+
var Footer: ({ onEvent }: {
|
|
14
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export declare const Root: ({ companyId, wireInId, selectedWireInId, dictionary, onEvent, modalContainerRef, }: WireInstructionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
18
|
export {};
|
|
@@ -1,30 +1,203 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as v } from "react";
|
|
3
|
+
import { useTranslation as A } from "react-i18next";
|
|
4
|
+
import { useWireInRequestsListSuspense as T } from "@gusto/embedded-api/react-query/wireInRequestsList";
|
|
5
|
+
import { usePayrollsListSuspense as x } from "@gusto/embedded-api/react-query/payrollsList";
|
|
6
|
+
import u from "./WireInstructions.module.scss.js";
|
|
7
|
+
import { BaseComponent as F } from "../../../Base/Base.js";
|
|
4
8
|
import "../../../Base/useBase.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { payrollWireEvents as
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import { Flex as f } from "../../../Common/Flex/Flex.js";
|
|
10
|
+
import { useComponentContext as g } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { useComponentDictionary as _, useI18n as k } from "../../../../i18n/I18n.js";
|
|
12
|
+
import { payrollWireEvents as C } from "../../../../shared/constants.js";
|
|
13
|
+
import { useDateFormatter as w } from "../../../../hooks/useDateFormatter.js";
|
|
14
|
+
import E from "../../../../hooks/useNumberFormatter.js";
|
|
15
|
+
import { useFlow as O } from "../../../Flow/useFlow.js";
|
|
16
|
+
function W(n, a) {
|
|
17
|
+
const { data: i } = T({
|
|
18
|
+
companyUuid: n
|
|
19
|
+
}), { data: d } = x({
|
|
20
|
+
companyId: n,
|
|
21
|
+
processed: !0
|
|
22
|
+
}), l = (i.wireInRequestList || []).filter(
|
|
23
|
+
(o) => o.status === "awaiting_funds"
|
|
24
|
+
), r = l.find((o) => o.uuid === a), t = d.payrollList || [], m = v(
|
|
25
|
+
() => l.map((o) => {
|
|
26
|
+
const h = t.find((b) => b.payrollUuid === o.paymentUuid);
|
|
27
|
+
return {
|
|
28
|
+
wireInRequest: o,
|
|
29
|
+
payroll: h
|
|
30
|
+
};
|
|
31
|
+
}),
|
|
32
|
+
[l, t]
|
|
33
|
+
);
|
|
34
|
+
return {
|
|
35
|
+
selectedInstruction: v(() => r ? {
|
|
36
|
+
id: r.uuid || "",
|
|
37
|
+
trackingCode: r.uniqueTrackingCode || "",
|
|
38
|
+
amount: parseFloat(r.requestedAmount || "0"),
|
|
39
|
+
bankName: r.originationBank || "",
|
|
40
|
+
bankAddress: r.originationBankAddress || "",
|
|
41
|
+
recipientName: r.recipientName || "",
|
|
42
|
+
recipientAddress: r.recipientAddress || "",
|
|
43
|
+
recipientAccountNumber: r.recipientAccountNumber || "",
|
|
44
|
+
recipientRoutingNumber: r.recipientRoutingNumber || ""
|
|
45
|
+
} : null, [r]),
|
|
46
|
+
activeWireInRequestsWithPayrolls: m
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function c({ label: n, value: a }) {
|
|
50
|
+
const { Text: i } = g();
|
|
51
|
+
return /* @__PURE__ */ p(f, { flexDirection: "column", gap: 8, children: [
|
|
52
|
+
/* @__PURE__ */ e(i, { className: u.fieldLabel, children: n }),
|
|
53
|
+
/* @__PURE__ */ e(i, { className: u.fieldValue, children: a })
|
|
54
|
+
] });
|
|
11
55
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
56
|
+
function U(n) {
|
|
57
|
+
return /* @__PURE__ */ e(F, { ...n, children: /* @__PURE__ */ e(B, { ...n, children: n.children }) });
|
|
58
|
+
}
|
|
59
|
+
const B = ({
|
|
60
|
+
companyId: n,
|
|
61
|
+
wireInId: a,
|
|
62
|
+
selectedWireInId: i,
|
|
63
|
+
dictionary: d,
|
|
64
|
+
onEvent: l,
|
|
65
|
+
modalContainerRef: r
|
|
66
|
+
}) => {
|
|
67
|
+
_("Payroll.WireInstructions", d), k("Payroll.WireInstructions");
|
|
68
|
+
const { t } = A("Payroll.WireInstructions"), { Select: m, Card: R, Text: o, UnorderedList: h, Heading: b, Alert: L } = g(), P = w(), q = E("currency"), { selectedInstruction: s, activeWireInRequestsWithPayrolls: I } = W(
|
|
69
|
+
n,
|
|
70
|
+
i
|
|
71
|
+
), S = !a && I.length > 1, D = (N) => {
|
|
72
|
+
l(C.PAYROLL_WIRE_INSTRUCTIONS_SELECT, {
|
|
73
|
+
selectedId: N
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
return I.length === 0 || i && !s ? /* @__PURE__ */ e(f, { flexDirection: "column", gap: 24, children: /* @__PURE__ */ e(o, { children: t("messages.noInstructions") }) }) : /* @__PURE__ */ p(f, { flexDirection: "column", gap: 24, children: [
|
|
77
|
+
/* @__PURE__ */ p("div", { children: [
|
|
78
|
+
/* @__PURE__ */ e(b, { as: "h2", styledAs: "h3", children: t("title") }),
|
|
79
|
+
/* @__PURE__ */ e(o, { className: u.subtitle, children: t("subtitle") })
|
|
80
|
+
] }),
|
|
81
|
+
S && /* @__PURE__ */ e(
|
|
82
|
+
m,
|
|
83
|
+
{
|
|
84
|
+
isRequired: !0,
|
|
85
|
+
portalContainer: r?.current || void 0,
|
|
86
|
+
label: t("selectLabel"),
|
|
87
|
+
value: i || "",
|
|
88
|
+
options: I.map(({ wireInRequest: N, payroll: y }) => ({
|
|
89
|
+
label: y?.payPeriod ? P.formatPayPeriodRange(
|
|
90
|
+
y.payPeriod.startDate,
|
|
91
|
+
y.payPeriod.endDate
|
|
92
|
+
) : t("selectFallback"),
|
|
93
|
+
value: N.uuid || ""
|
|
94
|
+
})),
|
|
95
|
+
onChange: D
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ e(L, { label: t("requirementsTitle"), disableScrollIntoView: !0, children: /* @__PURE__ */ e(
|
|
99
|
+
h,
|
|
100
|
+
{
|
|
101
|
+
className: u.requirementsList,
|
|
102
|
+
items: [
|
|
103
|
+
t("requirements.trackingCode"),
|
|
104
|
+
t("requirements.amountMatch"),
|
|
105
|
+
t("requirements.usBank"),
|
|
106
|
+
t("requirements.authorized")
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) }),
|
|
110
|
+
s && /* @__PURE__ */ e(f, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ p(R, { className: u.requirementsCard, children: [
|
|
111
|
+
/* @__PURE__ */ e(
|
|
112
|
+
c,
|
|
113
|
+
{
|
|
114
|
+
label: t("fields.trackingCode"),
|
|
115
|
+
value: s.trackingCode
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ e("hr", {}),
|
|
119
|
+
/* @__PURE__ */ e(
|
|
120
|
+
c,
|
|
121
|
+
{
|
|
122
|
+
label: t("fields.amount"),
|
|
123
|
+
value: q(s.amount)
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ e("hr", {}),
|
|
127
|
+
/* @__PURE__ */ e(
|
|
128
|
+
c,
|
|
129
|
+
{
|
|
130
|
+
label: t("fields.bankName"),
|
|
131
|
+
value: s.bankName
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ e("hr", {}),
|
|
135
|
+
/* @__PURE__ */ e(
|
|
136
|
+
c,
|
|
137
|
+
{
|
|
138
|
+
label: t("fields.bankAddress"),
|
|
139
|
+
value: s.bankAddress
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ e("hr", {}),
|
|
143
|
+
/* @__PURE__ */ e(
|
|
144
|
+
c,
|
|
145
|
+
{
|
|
146
|
+
label: t("fields.recipientName"),
|
|
147
|
+
value: s.recipientName
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ e("hr", {}),
|
|
151
|
+
/* @__PURE__ */ e(
|
|
152
|
+
c,
|
|
153
|
+
{
|
|
154
|
+
label: t("fields.recipientAddress"),
|
|
155
|
+
value: s.recipientAddress
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ e("hr", {}),
|
|
159
|
+
/* @__PURE__ */ e(
|
|
160
|
+
c,
|
|
161
|
+
{
|
|
162
|
+
label: t("fields.accountNumber"),
|
|
163
|
+
value: s.recipientAccountNumber
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ e("hr", {}),
|
|
167
|
+
/* @__PURE__ */ e(
|
|
168
|
+
c,
|
|
169
|
+
{
|
|
170
|
+
label: t("fields.routingNumber"),
|
|
171
|
+
value: s.recipientRoutingNumber
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] }) })
|
|
175
|
+
] });
|
|
176
|
+
}, Y = ({ onEvent: n }) => {
|
|
177
|
+
k("Payroll.WireInstructions");
|
|
178
|
+
const { t: a } = A("Payroll.WireInstructions"), { Button: i } = g(), { companyId: d, wireInId: l } = O(), { selectedInstruction: r } = W(d, l), t = () => {
|
|
179
|
+
const m = l || r?.id;
|
|
180
|
+
n(C.PAYROLL_WIRE_INSTRUCTIONS_DONE, {
|
|
181
|
+
selectedId: m
|
|
182
|
+
});
|
|
18
183
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
184
|
+
return /* @__PURE__ */ p("div", { className: u.footer, children: [
|
|
185
|
+
/* @__PURE__ */ e(
|
|
186
|
+
i,
|
|
187
|
+
{
|
|
188
|
+
variant: "secondary",
|
|
189
|
+
onClick: () => {
|
|
190
|
+
n(C.PAYROLL_WIRE_INSTRUCTIONS_CANCEL);
|
|
191
|
+
},
|
|
192
|
+
children: a("cta.close")
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ e(i, { variant: "primary", onClick: t, isDisabled: !r, children: a("cta.confirm") })
|
|
25
196
|
] });
|
|
26
197
|
};
|
|
198
|
+
U.Footer = Y;
|
|
27
199
|
export {
|
|
28
|
-
|
|
200
|
+
B as Root,
|
|
201
|
+
U as WireInstructions
|
|
29
202
|
};
|
|
30
203
|
//# sourceMappingURL=WireInstructions.js.map
|