@gusto/embedded-react-sdk 0.54.0 → 0.54.1
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 +39 -0
- package/dist/components/Common/Loading/Loading.d.ts +6 -1
- package/dist/components/Common/Loading/Loading.js +13 -12
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js +1 -1
- package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +8 -8
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +18 -16
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +19 -18
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- 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/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +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/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- 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/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.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/Industry.js +2 -2
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- 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/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +20 -19
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- 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 +20 -19
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +29 -28
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +24 -21
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +11 -11
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.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/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +14 -13
- package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -5
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +22 -21
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
- package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/fields.js +8 -8
- package/dist/components/Contractor/Landing/Landing.js +30 -29
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +18 -17
- package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +41 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +175 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.d.ts +18 -0
- package/dist/components/Contractor/Payments/{HistoricalPaymentAmounts → CreateHistoricalPayment}/useFormDictionary.js +37 -7
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.d.ts +30 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +56 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/index.d.ts +1 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js +33 -0
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +46 -131
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.d.ts +9 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js +36 -0
- package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +83 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +124 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -0
- package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/index.d.ts +1 -0
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
- package/dist/components/Contractor/exports/contractorManagement.d.ts +2 -2
- package/dist/components/Contractor/exports/contractorManagement.js +20 -20
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Documents/management/DocumentManager.js +2 -1
- package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/Landing/Landing.js +31 -30
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +59 -58
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Flow/Flow.js +27 -20
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +44 -44
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +108 -108
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +23 -23
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +4 -11
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/i18n/I18n.js +7 -7
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +5 -5
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +20 -18
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js +46 -44
- package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js +48 -0
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/types.d.ts +219 -105
- package/dist/shared/constants.d.ts +12 -4
- package/dist/shared/constants.js +23 -19
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/docs/guides/endpoint-inventory.json +30 -1
- package/package.json +17 -16
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.d.ts +0 -33
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js +0 -62
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/index.d.ts +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.d.ts +0 -9
- package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.d.ts +0 -27
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js +0 -56
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js.map +0 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentContractors/index.d.ts +0 -1
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js +0 -36
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js.map +0 -1
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js +0 -18
- package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gusto/embedded-react-sdk",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.1",
|
|
4
4
|
"homepage": "https://github.com/Gusto/embedded-react-sdk",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/Gusto/embedded-react-sdk/issues"
|
|
@@ -94,34 +94,35 @@
|
|
|
94
94
|
"sdk-app:analyze-props": "npx tsx sdk-app/scripts/analyze-component-props.ts"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
+
"@axe-core/playwright": "^4.12.1",
|
|
97
98
|
"@commitlint/cli": "^21.2.1",
|
|
98
99
|
"@commitlint/config-conventional": "^21.2.0",
|
|
99
100
|
"@eslint/js": "^9.39.5",
|
|
100
101
|
"@microsoft/api-extractor": "^7.58.12",
|
|
101
102
|
"@playwright/test": "^1.62.1",
|
|
102
103
|
"@release-it/conventional-changelog": "^12.0.0",
|
|
103
|
-
"@storybook/addon-a11y": "^10.5.
|
|
104
|
-
"@storybook/addon-docs": "^10.5.
|
|
105
|
-
"@storybook/addon-onboarding": "^10.5.
|
|
106
|
-
"@storybook/react-vite": "^10.5.
|
|
104
|
+
"@storybook/addon-a11y": "^10.5.7",
|
|
105
|
+
"@storybook/addon-docs": "^10.5.7",
|
|
106
|
+
"@storybook/addon-onboarding": "^10.5.7",
|
|
107
|
+
"@storybook/react-vite": "^10.5.7",
|
|
107
108
|
"@storybook/test-runner": "^0.24.4",
|
|
108
109
|
"@testing-library/dom": "^10.4.1",
|
|
109
110
|
"@testing-library/jest-dom": "^7.0.0",
|
|
110
111
|
"@testing-library/react": "^16.3.2",
|
|
111
|
-
"@testing-library/user-event": "^14.6.
|
|
112
|
+
"@testing-library/user-event": "^14.6.3",
|
|
112
113
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
113
114
|
"@types/jest": "^30.0.0",
|
|
114
115
|
"@types/jest-axe": "^3.5.9",
|
|
115
116
|
"@types/pngjs": "^6.0.5",
|
|
116
117
|
"@types/react": "^19.2.18",
|
|
117
118
|
"@types/react-dom": "^19.2.4",
|
|
118
|
-
"@typescript-eslint/parser": "^8.
|
|
119
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
119
|
+
"@typescript-eslint/parser": "^8.66.0",
|
|
120
|
+
"@typescript-eslint/rule-tester": "^8.66.0",
|
|
120
121
|
"@typescript-eslint/utils": "^8.64.0",
|
|
121
122
|
"@vitejs/plugin-react-swc": "^4.3.3",
|
|
122
123
|
"@vitest/coverage-v8": "^4.1.9",
|
|
123
124
|
"ajv": "^8.20.0",
|
|
124
|
-
"axe-core": "^4.
|
|
125
|
+
"axe-core": "^4.13.0",
|
|
125
126
|
"cspell": "^10.0.1",
|
|
126
127
|
"dotenv": "^17.4.2",
|
|
127
128
|
"eslint": "^9.39.5",
|
|
@@ -130,10 +131,10 @@
|
|
|
130
131
|
"eslint-plugin-react": "^7.37.5",
|
|
131
132
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
132
133
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
133
|
-
"eslint-plugin-storybook": "^10.5.
|
|
134
|
+
"eslint-plugin-storybook": "^10.5.7",
|
|
134
135
|
"eslint-plugin-tsdoc": "^0.5.2",
|
|
135
136
|
"fuse.js": "^7.5.0",
|
|
136
|
-
"globals": "^17.
|
|
137
|
+
"globals": "^17.9.0",
|
|
137
138
|
"husky": "^9.1.7",
|
|
138
139
|
"jest-axe": "^11.0.0",
|
|
139
140
|
"jsdom": "^26.1.0",
|
|
@@ -155,8 +156,8 @@
|
|
|
155
156
|
"storybook": "^10.5.5",
|
|
156
157
|
"stylelint-config-standard": "^40.0.0",
|
|
157
158
|
"ts-morph": "^28.0.0",
|
|
158
|
-
"tsx": "^4.23.
|
|
159
|
-
"typescript-eslint": "^8.
|
|
159
|
+
"tsx": "^4.23.11",
|
|
160
|
+
"typescript-eslint": "^8.66.0",
|
|
160
161
|
"vite": "^6.4.3",
|
|
161
162
|
"vite-plugin-checker": "^0.14.5",
|
|
162
163
|
"vite-plugin-circular-dependency": "^0.6.0",
|
|
@@ -185,17 +186,17 @@
|
|
|
185
186
|
"dependencies": {
|
|
186
187
|
"@gusto/embedded-api": "npm:@gusto/embedded-api-v-2026-06-15@^0.1.0",
|
|
187
188
|
"@hookform/error-message": "^2.0.1",
|
|
188
|
-
"@hookform/resolvers": "^5.
|
|
189
|
+
"@hookform/resolvers": "^5.7.1",
|
|
189
190
|
"@internationalized/date": "^3.12.3",
|
|
190
191
|
"@internationalized/number": "^3.6.7",
|
|
191
192
|
"classnames": "^2.5.1",
|
|
192
193
|
"deepmerge": "^4.3.1",
|
|
193
|
-
"dompurify": "^3.4.
|
|
194
|
+
"dompurify": "^3.4.13",
|
|
194
195
|
"i18next": "^26.3.6",
|
|
195
196
|
"react-aria": "^3.47.0",
|
|
196
197
|
"react-aria-components": "1.16.0",
|
|
197
198
|
"react-error-boundary": "^6.1.2",
|
|
198
|
-
"react-hook-form": "^7.
|
|
199
|
+
"react-hook-form": "^7.85.0",
|
|
199
200
|
"react-i18next": "^17.0.11",
|
|
200
201
|
"react-robot": "^1.2.1",
|
|
201
202
|
"robot3": "^1.2.0",
|
package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseComponentInterface } from '../../../Base';
|
|
2
|
-
/**
|
|
3
|
-
* Props for {@link HistoricalPaymentAmounts}.
|
|
4
|
-
*
|
|
5
|
-
* @alpha
|
|
6
|
-
*/
|
|
7
|
-
export interface HistoricalPaymentAmountsProps extends BaseComponentInterface<'Contractor.Payments.HistoricalPaymentAmounts'> {
|
|
8
|
-
/** UUID of the company recording the historical payment. */
|
|
9
|
-
companyId: string;
|
|
10
|
-
/** UUIDs of the contractors selected on the previous step. */
|
|
11
|
-
contractorIds: string[];
|
|
12
|
-
/** The check date selected on the previous step, as a `YYYY-MM-DD` string. */
|
|
13
|
-
checkDate: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Second step of the historical contractor payment flow: enter hours, wages, bonuses, and
|
|
17
|
-
* reimbursements for the contractors selected on the previous step.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* Every contractor payment is fixed to the `Historical Payment` payment method — there is no
|
|
21
|
-
* funds movement, so no payment method choice or debit information is shown. Continue is
|
|
22
|
-
* disabled until at least one contractor has a payment total greater than zero.
|
|
23
|
-
*
|
|
24
|
-
* @events
|
|
25
|
-
* | Event | Description | Data |
|
|
26
|
-
* | ----- | ----------- | ---- |
|
|
27
|
-
* | `contractor/historicalPayments/amountsSubmitted` | The user entered amounts and clicked Continue. | `{ checkDate: string, contractorPayments: ContractorPayments[] }` |
|
|
28
|
-
*
|
|
29
|
-
* @param props - See {@link HistoricalPaymentAmountsProps}.
|
|
30
|
-
* @returns The rendered payment-amounts entry screen.
|
|
31
|
-
* @alpha
|
|
32
|
-
*/
|
|
33
|
-
export declare function HistoricalPaymentAmounts(props: HistoricalPaymentAmountsProps): import("react").JSX.Element;
|
package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { useContractorsListSuspense as M } from "@gusto/embedded-api/react-query/contractorsList";
|
|
3
|
-
import { useTranslation as E } from "react-i18next";
|
|
4
|
-
import { usePaymentAmountsEditor as _ } from "../shared/usePaymentAmountsEditor.js";
|
|
5
|
-
import { useHistoricalPaymentAmountsDictionary as g } from "./useFormDictionary.js";
|
|
6
|
-
import { Flex as i, FlexItem as O } from "../../../Common/Flex/Flex.js";
|
|
7
|
-
import { BaseComponent as S } from "../../../Base/Base.js";
|
|
8
|
-
import "../../../Base/useBase.js";
|
|
9
|
-
import { useComponentContext as I } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
10
|
-
import { useI18n as L, useComponentDictionary as N } from "../../../../i18n/I18n.js";
|
|
11
|
-
import { componentEvents as v } from "../../../../shared/constants.js";
|
|
12
|
-
import { SetPaymentAmounts as B } from "../shared/SetPaymentAmounts/SetPaymentAmounts.js";
|
|
13
|
-
const l = ["Historical Payment"];
|
|
14
|
-
function K(o) {
|
|
15
|
-
return /* @__PURE__ */ t(S, { ...o, componentName: "Contractor.Payments.HistoricalPaymentAmounts", children: /* @__PURE__ */ t(R, { ...o }) });
|
|
16
|
-
}
|
|
17
|
-
function R({
|
|
18
|
-
companyId: o,
|
|
19
|
-
contractorIds: d,
|
|
20
|
-
checkDate: p,
|
|
21
|
-
dictionary: y,
|
|
22
|
-
onEvent: f
|
|
23
|
-
}) {
|
|
24
|
-
L("Contractor.Payments.HistoricalPaymentAmounts"), N("Contractor.Payments.HistoricalPaymentAmounts", y);
|
|
25
|
-
const { t: n } = E("Contractor.Payments.HistoricalPaymentAmounts"), { Heading: P, Text: C, Button: h } = I(), A = g(), { data: T } = M({ companyUuid: o }), a = (T.contractors || []).filter(
|
|
26
|
-
(r) => d.includes(r.uuid)
|
|
27
|
-
), { virtualContractorPayments: s, totals: m, editModal: x } = _({
|
|
28
|
-
contractors: a,
|
|
29
|
-
allowedPaymentMethods: l
|
|
30
|
-
}), c = m.total > 0, H = () => {
|
|
31
|
-
if (!c) return;
|
|
32
|
-
const r = s.filter((u) => u.isTouched).map(({ isTouched: u, ...D }) => D);
|
|
33
|
-
f(v.CONTRACTOR_HISTORICAL_PAYMENT_AMOUNTS_SUBMITTED, {
|
|
34
|
-
checkDate: p,
|
|
35
|
-
contractorPayments: r
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
return /* @__PURE__ */ e(i, { flexDirection: "column", gap: 32, children: [
|
|
39
|
-
/* @__PURE__ */ e(i, { justifyContent: "flex-end", gap: 16, children: [
|
|
40
|
-
/* @__PURE__ */ e(i, { flexDirection: "column", gap: 4, children: [
|
|
41
|
-
/* @__PURE__ */ t(P, { as: "h2", children: n("heading") }),
|
|
42
|
-
/* @__PURE__ */ t(C, { variant: "supporting", children: n("subtitle") })
|
|
43
|
-
] }),
|
|
44
|
-
/* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(h, { onClick: H, variant: "primary", isDisabled: !c, children: n("continueButton") }) })
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ t(
|
|
47
|
-
B,
|
|
48
|
-
{
|
|
49
|
-
contractors: a,
|
|
50
|
-
contractorPayments: s,
|
|
51
|
-
totals: m,
|
|
52
|
-
allowedPaymentMethods: l,
|
|
53
|
-
editModal: x,
|
|
54
|
-
dictionary: A
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
] });
|
|
58
|
-
}
|
|
59
|
-
export {
|
|
60
|
-
K as HistoricalPaymentAmounts
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=HistoricalPaymentAmounts.js.map
|
package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HistoricalPaymentAmounts.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.tsx"],"sourcesContent":["import { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { useTranslation } from 'react-i18next'\nimport type { PostV1CompaniesCompanyIdContractorPaymentGroupsPaymentMethod as ContractorPaymentMethod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroups'\nimport { usePaymentAmountsEditor } from '../shared/usePaymentAmountsEditor'\nimport { SetPaymentAmounts } from '../shared/SetPaymentAmounts'\nimport { useHistoricalPaymentAmountsDictionary } from './useFormDictionary'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nconst ALLOWED_PAYMENT_METHODS: ContractorPaymentMethod[] = ['Historical Payment']\n\n/**\n * Props for {@link HistoricalPaymentAmounts}.\n *\n * @alpha\n */\nexport interface HistoricalPaymentAmountsProps extends BaseComponentInterface<'Contractor.Payments.HistoricalPaymentAmounts'> {\n /** UUID of the company recording the historical payment. */\n companyId: string\n /** UUIDs of the contractors selected on the previous step. */\n contractorIds: string[]\n /** The check date selected on the previous step, as a `YYYY-MM-DD` string. */\n checkDate: string\n}\n\n/**\n * Second step of the historical contractor payment flow: enter hours, wages, bonuses, and\n * reimbursements for the contractors selected on the previous step.\n *\n * @remarks\n * Every contractor payment is fixed to the `Historical Payment` payment method — there is no\n * funds movement, so no payment method choice or debit information is shown. Continue is\n * disabled until at least one contractor has a payment total greater than zero.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/historicalPayments/amountsSubmitted` | The user entered amounts and clicked Continue. | `{ checkDate: string, contractorPayments: ContractorPayments[] }` |\n *\n * @param props - See {@link HistoricalPaymentAmountsProps}.\n * @returns The rendered payment-amounts entry screen.\n * @alpha\n */\nexport function HistoricalPaymentAmounts(props: HistoricalPaymentAmountsProps) {\n return (\n <BaseComponent {...props} componentName=\"Contractor.Payments.HistoricalPaymentAmounts\">\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({\n companyId,\n contractorIds,\n checkDate,\n dictionary,\n onEvent,\n}: HistoricalPaymentAmountsProps) {\n useI18n('Contractor.Payments.HistoricalPaymentAmounts')\n useComponentDictionary('Contractor.Payments.HistoricalPaymentAmounts', dictionary)\n const { t } = useTranslation('Contractor.Payments.HistoricalPaymentAmounts')\n const { Heading, Text, Button } = useComponentContext()\n const paymentAmountsDictionary = useHistoricalPaymentAmountsDictionary()\n\n const { data: contractorList } = useContractorsListSuspense({ companyUuid: companyId })\n const contractors = (contractorList.contractors || []).filter(contractor =>\n contractorIds.includes(contractor.uuid),\n )\n\n const { virtualContractorPayments, totals, editModal } = usePaymentAmountsEditor({\n contractors,\n allowedPaymentMethods: ALLOWED_PAYMENT_METHODS,\n })\n\n const canContinue = totals.total > 0\n\n const handleContinue = () => {\n if (!canContinue) return\n\n const contractorPayments = virtualContractorPayments\n .filter(payment => payment.isTouched)\n .map(({ isTouched: _isTouched, ...rest }) => rest)\n\n onEvent(componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_AMOUNTS_SUBMITTED, {\n checkDate,\n contractorPayments,\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('heading')}</Heading>\n <Text variant=\"supporting\">{t('subtitle')}</Text>\n </Flex>\n <FlexItem>\n <Button onClick={handleContinue} variant=\"primary\" isDisabled={!canContinue}>\n {t('continueButton')}\n </Button>\n </FlexItem>\n </Flex>\n\n <SetPaymentAmounts\n contractors={contractors}\n contractorPayments={virtualContractorPayments}\n totals={totals}\n allowedPaymentMethods={ALLOWED_PAYMENT_METHODS}\n editModal={editModal}\n dictionary={paymentAmountsDictionary}\n />\n </Flex>\n )\n}\n"],"names":["ALLOWED_PAYMENT_METHODS","HistoricalPaymentAmounts","props","jsx","BaseComponent","Root","companyId","contractorIds","checkDate","dictionary","onEvent","useI18n","useComponentDictionary","t","useTranslation","Heading","Text","Button","useComponentContext","paymentAmountsDictionary","useHistoricalPaymentAmountsDictionary","contractorList","useContractorsListSuspense","contractors","contractor","virtualContractorPayments","totals","editModal","usePaymentAmountsEditor","canContinue","handleContinue","contractorPayments","payment","_isTouched","rest","componentEvents","jsxs","Flex","FlexItem","SetPaymentAmounts"],"mappings":";;;;;;;;;;;;AAYA,MAAMA,IAAqD,CAAC,oBAAoB;AAkCzE,SAASC,EAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GAAO,eAAc,gDACtC,UAAA,gBAAAC,EAACE,GAAA,EAAM,GAAGH,EAAA,CAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK;AAAA,EACZ,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AACF,GAAkC;AAChC,EAAAC,EAAQ,8CAA8C,GACtDC,EAAuB,gDAAgDH,CAAU;AACjF,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,8CAA8C,GACrE,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GAC5BC,IAA2BC,EAAA,GAE3B,EAAE,MAAMC,EAAA,IAAmBC,EAA2B,EAAE,aAAahB,GAAW,GAChFiB,KAAeF,EAAe,eAAe,CAAA,GAAI;AAAA,IAAO,CAAAG,MAC5DjB,EAAc,SAASiB,EAAW,IAAI;AAAA,EAAA,GAGlC,EAAE,2BAAAC,GAA2B,QAAAC,GAAQ,WAAAC,EAAA,IAAcC,EAAwB;AAAA,IAC/E,aAAAL;AAAA,IACA,uBAAuBvB;AAAA,EAAA,CACxB,GAEK6B,IAAcH,EAAO,QAAQ,GAE7BI,IAAiB,MAAM;AAC3B,QAAI,CAACD,EAAa;AAElB,UAAME,IAAqBN,EACxB,OAAO,CAAAO,MAAWA,EAAQ,SAAS,EACnC,IAAI,CAAC,EAAE,WAAWC,GAAY,GAAGC,EAAA,MAAWA,CAAI;AAEnD,IAAAxB,EAAQyB,EAAgB,iDAAiD;AAAA,MACvE,WAAA3B;AAAA,MACA,oBAAAuB;AAAA,IAAA,CACD;AAAA,EACH;AAEA,SACE,gBAAAK,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA;AAAA,MAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,QAAA,gBAAAlC,EAACY,GAAA,EAAQ,IAAG,MAAM,UAAAF,EAAE,SAAS,GAAE;AAAA,0BAC9BG,GAAA,EAAK,SAAQ,cAAc,UAAAH,EAAE,UAAU,EAAA,CAAE;AAAA,MAAA,GAC5C;AAAA,MACA,gBAAAV,EAACmC,GAAA,EACC,UAAA,gBAAAnC,EAACc,GAAA,EAAO,SAASa,GAAgB,SAAQ,WAAU,YAAY,CAACD,GAC7D,UAAAhB,EAAE,gBAAgB,GACrB,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAV;AAAA,MAACoC;AAAA,MAAA;AAAA,QACC,aAAAhB;AAAA,QACA,oBAAoBE;AAAA,QACpB,QAAAC;AAAA,QACA,uBAAuB1B;AAAA,QACvB,WAAA2B;AAAA,QACA,YAAYR;AAAA,MAAA;AAAA,IAAA;AAAA,EACd,GACF;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { HistoricalPaymentAmounts, type HistoricalPaymentAmountsProps, } from './HistoricalPaymentAmounts';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SetPaymentAmountsDictionary } from '../shared/SetPaymentAmounts';
|
|
2
|
-
/**
|
|
3
|
-
* Resolves `SetPaymentAmounts`'s text against `HistoricalPaymentAmounts`'s own
|
|
4
|
-
* `Contractor.Payments.HistoricalPaymentAmounts` namespace, so partner
|
|
5
|
-
* overrides on that namespace flow into the shared grid and edit modal.
|
|
6
|
-
*
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare function useHistoricalPaymentAmountsDictionary(): SetPaymentAmountsDictionary;
|
package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFormDictionary.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { SetPaymentAmountsDictionary } from '../shared/SetPaymentAmounts'\n\n/**\n * Resolves `SetPaymentAmounts`'s text against `HistoricalPaymentAmounts`'s own\n * `Contractor.Payments.HistoricalPaymentAmounts` namespace, so partner\n * overrides on that namespace flow into the shared grid and edit modal.\n *\n * @internal\n */\nexport function useHistoricalPaymentAmountsDictionary(): SetPaymentAmountsDictionary {\n const { t } = useTranslation('Contractor.Payments.HistoricalPaymentAmounts')\n\n return useMemo<SetPaymentAmountsDictionary>(\n () => ({\n hoursAndPaymentsLabel: t('hoursAndPaymentsLabel'),\n contractorTableHeaders: {\n contractor: t('contractorTableHeaders.contractor'),\n wageType: t('contractorTableHeaders.wageType'),\n paymentMethod: t('contractorTableHeaders.paymentMethod'),\n hours: t('contractorTableHeaders.hours'),\n wage: t('contractorTableHeaders.wage'),\n bonus: t('contractorTableHeaders.bonus'),\n reimbursement: t('contractorTableHeaders.reimbursement'),\n total: t('contractorTableHeaders.total'),\n },\n emptyTableTitle: t('emptyTableTitle'),\n emptyTableDescription: t('emptyTableDescription'),\n na: t('na'),\n totalsLabel: t('totalsLabel'),\n editContractor: t('editContractor'),\n perHour: t('perHour'),\n editContractorPayment: {\n title: t('editContractorPayment.title'),\n subtitle: t('editContractorPayment.subtitle'),\n hoursLabel: t('editContractorPayment.hoursLabel'),\n hoursAdornment: t('editContractorPayment.hoursAdornment'),\n hoursPayDescription: (rate, total) =>\n t('editContractorPayment.hoursPayDescription', { rate, total }),\n wageLabel: t('editContractorPayment.wageLabel'),\n bonusLabel: t('editContractorPayment.bonusLabel'),\n reimbursementLabel: t('editContractorPayment.reimbursementLabel'),\n paymentMethodLabel: t('editContractorPayment.paymentMethodLabel'),\n cancelCta: t('editContractorPayment.cancelCta'),\n saveCta: t('editContractorPayment.saveCta'),\n paymentMethods: {\n check: t('editContractorPayment.paymentMethods.check'),\n directDeposit: t('editContractorPayment.paymentMethods.directDeposit'),\n historicalPayment: t('editContractorPayment.paymentMethods.historicalPayment'),\n },\n errors: {\n directDepositNotAvailable: t('editContractorPayment.errors.directDepositNotAvailable'),\n unsupportedPaymentMethod: t('editContractorPayment.errors.unsupportedPaymentMethod'),\n },\n },\n }),\n [t],\n )\n}\n"],"names":["useHistoricalPaymentAmountsDictionary","useTranslation","useMemo","rate","total"],"mappings":";;AAWO,SAASA,IAAqE;AACnF,QAAM,EAAE,EAAA,IAAMC,EAAe,8CAA8C;AAE3E,SAAOC;AAAA,IACL,OAAO;AAAA,MACL,uBAAuB,EAAE,uBAAuB;AAAA,MAChD,wBAAwB;AAAA,QACtB,YAAY,EAAE,mCAAmC;AAAA,QACjD,UAAU,EAAE,iCAAiC;AAAA,QAC7C,eAAe,EAAE,sCAAsC;AAAA,QACvD,OAAO,EAAE,8BAA8B;AAAA,QACvC,MAAM,EAAE,6BAA6B;AAAA,QACrC,OAAO,EAAE,8BAA8B;AAAA,QACvC,eAAe,EAAE,sCAAsC;AAAA,QACvD,OAAO,EAAE,8BAA8B;AAAA,MAAA;AAAA,MAEzC,iBAAiB,EAAE,iBAAiB;AAAA,MACpC,uBAAuB,EAAE,uBAAuB;AAAA,MAChD,IAAI,EAAE,IAAI;AAAA,MACV,aAAa,EAAE,aAAa;AAAA,MAC5B,gBAAgB,EAAE,gBAAgB;AAAA,MAClC,SAAS,EAAE,SAAS;AAAA,MACpB,uBAAuB;AAAA,QACrB,OAAO,EAAE,6BAA6B;AAAA,QACtC,UAAU,EAAE,gCAAgC;AAAA,QAC5C,YAAY,EAAE,kCAAkC;AAAA,QAChD,gBAAgB,EAAE,sCAAsC;AAAA,QACxD,qBAAqB,CAACC,GAAMC,MAC1B,EAAE,6CAA6C,EAAE,MAAAD,GAAM,OAAAC,GAAO;AAAA,QAChE,WAAW,EAAE,iCAAiC;AAAA,QAC9C,YAAY,EAAE,kCAAkC;AAAA,QAChD,oBAAoB,EAAE,0CAA0C;AAAA,QAChE,oBAAoB,EAAE,0CAA0C;AAAA,QAChE,WAAW,EAAE,iCAAiC;AAAA,QAC9C,SAAS,EAAE,+BAA+B;AAAA,QAC1C,gBAAgB;AAAA,UACd,OAAO,EAAE,4CAA4C;AAAA,UACrD,eAAe,EAAE,oDAAoD;AAAA,UACrE,mBAAmB,EAAE,wDAAwD;AAAA,QAAA;AAAA,QAE/E,QAAQ;AAAA,UACN,2BAA2B,EAAE,wDAAwD;AAAA,UACrF,0BAA0B,EAAE,uDAAuD;AAAA,QAAA;AAAA,MACrF;AAAA,IACF;AAAA,IAEF,CAAC,CAAC;AAAA,EAAA;AAEN;"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BaseComponentInterface } from '../../../Base';
|
|
2
|
-
/**
|
|
3
|
-
* Props for {@link HistoricalPaymentContractors}.
|
|
4
|
-
*
|
|
5
|
-
* @alpha
|
|
6
|
-
*/
|
|
7
|
-
export interface HistoricalPaymentContractorsProps extends BaseComponentInterface<'Contractor.Payments.HistoricalPaymentContractors'> {
|
|
8
|
-
/** UUID of the company recording the historical payment. */
|
|
9
|
-
companyId: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* First step of the historical contractor payment flow: pick a check date and the contractors being paid.
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* The check date is bounded to the current tax year (plus the prior year during the Jan 1–8, 3PM MST
|
|
16
|
-
* grace window) and can never be in the future.
|
|
17
|
-
*
|
|
18
|
-
* @events
|
|
19
|
-
* | Event | Description | Data |
|
|
20
|
-
* | ----- | ----------- | ---- |
|
|
21
|
-
* | `contractor/historicalPayments/contractorsSelected` | The user picked a check date and contractors, then clicked Continue. | `{ contractorIds: string[], checkDate: string }` |
|
|
22
|
-
*
|
|
23
|
-
* @param props - See {@link HistoricalPaymentContractorsProps}.
|
|
24
|
-
* @returns The rendered check-date and contractor-selection screen.
|
|
25
|
-
* @alpha
|
|
26
|
-
*/
|
|
27
|
-
export declare function HistoricalPaymentContractors(props: HistoricalPaymentContractorsProps): import("react").JSX.Element;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as m, useMemo as D } from "react";
|
|
3
|
-
import { useTranslation as g } from "react-i18next";
|
|
4
|
-
import { SelectContractors as P } from "../../shared/SelectContractors/SelectContractors.js";
|
|
5
|
-
import { getHistoricalPaymentCheckDateBounds as T } from "../shared/historicalPaymentDateBounds.js";
|
|
6
|
-
import { formatDateToStringDate as x } from "../../../../helpers/dateFormatting.js";
|
|
7
|
-
import { Flex as u } from "../../../Common/Flex/Flex.js";
|
|
8
|
-
import { ActionsLayout as E } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
-
import { BaseComponent as H } from "../../../Base/Base.js";
|
|
10
|
-
import "../../../Base/useBase.js";
|
|
11
|
-
import { useComponentContext as I } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
-
import { useI18n as S, useComponentDictionary as R } from "../../../../i18n/I18n.js";
|
|
13
|
-
import { componentEvents as k } from "../../../../shared/constants.js";
|
|
14
|
-
function z(r) {
|
|
15
|
-
return /* @__PURE__ */ e(H, { ...r, componentName: "Contractor.Payments.HistoricalPaymentContractors", children: /* @__PURE__ */ e(v, { ...r }) });
|
|
16
|
-
}
|
|
17
|
-
function v({ companyId: r, dictionary: C, onEvent: d }) {
|
|
18
|
-
S("Contractor.Payments.HistoricalPaymentContractors"), R("Contractor.Payments.HistoricalPaymentContractors", C);
|
|
19
|
-
const { t: o } = g("Contractor.Payments.HistoricalPaymentContractors"), a = I(), [l, p] = m([]), [t, f] = m(null), { minDate: i, maxDate: c } = D(() => T(), []);
|
|
20
|
-
let n = null;
|
|
21
|
-
t !== null && t > c ? n = o("dateInFutureError") : t !== null && t < i && (n = o("dateTooEarlyError", {
|
|
22
|
-
year: t.getFullYear(),
|
|
23
|
-
allowedYear: i.getFullYear()
|
|
24
|
-
}));
|
|
25
|
-
const h = l.length > 0 && t !== null && n === null, y = () => {
|
|
26
|
-
t === null || n !== null || d(k.CONTRACTOR_HISTORICAL_PAYMENT_CONTRACTORS_SELECTED, {
|
|
27
|
-
contractorIds: l,
|
|
28
|
-
checkDate: x(t)
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */ s(u, { flexDirection: "column", gap: 32, children: [
|
|
32
|
-
/* @__PURE__ */ s(u, { flexDirection: "column", gap: 4, children: [
|
|
33
|
-
/* @__PURE__ */ e(a.Heading, { as: "h2", children: o("heading") }),
|
|
34
|
-
/* @__PURE__ */ e(a.Text, { variant: "supporting", children: o("subtitle") })
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
a.DatePicker,
|
|
38
|
-
{
|
|
39
|
-
label: o("dateLabel"),
|
|
40
|
-
isRequired: !0,
|
|
41
|
-
value: t,
|
|
42
|
-
onChange: f,
|
|
43
|
-
minDate: i,
|
|
44
|
-
maxDate: c,
|
|
45
|
-
isInvalid: n !== null,
|
|
46
|
-
errorMessage: n ?? void 0
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
/* @__PURE__ */ e(P, { companyId: r, onSelectionChange: p }),
|
|
50
|
-
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(a.Button, { onClick: y, isDisabled: !h, children: o("continueButton") }) })
|
|
51
|
-
] });
|
|
52
|
-
}
|
|
53
|
-
export {
|
|
54
|
-
z as HistoricalPaymentContractors
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=HistoricalPaymentContractors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HistoricalPaymentContractors.js","sources":["../../../../../src/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { SelectContractors } from '@/components/Contractor/shared/SelectContractors/SelectContractors'\nimport { getHistoricalPaymentCheckDateBounds } from '@/components/Contractor/Payments/shared/historicalPaymentDateBounds'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\n/**\n * Props for {@link HistoricalPaymentContractors}.\n *\n * @alpha\n */\nexport interface HistoricalPaymentContractorsProps extends BaseComponentInterface<'Contractor.Payments.HistoricalPaymentContractors'> {\n /** UUID of the company recording the historical payment. */\n companyId: string\n}\n\n/**\n * First step of the historical contractor payment flow: pick a check date and the contractors being paid.\n *\n * @remarks\n * The check date is bounded to the current tax year (plus the prior year during the Jan 1–8, 3PM MST\n * grace window) and can never be in the future.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `contractor/historicalPayments/contractorsSelected` | The user picked a check date and contractors, then clicked Continue. | `{ contractorIds: string[], checkDate: string }` |\n *\n * @param props - See {@link HistoricalPaymentContractorsProps}.\n * @returns The rendered check-date and contractor-selection screen.\n * @alpha\n */\nexport function HistoricalPaymentContractors(props: HistoricalPaymentContractorsProps) {\n return (\n <BaseComponent {...props} componentName=\"Contractor.Payments.HistoricalPaymentContractors\">\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, dictionary, onEvent }: HistoricalPaymentContractorsProps) {\n useI18n('Contractor.Payments.HistoricalPaymentContractors')\n useComponentDictionary('Contractor.Payments.HistoricalPaymentContractors', dictionary)\n const { t } = useTranslation('Contractor.Payments.HistoricalPaymentContractors')\n const Components = useComponentContext()\n\n const [selectedIds, setSelectedIds] = useState<string[]>([])\n const [checkDate, setCheckDate] = useState<Date | null>(null)\n\n const { minDate, maxDate } = useMemo(() => getHistoricalPaymentCheckDateBounds(), [])\n\n let dateError: string | null = null\n if (checkDate !== null && checkDate > maxDate) {\n dateError = t('dateInFutureError')\n } else if (checkDate !== null && checkDate < minDate) {\n dateError = t('dateTooEarlyError', {\n year: checkDate.getFullYear(),\n allowedYear: minDate.getFullYear(),\n })\n }\n\n const canContinue = selectedIds.length > 0 && checkDate !== null && dateError === null\n\n const handleContinue = () => {\n if (checkDate === null || dateError !== null) return\n onEvent(componentEvents.CONTRACTOR_HISTORICAL_PAYMENT_CONTRACTORS_SELECTED, {\n contractorIds: selectedIds,\n checkDate: formatDateToStringDate(checkDate),\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">{t('heading')}</Components.Heading>\n <Components.Text variant=\"supporting\">{t('subtitle')}</Components.Text>\n </Flex>\n\n <Components.DatePicker\n label={t('dateLabel')}\n isRequired\n value={checkDate}\n onChange={setCheckDate}\n minDate={minDate}\n maxDate={maxDate}\n isInvalid={dateError !== null}\n errorMessage={dateError ?? undefined}\n />\n\n <SelectContractors companyId={companyId} onSelectionChange={setSelectedIds} />\n\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isDisabled={!canContinue}>\n {t('continueButton')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["HistoricalPaymentContractors","props","jsx","BaseComponent","Root","companyId","dictionary","onEvent","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","selectedIds","setSelectedIds","useState","checkDate","setCheckDate","minDate","maxDate","useMemo","getHistoricalPaymentCheckDateBounds","dateError","canContinue","handleContinue","componentEvents","formatDateToStringDate","jsxs","Flex","SelectContractors","ActionsLayout"],"mappings":";;;;;;;;;;;;;AAqCO,SAASA,EAA6BC,GAA0C;AACrF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GAAO,eAAc,oDACtC,UAAA,gBAAAC,EAACE,GAAA,EAAM,GAAGH,EAAA,CAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,YAAAC,GAAY,SAAAC,KAA8C;AACnF,EAAAC,EAAQ,kDAAkD,GAC1DC,EAAuB,oDAAoDH,CAAU;AACrF,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,kDAAkD,GACzEC,IAAaC,EAAA,GAEb,CAACC,GAAaC,CAAc,IAAIC,EAAmB,CAAA,CAAE,GACrD,CAACC,GAAWC,CAAY,IAAIF,EAAsB,IAAI,GAEtD,EAAE,SAAAG,GAAS,SAAAC,EAAA,IAAYC,EAAQ,MAAMC,EAAA,GAAuC,EAAE;AAEpF,MAAIC,IAA2B;AAC/B,EAAIN,MAAc,QAAQA,IAAYG,IACpCG,IAAYb,EAAE,mBAAmB,IACxBO,MAAc,QAAQA,IAAYE,MAC3CI,IAAYb,EAAE,qBAAqB;AAAA,IACjC,MAAMO,EAAU,YAAA;AAAA,IAChB,aAAaE,EAAQ,YAAA;AAAA,EAAY,CAClC;AAGH,QAAMK,IAAcV,EAAY,SAAS,KAAKG,MAAc,QAAQM,MAAc,MAE5EE,IAAiB,MAAM;AAC3B,IAAIR,MAAc,QAAQM,MAAc,QACxChB,EAAQmB,EAAgB,oDAAoD;AAAA,MAC1E,eAAeZ;AAAA,MACf,WAAWa,EAAuBV,CAAS;AAAA,IAAA,CAC5C;AAAA,EACH;AAEA,SACE,gBAAAW,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAA3B,EAACU,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,SAAS,GAAE;AAAA,MAC1C,gBAAAR,EAACU,EAAW,MAAX,EAAgB,SAAQ,cAAc,UAAAF,EAAE,UAAU,EAAA,CAAE;AAAA,IAAA,GACvD;AAAA,IAEA,gBAAAR;AAAA,MAACU,EAAW;AAAA,MAAX;AAAA,QACC,OAAOF,EAAE,WAAW;AAAA,QACpB,YAAU;AAAA,QACV,OAAOO;AAAA,QACP,UAAUC;AAAA,QACV,SAAAC;AAAA,QACA,SAAAC;AAAA,QACA,WAAWG,MAAc;AAAA,QACzB,cAAcA,KAAa;AAAA,MAAA;AAAA,IAAA;AAAA,IAG7B,gBAAArB,EAAC4B,GAAA,EAAkB,WAAAzB,GAAsB,mBAAmBU,EAAA,CAAgB;AAAA,IAE5E,gBAAAb,EAAC6B,GAAA,EACC,UAAA,gBAAA7B,EAACU,EAAW,QAAX,EAAkB,SAASa,GAAgB,YAAY,CAACD,GACtD,UAAAd,EAAE,gBAAgB,GACrB,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { HistoricalPaymentContractors, type HistoricalPaymentContractorsProps, } from './HistoricalPaymentContractors';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const t = "Enter payment amounts", e = "Enter the hours or wage paid to each contractor along with any bonuses and reimbursements.", o = "Continue", a = "Hours and payments", n = { contractor: "Contractor", wageType: "Wage", paymentMethod: "Payment method", hours: "Hours", wage: "Fixed amount", bonus: "Bonus", reimbursement: "Reimbursement", total: "Total" }, r = "No contractors selected", s = "Go back and select at least one contractor.", c = "N/A", i = "Totals", l = "Edit contractor payment", m = "/hr", d = { fixed: "Fixed", hourly: "Hourly" }, u = { directDeposit: "Direct Deposit", check: "Check", historicalPayment: "Historical Payment" }, p = { contractorPaymentUpdated: "Pay updated for {{contractorName}}" }, h = { title: "Edit contractor pay", subtitle: `Edit contractor's hours, additional earnings, and reimbursements. Inputs not applicable to this contractor are disabled. Please click "Done" to apply the change.`, hoursLabel: "Hours", hoursAdornment: "hrs", hoursPayDescription: "{{rate}}/hr × hours = {{total}}", wageLabel: "Fixed amount", bonusLabel: "Bonus", reimbursementLabel: "Reimbursement", paymentMethodLabel: "Payment Method", cancelCta: "Cancel", saveCta: "Done", paymentMethods: { check: "Check", directDeposit: "Direct deposit", historicalPayment: "Historical payment" }, errors: { directDepositNotAvailable: "Direct Deposit is not available for contractors set up for Check payments", unsupportedPaymentMethod: "This payment method is not supported. Please select Check or Direct Deposit." } }, y = {
|
|
2
|
-
heading: t,
|
|
3
|
-
subtitle: e,
|
|
4
|
-
continueButton: o,
|
|
5
|
-
hoursAndPaymentsLabel: a,
|
|
6
|
-
contractorTableHeaders: n,
|
|
7
|
-
emptyTableTitle: r,
|
|
8
|
-
emptyTableDescription: s,
|
|
9
|
-
na: c,
|
|
10
|
-
totalsLabel: i,
|
|
11
|
-
editContractor: l,
|
|
12
|
-
perHour: m,
|
|
13
|
-
wageTypes: d,
|
|
14
|
-
paymentMethods: u,
|
|
15
|
-
alerts: p,
|
|
16
|
-
editContractorPayment: h
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
p as alerts,
|
|
20
|
-
o as continueButton,
|
|
21
|
-
n as contractorTableHeaders,
|
|
22
|
-
y as default,
|
|
23
|
-
l as editContractor,
|
|
24
|
-
h as editContractorPayment,
|
|
25
|
-
s as emptyTableDescription,
|
|
26
|
-
r as emptyTableTitle,
|
|
27
|
-
t as heading,
|
|
28
|
-
a as hoursAndPaymentsLabel,
|
|
29
|
-
c as na,
|
|
30
|
-
u as paymentMethods,
|
|
31
|
-
m as perHour,
|
|
32
|
-
e as subtitle,
|
|
33
|
-
i as totalsLabel,
|
|
34
|
-
d as wageTypes
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=Contractor.Payments.HistoricalPaymentAmounts.json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Contractor.Payments.HistoricalPaymentAmounts.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const t = "Record a historical payment", a = "Log a contractor payment that already happened outside Gusto. Pick a paid date and the contractors you paid.", e = "Payment date", o = "You cannot issue historical payments for the future. Please choose a date in the past.", n = "You cannot create a payment in {{year}}. Please select a {{allowedYear}} date.", r = "Continue", s = {
|
|
2
|
-
heading: t,
|
|
3
|
-
subtitle: a,
|
|
4
|
-
dateLabel: e,
|
|
5
|
-
dateInFutureError: o,
|
|
6
|
-
dateTooEarlyError: n,
|
|
7
|
-
continueButton: r
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
r as continueButton,
|
|
11
|
-
o as dateInFutureError,
|
|
12
|
-
e as dateLabel,
|
|
13
|
-
n as dateTooEarlyError,
|
|
14
|
-
s as default,
|
|
15
|
-
t as heading,
|
|
16
|
-
a as subtitle
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=Contractor.Payments.HistoricalPaymentContractors.json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Contractor.Payments.HistoricalPaymentContractors.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|