@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
package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as x } from "react-i18next";
|
|
3
|
-
import { useForm as Q, FormProvider as k } from "react-hook-form";
|
|
4
|
-
import { zodResolver as L } from "@hookform/resolvers/zod";
|
|
5
|
-
import { z as m } from "zod";
|
|
6
|
-
import { useIsMutating as B } from "@tanstack/react-query";
|
|
7
|
-
import { useInformationRequestsGetInformationRequestsSuspense as j } from "@gusto/embedded-api/react-query/informationRequestsGetInformationRequests";
|
|
8
|
-
import { useInformationRequestsSubmitMutation as z, mutationKeyInformationRequestsSubmit as H } from "@gusto/embedded-api/react-query/informationRequestsSubmit";
|
|
9
|
-
import { ResponseType as p } from "@gusto/embedded-api/models/components/informationrequest";
|
|
10
|
-
import { ResponseType as b } from "@gusto/embedded-api/models/operations/submitinformationrequest";
|
|
11
|
-
import s from "./InformationRequestForm.module.scss.js";
|
|
12
|
-
import { BaseComponent as K } from "../../../Base/Base.js";
|
|
13
|
-
import { useBase as V } from "../../../Base/useBase.js";
|
|
14
|
-
import { Flex as v } from "../../../Common/Flex/Flex.js";
|
|
15
|
-
import "classnames";
|
|
16
|
-
import { informationRequestEvents as U } from "../../../../shared/constants.js";
|
|
17
|
-
import { ActionsLayout as W } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
18
|
-
import { useComponentContext as N } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
19
|
-
import "react";
|
|
20
|
-
import { FileInputField as G } from "../../../Common/Fields/FileInputField/FileInputField.js";
|
|
21
|
-
import { Form as Y } from "../../../Common/Form/Form.js";
|
|
22
|
-
import { useComponentDictionary as $, useI18n as E } from "../../../../i18n/I18n.js";
|
|
23
|
-
import { TextInputField as J } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
24
|
-
const A = "gusto-sdk-information-request-form", X = ["image/jpeg", "image/png", "application/pdf"], Z = m.record(
|
|
25
|
-
m.string(),
|
|
26
|
-
m.union([m.string().min(1), m.instanceof(File)])
|
|
27
|
-
);
|
|
28
|
-
function ee(n) {
|
|
29
|
-
return /* @__PURE__ */ o(K, { ...n, children: /* @__PURE__ */ o(te, { ...n, children: n.children }) });
|
|
30
|
-
}
|
|
31
|
-
const oe = (n) => new Promise((r, i) => {
|
|
32
|
-
const t = new FileReader();
|
|
33
|
-
t.onload = () => {
|
|
34
|
-
r(t.result);
|
|
35
|
-
}, t.onerror = i, t.readAsDataURL(n);
|
|
36
|
-
});
|
|
37
|
-
function te({ companyId: n, requestId: r, dictionary: i }) {
|
|
38
|
-
$("Payroll.InformationRequestForm", i), E("Payroll.InformationRequestForm");
|
|
39
|
-
const { t } = x("Payroll.InformationRequestForm"), { Alert: u, Heading: T, Text: q } = N(), { onEvent: D, baseSubmitHandler: M } = V(), { data: P } = j({
|
|
40
|
-
companyUuid: n
|
|
41
|
-
}), F = P.informationRequestList?.find((e) => e.uuid === r), I = F?.requiredQuestions ?? [], S = F?.blockingPayroll ?? !1, { mutateAsync: C } = z(), R = {}, y = [];
|
|
42
|
-
I.forEach((e) => {
|
|
43
|
-
!e.questionUuid || !e.responseType || (e.responseType === p.Text ? (y.push(e.questionUuid), R[e.questionUuid] = "") : e.responseType === p.Document && (y.push(e.questionUuid), R[e.questionUuid] = void 0));
|
|
44
|
-
});
|
|
45
|
-
const g = Q({
|
|
46
|
-
resolver: L(Z),
|
|
47
|
-
defaultValues: R
|
|
48
|
-
}), w = async (e) => {
|
|
49
|
-
await M(e, async () => {
|
|
50
|
-
const d = (await Promise.all(
|
|
51
|
-
y.map(async (a) => {
|
|
52
|
-
const l = e[a];
|
|
53
|
-
if (typeof l == "string")
|
|
54
|
-
return {
|
|
55
|
-
questionUuid: a,
|
|
56
|
-
responseType: b.Text,
|
|
57
|
-
textResponse: l
|
|
58
|
-
};
|
|
59
|
-
if (l instanceof File) {
|
|
60
|
-
const O = await oe(l);
|
|
61
|
-
return {
|
|
62
|
-
questionUuid: a,
|
|
63
|
-
responseType: b.Document,
|
|
64
|
-
fileResponse: O,
|
|
65
|
-
fileName: l.name
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
69
|
-
})
|
|
70
|
-
)).filter((a) => a !== null), h = await C({
|
|
71
|
-
request: {
|
|
72
|
-
informationRequestUuid: r,
|
|
73
|
-
requestBody: {
|
|
74
|
-
requiredQuestions: d
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
D(U.INFORMATION_REQUEST_FORM_DONE, h.informationRequest);
|
|
79
|
-
});
|
|
80
|
-
}, _ = (e) => {
|
|
81
|
-
if (!e.questionUuid || !e.responseType) return null;
|
|
82
|
-
const c = e.questionUuid, d = e.responseType === p.Document, h = e.responseType === p.Text;
|
|
83
|
-
return /* @__PURE__ */ f("div", { className: s.questionCard, children: [
|
|
84
|
-
/* @__PURE__ */ f("div", { className: s.questionDescription, children: [
|
|
85
|
-
/* @__PURE__ */ o(q, { weight: "medium", children: t(d ? "questionTypes.document" : "questionTypes.answer") }),
|
|
86
|
-
/* @__PURE__ */ o(q, { children: e.questionText })
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ o("hr", { className: s.divider }),
|
|
89
|
-
h && /* @__PURE__ */ o("div", { className: s.textInputWrapper, children: /* @__PURE__ */ o(
|
|
90
|
-
J,
|
|
91
|
-
{
|
|
92
|
-
name: c,
|
|
93
|
-
label: t("fields.textAnswer.label"),
|
|
94
|
-
placeholder: t("fields.textAnswer.placeholder"),
|
|
95
|
-
isRequired: !0,
|
|
96
|
-
errorMessage: t("validation.required")
|
|
97
|
-
}
|
|
98
|
-
) }),
|
|
99
|
-
d && /* @__PURE__ */ o("div", { className: s.fileInputWrapper, children: /* @__PURE__ */ o(
|
|
100
|
-
G,
|
|
101
|
-
{
|
|
102
|
-
name: c,
|
|
103
|
-
label: t("fields.fileUpload.label"),
|
|
104
|
-
accept: X,
|
|
105
|
-
isRequired: !0,
|
|
106
|
-
errorMessage: t("validation.required")
|
|
107
|
-
}
|
|
108
|
-
) })
|
|
109
|
-
] }, c);
|
|
110
|
-
};
|
|
111
|
-
return /* @__PURE__ */ o("div", { className: s.root, children: /* @__PURE__ */ f(v, { flexDirection: "column", gap: 16, children: [
|
|
112
|
-
/* @__PURE__ */ o(T, { as: "h2", children: t("title") }),
|
|
113
|
-
S && /* @__PURE__ */ o(u, { status: "error", label: t("blockingAlert.title"), disableScrollIntoView: !0, children: t("blockingAlert.description") }),
|
|
114
|
-
/* @__PURE__ */ o(k, { ...g, children: /* @__PURE__ */ o(Y, { id: A, onSubmit: g.handleSubmit(w), children: /* @__PURE__ */ o(v, { flexDirection: "column", gap: 16, children: I.map(_) }) }) })
|
|
115
|
-
] }) });
|
|
116
|
-
}
|
|
117
|
-
const ne = ({ onEvent: n }) => {
|
|
118
|
-
E("Payroll.InformationRequestForm");
|
|
119
|
-
const { t: r } = x("Payroll.InformationRequestForm"), { Button: i } = N(), u = B({
|
|
120
|
-
mutationKey: H()
|
|
121
|
-
}) > 0;
|
|
122
|
-
return /* @__PURE__ */ f(W, { children: [
|
|
123
|
-
/* @__PURE__ */ o(i, { variant: "secondary", onClick: () => {
|
|
124
|
-
n(U.INFORMATION_REQUEST_FORM_CANCEL);
|
|
125
|
-
}, isDisabled: u, children: r("cta.cancel") }),
|
|
126
|
-
/* @__PURE__ */ o(
|
|
127
|
-
i,
|
|
128
|
-
{
|
|
129
|
-
variant: "primary",
|
|
130
|
-
type: "submit",
|
|
131
|
-
form: A,
|
|
132
|
-
isLoading: u,
|
|
133
|
-
children: r("cta.submit")
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
] });
|
|
137
|
-
};
|
|
138
|
-
ee.Footer = ne;
|
|
139
|
-
export {
|
|
140
|
-
ee as InformationRequestForm
|
|
141
|
-
};
|
|
142
|
-
//# sourceMappingURL=InformationRequestForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InformationRequestForm.js","sources":["../../../../../src/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { useIsMutating } from '@tanstack/react-query'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport {\n useInformationRequestsSubmitMutation,\n mutationKeyInformationRequestsSubmit,\n} from '@gusto/embedded-api/react-query/informationRequestsSubmit'\nimport type { RequiredQuestions } from '@gusto/embedded-api/models/components/informationrequest'\nimport { ResponseType } from '@gusto/embedded-api/models/components/informationrequest'\nimport { ResponseType as SubmitResponseType } from '@gusto/embedded-api/models/operations/submitinformationrequest'\nimport styles from './InformationRequestForm.module.scss'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex, TextInputField } from '@/components/Common'\nimport { FileInputField } from '@/components/Common/Fields/FileInputField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { informationRequestEvents, type EventType } from '@/shared/constants'\n\nconst INFORMATION_REQUEST_FORM_ID = 'gusto-sdk-information-request-form'\nconst ACCEPTED_FILE_TYPES = ['image/jpeg', 'image/png', 'application/pdf']\n\nconst InformationRequestFormSchema = z.record(\n z.string(),\n z.union([z.string().min(1), z.instanceof(File)]),\n)\n\ntype InformationRequestFormValues = z.infer<typeof InformationRequestFormSchema>\n\ninterface InformationRequestFormProps extends BaseComponentInterface<'Payroll.InformationRequestForm'> {\n companyId: string\n requestId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function InformationRequestForm(props: InformationRequestFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst convertFileToDataUrl = (file: File) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = () => {\n resolve(reader.result as string)\n }\n reader.onerror = reject\n reader.readAsDataURL(file)\n })\n}\n\nfunction Root({ companyId, requestId, dictionary }: InformationRequestFormProps) {\n useComponentDictionary('Payroll.InformationRequestForm', dictionary)\n useI18n('Payroll.InformationRequestForm')\n const { t } = useTranslation('Payroll.InformationRequestForm')\n const { Alert, Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequest = data.informationRequestList?.find(req => req.uuid === requestId)\n const requiredQuestions = informationRequest?.requiredQuestions ?? []\n const isBlockingPayroll = informationRequest?.blockingPayroll ?? false\n\n const { mutateAsync: submitInformationRequest } = useInformationRequestsSubmitMutation()\n\n const defaultValues: Record<string, string | File | undefined> = {}\n const questionUuids: string[] = []\n\n requiredQuestions.forEach(question => {\n if (!question.questionUuid || !question.responseType) return\n\n if (question.responseType === ResponseType.Text) {\n questionUuids.push(question.questionUuid)\n defaultValues[question.questionUuid] = ''\n } else if (question.responseType === ResponseType.Document) {\n questionUuids.push(question.questionUuid)\n defaultValues[question.questionUuid] = undefined\n }\n })\n\n const formMethods = useForm<InformationRequestFormValues>({\n resolver: zodResolver(InformationRequestFormSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InformationRequestFormValues) => {\n await baseSubmitHandler(formData, async () => {\n const questionResponses = await Promise.all(\n questionUuids.map(async uuid => {\n const value = formData[uuid]\n\n if (typeof value === 'string') {\n return {\n questionUuid: uuid,\n responseType: SubmitResponseType.Text,\n textResponse: value,\n }\n }\n\n if (value instanceof File) {\n const fileResponse = await convertFileToDataUrl(value)\n return {\n questionUuid: uuid,\n responseType: SubmitResponseType.Document,\n fileResponse,\n fileName: value.name,\n }\n }\n\n return null\n }),\n )\n\n const validResponses = questionResponses.filter(response => response !== null)\n\n const response = await submitInformationRequest({\n request: {\n informationRequestUuid: requestId,\n requestBody: {\n requiredQuestions: validResponses,\n },\n },\n })\n\n onEvent(informationRequestEvents.INFORMATION_REQUEST_FORM_DONE, response.informationRequest)\n })\n }\n\n const renderQuestion = (question: RequiredQuestions) => {\n if (!question.questionUuid || !question.responseType) return null\n\n const fieldName = question.questionUuid\n const isDocumentType = question.responseType === ResponseType.Document\n const isTextType = question.responseType === ResponseType.Text\n\n return (\n <div key={fieldName} className={styles.questionCard}>\n <div className={styles.questionDescription}>\n <Text weight=\"medium\">\n {isDocumentType ? t('questionTypes.document') : t('questionTypes.answer')}\n </Text>\n <Text>{question.questionText}</Text>\n </div>\n\n <hr className={styles.divider} />\n\n {isTextType && (\n <div className={styles.textInputWrapper}>\n <TextInputField\n name={fieldName}\n label={t('fields.textAnswer.label')}\n placeholder={t('fields.textAnswer.placeholder')}\n isRequired\n errorMessage={t('validation.required')}\n />\n </div>\n )}\n\n {isDocumentType && (\n <div className={styles.fileInputWrapper}>\n <FileInputField\n name={fieldName}\n label={t('fields.fileUpload.label')}\n accept={ACCEPTED_FILE_TYPES}\n isRequired\n errorMessage={t('validation.required')}\n />\n </div>\n )}\n </div>\n )\n }\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('title')}</Heading>\n\n {isBlockingPayroll && (\n <Alert status=\"error\" label={t('blockingAlert.title')} disableScrollIntoView>\n {t('blockingAlert.description')}\n </Alert>\n )}\n\n <FormProvider {...formMethods}>\n <Form id={INFORMATION_REQUEST_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n {requiredQuestions.map(renderQuestion)}\n </Flex>\n </Form>\n </FormProvider>\n </Flex>\n </div>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.InformationRequestForm')\n const { t } = useTranslation('Payroll.InformationRequestForm')\n const { Button } = useComponentContext()\n const isMutating = useIsMutating({\n mutationKey: mutationKeyInformationRequestsSubmit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL)\n }\n\n return (\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={INFORMATION_REQUEST_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.submit')}\n </Button>\n </ActionsLayout>\n )\n}\n\nInformationRequestForm.Footer = Footer\n"],"names":["INFORMATION_REQUEST_FORM_ID","ACCEPTED_FILE_TYPES","InformationRequestFormSchema","z","InformationRequestForm","props","jsx","BaseComponent","Root","convertFileToDataUrl","file","resolve","reject","reader","companyId","requestId","dictionary","useComponentDictionary","useI18n","useTranslation","Alert","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","data","useInformationRequestsGetInformationRequestsSuspense","informationRequest","req","requiredQuestions","isBlockingPayroll","submitInformationRequest","useInformationRequestsSubmitMutation","defaultValues","questionUuids","question","ResponseType","formMethods","useForm","zodResolver","onSubmit","formData","validResponses","uuid","value","SubmitResponseType","fileResponse","response","informationRequestEvents","renderQuestion","fieldName","isDocumentType","isTextType","jsxs","styles","TextInputField","FileInputField","Flex","FormProvider","Form","Footer","t","Button","isPending","useIsMutating","mutationKeyInformationRequestsSubmit","ActionsLayout"],"mappings":"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"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const t = "_root_11yro_1", r = "_questionCard_11yro_5", o = "_questionDescription_11yro_15", e = "_textInputWrapper_11yro_22", n = "_fileInputWrapper_11yro_26", p = "_divider_11yro_31", i = {
|
|
2
|
-
root: t,
|
|
3
|
-
questionCard: r,
|
|
4
|
-
questionDescription: o,
|
|
5
|
-
textInputWrapper: e,
|
|
6
|
-
fileInputWrapper: n,
|
|
7
|
-
divider: p
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
i as default,
|
|
11
|
-
p as divider,
|
|
12
|
-
n as fileInputWrapper,
|
|
13
|
-
r as questionCard,
|
|
14
|
-
o as questionDescription,
|
|
15
|
-
t as root,
|
|
16
|
-
e as textInputWrapper
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=InformationRequestForm.module.scss.js.map
|
package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as I } from "react-i18next";
|
|
3
|
-
import { useInformationRequestsGetInformationRequests as b } from "@gusto/embedded-api/react-query/informationRequestsGetInformationRequests";
|
|
4
|
-
import { InformationRequestStatus as s, InformationRequestType as i } from "@gusto/embedded-api/models/components/informationrequest";
|
|
5
|
-
import { BaseComponent as w } from "../../../Base/Base.js";
|
|
6
|
-
import "../../../Base/useBase.js";
|
|
7
|
-
import { useComponentContext as x } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
import { useComponentDictionary as S, useI18n as v } from "../../../../i18n/I18n.js";
|
|
9
|
-
import { DataView as C } from "../../../Common/DataView/DataView.js";
|
|
10
|
-
import { useDataView as D } from "../../../Common/DataView/useDataView.js";
|
|
11
|
-
import { FlexItem as E, Flex as a } from "../../../Common/Flex/Flex.js";
|
|
12
|
-
import "classnames";
|
|
13
|
-
import { informationRequestEvents as L } from "../../../../shared/constants.js";
|
|
14
|
-
import "react";
|
|
15
|
-
function J(o) {
|
|
16
|
-
return /* @__PURE__ */ n(w, { ...o, children: /* @__PURE__ */ n(T, { ...o, children: o.children }) });
|
|
17
|
-
}
|
|
18
|
-
function T({ companyId: o, dictionary: m, onEvent: c }) {
|
|
19
|
-
S("Payroll.InformationRequestList", m), v("Payroll.InformationRequestList");
|
|
20
|
-
const { t } = I("Payroll.InformationRequestList"), { Heading: p, Text: u, Button: d, Badge: f } = x(), { data: y, isFetching: R } = b({
|
|
21
|
-
companyUuid: o
|
|
22
|
-
}), g = (y?.informationRequestList ?? []).filter(
|
|
23
|
-
(e) => e.blockingPayroll && e.status !== s.Approved
|
|
24
|
-
), h = (e) => {
|
|
25
|
-
switch (e) {
|
|
26
|
-
case i.CompanyOnboarding:
|
|
27
|
-
return t("types.companyOnboarding");
|
|
28
|
-
case i.AccountProtection:
|
|
29
|
-
return t("types.accountProtection");
|
|
30
|
-
case i.PaymentRequest:
|
|
31
|
-
return t("types.paymentRequest");
|
|
32
|
-
case i.PaymentError:
|
|
33
|
-
return t("types.paymentError");
|
|
34
|
-
default:
|
|
35
|
-
return t("types.unknown");
|
|
36
|
-
}
|
|
37
|
-
}, P = (e) => {
|
|
38
|
-
switch (e) {
|
|
39
|
-
case s.PendingResponse:
|
|
40
|
-
return { label: t("status.incomplete"), badgeStatus: "info" };
|
|
41
|
-
case s.PendingReview:
|
|
42
|
-
return { label: t("status.underReview"), badgeStatus: "warning" };
|
|
43
|
-
default:
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
}, q = D({
|
|
47
|
-
data: g,
|
|
48
|
-
isFetching: R,
|
|
49
|
-
columns: [
|
|
50
|
-
{
|
|
51
|
-
key: "type",
|
|
52
|
-
title: t("columns.type"),
|
|
53
|
-
render: (e) => /* @__PURE__ */ n(E, { flexGrow: 1, children: /* @__PURE__ */ n(u, { weight: "medium", children: h(e.type) }) })
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
key: "status",
|
|
57
|
-
title: t("columns.status"),
|
|
58
|
-
render: (e) => {
|
|
59
|
-
const r = P(e.status);
|
|
60
|
-
return r ? /* @__PURE__ */ n(a, { gap: 8, alignItems: "center", children: /* @__PURE__ */ n(f, { status: r.badgeStatus, children: r.label }) }) : null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
itemMenu: (e) => e.status === s.PendingResponse ? /* @__PURE__ */ n(
|
|
65
|
-
d,
|
|
66
|
-
{
|
|
67
|
-
variant: "secondary",
|
|
68
|
-
onClick: () => {
|
|
69
|
-
c(L.INFORMATION_REQUEST_RESPOND, {
|
|
70
|
-
requestId: e.uuid
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
children: t("cta.respond")
|
|
74
|
-
}
|
|
75
|
-
) : null
|
|
76
|
-
});
|
|
77
|
-
return /* @__PURE__ */ l(a, { flexDirection: "column", gap: 20, children: [
|
|
78
|
-
/* @__PURE__ */ l(a, { flexDirection: "column", gap: 2, children: [
|
|
79
|
-
/* @__PURE__ */ n(p, { as: "h2", styledAs: "h3", children: t("title") }),
|
|
80
|
-
/* @__PURE__ */ n(u, { children: t("description") })
|
|
81
|
-
] }),
|
|
82
|
-
/* @__PURE__ */ n(C, { ...q, label: t("title") })
|
|
83
|
-
] });
|
|
84
|
-
}
|
|
85
|
-
export {
|
|
86
|
-
J as InformationRequestList
|
|
87
|
-
};
|
|
88
|
-
//# sourceMappingURL=InformationRequestList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InformationRequestList.js","sources":["../../../../../src/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useInformationRequestsGetInformationRequests } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport type { InformationRequest } from '@gusto/embedded-api/models/components/informationrequest'\nimport {\n InformationRequestStatus,\n InformationRequestType,\n} from '@gusto/embedded-api/models/components/informationrequest'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { informationRequestEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\n\ninterface InformationRequestListProps extends BaseComponentInterface<'Payroll.InformationRequestList'> {\n companyId: string\n onEvent: BaseComponentInterface['onEvent']\n}\n\nexport function InformationRequestList(props: InformationRequestListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\ntype StatusMapping = {\n label: string\n badgeStatus: BadgeProps['status']\n} | null\n\nfunction Root({ companyId, dictionary, onEvent }: InformationRequestListProps) {\n useComponentDictionary('Payroll.InformationRequestList', dictionary)\n useI18n('Payroll.InformationRequestList')\n const { t } = useTranslation('Payroll.InformationRequestList')\n const { Heading, Text, Button, Badge } = useComponentContext()\n\n const { data, isFetching } = useInformationRequestsGetInformationRequests({\n companyUuid: companyId,\n })\n\n const informationRequests = data?.informationRequestList ?? []\n\n const visibleRequests = informationRequests.filter(\n request => request.blockingPayroll && request.status !== InformationRequestStatus.Approved,\n )\n\n const getTypeLabel = (type: InformationRequest['type']): string => {\n switch (type) {\n case InformationRequestType.CompanyOnboarding:\n return t('types.companyOnboarding')\n case InformationRequestType.AccountProtection:\n return t('types.accountProtection')\n case InformationRequestType.PaymentRequest:\n return t('types.paymentRequest')\n case InformationRequestType.PaymentError:\n return t('types.paymentError')\n default:\n return t('types.unknown')\n }\n }\n\n const getStatusMapping = (status: InformationRequest['status']): StatusMapping => {\n switch (status) {\n case InformationRequestStatus.PendingResponse:\n return { label: t('status.incomplete'), badgeStatus: 'info' }\n case InformationRequestStatus.PendingReview:\n return { label: t('status.underReview'), badgeStatus: 'warning' }\n default:\n return null\n }\n }\n\n const dataViewProps = useDataView({\n data: visibleRequests,\n isFetching,\n columns: [\n {\n key: 'type',\n title: t('columns.type'),\n render: request => (\n <FlexItem flexGrow={1}>\n <Text weight=\"medium\">{getTypeLabel(request.type)}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: request => {\n const statusMapping = getStatusMapping(request.status)\n if (!statusMapping) {\n return null\n }\n return (\n <Flex gap={8} alignItems=\"center\">\n <Badge status={statusMapping.badgeStatus}>{statusMapping.label}</Badge>\n </Flex>\n )\n },\n },\n ],\n itemMenu: request => {\n const isPendingResponse = request.status === InformationRequestStatus.PendingResponse\n if (!isPendingResponse) {\n return null\n }\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_RESPOND, {\n requestId: request.uuid,\n })\n }}\n >\n {t('cta.respond')}\n </Button>\n )\n },\n })\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text>{t('description')}</Text>\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n )\n}\n"],"names":["InformationRequestList","props","jsx","BaseComponent","Root","companyId","dictionary","onEvent","useComponentDictionary","useI18n","useTranslation","Heading","Text","Button","Badge","useComponentContext","data","isFetching","useInformationRequestsGetInformationRequests","visibleRequests","request","InformationRequestStatus","getTypeLabel","type","InformationRequestType","getStatusMapping","status","dataViewProps","useDataView","FlexItem","statusMapping","Flex","informationRequestEvents","jsxs","DataView"],"mappings":"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"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseComponentInterface } from '../../Base';
|
|
2
|
-
export interface InformationRequestsProps {
|
|
3
|
-
companyId: string;
|
|
4
|
-
onEvent?: BaseComponentInterface['onEvent'];
|
|
5
|
-
}
|
|
6
|
-
export declare function InformationRequests({ companyId, onEvent }: InformationRequestsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsxs as O, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { createMachine as p } from "robot3";
|
|
3
|
-
import { useMachine as d } from "react-robot";
|
|
4
|
-
import { useState as v, useMemo as C } from "react";
|
|
5
|
-
import { informationRequestsMachine as N } from "./informationRequestsStateMachine.js";
|
|
6
|
-
import { useComponentContext as h } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
import { FlowContext as F } from "../../Flow/useFlow.js";
|
|
8
|
-
import { informationRequestEvents as i } from "../../../shared/constants.js";
|
|
9
|
-
import { InformationRequestList as I } from "./InformationRequestList/InformationRequestList.js";
|
|
10
|
-
function D({ companyId: t, onEvent: c = () => {
|
|
11
|
-
} }) {
|
|
12
|
-
const { Modal: l } = h(), [u, r] = v(!1), E = C(
|
|
13
|
-
() => p(
|
|
14
|
-
"list",
|
|
15
|
-
N,
|
|
16
|
-
() => ({
|
|
17
|
-
component: null,
|
|
18
|
-
companyId: t,
|
|
19
|
-
onEvent: n
|
|
20
|
-
})
|
|
21
|
-
),
|
|
22
|
-
[t]
|
|
23
|
-
), [m, M] = d(E);
|
|
24
|
-
function n(o, a) {
|
|
25
|
-
M({ type: o, payload: a }), o === i.INFORMATION_REQUEST_RESPOND && r(!0), (o === i.INFORMATION_REQUEST_FORM_CANCEL || o === i.INFORMATION_REQUEST_FORM_DONE) && r(!1), c(o, a);
|
|
26
|
-
}
|
|
27
|
-
const R = () => {
|
|
28
|
-
r(!1);
|
|
29
|
-
}, s = m.context.component, f = s?.Footer || void 0;
|
|
30
|
-
return /* @__PURE__ */ O(
|
|
31
|
-
F.Provider,
|
|
32
|
-
{
|
|
33
|
-
value: {
|
|
34
|
-
...m.context,
|
|
35
|
-
onEvent: n
|
|
36
|
-
},
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ e(I, { companyId: t, onEvent: n }),
|
|
39
|
-
/* @__PURE__ */ e(
|
|
40
|
-
l,
|
|
41
|
-
{
|
|
42
|
-
isOpen: u,
|
|
43
|
-
onClose: R,
|
|
44
|
-
footer: f && /* @__PURE__ */ e(f, { onEvent: n }),
|
|
45
|
-
children: s && /* @__PURE__ */ e(s, {})
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
D as InformationRequests
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=InformationRequests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InformationRequests.js","sources":["../../../../src/components/Payroll/InformationRequests/InformationRequests.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMachine } from 'react-robot'\nimport { useMemo, useState } from 'react'\nimport { InformationRequestList } from './InformationRequestList'\nimport { informationRequestsMachine } from './informationRequestsStateMachine'\nimport { type InformationRequestsContextInterface } from './InformationRequestsComponents'\nimport { type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FlowContext } from '@/components/Flow/useFlow'\nimport { informationRequestEvents, type EventType } from '@/shared/constants'\n\nexport interface InformationRequestsProps {\n companyId: string\n onEvent?: BaseComponentInterface['onEvent']\n}\n\nexport function InformationRequests({ companyId, onEvent = () => {} }: InformationRequestsProps) {\n const { Modal } = useComponentContext()\n const [isModalOpen, setIsModalOpen] = useState(false)\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 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 <InformationRequestList companyId={companyId} onEvent={handleEvent} />\n <Modal\n isOpen={isModalOpen}\n onClose={handleCloseModal}\n footer={Footer && <Footer onEvent={handleEvent} />}\n >\n {CurrentComponent && <CurrentComponent />}\n </Modal>\n </FlowContext.Provider>\n )\n}\n"],"names":["InformationRequests","companyId","onEvent","Modal","useComponentContext","isModalOpen","setIsModalOpen","useState","informationRequestsMachineInstance","useMemo","createMachine","informationRequestsMachine","handleEvent","current","send","useMachine","type","data","informationRequestEvents","handleCloseModal","CurrentComponent","Footer","jsxs","FlowContext","jsx","InformationRequestList"],"mappings":";;;;;;;;;AAgBO,SAASA,EAAoB,EAAE,WAAAC,GAAW,SAAAC,IAAU,MAAM;AAAC,KAA+B;AAC/F,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAA,GACZ,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9CC,IAAqCC;AAAA,IACzC,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,OAA4C;AAAA,QAC1C,WAAW;AAAA,QACX,WAAAV;AAAA,QACA,SAASW;AAAA,MAAA;AAAA,IACX;AAAA,IAEJ,CAACX,CAAS;AAAA,EAAA,GAEN,CAACY,GAASC,CAAI,IAAIC,EAAWP,CAAkC;AAErE,WAASI,EAAYI,GAAiBC,GAAgB;AACpD,IAAAH,EAAK,EAAE,MAAAE,GAAM,SAASC,EAAA,CAAM,GAExBD,MAASE,EAAyB,+BACpCZ,EAAe,EAAI,IAInBU,MAASE,EAAyB,mCAClCF,MAASE,EAAyB,kCAElCZ,EAAe,EAAK,GAGtBJ,EAAQc,GAAMC,CAAI;AAAA,EACpB;AAEA,QAAME,IAAmB,MAAM;AAC7B,IAAAb,EAAe,EAAK;AAAA,EACtB,GAEMc,IAAmBP,EAAQ,QAAQ,WACnCQ,IAASD,GAAkB,UAAU;AAE3C,SACE,gBAAAE;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGV,EAAQ;AAAA,QACX,SAASD;AAAA,MAAA;AAAA,MAGX,UAAA;AAAA,QAAA,gBAAAY,EAACC,GAAA,EAAuB,WAAAxB,GAAsB,SAASW,EAAA,CAAa;AAAA,QACpE,gBAAAY;AAAA,UAACrB;AAAA,UAAA;AAAA,YACC,QAAQE;AAAA,YACR,SAASc;AAAA,YACT,QAAQE,KAAU,gBAAAG,EAACH,GAAA,EAAO,SAAST,GAAa;AAAA,YAE/C,UAAAQ,uBAAqBA,GAAA,CAAA,CAAiB;AAAA,UAAA;AAAA,QAAA;AAAA,MACzC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InformationRequestsComponents.js","sources":["../../../../src/components/Payroll/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;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"informationRequestsStateMachine.js","sources":["../../../../src/components/Payroll/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,6 +0,0 @@
|
|
|
1
|
-
import { BaseComponentInterface } from '../../Base/Base';
|
|
2
|
-
interface PayrollBlockerProps extends BaseComponentInterface<'Payroll.PayrollBlocker'> {
|
|
3
|
-
companyId: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function PayrollBlocker(props: PayrollBlockerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as u } from "react-i18next";
|
|
3
|
-
import { usePayrollsGetBlockersSuspense as k } from "@gusto/embedded-api/react-query/payrollsGetBlockers";
|
|
4
|
-
import { PayrollBlockerList as f } from "./components/PayrollBlockerList.js";
|
|
5
|
-
import { getBlockerTranslationKeys as B } from "./payrollHelpers.js";
|
|
6
|
-
import { BaseComponent as d } from "../../Base/Base.js";
|
|
7
|
-
import { useComponentDictionary as P, useI18n as g } from "../../../i18n/I18n.js";
|
|
8
|
-
function U(o) {
|
|
9
|
-
return /* @__PURE__ */ l(d, { ...o, children: /* @__PURE__ */ l(K, { ...o, children: o.children }) });
|
|
10
|
-
}
|
|
11
|
-
function K({ className: o, dictionary: c, companyId: i }) {
|
|
12
|
-
P("Payroll.PayrollBlocker", c), g("Payroll.PayrollBlocker");
|
|
13
|
-
const { t: r } = u("Payroll.PayrollBlocker"), { data: s } = k({
|
|
14
|
-
companyUuid: i
|
|
15
|
-
}), t = (s.payrollBlockerList ?? []).map((n) => {
|
|
16
|
-
const e = n.key ?? "unknown", a = B(e), y = r(a.titleKey, {
|
|
17
|
-
defaultValue: e.replace(/_/g, " ").replace(/\b\w/g, (p) => p.toUpperCase())
|
|
18
|
-
}), m = r(a.descriptionKey, {
|
|
19
|
-
defaultValue: n.message || r("defaultBlockerDescription")
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
id: e,
|
|
23
|
-
title: y,
|
|
24
|
-
description: m
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
return t.length === 0 ? null : /* @__PURE__ */ l(f, { className: o, blockers: t });
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
U as PayrollBlocker
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=PayrollBlocker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollBlocker.js","sources":["../../../../src/components/Payroll/PayrollBlocker/PayrollBlocker.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePayrollsGetBlockersSuspense } from '@gusto/embedded-api/react-query/payrollsGetBlockers'\nimport { PayrollBlockerList, type PayrollBlocker } from './components/PayrollBlockerList'\nimport { getBlockerTranslationKeys } from './payrollHelpers'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\n\ninterface PayrollBlockerProps extends BaseComponentInterface<'Payroll.PayrollBlocker'> {\n companyId: string\n}\n\nexport function PayrollBlocker(props: PayrollBlockerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, dictionary, companyId }: PayrollBlockerProps) {\n useComponentDictionary('Payroll.PayrollBlocker', dictionary)\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n\n const { data } = usePayrollsGetBlockersSuspense({\n companyUuid: companyId,\n })\n\n const payrollBlockerList = data.payrollBlockerList ?? []\n\n const blockers: PayrollBlocker[] = payrollBlockerList.map(blocker => {\n const blockerKey = blocker.key ?? 'unknown'\n const translationKeys = getBlockerTranslationKeys(blockerKey)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: blockerKey.replace(/_/g, ' ').replace(/\\b\\w/g, letter => letter.toUpperCase()),\n })\n\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n\n return {\n id: blockerKey,\n title,\n description,\n }\n })\n\n if (blockers.length === 0) {\n return null\n }\n\n return <PayrollBlockerList className={className} blockers={blockers} />\n}\n"],"names":["PayrollBlocker","props","jsx","BaseComponent","Root","className","dictionary","companyId","useComponentDictionary","useI18n","t","useTranslation","data","usePayrollsGetBlockersSuspense","blockers","blocker","blockerKey","translationKeys","getBlockerTranslationKeys","title","letter","description","PayrollBlockerList"],"mappings":";;;;;;;AAWO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,YAAAC,GAAY,WAAAC,KAAkC;AACvE,EAAAC,EAAuB,0BAA0BF,CAAU,GAC3DG,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAE/C,EAAE,MAAAC,EAAA,IAASC,EAA+B;AAAA,IAC9C,aAAaN;AAAA,EAAA,CACd,GAIKO,KAFqBF,EAAK,sBAAsB,CAAA,GAEA,IAAI,CAAAG,MAAW;AACnE,UAAMC,IAAaD,EAAQ,OAAO,WAC5BE,IAAkBC,EAA0BF,CAAU,GAEtDG,IAAQT,EAAEO,EAAgB,UAAU;AAAA,MACxC,cAAcD,EAAW,QAAQ,MAAM,GAAG,EAAE,QAAQ,SAAS,CAAAI,MAAUA,EAAO,YAAA,CAAa;AAAA,IAAA,CAC5F,GAEKC,IAAcX,EAAEO,EAAgB,gBAAgB;AAAA,MACpD,cAAcF,EAAQ,WAAWL,EAAE,2BAA2B;AAAA,IAAA,CAC/D;AAED,WAAO;AAAA,MACL,IAAIM;AAAA,MACJ,OAAAG;AAAA,MACA,aAAAE;AAAA,IAAA;AAAA,EAEJ,CAAC;AAED,SAAIP,EAAS,WAAW,IACf,OAGF,gBAAAZ,EAACoB,GAAA,EAAmB,WAAAjB,GAAsB,UAAAS,EAAA,CAAoB;AACvE;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const e = "Request for information", o = { title: "This is a payroll blocking request", description: "You will not be able to run payroll until we receive the information requested below." }, t = { document: "Document required", answer: "Answer required" }, l = { textAnswer: { label: "Answer the above question", placeholder: "Your answer" }, fileUpload: { label: "Upload document" } }, i = { required: "This field is required", fileRequired: "Please upload a file" }, n = { cancel: "Cancel", submit: "Submit response" }, r = {
|
|
2
|
-
title: e,
|
|
3
|
-
blockingAlert: o,
|
|
4
|
-
questionTypes: t,
|
|
5
|
-
fields: l,
|
|
6
|
-
validation: i,
|
|
7
|
-
cta: n
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
o as blockingAlert,
|
|
11
|
-
n as cta,
|
|
12
|
-
r as default,
|
|
13
|
-
l as fields,
|
|
14
|
-
t as questionTypes,
|
|
15
|
-
e as title,
|
|
16
|
-
i as validation
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=Payroll.InformationRequestForm.json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Payroll.InformationRequestForm.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const e = "Information requests", o = "We need you to share some more information about your business. This info will be used to keep your business secure and ensure that our data about your company is correct. Please make sure to do this soon since it may otherwise impact your ability to run payroll.", t = { type: "Type", status: "Status" }, n = { companyOnboarding: "Company Onboarding", accountProtection: "Account Protection", paymentRequest: "Payment Request", paymentError: "Payment Error", unknown: "Information Request" }, s = { incomplete: "Incomplete", underReview: "Under review" }, r = { respond: "Respond" }, a = {
|
|
2
|
-
title: e,
|
|
3
|
-
description: o,
|
|
4
|
-
columns: t,
|
|
5
|
-
types: n,
|
|
6
|
-
status: s,
|
|
7
|
-
cta: r
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
t as columns,
|
|
11
|
-
r as cta,
|
|
12
|
-
a as default,
|
|
13
|
-
o as description,
|
|
14
|
-
s as status,
|
|
15
|
-
e as title,
|
|
16
|
-
n as types
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=Payroll.InformationRequestList.json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Payroll.InformationRequestList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
File without changes
|
|
File without changes
|