@gusto/embedded-react-sdk 0.45.0 → 0.46.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 +64 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +51 -50
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +1 -0
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +8 -1
- package/dist/components/Common/DataView/useDataView.js +20 -17
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +20 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +20 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +22 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +20 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +20 -4
- 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 +28 -12
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +23 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +20 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +20 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +20 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +20 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +20 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +22 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +52 -42
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +85 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +81 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
- package/dist/components/Employee/Compensation/management/index.d.ts +6 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +212 -187
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +22 -17
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +12 -2
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +115 -110
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +8 -3
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +108 -84
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +86 -68
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +8 -4
- package/dist/components/Employee/Dashboard/DashboardComponents.js +147 -93
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +18 -11
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +304 -264
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +10 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +7 -2
- package/dist/components/Employee/Dashboard/TaxesView.js +68 -54
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +152 -142
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +13 -12
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -21
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +13 -3
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +53 -55
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
- 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/onboarding/DocumentSigner/DocumentList/useDocumentList.js +20 -4
- 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/EmployeeList/management/ManagementEmployeeList.js +37 -40
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +86 -83
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- 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/Employee/Taxes/useTaxes.js +20 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +92 -89
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
- package/dist/components/Employee/exports/employeeManagement.js +18 -16
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/index.d.ts +2 -0
- package/dist/components/Employee/index.js +32 -30
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/FlowHeader.js +34 -31
- package/dist/components/Flow/FlowHeader.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +12 -0
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +34 -26
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +36 -22
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +52 -40
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -124
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +72 -87
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -6
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +160 -220
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +77 -54
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +10 -10
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
- package/dist/i18n/en/Employee.Compensation.json.js +68 -56
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +26 -24
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentManager.json.js +1 -1
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +21 -0
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/types.d.ts +4 -0
- package/dist/shared/constants.d.ts +4 -0
- package/dist/shared/constants.js +20 -18
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +45 -11
- package/docs/reference/endpoint-inventory.json +24 -8
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { composeErrorHandler as
|
|
6
|
-
function
|
|
7
|
-
employeeId:
|
|
1
|
+
import { useMemo as n } from "react";
|
|
2
|
+
import { useEmployeesGet as l } from "@gusto/embedded-api/react-query/employeesGet";
|
|
3
|
+
import { useEmployeeAddressesGet as p } from "@gusto/embedded-api/react-query/employeeAddressesGet";
|
|
4
|
+
import { useEmployeeAddressesGetWorkAddresses as y } from "@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses";
|
|
5
|
+
import { composeErrorHandler as u } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
6
|
+
function E({
|
|
7
|
+
employeeId: r
|
|
8
8
|
}) {
|
|
9
|
-
const s = y(
|
|
10
|
-
employeeId:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
isLoading: !0,
|
|
15
|
-
errorHandling: m
|
|
16
|
-
} : {
|
|
9
|
+
const e = l({ employeeId: r }, { staleTime: 1 / 0 }), s = p({ employeeId: r }, { staleTime: 1 / 0 }), o = y(
|
|
10
|
+
{ employeeId: r },
|
|
11
|
+
{ staleTime: 1 / 0 }
|
|
12
|
+
), a = e.data?.employee, t = s.data?.employeeAddressList, d = o.data?.employeeWorkAddressesList, m = n(() => t?.find((i) => i.active), [t]), c = n(() => d?.find((i) => i.active), [d]);
|
|
13
|
+
return {
|
|
17
14
|
isLoading: !1,
|
|
18
15
|
data: {
|
|
19
|
-
employee:
|
|
20
|
-
currentHomeAddress:
|
|
21
|
-
currentWorkAddress:
|
|
16
|
+
employee: a,
|
|
17
|
+
currentHomeAddress: m,
|
|
18
|
+
currentWorkAddress: c
|
|
22
19
|
},
|
|
23
20
|
status: {
|
|
24
|
-
isPending:
|
|
21
|
+
isPending: e.isFetching || s.isFetching || o.isFetching,
|
|
22
|
+
isEmployeeLoading: e.isLoading,
|
|
23
|
+
isHomeAddressLoading: s.isLoading,
|
|
24
|
+
isWorkAddressLoading: o.isLoading
|
|
25
25
|
},
|
|
26
|
-
errorHandling:
|
|
26
|
+
errorHandling: u([e, s, o])
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
E as useEmployeeBasicDetails
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=useEmployeeBasicDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeBasicDetails.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"useEmployeeBasicDetails.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeeAddressesGet } from '@gusto/embedded-api/react-query/employeeAddressesGet'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady } from '@/partner-hook-utils/types'\n\nexport interface UseEmployeeBasicDetailsProps {\n employeeId: string\n}\n\nexport type UseEmployeeBasicDetailsResult = BaseHookReady<\n {\n employee?: Employee\n currentHomeAddress?: EmployeeAddress\n currentWorkAddress?: EmployeeWorkAddress\n },\n {\n isPending: boolean\n isEmployeeLoading: boolean\n isHomeAddressLoading: boolean\n isWorkAddressLoading: boolean\n }\n>\n\n/**\n * Phase B: each query runs non-Suspense so the three cards (employee\n * info, home address, work address) can paint independently. The\n * consuming view branches on the per-query loading flags to render\n * skeletons inside the box bodies.\n */\nexport function useEmployeeBasicDetails({\n employeeId,\n}: UseEmployeeBasicDetailsProps): UseEmployeeBasicDetailsResult {\n // staleTime: Infinity — see useEmployeeCompensation for rationale (SDK\n // QueryClient invalidates on any mutation success).\n //\n // No `include: ['all_compensations']` here: BasicDetails only reads\n // `firstName/lastName/dateOfBirth/email/hasSsn` and the first job's\n // `hireDate` — the historical compensations are dead weight in this\n // payload. `useEmployeeCompensation` keeps the include since the\n // JobAndPay tab actually consumes it. The two hooks intentionally use\n // different query keys; mount-time payload shrinks on the active tab.\n const employeeQuery = useEmployeesGet({ employeeId }, { staleTime: Infinity })\n const addressesQuery = useEmployeeAddressesGet({ employeeId }, { staleTime: Infinity })\n const workAddressesQuery = useEmployeeAddressesGetWorkAddresses(\n { employeeId },\n { staleTime: Infinity },\n )\n\n const employee = employeeQuery.data?.employee\n const employeeAddressList = addressesQuery.data?.employeeAddressList\n const employeeWorkAddressesList = workAddressesQuery.data?.employeeWorkAddressesList\n\n const currentHomeAddress = useMemo(() => {\n return employeeAddressList?.find(address => address.active)\n }, [employeeAddressList])\n\n const currentWorkAddress = useMemo(() => {\n return employeeWorkAddressesList?.find(address => address.active)\n }, [employeeWorkAddressesList])\n\n return {\n isLoading: false,\n data: {\n employee,\n currentHomeAddress,\n currentWorkAddress,\n },\n status: {\n isPending:\n employeeQuery.isFetching || addressesQuery.isFetching || workAddressesQuery.isFetching,\n isEmployeeLoading: employeeQuery.isLoading,\n isHomeAddressLoading: addressesQuery.isLoading,\n isWorkAddressLoading: workAddressesQuery.isLoading,\n },\n errorHandling: composeErrorHandler([employeeQuery, addressesQuery, workAddressesQuery]),\n }\n}\n"],"names":["useEmployeeBasicDetails","employeeId","employeeQuery","useEmployeesGet","addressesQuery","useEmployeeAddressesGet","workAddressesQuery","useEmployeeAddressesGetWorkAddresses","employee","employeeAddressList","employeeWorkAddressesList","currentHomeAddress","useMemo","address","currentWorkAddress","composeErrorHandler"],"mappings":";;;;;AAkCO,SAASA,EAAwB;AAAA,EACtC,YAAAC;AACF,GAAgE;AAU9D,QAAMC,IAAgBC,EAAgB,EAAE,YAAAF,EAAA,GAAc,EAAE,WAAW,OAAU,GACvEG,IAAiBC,EAAwB,EAAE,YAAAJ,EAAA,GAAc,EAAE,WAAW,OAAU,GAChFK,IAAqBC;AAAA,IACzB,EAAE,YAAAN,EAAA;AAAA,IACF,EAAE,WAAW,MAAA;AAAA,EAAS,GAGlBO,IAAWN,EAAc,MAAM,UAC/BO,IAAsBL,EAAe,MAAM,qBAC3CM,IAA4BJ,EAAmB,MAAM,2BAErDK,IAAqBC,EAAQ,MAC1BH,GAAqB,KAAK,CAAAI,MAAWA,EAAQ,MAAM,GACzD,CAACJ,CAAmB,CAAC,GAElBK,IAAqBF,EAAQ,MAC1BF,GAA2B,KAAK,CAAAG,MAAWA,EAAQ,MAAM,GAC/D,CAACH,CAAyB,CAAC;AAE9B,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,UAAAF;AAAA,MACA,oBAAAG;AAAA,MACA,oBAAAG;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WACEZ,EAAc,cAAcE,EAAe,cAAcE,EAAmB;AAAA,MAC9E,mBAAmBJ,EAAc;AAAA,MACjC,sBAAsBE,EAAe;AAAA,MACrC,sBAAsBE,EAAmB;AAAA,IAAA;AAAA,IAE3C,eAAeS,EAAoB,CAACb,GAAeE,GAAgBE,CAAkB,CAAC;AAAA,EAAA;AAE1F;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
2
2
|
import { GetV1EmployeesEmployeeUuidPayStubsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeuuidpaystubs';
|
|
3
3
|
import { PendingCompensationChange } from '../getPendingCompensationChanges';
|
|
4
|
-
import { BaseHookReady,
|
|
4
|
+
import { BaseHookReady, HookSubmitResult } from '../../../../partner-hook-utils/types';
|
|
5
5
|
import { PaginationControlProps } from '../../../Common/PaginationControl/PaginationControlTypes';
|
|
6
6
|
type EmployeePayStub = NonNullable<GetV1EmployeesEmployeeUuidPayStubsResponse['employeePayStubsList']>[number];
|
|
7
7
|
export interface UseEmployeeCompensationProps {
|
|
8
8
|
employeeId: string;
|
|
9
9
|
}
|
|
10
|
-
interface
|
|
10
|
+
export interface UseEmployeeCompensationResult extends BaseHookReady<{
|
|
11
11
|
jobs: Job[];
|
|
12
12
|
primaryJob?: Job;
|
|
13
13
|
primaryFlsaStatus?: string;
|
|
@@ -21,6 +21,11 @@ interface UseEmployeeCompensationReady extends BaseHookReady<{
|
|
|
21
21
|
}, {
|
|
22
22
|
isPending: boolean;
|
|
23
23
|
cancellingCompensationUuid: string | null;
|
|
24
|
+
/** Compensation card depends on the jobs fetch (jobs, pending
|
|
25
|
+
* changes, FLSA status). */
|
|
26
|
+
isCompensationLoading: boolean;
|
|
27
|
+
/** Paystubs card depends on a separate paginated endpoint. */
|
|
28
|
+
isPayStubsLoading: boolean;
|
|
24
29
|
}> {
|
|
25
30
|
pagination: {
|
|
26
31
|
payStubs?: PaginationControlProps;
|
|
@@ -29,6 +34,11 @@ interface UseEmployeeCompensationReady extends BaseHookReady<{
|
|
|
29
34
|
cancelPendingChange: (pendingChange: PendingCompensationChange) => Promise<HookSubmitResult<unknown> | undefined>;
|
|
30
35
|
};
|
|
31
36
|
}
|
|
32
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Phase B: non-Suspense queries so the Compensation and Paystubs cards
|
|
39
|
+
* can paint independently within the Job and pay tab. JobAndPayView
|
|
40
|
+
* already gets the Payment and Deductions cards as separate non-Suspense
|
|
41
|
+
* hooks, so this completes the four-section incremental render.
|
|
42
|
+
*/
|
|
33
43
|
export declare function useEmployeeCompensation({ employeeId, }: UseEmployeeCompensationProps): UseEmployeeCompensationResult;
|
|
34
44
|
export {};
|
|
@@ -1,76 +1,74 @@
|
|
|
1
|
-
import { useMemo as a, useCallback as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { useMemo as a, useCallback as M } from "react";
|
|
2
|
+
import { useEmployeesGet as A } from "@gusto/embedded-api/react-query/employeesGet";
|
|
3
|
+
import { useJobsAndCompensationsGetJobs as j } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
|
|
4
|
+
import { GetV1EmployeesEmployeeIdJobsQueryParamInclude as v } from "@gusto/embedded-api/models/operations/getv1employeesemployeeidjobs";
|
|
5
|
+
import { useJobsAndCompensationsDeleteCompensationMutation as G } from "@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation";
|
|
6
|
+
import { usePayrollsGetPayStubs as Q } from "@gusto/embedded-api/react-query/payrollsGetPayStubs";
|
|
7
|
+
import { getPendingCompensationChanges as H } from "../getPendingCompensationChanges.js";
|
|
8
|
+
import { derivePrimaryFlsaStatus as T } from "../../Compensation/shared/derivePrimaryFlsaStatus.js";
|
|
9
|
+
import { useBaseSubmit as q } from "../../../Base/useBaseSubmit.js";
|
|
10
|
+
import { composeErrorHandler as w } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
11
|
+
import { usePagination as D } from "../../../../hooks/usePagination/usePagination.js";
|
|
12
|
+
function Y({
|
|
13
|
+
employeeId: i
|
|
12
14
|
}) {
|
|
13
|
-
const { currentPage:
|
|
15
|
+
const { currentPage: c, itemsPerPage: d, getPaginationProps: m } = D({
|
|
14
16
|
defaultItemsPerPage: 10
|
|
15
|
-
}),
|
|
16
|
-
employeeId:
|
|
17
|
-
|
|
18
|
-
}),
|
|
19
|
-
employeeId:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
), E =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
let d;
|
|
35
|
-
return await u(n, async ({ compensationUuid: L }) => {
|
|
36
|
-
d = { mode: "update", data: await o.mutateAsync({
|
|
17
|
+
}), o = j(
|
|
18
|
+
{ employeeId: i, include: v.AllCompensations },
|
|
19
|
+
{ staleTime: 1 / 0 }
|
|
20
|
+
), r = A({ employeeId: i }, { staleTime: 1 / 0 }), e = Q(
|
|
21
|
+
{ employeeId: i, page: c, per: d },
|
|
22
|
+
{ staleTime: 1 / 0 }
|
|
23
|
+
), n = G(), {
|
|
24
|
+
baseSubmitHandler: p,
|
|
25
|
+
error: l,
|
|
26
|
+
setError: g
|
|
27
|
+
} = q("Employee.Dashboard.JobAndPay.Compensation"), y = r.data?.employee, t = a(() => o.data?.jobs ?? [], [o.data?.jobs]), b = a(() => t.find((s) => s.primary === !0), [t]), P = a(() => T(t), [t]), f = t.length > 1, h = a(() => H(t), [t]), C = e.data?.employeePayStubsList ?? [], S = a(() => {
|
|
28
|
+
const s = e.data?.httpMeta.response.headers;
|
|
29
|
+
if (s)
|
|
30
|
+
return m(s, e.isFetching);
|
|
31
|
+
}, [e.data?.httpMeta.response.headers, e.isFetching, m]), E = n.isPending ? n.variables.request.compensationId : null, F = M(
|
|
32
|
+
async (s) => {
|
|
33
|
+
let u;
|
|
34
|
+
return await p(s, async ({ compensationUuid: L }) => {
|
|
35
|
+
u = { mode: "update", data: await n.mutateAsync({
|
|
37
36
|
request: { compensationId: L }
|
|
38
37
|
}) };
|
|
39
|
-
}),
|
|
38
|
+
}), u;
|
|
40
39
|
},
|
|
41
|
-
[
|
|
42
|
-
),
|
|
43
|
-
submitError:
|
|
44
|
-
setSubmitError:
|
|
40
|
+
[p, n]
|
|
41
|
+
), J = o.isFetching || r.isFetching || e.isFetching || n.isPending, I = w([o, r, e], {
|
|
42
|
+
submitError: l,
|
|
43
|
+
setSubmitError: g
|
|
45
44
|
});
|
|
46
|
-
return
|
|
47
|
-
isLoading: !0,
|
|
48
|
-
errorHandling: l
|
|
49
|
-
} : {
|
|
45
|
+
return {
|
|
50
46
|
isLoading: !1,
|
|
51
47
|
data: {
|
|
52
48
|
jobs: t,
|
|
53
|
-
primaryJob:
|
|
54
|
-
primaryFlsaStatus:
|
|
55
|
-
hasMultipleJobs:
|
|
56
|
-
pendingChanges:
|
|
57
|
-
payStubs:
|
|
58
|
-
employeeFirstName:
|
|
49
|
+
primaryJob: b,
|
|
50
|
+
primaryFlsaStatus: P,
|
|
51
|
+
hasMultipleJobs: f,
|
|
52
|
+
pendingChanges: h,
|
|
53
|
+
payStubs: C,
|
|
54
|
+
employeeFirstName: y?.firstName ?? void 0
|
|
59
55
|
},
|
|
60
56
|
status: {
|
|
61
|
-
isPending:
|
|
62
|
-
cancellingCompensationUuid:
|
|
57
|
+
isPending: J,
|
|
58
|
+
cancellingCompensationUuid: E,
|
|
59
|
+
isCompensationLoading: o.isLoading,
|
|
60
|
+
isPayStubsLoading: e.isLoading
|
|
63
61
|
},
|
|
64
62
|
pagination: {
|
|
65
|
-
payStubs:
|
|
63
|
+
payStubs: S
|
|
66
64
|
},
|
|
67
65
|
actions: {
|
|
68
|
-
cancelPendingChange:
|
|
66
|
+
cancelPendingChange: F
|
|
69
67
|
},
|
|
70
|
-
errorHandling:
|
|
68
|
+
errorHandling: I
|
|
71
69
|
};
|
|
72
70
|
}
|
|
73
71
|
export {
|
|
74
|
-
|
|
72
|
+
Y as useEmployeeCompensation
|
|
75
73
|
};
|
|
76
74
|
//# sourceMappingURL=useEmployeeCompensation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeCompensation.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeCompensation.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"useEmployeeCompensation.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeCompensation.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsDeleteCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation'\nimport { usePayrollsGetPayStubs } from '@gusto/embedded-api/react-query/payrollsGetPayStubs'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { GetV1EmployeesEmployeeUuidPayStubsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeuuidpaystubs'\nimport {\n getPendingCompensationChanges,\n type PendingCompensationChange,\n} from '../getPendingCompensationChanges'\nimport { derivePrimaryFlsaStatus } from '@/components/Employee/Compensation/shared/derivePrimaryFlsaStatus'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport type { BaseHookReady, HookSubmitResult } from '@/partner-hook-utils/types'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype EmployeePayStub = NonNullable<\n GetV1EmployeesEmployeeUuidPayStubsResponse['employeePayStubsList']\n>[number]\n\nexport interface UseEmployeeCompensationProps {\n employeeId: string\n}\n\nexport interface UseEmployeeCompensationResult extends BaseHookReady<\n {\n jobs: Job[]\n primaryJob?: Job\n primaryFlsaStatus?: string\n hasMultipleJobs: boolean\n pendingChanges: PendingCompensationChange[]\n payStubs: EmployeePayStub[]\n /** First name from the shared employee fetch; useful for cosmetic copy\n * in alerts (e.g. \"Heads up, Jane has pending changes\"). Optional\n * because the employee record can omit it. */\n employeeFirstName?: string\n },\n {\n isPending: boolean\n cancellingCompensationUuid: string | null\n /** Compensation card depends on the jobs fetch (jobs, pending\n * changes, FLSA status). */\n isCompensationLoading: boolean\n /** Paystubs card depends on a separate paginated endpoint. */\n isPayStubsLoading: boolean\n }\n> {\n pagination: {\n payStubs?: PaginationControlProps\n }\n actions: {\n cancelPendingChange: (\n pendingChange: PendingCompensationChange,\n ) => Promise<HookSubmitResult<unknown> | undefined>\n }\n}\n\n/**\n * Phase B: non-Suspense queries so the Compensation and Paystubs cards\n * can paint independently within the Job and pay tab. JobAndPayView\n * already gets the Payment and Deductions cards as separate non-Suspense\n * hooks, so this completes the four-section incremental render.\n */\nexport function useEmployeeCompensation({\n employeeId,\n}: UseEmployeeCompensationProps): UseEmployeeCompensationResult {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination({\n defaultItemsPerPage: 10,\n })\n\n // staleTime: Infinity on dashboard reads — the SDK QueryClient already\n // invalidates all queries on any mutation success, so post-write\n // freshness is preserved. Without this, every subscriber re-mount\n // (e.g. tab navigation) would fire a redundant background refetch.\n //\n // GET /v1/employees/:id/jobs?include=all_compensations returns all effective-\n // dated compensations (current + future) with compensation.title on each,\n // which is required for pending-change detection. Without the include param,\n // only the current compensation is returned.\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId, include: GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations },\n { staleTime: Infinity },\n )\n // Employee query is a lightweight secondary fetch for cosmetic data only\n // (first name used in alert copy). Jobs / compensation data comes from jobsQuery.\n const employeeQuery = useEmployeesGet({ employeeId }, { staleTime: Infinity })\n const payStubsQuery = usePayrollsGetPayStubs(\n { employeeId, page: currentPage, per: itemsPerPage },\n { staleTime: Infinity },\n )\n const cancelCompensationMutation = useJobsAndCompensationsDeleteCompensationMutation()\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('Employee.Dashboard.JobAndPay.Compensation')\n\n const employee = employeeQuery.data?.employee\n\n const jobs = useMemo(() => jobsQuery.data?.jobs ?? [], [jobsQuery.data?.jobs])\n const primaryJob = useMemo(() => jobs.find(job => job.primary === true), [jobs])\n const primaryFlsaStatus = useMemo(() => derivePrimaryFlsaStatus(jobs), [jobs])\n const hasMultipleJobs = jobs.length > 1\n\n const pendingChanges = useMemo(() => getPendingCompensationChanges(jobs), [jobs])\n\n const payStubs = payStubsQuery.data?.employeePayStubsList ?? []\n\n const payStubsPagination = useMemo(() => {\n const headers = payStubsQuery.data?.httpMeta.response.headers\n if (!headers) return undefined\n return getPaginationProps(headers, payStubsQuery.isFetching)\n }, [payStubsQuery.data?.httpMeta.response.headers, payStubsQuery.isFetching, getPaginationProps])\n\n const cancellingCompensationUuid = cancelCompensationMutation.isPending\n ? cancelCompensationMutation.variables.request.compensationId\n : null\n\n const cancelPendingChange = useCallback(\n async (\n pendingChange: PendingCompensationChange,\n ): Promise<HookSubmitResult<unknown> | undefined> => {\n let submitResult: HookSubmitResult<unknown> | undefined\n await baseSubmitHandler(pendingChange, async ({ compensationUuid }) => {\n const data = await cancelCompensationMutation.mutateAsync({\n request: { compensationId: compensationUuid },\n })\n submitResult = { mode: 'update', data }\n })\n return submitResult\n },\n [baseSubmitHandler, cancelCompensationMutation],\n )\n\n const isPending =\n jobsQuery.isFetching ||\n employeeQuery.isFetching ||\n payStubsQuery.isFetching ||\n cancelCompensationMutation.isPending\n\n const errorHandling = composeErrorHandler([jobsQuery, employeeQuery, payStubsQuery], {\n submitError,\n setSubmitError,\n })\n\n return {\n isLoading: false,\n data: {\n jobs,\n primaryJob,\n primaryFlsaStatus,\n hasMultipleJobs,\n pendingChanges,\n payStubs,\n employeeFirstName: employee?.firstName ?? undefined,\n },\n status: {\n isPending,\n cancellingCompensationUuid,\n isCompensationLoading: jobsQuery.isLoading,\n isPayStubsLoading: payStubsQuery.isLoading,\n },\n pagination: {\n payStubs: payStubsPagination,\n },\n actions: {\n cancelPendingChange,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeCompensation","employeeId","currentPage","itemsPerPage","getPaginationProps","usePagination","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","employeeQuery","useEmployeesGet","payStubsQuery","usePayrollsGetPayStubs","cancelCompensationMutation","useJobsAndCompensationsDeleteCompensationMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","employee","jobs","useMemo","primaryJob","job","primaryFlsaStatus","derivePrimaryFlsaStatus","hasMultipleJobs","pendingChanges","getPendingCompensationChanges","payStubs","payStubsPagination","headers","cancellingCompensationUuid","cancelPendingChange","useCallback","pendingChange","submitResult","compensationUuid","isPending","errorHandling","composeErrorHandler"],"mappings":";;;;;;;;;;;AAkEO,SAASA,EAAwB;AAAA,EACtC,YAAAC;AACF,GAAgE;AAC9D,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAc;AAAA,IACtE,qBAAqB;AAAA,EAAA,CACtB,GAWKC,IAAYC;AAAA,IAChB,EAAE,YAAAN,GAAY,SAASO,EAA8C,iBAAA;AAAA,IACrE,EAAE,WAAW,MAAA;AAAA,EAAS,GAIlBC,IAAgBC,EAAgB,EAAE,YAAAT,EAAA,GAAc,EAAE,WAAW,OAAU,GACvEU,IAAgBC;AAAA,IACpB,EAAE,YAAAX,GAAY,MAAMC,GAAa,KAAKC,EAAA;AAAA,IACtC,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBU,IAA6BC,EAAA,GAC7B;AAAA,IACJ,mBAAAC;AAAA,IACA,OAAOC;AAAA,IACP,UAAUC;AAAA,EAAA,IACRC,EAAc,2CAA2C,GAEvDC,IAAWV,EAAc,MAAM,UAE/BW,IAAOC,EAAQ,MAAMf,EAAU,MAAM,QAAQ,CAAA,GAAI,CAACA,EAAU,MAAM,IAAI,CAAC,GACvEgB,IAAaD,EAAQ,MAAMD,EAAK,KAAK,CAAAG,MAAOA,EAAI,YAAY,EAAI,GAAG,CAACH,CAAI,CAAC,GACzEI,IAAoBH,EAAQ,MAAMI,EAAwBL,CAAI,GAAG,CAACA,CAAI,CAAC,GACvEM,IAAkBN,EAAK,SAAS,GAEhCO,IAAiBN,EAAQ,MAAMO,EAA8BR,CAAI,GAAG,CAACA,CAAI,CAAC,GAE1ES,IAAWlB,EAAc,MAAM,wBAAwB,CAAA,GAEvDmB,IAAqBT,EAAQ,MAAM;AACvC,UAAMU,IAAUpB,EAAc,MAAM,SAAS,SAAS;AACtD,QAAKoB;AACL,aAAO3B,EAAmB2B,GAASpB,EAAc,UAAU;AAAA,EAC7D,GAAG,CAACA,EAAc,MAAM,SAAS,SAAS,SAASA,EAAc,YAAYP,CAAkB,CAAC,GAE1F4B,IAA6BnB,EAA2B,YAC1DA,EAA2B,UAAU,QAAQ,iBAC7C,MAEEoB,IAAsBC;AAAA,IAC1B,OACEC,MACmD;AACnD,UAAIC;AACJ,mBAAMrB,EAAkBoB,GAAe,OAAO,EAAE,kBAAAE,QAAuB;AAIrE,QAAAD,IAAe,EAAE,MAAM,UAAU,MAHpB,MAAMvB,EAA2B,YAAY;AAAA,UACxD,SAAS,EAAE,gBAAgBwB,EAAA;AAAA,QAAiB,CAC7C,EACgC;AAAA,MACnC,CAAC,GACMD;AAAA,IACT;AAAA,IACA,CAACrB,GAAmBF,CAA0B;AAAA,EAAA,GAG1CyB,IACJhC,EAAU,cACVG,EAAc,cACdE,EAAc,cACdE,EAA2B,WAEvB0B,IAAgBC,EAAoB,CAAClC,GAAWG,GAAeE,CAAa,GAAG;AAAA,IACnF,aAAAK;AAAA,IACA,gBAAAC;AAAA,EAAA,CACD;AAED,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,MAAAG;AAAA,MACA,YAAAE;AAAA,MACA,mBAAAE;AAAA,MACA,iBAAAE;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAE;AAAA,MACA,mBAAmBV,GAAU,aAAa;AAAA,IAAA;AAAA,IAE5C,QAAQ;AAAA,MACN,WAAAmB;AAAA,MACA,4BAAAN;AAAA,MACA,uBAAuB1B,EAAU;AAAA,MACjC,mBAAmBK,EAAc;AAAA,IAAA;AAAA,IAEnC,YAAY;AAAA,MACV,UAAUmB;AAAA,IAAA;AAAA,IAEZ,SAAS;AAAA,MACP,qBAAAG;AAAA,IAAA;AAAA,IAEF,eAAAM;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { Form } from '@gusto/embedded-api/models/components/form';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseHookReady } from '../../../../partner-hook-utils/types';
|
|
3
3
|
export interface UseEmployeeFormsProps {
|
|
4
4
|
employeeId: string;
|
|
5
5
|
}
|
|
6
|
-
type
|
|
6
|
+
export type UseEmployeeFormsResult = BaseHookReady<{
|
|
7
7
|
formList: Form[];
|
|
8
8
|
}, {
|
|
9
9
|
isPending: boolean;
|
|
10
|
+
isFormsLoading: boolean;
|
|
10
11
|
}>;
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Phase B: non-Suspense query so the consuming view can paint its frame
|
|
14
|
+
* (box header, tab structure) before the data arrives. The `formList`
|
|
15
|
+
* defaults to `[]` while the query is loading — consumers branch on
|
|
16
|
+
* `status.isFormsLoading` to distinguish "still loading" from "loaded
|
|
17
|
+
* empty" and render a skeleton accordingly.
|
|
18
|
+
*/
|
|
12
19
|
export declare function useEmployeeForms({ employeeId }: UseEmployeeFormsProps): UseEmployeeFormsResult;
|
|
13
|
-
export {};
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { composeErrorHandler as
|
|
3
|
-
function
|
|
4
|
-
const o =
|
|
5
|
-
return
|
|
6
|
-
isLoading: !0,
|
|
7
|
-
errorHandling: t
|
|
8
|
-
} : {
|
|
1
|
+
import { useEmployeeFormsList as s } from "@gusto/embedded-api/react-query/employeeFormsList";
|
|
2
|
+
import { composeErrorHandler as i } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
3
|
+
function t({ employeeId: r }) {
|
|
4
|
+
const o = s({ employeeId: r }, { staleTime: 1 / 0 });
|
|
5
|
+
return {
|
|
9
6
|
isLoading: !1,
|
|
10
7
|
data: {
|
|
11
|
-
formList:
|
|
8
|
+
formList: o.data?.forms ?? []
|
|
12
9
|
},
|
|
13
10
|
status: {
|
|
14
|
-
isPending:
|
|
11
|
+
isPending: o.isFetching,
|
|
12
|
+
isFormsLoading: o.isLoading
|
|
15
13
|
},
|
|
16
|
-
errorHandling:
|
|
14
|
+
errorHandling: i([o])
|
|
17
15
|
};
|
|
18
16
|
}
|
|
19
17
|
export {
|
|
20
|
-
|
|
18
|
+
t as useEmployeeForms
|
|
21
19
|
};
|
|
22
20
|
//# sourceMappingURL=useEmployeeForms.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeForms.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeForms.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useEmployeeForms.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeForms.tsx"],"sourcesContent":["import { useEmployeeFormsList } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport type { Form } from '@gusto/embedded-api/models/components/form'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady } from '@/partner-hook-utils/types'\n\nexport interface UseEmployeeFormsProps {\n employeeId: string\n}\n\nexport type UseEmployeeFormsResult = BaseHookReady<\n { formList: Form[] },\n { isPending: boolean; isFormsLoading: boolean }\n>\n\n/**\n * Phase B: non-Suspense query so the consuming view can paint its frame\n * (box header, tab structure) before the data arrives. The `formList`\n * defaults to `[]` while the query is loading — consumers branch on\n * `status.isFormsLoading` to distinguish \"still loading\" from \"loaded\n * empty\" and render a skeleton accordingly.\n */\nexport function useEmployeeForms({ employeeId }: UseEmployeeFormsProps): UseEmployeeFormsResult {\n // staleTime: Infinity — see useEmployeeCompensation for rationale (SDK\n // QueryClient invalidates on any mutation success).\n const formsQuery = useEmployeeFormsList({ employeeId }, { staleTime: Infinity })\n\n return {\n isLoading: false,\n data: {\n formList: formsQuery.data?.forms ?? [],\n },\n status: {\n isPending: formsQuery.isFetching,\n isFormsLoading: formsQuery.isLoading,\n },\n errorHandling: composeErrorHandler([formsQuery]),\n }\n}\n"],"names":["useEmployeeForms","employeeId","formsQuery","useEmployeeFormsList","composeErrorHandler"],"mappings":";;AAqBO,SAASA,EAAiB,EAAE,YAAAC,KAA6D;AAG9F,QAAMC,IAAaC,EAAqB,EAAE,YAAAF,EAAA,GAAc,EAAE,WAAW,OAAU;AAE/E,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,UAAUC,EAAW,MAAM,SAAS,CAAA;AAAA,IAAC;AAAA,IAEvC,QAAQ;AAAA,MACN,WAAWA,EAAW;AAAA,MACtB,gBAAgBA,EAAW;AAAA,IAAA;AAAA,IAE7B,eAAeE,EAAoB,CAACF,CAAU,CAAC;AAAA,EAAA;AAEnD;"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { GetV1EmployeesEmployeeIdFederalTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidfederaltaxes';
|
|
2
2
|
import { GetV1EmployeesEmployeeIdStateTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidstatetaxes';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseHookReady } from '../../../../partner-hook-utils/types';
|
|
4
4
|
type EmployeeFederalTax = NonNullable<GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']>;
|
|
5
5
|
type EmployeeStateTax = NonNullable<GetV1EmployeesEmployeeIdStateTaxesResponse['employeeStateTaxesList']>[number];
|
|
6
6
|
export interface UseEmployeeTaxesProps {
|
|
7
7
|
employeeId: string;
|
|
8
8
|
}
|
|
9
|
-
type
|
|
9
|
+
export type UseEmployeeTaxesResult = BaseHookReady<{
|
|
10
10
|
employeeFederalTax?: EmployeeFederalTax;
|
|
11
11
|
employeeStateTaxesList: EmployeeStateTax[];
|
|
12
12
|
}, {
|
|
13
13
|
isPending: boolean;
|
|
14
|
+
isFederalTaxesLoading: boolean;
|
|
15
|
+
isStateTaxesLoading: boolean;
|
|
14
16
|
}>;
|
|
15
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Phase B: non-Suspense queries so the federal and state tax cards
|
|
19
|
+
* paint independently. `isFederalTaxesLoading` and `isStateTaxesLoading`
|
|
20
|
+
* let TaxesView render a per-card skeleton while the box header stays
|
|
21
|
+
* visible.
|
|
22
|
+
*/
|
|
16
23
|
export declare function useEmployeeTaxes({ employeeId }: UseEmployeeTaxesProps): UseEmployeeTaxesResult;
|
|
17
24
|
export {};
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { composeErrorHandler as
|
|
4
|
-
function
|
|
5
|
-
const e =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useEmployeeTaxSetupGetFederalTaxes as i } from "@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes";
|
|
2
|
+
import { useEmployeeTaxSetupGetStateTaxes as s } from "@gusto/embedded-api/react-query/employeeTaxSetupGetStateTaxes";
|
|
3
|
+
import { composeErrorHandler as o } from "../../../../partner-hook-utils/composeErrorHandler.js";
|
|
4
|
+
function d({ employeeId: t }) {
|
|
5
|
+
const e = i(
|
|
6
|
+
{ employeeUuid: t },
|
|
7
|
+
{ staleTime: 1 / 0 }
|
|
8
|
+
), a = s(
|
|
9
|
+
{ employeeUuid: t },
|
|
10
|
+
{ staleTime: 1 / 0 }
|
|
11
|
+
);
|
|
12
|
+
return {
|
|
10
13
|
isLoading: !1,
|
|
11
14
|
data: {
|
|
12
|
-
employeeFederalTax:
|
|
13
|
-
employeeStateTaxesList:
|
|
15
|
+
employeeFederalTax: e.data?.employeeFederalTax,
|
|
16
|
+
employeeStateTaxesList: a.data?.employeeStateTaxesList ?? []
|
|
14
17
|
},
|
|
15
18
|
status: {
|
|
16
|
-
isPending:
|
|
19
|
+
isPending: e.isFetching || a.isFetching,
|
|
20
|
+
isFederalTaxesLoading: e.isLoading,
|
|
21
|
+
isStateTaxesLoading: a.isLoading
|
|
17
22
|
},
|
|
18
|
-
errorHandling:
|
|
23
|
+
errorHandling: o([e, a])
|
|
19
24
|
};
|
|
20
25
|
}
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
d as useEmployeeTaxes
|
|
23
28
|
};
|
|
24
29
|
//# sourceMappingURL=useEmployeeTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeTaxes.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeTaxes.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useEmployeeTaxes.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeTaxes.tsx"],"sourcesContent":["import { useEmployeeTaxSetupGetFederalTaxes } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupGetStateTaxes } from '@gusto/embedded-api/react-query/employeeTaxSetupGetStateTaxes'\nimport type { GetV1EmployeesEmployeeIdFederalTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidfederaltaxes'\nimport type { GetV1EmployeesEmployeeIdStateTaxesResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidstatetaxes'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady } from '@/partner-hook-utils/types'\n\ntype EmployeeFederalTax = NonNullable<\n GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']\n>\ntype EmployeeStateTax = NonNullable<\n GetV1EmployeesEmployeeIdStateTaxesResponse['employeeStateTaxesList']\n>[number]\n\nexport interface UseEmployeeTaxesProps {\n employeeId: string\n}\n\nexport type UseEmployeeTaxesResult = BaseHookReady<\n {\n employeeFederalTax?: EmployeeFederalTax\n employeeStateTaxesList: EmployeeStateTax[]\n },\n {\n isPending: boolean\n isFederalTaxesLoading: boolean\n isStateTaxesLoading: boolean\n }\n>\n\n/**\n * Phase B: non-Suspense queries so the federal and state tax cards\n * paint independently. `isFederalTaxesLoading` and `isStateTaxesLoading`\n * let TaxesView render a per-card skeleton while the box header stays\n * visible.\n */\nexport function useEmployeeTaxes({ employeeId }: UseEmployeeTaxesProps): UseEmployeeTaxesResult {\n // staleTime: Infinity — see useEmployeeCompensation for rationale (SDK\n // QueryClient invalidates on any mutation success).\n const federalTaxesQuery = useEmployeeTaxSetupGetFederalTaxes(\n { employeeUuid: employeeId },\n { staleTime: Infinity },\n )\n const stateTaxesQuery = useEmployeeTaxSetupGetStateTaxes(\n { employeeUuid: employeeId },\n { staleTime: Infinity },\n )\n\n return {\n isLoading: false,\n data: {\n employeeFederalTax: federalTaxesQuery.data?.employeeFederalTax,\n employeeStateTaxesList: stateTaxesQuery.data?.employeeStateTaxesList ?? [],\n },\n status: {\n isPending: federalTaxesQuery.isFetching || stateTaxesQuery.isFetching,\n isFederalTaxesLoading: federalTaxesQuery.isLoading,\n isStateTaxesLoading: stateTaxesQuery.isLoading,\n },\n errorHandling: composeErrorHandler([federalTaxesQuery, stateTaxesQuery]),\n }\n}\n"],"names":["useEmployeeTaxes","employeeId","federalTaxesQuery","useEmployeeTaxSetupGetFederalTaxes","stateTaxesQuery","useEmployeeTaxSetupGetStateTaxes","composeErrorHandler"],"mappings":";;;AAoCO,SAASA,EAAiB,EAAE,YAAAC,KAA6D;AAG9F,QAAMC,IAAoBC;AAAA,IACxB,EAAE,cAAcF,EAAA;AAAA,IAChB,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBG,IAAkBC;AAAA,IACtB,EAAE,cAAcJ,EAAA;AAAA,IAChB,EAAE,WAAW,MAAA;AAAA,EAAS;AAGxB,SAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,oBAAoBC,EAAkB,MAAM;AAAA,MAC5C,wBAAwBE,EAAgB,MAAM,0BAA0B,CAAA;AAAA,IAAC;AAAA,IAE3E,QAAQ;AAAA,MACN,WAAWF,EAAkB,cAAcE,EAAgB;AAAA,MAC3D,uBAAuBF,EAAkB;AAAA,MACzC,qBAAqBE,EAAgB;AAAA,IAAA;AAAA,IAEvC,eAAeE,EAAoB,CAACJ,GAAmBE,CAAe,CAAC;AAAA,EAAA;AAE3E;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { TextInputHookField as n } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
3
|
+
import { SelectHookField as t } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
3
4
|
import { NumberInputHookField as i } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
4
|
-
import { TextInputHookField as t } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
5
5
|
function d(e) {
|
|
6
|
-
return /* @__PURE__ */ r(
|
|
6
|
+
return /* @__PURE__ */ r(t, { ...e, name: "state" });
|
|
7
7
|
}
|
|
8
8
|
function f(e) {
|
|
9
|
-
return /* @__PURE__ */ r(
|
|
9
|
+
return /* @__PURE__ */ r(t, { ...e, name: "fipsCode" });
|
|
10
10
|
}
|
|
11
11
|
function c(e) {
|
|
12
|
-
return /* @__PURE__ */ r(
|
|
12
|
+
return /* @__PURE__ */ r(n, { ...e, name: "caseNumber" });
|
|
13
13
|
}
|
|
14
14
|
function l(e) {
|
|
15
|
-
return /* @__PURE__ */ r(
|
|
15
|
+
return /* @__PURE__ */ r(n, { ...e, name: "orderNumber" });
|
|
16
16
|
}
|
|
17
17
|
function F(e) {
|
|
18
|
-
return /* @__PURE__ */ r(
|
|
18
|
+
return /* @__PURE__ */ r(n, { ...e, name: "remittanceNumber" });
|
|
19
19
|
}
|
|
20
20
|
function p(e) {
|
|
21
21
|
return /* @__PURE__ */ r(i, { ...e, name: "payPeriodMaximum" });
|
|
@@ -24,7 +24,7 @@ function b(e) {
|
|
|
24
24
|
return /* @__PURE__ */ r(i, { ...e, name: "amount" });
|
|
25
25
|
}
|
|
26
26
|
function N(e) {
|
|
27
|
-
return /* @__PURE__ */ r(
|
|
27
|
+
return /* @__PURE__ */ r(t, { ...e, name: "paymentPeriod" });
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
30
|
b as AmountField,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { TextInputHookField as o } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
3
|
+
import { SelectHookField as i } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
3
4
|
import { NumberInputHookField as t } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
4
5
|
import { RadioGroupHookField as r } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
5
|
-
import { TextInputHookField as i } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
6
6
|
function l(n) {
|
|
7
|
-
return /* @__PURE__ */ e(
|
|
7
|
+
return /* @__PURE__ */ e(o, { ...n, name: "description" });
|
|
8
8
|
}
|
|
9
9
|
function p(n) {
|
|
10
10
|
return /* @__PURE__ */ e(r, { ...n, name: "recurring" });
|
|
@@ -22,7 +22,7 @@ function A(n) {
|
|
|
22
22
|
return /* @__PURE__ */ e(t, { ...n, name: "annualMaximum" });
|
|
23
23
|
}
|
|
24
24
|
function g(n) {
|
|
25
|
-
return /* @__PURE__ */ e(
|
|
25
|
+
return /* @__PURE__ */ e(i, { ...n, name: "garnishmentType" });
|
|
26
26
|
}
|
|
27
27
|
export {
|
|
28
28
|
F as AmountField,
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-error-boundary";
|
|
4
|
+
import "react-i18next";
|
|
5
|
+
import "@tanstack/react-query";
|
|
2
6
|
import "../../../../../Base/useBase.js";
|
|
3
|
-
|
|
7
|
+
import "@gusto/embedded-api/models/errors/apierror";
|
|
8
|
+
import "@gusto/embedded-api/models/errors/gustoembeddederror";
|
|
9
|
+
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
10
|
+
import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
11
|
+
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
|
+
import "dompurify";
|
|
13
|
+
import "../../../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
|
+
import "../../../../../../shared/constants.js";
|
|
15
|
+
import "classnames";
|
|
16
|
+
import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
|
+
import "../../../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
18
|
+
import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
|
|
19
|
+
const [P, b] = t("DocumentListContext");
|
|
4
20
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
21
|
+
b as DocumentListProvider,
|
|
22
|
+
P as useDocumentList
|
|
7
23
|
};
|
|
8
24
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { CheckboxHookField as t } from "../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
|
|
3
2
|
import { TextInputHookField as n } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
|
|
4
3
|
import { SelectHookField as a } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
|
|
4
|
+
import { CheckboxHookField as t } from "../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
|
|
5
5
|
import { RadioGroupHookField as p } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
6
6
|
function c(r) {
|
|
7
7
|
return /* @__PURE__ */ e(n, { ...r, name: "signature" });
|