@gusto/embedded-react-sdk 0.22.0 → 0.23.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/assets/icons/eye.svg.js +10 -0
- package/dist/assets/icons/eye.svg.js.map +1 -0
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.d.ts +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js +7 -7
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.d.ts +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.js +10 -7
- package/dist/components/Common/UI/Button/ButtonIcon.js.map +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 +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
- 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/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +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 +6 -5
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +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 +6 -5
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- 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/SignatureForm.js +2 -2
- 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/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/Form.js +4 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
- 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 +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- 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/LocationsList.js +2 -2
- 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/Completed.js +3 -2
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
- 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 +4 -3
- 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/Edit.js +15 -15
- package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.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/Company/index.d.ts +2 -0
- package/dist/components/Company/index.js +20 -16
- 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 +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/ContractorList/index.js +17 -17
- 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.d.ts +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +198 -42
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -8
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +94 -63
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +39 -0
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +132 -0
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +11 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +139 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +2 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js +6 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +3 -2
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +21 -20
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -2
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +48 -84
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +26 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -0
- package/dist/components/Contractor/Payments/{Detail/DetailPresentation.d.ts → PaymentHistory/PaymentHistoryPresentation.d.ts} +5 -4
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +114 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +3 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +43 -23
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +8 -14
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +73 -65
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/types.d.ts +8 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +11 -10
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +63 -76
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +12 -11
- 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/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.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/SignatureForm.js +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/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +3 -2
- package/dist/components/Employee/EmployeeList/Head.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/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/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +25 -23
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +116 -106
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- 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/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- 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/Flow/Flow.d.ts +3 -3
- package/dist/components/Flow/Flow.js +32 -27
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +87 -72
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +18 -17
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +17 -16
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/{FastAchThresholdExceeded.d.ts → FastAchSubmissionBlockerBanner.d.ts} +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +55 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +1 -1
- package/dist/components/Payroll/index.js +8 -6
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +6 -5
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +4 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +9 -10
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LocaleProvider/useLocale.d.ts +6 -3
- package/dist/contexts/LocaleProvider/useLocale.js +12 -9
- package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
- package/dist/helpers/currencyHelpers.d.ts +2 -0
- package/dist/helpers/currencyHelpers.js +6 -0
- package/dist/helpers/currencyHelpers.js.map +1 -0
- package/dist/i18n/I18n.js +3 -3
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +27 -21
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +24 -0
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +30 -28
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +14 -14
- package/dist/shared/constants.d.ts +8 -2
- package/dist/shared/constants.js +18 -12
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +57 -46
- package/package.json +11 -11
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.d.ts +0 -7
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.js +0 -34
- package/dist/components/Contractor/Payments/EditPayment/EditPayment.js.map +0 -1
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.d.ts +0 -6
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js +0 -84
- package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js.map +0 -1
- package/dist/components/Contractor/Payments/Overview/Overview.d.ts +0 -7
- package/dist/components/Contractor/Payments/Overview/Overview.js +0 -72
- package/dist/components/Contractor/Payments/Overview/Overview.js.map +0 -1
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +0 -18
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js +0 -131
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js.map +0 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +0 -51
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +0 -1
- package/dist/i18n/en/Contractor.Payments.EditPayment.json.js +0 -36
- package/dist/i18n/en/Contractor.Payments.EditPayment.json.js.map +0 -1
- package/dist/i18n/en/Contractor.Payments.Overview.json.js +0 -34
- package/dist/i18n/en/Contractor.Payments.Overview.json.js.map +0 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +0 -24
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
|
|
@@ -11,11 +11,11 @@ import { Form as Z } from "../../Common/Form/Form.js";
|
|
|
11
11
|
import { BaseComponent as $ } from "../../Base/Base.js";
|
|
12
12
|
import { useBase as V } from "../../Base/useBase.js";
|
|
13
13
|
import { Flex as ee } from "../../Common/Flex/Flex.js";
|
|
14
|
-
import "react-i18next";
|
|
15
14
|
import "classnames";
|
|
15
|
+
import { componentEvents as S } from "../../../shared/constants.js";
|
|
16
|
+
import "react-i18next";
|
|
16
17
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
18
|
import { useI18n as oe, useComponentDictionary as re } from "../../../i18n/I18n.js";
|
|
18
|
-
import { componentEvents as S } from "../../../shared/constants.js";
|
|
19
19
|
import { formatDateToStringDate as l } from "../../../helpers/dateFormatting.js";
|
|
20
20
|
import { Head as te } from "./_parts/Head.js";
|
|
21
21
|
import { List as ae } from "./_parts/List.js";
|
|
@@ -7,22 +7,22 @@ import l from "./Edit.module.scss.js";
|
|
|
7
7
|
import { Flex as y } from "../../../Common/Flex/Flex.js";
|
|
8
8
|
import { Grid as x } from "../../../Common/Grid/Grid.js";
|
|
9
9
|
import "classnames";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
10
|
+
import { RadioGroupField as E } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
11
|
+
import { TextInputField as N } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
12
|
+
import { DatePickerField as h } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
13
|
+
import { NumberInputField as f } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
14
|
+
import { useComponentContext as F } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
+
import { useDateFormatter as R } from "../../../../hooks/useDateFormatter.js";
|
|
16
|
+
import { SelectField as O } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
17
17
|
const K = () => {
|
|
18
|
-
const o =
|
|
18
|
+
const o = F(), { t: e } = C("Company.PaySchedule"), P = R(), { payPeriodPreview: r, mode: u, payPreviewLoading: D } = T(), { setValue: d } = q(), [a, v] = g(0), i = p({ name: "frequency" }), n = p({ name: "customTwicePerMonth" }), b = i === "Twice per month" && n === "custom" || i === "Monthly", w = i === "Twice per month" && n === "custom";
|
|
19
19
|
return S(() => {
|
|
20
20
|
i === "Twice per month" && n === "1st15th" && (d("day1", 15), d("day2", 31));
|
|
21
21
|
}, [i, n, d]), u !== "EDIT_PAY_SCHEDULE" && u !== "ADD_PAY_SCHEDULE" ? null : /* @__PURE__ */ t("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ m(x, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
|
|
22
22
|
/* @__PURE__ */ t("div", { className: l.payScheduleForm, children: /* @__PURE__ */ m(y, { flexDirection: "column", children: [
|
|
23
|
-
/* @__PURE__ */ t(
|
|
23
|
+
/* @__PURE__ */ t(N, { name: "customName", label: e("labels.name"), isRequired: !0 }),
|
|
24
24
|
/* @__PURE__ */ t(
|
|
25
|
-
|
|
25
|
+
O,
|
|
26
26
|
{
|
|
27
27
|
name: "frequency",
|
|
28
28
|
label: e("labels.frequency"),
|
|
@@ -36,7 +36,7 @@ const K = () => {
|
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
i === "Twice per month" && /* @__PURE__ */ t(
|
|
39
|
-
|
|
39
|
+
E,
|
|
40
40
|
{
|
|
41
41
|
name: "customTwicePerMonth",
|
|
42
42
|
label: e("labels.frequencyOptions"),
|
|
@@ -48,7 +48,7 @@ const K = () => {
|
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ t(
|
|
51
|
-
|
|
51
|
+
h,
|
|
52
52
|
{
|
|
53
53
|
name: "anchorPayDate",
|
|
54
54
|
label: e("labels.firstPayDate"),
|
|
@@ -57,7 +57,7 @@ const K = () => {
|
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
59
|
/* @__PURE__ */ t(
|
|
60
|
-
|
|
60
|
+
h,
|
|
61
61
|
{
|
|
62
62
|
name: "anchorEndOfPayPeriod",
|
|
63
63
|
label: e("labels.firstPayPeriodEndDate"),
|
|
@@ -65,8 +65,8 @@ const K = () => {
|
|
|
65
65
|
isRequired: !0
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
/* @__PURE__ */ t("div", { className: b ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(
|
|
69
|
-
/* @__PURE__ */ t("div", { className: w ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(
|
|
68
|
+
/* @__PURE__ */ t("div", { className: b ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(f, { name: "day1", label: e("labels.firstPayDayOfTheMonth"), isRequired: !0 }) }),
|
|
69
|
+
/* @__PURE__ */ t("div", { className: w ? "" : l.visuallyHidden, children: /* @__PURE__ */ t(f, { name: "day2", label: e("labels.lastPayDayOfTheMonth"), isRequired: !0 }) })
|
|
70
70
|
] }) }),
|
|
71
71
|
/* @__PURE__ */ t(y, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: r && r[a] ? /* @__PURE__ */ m("div", { className: l.calendarContainer, children: [
|
|
72
72
|
!D && /* @__PURE__ */ t(
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as c, Trans as
|
|
2
|
+
import { useTranslation as c, Trans as r } from "react-i18next";
|
|
3
3
|
import { usePaySchedule as d } from "../usePaySchedule.js";
|
|
4
4
|
import { Flex as h } from "../../../Common/Flex/Flex.js";
|
|
5
5
|
import "classnames";
|
|
6
|
-
import
|
|
6
|
+
import "../../../../shared/constants.js";
|
|
7
|
+
import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
8
|
import "react";
|
|
8
|
-
const
|
|
9
|
-
const { t: i } = c("Company.PaySchedule"), n =
|
|
9
|
+
const x = () => {
|
|
10
|
+
const { t: i } = c("Company.PaySchedule"), n = m(), { mode: a } = d();
|
|
10
11
|
let t = /* @__PURE__ */ e(o, {});
|
|
11
|
-
switch (
|
|
12
|
+
switch (a) {
|
|
12
13
|
case "LIST_PAY_SCHEDULES":
|
|
13
14
|
t = /* @__PURE__ */ s(o, { children: [
|
|
14
15
|
/* @__PURE__ */ e(n.Heading, { as: "h2", children: i("headings.pageTitle") }),
|
|
15
16
|
/* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
|
|
16
|
-
|
|
17
|
+
r,
|
|
17
18
|
{
|
|
18
19
|
i18nKey: "listDescription",
|
|
19
20
|
t: i,
|
|
@@ -23,7 +24,7 @@ const L = () => {
|
|
|
23
24
|
}
|
|
24
25
|
) }),
|
|
25
26
|
/* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
|
|
26
|
-
|
|
27
|
+
r,
|
|
27
28
|
{
|
|
28
29
|
i18nKey: "listDescription2",
|
|
29
30
|
t: i,
|
|
@@ -44,6 +45,6 @@ const L = () => {
|
|
|
44
45
|
return /* @__PURE__ */ e(h, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ e("header", { children: t }) });
|
|
45
46
|
};
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
+
x as Head
|
|
48
49
|
};
|
|
49
50
|
//# sourceMappingURL=Head.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for PaySchedule component\nexport const Head = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { mode } = usePaySchedule()\n let headingOutput: React.ReactElement = <></>\n\n switch (mode) {\n case 'LIST_PAY_SCHEDULES':\n headingOutput = (\n <>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'listDescription'}\n t={t}\n components={{\n ScheduleLink: <Components.Link />,\n }}\n />\n </Components.Text>\n <Components.Text>\n <Trans\n i18nKey={'listDescription2'}\n t={t}\n components={{\n PaymentLawLink: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n break\n case 'ADD_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.addPaySchedule')}</Components.Heading>\n )\n break\n case 'EDIT_PAY_SCHEDULE':\n headingOutput = (\n <Components.Heading as=\"h2\">{t('headings.editPaySchedule')}</Components.Heading>\n )\n break\n default:\n }\n\n return (\n <Flex justifyContent=\"space-between\" flexDirection={'column'} gap={4}>\n <header>{headingOutput}</header>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","mode","usePaySchedule","headingOutput","jsx","Fragment","jsxs","Trans","Flex"],"mappings":";;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAAC,EAAA,IAASC,EAAA;AACjB,MAAIC,IAAoC,gBAAAC,EAAAC,GAAA,EAAE;AAE1C,UAAQJ,GAAA;AAAA,IACN,KAAK;AACH,MAAAE,IACE,gBAAAG,EAAAD,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAD,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,oBAAoB,GAAE;AAAA,QACrD,gBAAAO,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACjC;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAK,EAACL,EAAW,MAAX,EACC,UAAA,gBAAAK;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,gBAAgB,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UACnC;AAAA,QAAA,EACF,CACF;AAAA,MAAA,GACF;AAEF;AAAA,IACF,KAAK;AACH,MAAAI,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,yBAAyB,GAAE;AAE5D;AAAA,IACF,KAAK;AACH,MAAAM,IACE,gBAAAC,EAACL,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,0BAA0B,GAAE;AAE7D;AAAA,EACF;AAGF,SACE,gBAAAO,EAACI,GAAA,EAAK,gBAAe,iBAAgB,eAAe,UAAU,KAAK,GACjE,UAAA,gBAAAJ,EAAC,UAAA,EAAQ,UAAAD,EAAA,CAAc,GACzB;AAEJ;"}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as h } from "react-i18next";
|
|
3
3
|
import { usePaySchedule as y } from "../usePaySchedule.js";
|
|
4
4
|
import o from "./List.module.scss.js";
|
|
5
5
|
import { Flex as s } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
|
+
import "../../../../shared/constants.js";
|
|
7
8
|
import { HamburgerMenu as f } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
8
9
|
import S from "../../../../assets/icons/pencil.svg.js";
|
|
9
10
|
import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
11
|
import { VisuallyHidden as g } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
|
|
11
12
|
import { useDataView as L } from "../../../Common/DataView/useDataView.js";
|
|
12
13
|
import { DataView as C } from "../../../Common/DataView/DataView.js";
|
|
13
|
-
const
|
|
14
|
-
const { t:
|
|
14
|
+
const F = () => {
|
|
15
|
+
const { t: r } = h("Company.PaySchedule"), n = v(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
|
|
15
16
|
data: m || [],
|
|
16
17
|
columns: [
|
|
17
18
|
{
|
|
18
|
-
title:
|
|
19
|
+
title: r("payScheduleList.name"),
|
|
19
20
|
key: "customName",
|
|
20
21
|
render: (t) => {
|
|
21
22
|
const a = !!t.name;
|
|
22
23
|
let i = a ? t.name : t.customName;
|
|
23
24
|
i && i.length > 1 ? i = i.charAt(0).toUpperCase() + i.slice(1) : i = t.customName;
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */
|
|
25
|
+
const p = t.customName;
|
|
26
|
+
return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ u("div", { className: o.content, children: [
|
|
26
27
|
/* @__PURE__ */ e("div", { children: i }),
|
|
27
|
-
a && /* @__PURE__ */ e("div", { children:
|
|
28
|
+
a && /* @__PURE__ */ e("div", { children: p })
|
|
28
29
|
] }) });
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
|
-
title: /* @__PURE__ */ e(g, { children:
|
|
33
|
+
title: /* @__PURE__ */ e(g, { children: r("payScheduleList.active") }),
|
|
33
34
|
key: "active",
|
|
34
|
-
render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(
|
|
35
|
+
render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(n.Badge, { status: "success", children: r("payScheduleList.active") }) : /* @__PURE__ */ e(n.Badge, { status: "info", children: r("payScheduleList.inactive") }) }) })
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
38
|
itemMenu: (t) => /* @__PURE__ */ e(
|
|
@@ -40,7 +41,7 @@ const B = () => {
|
|
|
40
41
|
triggerLabel: "Actions",
|
|
41
42
|
items: [
|
|
42
43
|
{
|
|
43
|
-
label:
|
|
44
|
+
label: r("payScheduleList.edit"),
|
|
44
45
|
onClick: () => {
|
|
45
46
|
l(t);
|
|
46
47
|
},
|
|
@@ -53,6 +54,6 @@ const B = () => {
|
|
|
53
54
|
return c !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
|
|
54
55
|
};
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
F as List
|
|
57
58
|
};
|
|
58
59
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAAI,EAACC,GAAA,EAAK,eAAe,UAAU,KAAK,GAClC,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,SACrB,UAAA;AAAA,YAAA,gBAAAH,EAAC,SAAK,UAAAF,EAAA,CAAY;AAAA,YACjBD,KAAW,gBAAAG,EAAC,OAAA,EAAK,UAAAD,EAAA,CAAiB;AAAA,UAAA,EAAA,CACrC,EAAA,CACF;AAAA,QAEJ;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAlB,EAAE,wBAAwB,GAAE;AAAA,QACpD,KAAK;AAAA,QACL,QAAQ,CAAAU,MACN,gBAAAI,EAACC,GAAA,EAAK,YAAY,UAAU,gBAAgB,UAC1C,UAAA,gBAAAD,EAAC,SAAI,WAAWG,EAAO,SACpB,UAAAP,EAAS,SACR,gBAAAI,EAACZ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAF,EAAE,wBAAwB,EAAA,CAAE,IAEhE,gBAAAc,EAACZ,EAAW,OAAX,EAAiB,QAAO,QAAQ,UAAAF,EAAE,0BAA0B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
|
|
@@ -10,9 +10,10 @@ 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";
|
|
13
14
|
import "dompurify";
|
|
14
15
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const
|
|
16
|
+
const x = o.object({
|
|
16
17
|
frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
|
|
17
18
|
anchorPayDate: o.date().optional(),
|
|
18
19
|
anchorEndOfPayPeriod: o.date().optional(),
|
|
@@ -20,10 +21,10 @@ const s = o.object({
|
|
|
20
21
|
day2: o.number().min(1).max(31).optional(),
|
|
21
22
|
customName: o.string().optional(),
|
|
22
23
|
customTwicePerMonth: o.string().optional()
|
|
23
|
-
}), [
|
|
24
|
+
}), [S, f] = t("PayScheduleContext");
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
f as PayScheduleProvider,
|
|
27
|
+
x as PayScheduleSchema,
|
|
28
|
+
S as usePaySchedule
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=usePaySchedule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
|
|
@@ -9,11 +9,12 @@ 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";
|
|
12
13
|
import "dompurify";
|
|
13
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [c, d] = t("StateTaxesFormContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
d as StateTaxesFormProvider,
|
|
18
|
+
c as useStateTaxesForm
|
|
18
19
|
};
|
|
19
20
|
//# 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;"}
|
|
@@ -9,11 +9,12 @@ 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";
|
|
12
13
|
import "dompurify";
|
|
13
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
14
|
-
const [
|
|
15
|
+
const [c, d] = t("StateTaxesListContext");
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
d as StateTaxesListProvider,
|
|
18
|
+
c as useStateTaxesList
|
|
18
19
|
};
|
|
19
20
|
//# 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;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
2
|
export { Industry } from './Industry';
|
|
3
3
|
export { AssignSignatory } from './AssignSignatory';
|
|
4
|
+
export { CreateSignatory } from './AssignSignatory/CreateSignatory';
|
|
5
|
+
export { InviteSignatory } from './AssignSignatory/InviteSignatory';
|
|
4
6
|
export { DocumentList } from './DocumentSigner/DocumentList';
|
|
5
7
|
export { SignatureForm } from './DocumentSigner/SignatureForm';
|
|
6
8
|
export { DocumentSigner } from './DocumentSigner';
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import { OnboardingOverview as e } from "./OnboardingOverview/OnboardingOverview.js";
|
|
2
2
|
import { Locations as m } from "./Locations/Locations.js";
|
|
3
3
|
import { BankAccount as x } from "./BankAccount/BankAccount.js";
|
|
4
|
-
import { StateTaxes as
|
|
4
|
+
import { StateTaxes as f } from "./StateTaxes/StateTaxes.js";
|
|
5
5
|
import { OnboardingFlow as i } from "./OnboardingFlow/OnboardingFlow.js";
|
|
6
|
-
import { Industry as
|
|
7
|
-
import { AssignSignatory as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
6
|
+
import { Industry as s } from "./Industry/Industry.js";
|
|
7
|
+
import { AssignSignatory as c } from "./AssignSignatory/AssignSignatory.js";
|
|
8
|
+
import { CreateSignatory as d } from "./AssignSignatory/CreateSignatory/CreateSignatory.js";
|
|
9
|
+
import { InviteSignatory as l } from "./AssignSignatory/InviteSignatory/InviteSignatory.js";
|
|
10
|
+
import { DocumentList as F } from "./DocumentSigner/DocumentList/DocumentList.js";
|
|
11
|
+
import { SignatureForm as b } from "./DocumentSigner/SignatureForm/SignatureForm.js";
|
|
12
|
+
import { DocumentSigner as A } from "./DocumentSigner/DocumentSigner.js";
|
|
13
|
+
import { PaySchedule as I } from "./PaySchedule/PaySchedule.js";
|
|
14
|
+
import { FederalTaxes as T } from "./FederalTaxes/FederalTaxes.js";
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
c as AssignSignatory,
|
|
15
17
|
x as BankAccount,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
A as
|
|
19
|
-
|
|
18
|
+
d as CreateSignatory,
|
|
19
|
+
F as DocumentList,
|
|
20
|
+
A as DocumentSigner,
|
|
21
|
+
T as FederalTaxes,
|
|
22
|
+
s as Industry,
|
|
23
|
+
l as InviteSignatory,
|
|
20
24
|
m as Locations,
|
|
21
25
|
i as OnboardingFlow,
|
|
22
26
|
e as OnboardingOverview,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
I as PaySchedule,
|
|
28
|
+
b as SignatureForm,
|
|
29
|
+
f as StateTaxes
|
|
26
30
|
};
|
|
27
31
|
//# 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 "react-i18next";
|
|
15
14
|
import "classnames";
|
|
15
|
+
import { contractorEvents as d } from "../../../shared/constants.js";
|
|
16
|
+
import "react-i18next";
|
|
16
17
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
18
|
import "react";
|
|
18
19
|
import { BaseComponent as G } from "../../Base/Base.js";
|
|
19
20
|
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
|
}
|
|
@@ -3,9 +3,9 @@ import { useTranslation as s } from "react-i18next";
|
|
|
3
3
|
import { STATES_ABBR as o } from "../../../shared/constants.js";
|
|
4
4
|
import { Grid as l } from "../../Common/Grid/Grid.js";
|
|
5
5
|
import "classnames";
|
|
6
|
+
import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
6
7
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
8
|
import "react";
|
|
8
|
-
import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
9
9
|
import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
|
|
10
10
|
function T() {
|
|
11
11
|
const { t: e } = s("Contractor.Address");
|
|
@@ -10,20 +10,21 @@ 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";
|
|
13
14
|
import "dompurify";
|
|
14
15
|
import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
|
|
15
|
-
const
|
|
16
|
+
const u = t.object({
|
|
16
17
|
street1: t.string().min(1),
|
|
17
18
|
street2: t.string().optional(),
|
|
18
19
|
city: t.string().min(1),
|
|
19
20
|
state: t.string().min(1),
|
|
20
21
|
zip: t.string().min(1)
|
|
21
|
-
}), [
|
|
22
|
+
}), [z, b] = r(
|
|
22
23
|
"ContractorAddressContext"
|
|
23
24
|
);
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
u as AddressFormSchema,
|
|
27
|
+
b as AddressProvider,
|
|
28
|
+
z as useAddress
|
|
28
29
|
};
|
|
29
30
|
//# 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 p } from "../../Common/Flex/Flex.js";
|
|
6
6
|
import "classnames";
|
|
7
|
-
import {
|
|
7
|
+
import { CONTRACTOR_TYPE as k, componentEvents as m } from "../../../shared/constants.js";
|
|
8
|
+
import { EmptyData as U } from "../../Common/EmptyData/EmptyData.js";
|
|
8
9
|
import { ActionsLayout as f } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
-
import { HamburgerMenu as
|
|
10
|
-
import { firstLastName as
|
|
11
|
-
import
|
|
10
|
+
import { HamburgerMenu as j } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
11
|
+
import { firstLastName as M } from "../../../helpers/formattedStrings.js";
|
|
12
|
+
import V from "../../../assets/icons/pencil.svg.js";
|
|
12
13
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
-
import { ContractorOnboardingStatusBadge as
|
|
14
|
-
import { useI18n as
|
|
15
|
-
import { BaseComponent as
|
|
16
|
-
import { useBase as
|
|
17
|
-
import { CONTRACTOR_TYPE as Y, componentEvents as m } from "../../../shared/constants.js";
|
|
14
|
+
import { ContractorOnboardingStatusBadge as F } from "../../Common/OnboardingStatusBadge/index.js";
|
|
15
|
+
import { useI18n as q } from "../../../i18n/I18n.js";
|
|
16
|
+
import { BaseComponent as G } from "../../Base/Base.js";
|
|
17
|
+
import { useBase as Y } from "../../Base/useBase.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(U, { title: r("emptyTableTitle"), description: r("emptyTableDescription"), children: /* @__PURE__ */ t(f, { 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(G, { ...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: h } =
|
|
36
|
+
q("Contractor.ContractorList");
|
|
37
|
+
const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: h } = Y(), { Alert: g, Button: T } = u(), {
|
|
38
38
|
contractors: P,
|
|
39
39
|
totalCount: L,
|
|
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 === k.BUSINESS ? e.businessName : M({ 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
|
+
F,
|
|
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: P,
|
|
66
66
|
itemMenu: (e) => /* @__PURE__ */ t(
|
|
67
|
-
|
|
67
|
+
j,
|
|
68
68
|
{
|
|
69
69
|
items: [
|
|
70
70
|
{
|
|
71
71
|
label: n("editCta"),
|
|
72
|
-
icon: /* @__PURE__ */ t(
|
|
72
|
+
icon: /* @__PURE__ */ t(V, { "aria-hidden": !0 }),
|
|
73
73
|
onClick: () => {
|
|
74
74
|
_(e.uuid);
|
|
75
75
|
}
|
|
@@ -2,10 +2,10 @@ import { jsxs as a, Fragment as t, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as n } from "react-i18next";
|
|
3
3
|
import "../../../shared/constants.js";
|
|
4
4
|
import "classnames";
|
|
5
|
+
import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
6
|
+
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
5
7
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
8
|
import "react";
|
|
7
|
-
import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
|
-
import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
9
9
|
function N({ bankAccount: u }) {
|
|
10
10
|
const { t: e } = n("Contractor.PaymentMethod", { keyPrefix: "bankAccountForm" });
|
|
11
11
|
return /* @__PURE__ */ a(t, { children: [
|
|
@@ -3,9 +3,9 @@ import { useTranslation as r } from "react-i18next";
|
|
|
3
3
|
import { z as t } from "zod";
|
|
4
4
|
import { PAYMENT_METHODS as o } from "../../../shared/constants.js";
|
|
5
5
|
import "classnames";
|
|
6
|
+
import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
6
7
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
8
|
import "react";
|
|
8
|
-
import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
9
9
|
t.object({
|
|
10
10
|
type: t.enum(["Check", "Direct Deposit"])
|
|
11
11
|
});
|
|
@@ -3,5 +3,5 @@ interface CreatePaymentProps extends BaseComponentInterface<'Contractor.Payments
|
|
|
3
3
|
companyId: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function CreatePayment(props: CreatePaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare const Root: ({ companyId, dictionary, onEvent
|
|
6
|
+
export declare const Root: ({ companyId, dictionary, onEvent }: CreatePaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|