@gusto/embedded-react-sdk 0.27.0 → 0.29.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 +58 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +4 -2
- package/dist/components/Common/DataView/DataCards/DataCards.js +52 -32
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +3 -2
- package/dist/components/Common/DataView/DataTable/DataTable.js +68 -53
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +4 -2
- package/dist/components/Common/DataView/DataView.js +28 -18
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +6 -1
- package/dist/components/Common/DataView/useDataView.js +34 -19
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/Fields/PercentageField/PercentageField.d.ts +8 -0
- package/dist/components/Common/Fields/PercentageField/PercentageField.js +58 -0
- package/dist/components/Common/Fields/PercentageField/PercentageField.js.map +1 -0
- package/dist/components/Common/Fields/PercentageField/index.d.ts +2 -0
- package/dist/components/Common/SignatureForm/SignatureForm.js +11 -12
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -4
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js +125 -98
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Card/Card.d.ts +1 -1
- package/dist/components/Common/UI/Card/Card.js +10 -20
- package/dist/components/Common/UI/Card/Card.js.map +1 -1
- package/dist/components/Common/UI/Card/CardTypes.d.ts +4 -4
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +5 -5
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -4
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +17 -16
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +6 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/Form.js +3 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -8
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +2 -3
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +6 -7
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +39 -56
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +2 -3
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +24 -23
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -9
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +60 -67
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +2 -0
- package/dist/components/Company/index.d.ts +2 -0
- package/dist/components/Company/index.js +21 -17
- package/dist/components/Company/index.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- package/dist/components/Contractor/Address/Form.js +11 -10
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/ContractorList/useContractorList.d.ts +8 -8
- package/dist/components/Contractor/ContractorList/useContractorList.js +9 -25
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +11 -12
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +23 -22
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -8
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +38 -24
- 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 +95 -60
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -7
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +67 -42
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +40 -36
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/types.d.ts +2 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Compensation/List.js +22 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -12
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -7
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +77 -95
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +2 -3
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +12 -12
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -5
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -12
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +3 -3
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +6 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -2
- package/dist/components/Employee/PaymentMethod/Split.js +9 -9
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +5 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +5 -6
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +10 -9
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +3 -3
- package/dist/components/Employee/Profile/useProfile.js +3 -5
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +5 -6
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +6 -7
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +13 -14
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +2 -3
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -16
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +20 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +11 -12
- package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +2 -3
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +50 -68
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +39 -38
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +17 -18
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -3
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +2 -3
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +5 -7
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/formattedStrings.js +11 -12
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/percentageConversion.d.ts +3 -0
- package/dist/helpers/percentageConversion.js +27 -0
- package/dist/helpers/percentageConversion.js.map +1 -0
- package/dist/helpers/percentageConversion.test.d.ts +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +15 -0
- package/dist/hooks/usePagination/usePagination.js +37 -0
- package/dist/hooks/usePagination/usePagination.js.map +1 -0
- package/dist/hooks/usePagination/usePagination.test.d.ts +1 -0
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +28 -28
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +18 -16
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +3 -1
- package/dist/i18n/en/common.json.js +1 -1
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/constants.js +11 -10
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +8 -0
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject<Record<string, z.ZodTypeAny>>> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodTypeAny> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n // --- Default Value Logic ---\n requirementValues[requirementKey] =\n requirement.metadata?.type === 'radio'\n ? (requirement.value ?? undefined)\n : requirement.value\n ? String(requirement.value)\n : ''\n\n // --- Schema Logic ---\n // Start with a basic string schema\n let fieldSchema: z.ZodTypeAny = z\n .string({\n required_error: t('validations.required'),\n })\n .min(1, t('validations.required'))\n\n const validation = requirement.metadata?.validation\n // Not all requirements have validation\n if (validation) {\n if (requirement.metadata?.type === 'tax_rate') {\n if (validation.type === 'min_max') {\n const min = parseFloat(validation.min as string)\n const max = parseFloat(validation.max as string)\n\n if (!isNaN(min) && !isNaN(max)) {\n fieldSchema = z.preprocess(\n val => Number(val),\n z\n .number()\n .min(min, t('validations.minValue', { min }))\n .max(max, t('validations.maxValue', { max }))\n .transform(num => String(num)),\n )\n }\n } else {\n //Type is one_of\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string({\n required_error: t('validations.required'),\n })\n .min(1, t('validations.required'))\n .refine(val => oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n }\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean({\n required_error: t('validations.required'),\n })\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm<InferredFormInputs>({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([key, value]) => ({\n key,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","fieldSchema","z","validation","min","max","val","num","oneOfValues","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","key","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject<Record<string, z.ZodTypeAny>>> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodTypeAny> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n const isPercentField =\n requirement.metadata?.type === 'tax_rate' || requirement.metadata?.type === 'percent'\n\n if (requirement.metadata?.type === 'radio') {\n requirementValues[requirementKey] = requirement.value ?? undefined\n } else {\n requirementValues[requirementKey] = requirement.value ? String(requirement.value) : ''\n }\n\n let fieldSchema: z.ZodTypeAny = z\n .string({\n required_error: t('validations.required'),\n })\n .min(1, t('validations.required'))\n\n const validation = requirement.metadata?.validation\n\n if (validation) {\n if (isPercentField && validation.type === 'one_of') {\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string({\n required_error: t('validations.required'),\n })\n .min(1, t('validations.required'))\n .refine(val => oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean({\n required_error: t('validations.required'),\n })\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm<InferredFormInputs>({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([reqKey, value]) => ({\n key: reqKey,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","isPercentField","fieldSchema","z","validation","oneOfValues","val","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","reqKey","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":"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"}
|
|
@@ -9,13 +9,11 @@ import "../../../Base/useBase.js";
|
|
|
9
9
|
import "../../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
12
|
import "dompurify";
|
|
14
|
-
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
15
13
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
14
|
+
const [T, c] = t("StateTaxesFormContext");
|
|
17
15
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
c as StateTaxesFormProvider,
|
|
17
|
+
T as useStateTaxesForm
|
|
20
18
|
};
|
|
21
19
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as i } from "react-i18next";
|
|
3
3
|
import { useStateTaxesList as e } from "./context.js";
|
|
4
|
-
import "../../../../shared/constants.js";
|
|
5
4
|
import "classnames";
|
|
6
5
|
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
6
|
import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
|
-
function
|
|
8
|
+
function x() {
|
|
10
9
|
const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
|
|
11
10
|
return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
|
|
12
11
|
}
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
x as Actions
|
|
15
14
|
};
|
|
16
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAA,GACb,EAAE,gBAAAC,EAAA,IAAmBC,EAAA;AAC3B,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAAJ,EAAE,kBAAkB,GACvB,GACF;AAEJ;"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as s, Fragment as p } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as o } from "react-i18next";
|
|
3
3
|
import { useStateTaxesList as l } from "./context.js";
|
|
4
|
-
import "../../../../shared/constants.js";
|
|
5
4
|
import "classnames";
|
|
6
5
|
import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
|
|
7
6
|
import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
7
|
import "react";
|
|
9
8
|
import { useDataView as d } from "../../../Common/DataView/useDataView.js";
|
|
10
9
|
import { DataView as C } from "../../../Common/DataView/DataView.js";
|
|
11
|
-
const
|
|
10
|
+
const b = () => {
|
|
12
11
|
const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
|
|
13
12
|
data: r,
|
|
14
13
|
columns: [
|
|
@@ -38,6 +37,6 @@ const w = () => {
|
|
|
38
37
|
return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
|
|
39
38
|
};
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
b as List
|
|
42
41
|
};
|
|
43
42
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAA,IAAiBC,EAAA,GACzCC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAS,MACC,gBAAAC,EAAC,QAAA,EAAM,UAAAJ,EAAWG,EAAY,KAAqC,GAAE;AAAA,MAC9E;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAAA,6BAGF,UAAA,gBAAAC,EAACP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,GACvE,GACF;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAA,MAEN,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,IAKtF,YAAY,MACV,gBAAAC,EAACC,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAA,EAAS,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
|
|
@@ -9,13 +9,11 @@ import "../../../Base/useBase.js";
|
|
|
9
9
|
import "../../../../shared/constants.js";
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
12
|
import "dompurify";
|
|
14
|
-
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
15
13
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
14
|
+
const [T, c] = t("StateTaxesListContext");
|
|
17
15
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
c as StateTaxesListProvider,
|
|
17
|
+
T as useStateTaxesList
|
|
20
18
|
};
|
|
21
19
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
|
|
@@ -11,5 +11,7 @@ export { Locations } from './Locations/Locations';
|
|
|
11
11
|
export { PaySchedule } from './PaySchedule';
|
|
12
12
|
export { FederalTaxes } from './FederalTaxes';
|
|
13
13
|
export { BankAccount } from './BankAccount/BankAccount';
|
|
14
|
+
export { StateTaxesList } from './StateTaxes/StateTaxesList';
|
|
15
|
+
export { StateTaxesForm } from './StateTaxes/StateTaxesForm';
|
|
14
16
|
export { StateTaxes } from './StateTaxes/StateTaxes';
|
|
15
17
|
export { OnboardingFlow } from './OnboardingFlow/OnboardingFlow';
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import { OnboardingOverview as e } from "./OnboardingOverview/OnboardingOverview.js";
|
|
2
2
|
import { Locations as m } from "./Locations/Locations.js";
|
|
3
|
-
import { BankAccount as
|
|
3
|
+
import { BankAccount as a } from "./BankAccount/BankAccount.js";
|
|
4
4
|
import { StateTaxes as f } from "./StateTaxes/StateTaxes.js";
|
|
5
5
|
import { OnboardingFlow as i } from "./OnboardingFlow/OnboardingFlow.js";
|
|
6
|
-
import { Industry as
|
|
6
|
+
import { Industry as S } from "./Industry/Industry.js";
|
|
7
7
|
import { AssignSignatory as c } from "./AssignSignatory/AssignSignatory.js";
|
|
8
8
|
import { CreateSignatory as d } from "./AssignSignatory/CreateSignatory/CreateSignatory.js";
|
|
9
|
-
import { InviteSignatory as
|
|
10
|
-
import { DocumentList as
|
|
11
|
-
import { SignatureForm as
|
|
12
|
-
import { DocumentSigner as
|
|
13
|
-
import { PaySchedule as
|
|
14
|
-
import { FederalTaxes as
|
|
9
|
+
import { InviteSignatory as F } from "./AssignSignatory/InviteSignatory/InviteSignatory.js";
|
|
10
|
+
import { DocumentList as l } from "./DocumentSigner/DocumentList/DocumentList.js";
|
|
11
|
+
import { SignatureForm as L } from "./DocumentSigner/SignatureForm/SignatureForm.js";
|
|
12
|
+
import { DocumentSigner as b } from "./DocumentSigner/DocumentSigner.js";
|
|
13
|
+
import { PaySchedule as A } from "./PaySchedule/PaySchedule.js";
|
|
14
|
+
import { FederalTaxes as I } from "./FederalTaxes/FederalTaxes.js";
|
|
15
|
+
import { StateTaxesList as k } from "./StateTaxes/StateTaxesList/StateTaxesList.js";
|
|
16
|
+
import { StateTaxesForm as C } from "./StateTaxes/StateTaxesForm/StateTaxesForm.js";
|
|
15
17
|
export {
|
|
16
18
|
c as AssignSignatory,
|
|
17
|
-
|
|
19
|
+
a as BankAccount,
|
|
18
20
|
d as CreateSignatory,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
l as DocumentList,
|
|
22
|
+
b as DocumentSigner,
|
|
23
|
+
I as FederalTaxes,
|
|
24
|
+
S as Industry,
|
|
25
|
+
F as InviteSignatory,
|
|
24
26
|
m as Locations,
|
|
25
27
|
i as OnboardingFlow,
|
|
26
28
|
e as OnboardingOverview,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
f as StateTaxes
|
|
29
|
+
A as PaySchedule,
|
|
30
|
+
L as SignatureForm,
|
|
31
|
+
f as StateTaxes,
|
|
32
|
+
C as StateTaxesForm,
|
|
33
|
+
k as StateTaxesList
|
|
30
34
|
};
|
|
31
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -11,13 +11,13 @@ import { Actions as B } from "./Actions.js";
|
|
|
11
11
|
import { Form as N } from "../../Common/Form/Form.js";
|
|
12
12
|
import { useComponentDictionary as j, useI18n as q } from "../../../i18n/I18n.js";
|
|
13
13
|
import { Flex as w } from "../../Common/Flex/Flex.js";
|
|
14
|
-
import "classnames";
|
|
15
|
-
import { contractorEvents as d } from "../../../shared/constants.js";
|
|
16
14
|
import "react-i18next";
|
|
15
|
+
import "classnames";
|
|
17
16
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
18
17
|
import "react";
|
|
19
18
|
import { BaseComponent as G } from "../../Base/Base.js";
|
|
20
19
|
import { useBase as H } from "../../Base/useBase.js";
|
|
20
|
+
import { contractorEvents as d } from "../../../shared/constants.js";
|
|
21
21
|
function mt(r) {
|
|
22
22
|
return /* @__PURE__ */ t(G, { ...r, children: /* @__PURE__ */ t(M, { ...r, children: r.children }) });
|
|
23
23
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as s } from "react-i18next";
|
|
3
|
+
import { Grid as o } from "../../Common/Grid/Grid.js";
|
|
4
|
+
import "classnames";
|
|
6
5
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
6
|
import "react";
|
|
7
|
+
import { STATES_ABBR as l } from "../../../shared/constants.js";
|
|
8
|
+
import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
9
|
import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
|
|
9
|
-
function
|
|
10
|
-
const { t: e } =
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
function T() {
|
|
11
|
+
const { t: e } = s("Contractor.Address");
|
|
12
|
+
return /* @__PURE__ */ i(o, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
|
|
12
13
|
/* @__PURE__ */ r(
|
|
13
14
|
t,
|
|
14
15
|
{
|
|
@@ -32,7 +33,7 @@ function R() {
|
|
|
32
33
|
m,
|
|
33
34
|
{
|
|
34
35
|
name: "state",
|
|
35
|
-
options:
|
|
36
|
+
options: l.map((a) => ({
|
|
36
37
|
label: e(`statesHash.${a}`, { ns: "common", defaultValue: a }),
|
|
37
38
|
value: a
|
|
38
39
|
})),
|
|
@@ -46,6 +47,6 @@ function R() {
|
|
|
46
47
|
] });
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
T as Form
|
|
50
51
|
};
|
|
51
52
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB;AAEjD,SACE,gBAAAC,EAACC,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,SAAS;AAAA,QAClB,YAAU;AAAA,QACV,cAAcA,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEtCK,GAAA,EAAe,MAAK,WAAU,OAAOL,EAAE,SAAS,GAAG;AAAA,IACpD,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,MAAM;AAAA,QACf,YAAU;AAAA,QACV,cAAcA,EAAE,kBAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEpC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASC,EAAY,IAAI,CAAAC,OAAc;AAAA,UACrC,OAAOR,EAAE,cAAcQ,CAAS,IAAI,EAAE,IAAI,UAAU,cAAcA,GAAW;AAAA,UAC7E,OAAOA;AAAA,QAAA,EACP;AAAA,QACF,OAAOR,EAAE,OAAO;AAAA,QAChB,aAAaA,EAAE,kBAAkB;AAAA,QACjC,cAAcA,EAAE,mBAAmB;AAAA,QACnC,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI,EAACC,GAAA,EAAe,MAAK,OAAM,OAAOL,EAAE,KAAK,GAAG,YAAU,IAAC,cAAcA,EAAE,iBAAiB,EAAA,CAAG;AAAA,EAAA,GAC7F;AAEJ;"}
|
|
@@ -10,22 +10,20 @@ import "../../Base/useBase.js";
|
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
11
|
import "classnames";
|
|
12
12
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
-
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
13
|
import "dompurify";
|
|
15
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
16
14
|
import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
|
|
17
|
-
const
|
|
15
|
+
const f = t.object({
|
|
18
16
|
street1: t.string().min(1),
|
|
19
17
|
street2: t.string().optional(),
|
|
20
18
|
city: t.string().min(1),
|
|
21
19
|
state: t.string().min(1),
|
|
22
20
|
zip: t.string().min(1)
|
|
23
|
-
}), [
|
|
21
|
+
}), [u, z] = r(
|
|
24
22
|
"ContractorAddressContext"
|
|
25
23
|
);
|
|
26
24
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
f as AddressFormSchema,
|
|
26
|
+
z as AddressProvider,
|
|
27
|
+
u as useAddress
|
|
30
28
|
};
|
|
31
29
|
//# sourceMappingURL=useAddress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAiBO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
|
|
@@ -4,17 +4,17 @@ import { useContractorsDeleteMutation as w } from "@gusto/embedded-api/react-que
|
|
|
4
4
|
import { useContractors as H } from "./useContractorList.js";
|
|
5
5
|
import { Flex as f } from "../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
|
-
import {
|
|
8
|
-
import { EmptyData as U } from "../../Common/EmptyData/EmptyData.js";
|
|
7
|
+
import { EmptyData as k } from "../../Common/EmptyData/EmptyData.js";
|
|
9
8
|
import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
-
import { HamburgerMenu as
|
|
11
|
-
import { firstLastName as
|
|
12
|
-
import
|
|
9
|
+
import { HamburgerMenu as U } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
10
|
+
import { firstLastName as j } from "../../../helpers/formattedStrings.js";
|
|
11
|
+
import M from "../../../assets/icons/pencil.svg.js";
|
|
13
12
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
-
import { ContractorOnboardingStatusBadge as
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { BaseComponent as
|
|
17
|
-
import { useBase as
|
|
13
|
+
import { ContractorOnboardingStatusBadge as V } from "../../Common/OnboardingStatusBadge/index.js";
|
|
14
|
+
import { useI18n as F } from "../../../i18n/I18n.js";
|
|
15
|
+
import { BaseComponent as q } from "../../Base/Base.js";
|
|
16
|
+
import { useBase as G } from "../../Base/useBase.js";
|
|
17
|
+
import { CONTRACTOR_TYPE as Y, componentEvents as m } from "../../../shared/constants.js";
|
|
18
18
|
import z from "../../../assets/icons/trashcan.svg.js";
|
|
19
19
|
import { useDataView as J } from "../../Common/DataView/useDataView.js";
|
|
20
20
|
import { DataView as K } from "../../Common/DataView/DataView.js";
|
|
@@ -27,14 +27,14 @@ function Q({ count: o, handleAdd: a }) {
|
|
|
27
27
|
}
|
|
28
28
|
function W({ handleAdd: o }) {
|
|
29
29
|
const { Button: a } = u(), { t: r } = d("Contractor.ContractorList");
|
|
30
|
-
return /* @__PURE__ */ t(
|
|
30
|
+
return /* @__PURE__ */ t(k, { title: r("emptyTableTitle"), description: r("emptyTableDescription"), children: /* @__PURE__ */ t(h, { justifyContent: "center", children: /* @__PURE__ */ t(a, { onClick: o, children: r("addContractorCta") }) }) });
|
|
31
31
|
}
|
|
32
32
|
function Tt(o) {
|
|
33
|
-
return /* @__PURE__ */ t(
|
|
33
|
+
return /* @__PURE__ */ t(q, { ...o, children: /* @__PURE__ */ t(X, { ...o, children: o.children }) });
|
|
34
34
|
}
|
|
35
35
|
function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
|
|
36
|
-
|
|
37
|
-
const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: g } =
|
|
36
|
+
F("Contractor.ContractorList");
|
|
37
|
+
const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: g } = G(), { Alert: T, Button: P } = u(), {
|
|
38
38
|
contractors: L,
|
|
39
39
|
totalCount: C,
|
|
40
40
|
handleNextPage: N,
|
|
@@ -49,12 +49,12 @@ function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
|
|
|
49
49
|
columns: [
|
|
50
50
|
{
|
|
51
51
|
title: n("listHeaders.name"),
|
|
52
|
-
render: (e) => e.type ===
|
|
52
|
+
render: (e) => e.type === Y.BUSINESS ? e.businessName : j({ first_name: e.firstName, last_name: e.lastName })
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
title: n("listHeaders.status"),
|
|
56
56
|
render: ({ onboarded: e, onboardingStatus: c }) => /* @__PURE__ */ t(
|
|
57
|
-
|
|
57
|
+
V,
|
|
58
58
|
{
|
|
59
59
|
onboarded: e,
|
|
60
60
|
onboardingStatus: c
|
|
@@ -64,12 +64,12 @@ function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
|
|
|
64
64
|
],
|
|
65
65
|
data: L,
|
|
66
66
|
itemMenu: (e) => /* @__PURE__ */ t(
|
|
67
|
-
|
|
67
|
+
U,
|
|
68
68
|
{
|
|
69
69
|
items: [
|
|
70
70
|
{
|
|
71
71
|
label: n("editCta"),
|
|
72
|
-
icon: /* @__PURE__ */ t(
|
|
72
|
+
icon: /* @__PURE__ */ t(M, { "aria-hidden": !0 }),
|
|
73
73
|
onClick: () => {
|
|
74
74
|
_(e.uuid);
|
|
75
75
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Contractor } from '@gusto/embedded-api/models/components/contractor';
|
|
2
|
-
import { PaginationItemsPerPage } from '../../Common/PaginationControl/PaginationControlTypes';
|
|
3
2
|
export interface ContractorListContext {
|
|
4
3
|
contractors: Contractor[];
|
|
5
4
|
}
|
|
@@ -7,14 +6,15 @@ export interface useContractorsArgs {
|
|
|
7
6
|
companyUuid: string;
|
|
8
7
|
}
|
|
9
8
|
export declare function useContractors({ companyUuid }: useContractorsArgs): {
|
|
10
|
-
|
|
9
|
+
totalCount: number;
|
|
10
|
+
itemsPerPage: import('../../..').PaginationItemsPerPage;
|
|
11
11
|
currentPage: number;
|
|
12
|
+
totalPages: number;
|
|
13
|
+
isFetching?: boolean | undefined;
|
|
12
14
|
handleFirstPage: () => void;
|
|
13
|
-
handleItemsPerPageChange: import('react').Dispatch<import('react').SetStateAction<PaginationItemsPerPage>>;
|
|
14
|
-
handleLastPage: () => void;
|
|
15
|
-
handleNextPage: () => void;
|
|
16
15
|
handlePreviousPage: () => void;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
handleNextPage: () => void;
|
|
17
|
+
handleLastPage: () => void;
|
|
18
|
+
handleItemsPerPageChange: (n: import('../../..').PaginationItemsPerPage) => void;
|
|
19
|
+
contractors: Contractor[];
|
|
20
20
|
};
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
import { useContractorsListSuspense as
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
data: { httpMeta:
|
|
6
|
-
} =
|
|
1
|
+
import { useContractorsListSuspense as a } from "@gusto/embedded-api/react-query/contractorsList";
|
|
2
|
+
import { usePagination as c } from "../../../hooks/usePagination/usePagination.js";
|
|
3
|
+
function u({ companyUuid: t }) {
|
|
4
|
+
const { currentPage: r, itemsPerPage: e, getPaginationProps: o } = c(), {
|
|
5
|
+
data: { httpMeta: s, contractorList: n }
|
|
6
|
+
} = a({ companyUuid: t, page: r, per: e });
|
|
7
7
|
return {
|
|
8
|
-
contractors:
|
|
9
|
-
|
|
10
|
-
handleFirstPage: () => {
|
|
11
|
-
e(1);
|
|
12
|
-
},
|
|
13
|
-
handleItemsPerPageChange: P,
|
|
14
|
-
handleLastPage: () => {
|
|
15
|
-
e(t);
|
|
16
|
-
},
|
|
17
|
-
handleNextPage: () => {
|
|
18
|
-
e((a) => Math.min(a + 1, t));
|
|
19
|
-
},
|
|
20
|
-
handlePreviousPage: () => {
|
|
21
|
-
e((a) => Math.max(a - 1, 1));
|
|
22
|
-
},
|
|
23
|
-
totalCount: h,
|
|
24
|
-
totalPages: t,
|
|
25
|
-
itemsPerPage: n
|
|
8
|
+
contractors: n,
|
|
9
|
+
...o(s.response.headers)
|
|
26
10
|
};
|
|
27
11
|
}
|
|
28
12
|
export {
|
|
29
|
-
|
|
13
|
+
u as useContractors
|
|
30
14
|
};
|
|
31
15
|
//# sourceMappingURL=useContractorList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContractorList.js","sources":["../../../../src/components/Contractor/ContractorList/useContractorList.ts"],"sourcesContent":["import { type Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport {
|
|
1
|
+
{"version":3,"file":"useContractorList.js","sources":["../../../../src/components/Contractor/ContractorList/useContractorList.ts"],"sourcesContent":["import { type Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\nexport interface ContractorListContext {\n contractors: Contractor[]\n}\n\nexport interface useContractorsArgs {\n companyUuid: string\n}\n\nexport function useContractors({ companyUuid }: useContractorsArgs) {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const {\n data: { httpMeta, contractorList: contractors },\n } = useContractorsListSuspense({ companyUuid, page: currentPage, per: itemsPerPage })\n\n return {\n contractors: contractors!,\n ...getPaginationProps(httpMeta.response.headers),\n }\n}\n"],"names":["useContractors","companyUuid","currentPage","itemsPerPage","getPaginationProps","usePagination","httpMeta","contractors","useContractorsListSuspense"],"mappings":";;AAYO,SAASA,EAAe,EAAE,aAAAC,KAAmC;AAClE,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAA,GAEpD;AAAA,IACJ,MAAM,EAAE,UAAAC,GAAU,gBAAgBC,EAAA;AAAA,EAAY,IAC5CC,EAA2B,EAAE,aAAAP,GAAa,MAAMC,GAAa,KAAKC,GAAc;AAEpF,SAAO;AAAA,IACL,aAAAI;AAAA,IACA,GAAGH,EAAmBE,EAAS,SAAS,OAAO;AAAA,EAAA;AAEnD;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import "../../../shared/constants.js";
|
|
1
|
+
import { jsxs as o, Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as t } from "react-i18next";
|
|
4
3
|
import "classnames";
|
|
5
|
-
import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
6
|
-
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
7
4
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
5
|
import "react";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
7
|
+
import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
8
|
+
function g({ bankAccount: u }) {
|
|
9
|
+
const { t: e } = t("Contractor.PaymentMethod", { keyPrefix: "bankAccountForm" });
|
|
10
|
+
return /* @__PURE__ */ o(n, { children: [
|
|
12
11
|
/* @__PURE__ */ r(
|
|
13
|
-
|
|
12
|
+
a,
|
|
14
13
|
{
|
|
15
14
|
name: "name",
|
|
16
15
|
isRequired: !0,
|
|
@@ -19,7 +18,7 @@ function N({ bankAccount: u }) {
|
|
|
19
18
|
}
|
|
20
19
|
),
|
|
21
20
|
/* @__PURE__ */ r(
|
|
22
|
-
|
|
21
|
+
a,
|
|
23
22
|
{
|
|
24
23
|
name: "routingNumber",
|
|
25
24
|
label: e("routingNumberLabel"),
|
|
@@ -29,7 +28,7 @@ function N({ bankAccount: u }) {
|
|
|
29
28
|
}
|
|
30
29
|
),
|
|
31
30
|
/* @__PURE__ */ r(
|
|
32
|
-
|
|
31
|
+
a,
|
|
33
32
|
{
|
|
34
33
|
name: "accountNumber",
|
|
35
34
|
label: e("accountNumberLabel"),
|
|
@@ -52,6 +51,6 @@ function N({ bankAccount: u }) {
|
|
|
52
51
|
] });
|
|
53
52
|
}
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
g as BankAccountForm
|
|
56
55
|
};
|
|
57
56
|
//# sourceMappingURL=BankAccountForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountForm.js","sources":["../../../../src/components/Contractor/PaymentMethod/BankAccountForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { BankAccountFormProps } from './types'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\n\nexport function BankAccountForm({ bankAccount }: BankAccountFormProps) {\n const { t } = useTranslation('Contractor.PaymentMethod', { keyPrefix: 'bankAccountForm' })\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n isRequired\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","bankAccount","t","useTranslation","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BankAccountForm.js","sources":["../../../../src/components/Contractor/PaymentMethod/BankAccountForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { BankAccountFormProps } from './types'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\n\nexport function BankAccountForm({ bankAccount }: BankAccountFormProps) {\n const { t } = useTranslation('Contractor.PaymentMethod', { keyPrefix: 'bankAccountForm' })\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n isRequired\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","bankAccount","t","useTranslation","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;;;AAIO,SAASA,EAAgB,EAAE,aAAAC,KAAqC;AACrE,QAAM,EAAE,GAAAC,MAAMC,EAAe,4BAA4B,EAAE,WAAW,mBAAmB;AAEzF,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,WAAW;AAAA,QACpB,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,IAG3C,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,YAAU;AAAA,QACV,aAAaA,EAAE,0BAA0B;AAAA,QACzC,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,IAG7C,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,cAAcA,EAAE,2BAA2B;AAAA,QAC3C,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAGZ,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAA;AAAA,UACnD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAA;AAAA,QAAE;AAAA,MACrD;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|