@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.
Files changed (233) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +51 -50
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DataView/DataView.d.ts +1 -0
  9. package/dist/components/Common/DataView/DataView.js.map +1 -1
  10. package/dist/components/Common/DataView/useDataView.d.ts +8 -1
  11. package/dist/components/Common/DataView/useDataView.js +20 -17
  12. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +20 -4
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +20 -4
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +22 -6
  18. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  19. package/dist/components/Company/BankAccount/BankAccountForm/context.js +20 -4
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  21. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +20 -4
  22. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  23. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  24. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +28 -12
  25. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  26. package/dist/components/Company/Industry/Context.js +23 -7
  27. package/dist/components/Company/Industry/Context.js.map +1 -1
  28. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +20 -4
  29. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  30. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +20 -4
  31. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  32. package/dist/components/Company/OnboardingOverview/context.js +20 -4
  33. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  34. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  35. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +20 -4
  36. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  37. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +20 -4
  38. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  39. package/dist/components/Contractor/Address/useAddress.js +22 -6
  40. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  41. package/dist/components/Contractor/Profile/useContractorProfile.js +52 -42
  42. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  43. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
  44. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
  45. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
  46. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
  47. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
  48. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
  49. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +85 -0
  50. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
  51. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
  52. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  53. package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
  54. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
  55. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +81 -0
  56. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
  57. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
  58. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
  59. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
  60. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
  61. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
  62. package/dist/components/Employee/Compensation/management/index.d.ts +6 -0
  63. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
  64. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
  65. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  66. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
  67. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
  68. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
  69. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
  70. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
  71. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  72. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
  73. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  74. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  75. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +212 -187
  76. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  77. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  78. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
  79. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +22 -17
  80. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  81. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +12 -2
  82. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +115 -110
  83. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  84. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +8 -3
  85. package/dist/components/Employee/Dashboard/BasicDetailsView.js +108 -84
  86. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  87. package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
  88. package/dist/components/Employee/Dashboard/Dashboard.js +86 -68
  89. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  90. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +8 -4
  91. package/dist/components/Employee/Dashboard/DashboardComponents.js +147 -93
  92. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  93. package/dist/components/Employee/Dashboard/DocumentsView.js +18 -11
  94. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  95. package/dist/components/Employee/Dashboard/JobAndPayView.js +304 -264
  96. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  97. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +10 -0
  98. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
  99. package/dist/components/Employee/Dashboard/TaxesView.d.ts +7 -2
  100. package/dist/components/Employee/Dashboard/TaxesView.js +68 -54
  101. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  102. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +152 -142
  103. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  104. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
  105. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +13 -12
  106. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  107. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
  108. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -21
  109. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  110. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +13 -3
  111. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +53 -55
  112. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
  114. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
  115. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
  117. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
  118. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
  119. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  120. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  121. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +20 -4
  122. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  123. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  124. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
  125. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  126. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
  127. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
  128. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  129. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
  130. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
  131. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
  132. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
  133. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
  134. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
  135. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
  136. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
  137. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
  138. package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
  139. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  140. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
  141. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  142. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
  143. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +86 -83
  144. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  145. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  146. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  147. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  148. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  149. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  150. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  151. package/dist/components/Employee/Taxes/useTaxes.js +20 -4
  152. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  153. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
  154. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  155. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
  156. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +92 -89
  157. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  158. package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
  159. package/dist/components/Employee/exports/employeeManagement.js +18 -16
  160. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  161. package/dist/components/Employee/index.d.ts +2 -0
  162. package/dist/components/Employee/index.js +32 -30
  163. package/dist/components/Employee/index.js.map +1 -1
  164. package/dist/components/Flow/FlowHeader.js +34 -31
  165. package/dist/components/Flow/FlowHeader.js.map +1 -1
  166. package/dist/components/Flow/useFlow.d.ts +12 -0
  167. package/dist/components/Flow/useFlow.js.map +1 -1
  168. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +34 -26
  169. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  170. package/dist/components/Payroll/usePreparedPayrollData.js +36 -22
  171. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  172. package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
  173. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  174. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
  175. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  176. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +52 -40
  177. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  178. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  179. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  180. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
  181. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  182. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
  183. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  184. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  185. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
  186. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  187. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  188. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -124
  189. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  190. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  191. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +72 -87
  192. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  193. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -6
  194. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +160 -220
  195. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  196. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
  197. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +77 -54
  198. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  199. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
  200. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
  201. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  202. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
  203. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  204. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
  205. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
  206. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  207. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
  208. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +10 -10
  209. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
  210. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  211. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
  212. package/dist/i18n/en/Employee.Compensation.json.js +68 -56
  213. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  214. package/dist/i18n/en/Employee.Dashboard.json.js +26 -24
  215. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  216. package/dist/i18n/en/Employee.DocumentManager.json.js +1 -1
  217. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
  218. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
  219. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
  220. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
  221. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
  222. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
  223. package/dist/i18n/en/common.json.d.ts +21 -0
  224. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
  225. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  226. package/dist/partner-hook-utils/types.d.ts +4 -0
  227. package/dist/shared/constants.d.ts +4 -0
  228. package/dist/shared/constants.js +20 -18
  229. package/dist/shared/constants.js.map +1 -1
  230. package/dist/style.css +1 -1
  231. package/dist/types/i18next.d.ts +45 -11
  232. package/docs/reference/endpoint-inventory.json +24 -8
  233. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
- import { useMemo as a } from "react";
2
- import { useEmployeesGetSuspense as y } from "@gusto/embedded-api/react-query/employeesGet";
3
- import { useEmployeeAddressesGetSuspense as f } from "@gusto/embedded-api/react-query/employeeAddressesGet";
4
- import { useEmployeeAddressesGetWorkAddressesSuspense as A } from "@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses";
5
- import { composeErrorHandler as g } from "../../../../partner-hook-utils/composeErrorHandler.js";
6
- function F({
7
- employeeId: e
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: e,
11
- include: ["all_compensations"]
12
- }), r = f({ employeeId: e }), o = A({ employeeId: e }), n = s.data.employee, i = r.data.employeeAddressList, d = o.data.employeeWorkAddressesList, u = a(() => i?.find((t) => t.active), [i]), p = a(() => d?.find((t) => t.active), [d]), c = s.isFetching || r.isFetching || o.isFetching, l = !n && c, m = g([s, r, o]);
13
- return l ? {
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: n,
20
- currentHomeAddress: u,
21
- currentWorkAddress: p
16
+ employee: a,
17
+ currentHomeAddress: m,
18
+ currentWorkAddress: c
22
19
  },
23
20
  status: {
24
- isPending: c
21
+ isPending: e.isFetching || s.isFetching || o.isFetching,
22
+ isEmployeeLoading: e.isLoading,
23
+ isHomeAddressLoading: s.isLoading,
24
+ isWorkAddressLoading: o.isLoading
25
25
  },
26
- errorHandling: m
26
+ errorHandling: u([e, s, o])
27
27
  };
28
28
  }
29
29
  export {
30
- F as useEmployeeBasicDetails
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 { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeeAddressesGetSuspense } from '@gusto/embedded-api/react-query/employeeAddressesGet'\nimport { useEmployeeAddressesGetWorkAddressesSuspense } 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 { HookLoadingResult, BaseHookReady } from '@/partner-hook-utils/types'\n\nexport interface UseEmployeeBasicDetailsProps {\n employeeId: string\n}\n\ntype UseEmployeeBasicDetailsReady = BaseHookReady<\n {\n employee: Employee\n currentHomeAddress?: EmployeeAddress\n currentWorkAddress?: EmployeeWorkAddress\n },\n { isPending: boolean }\n>\n\nexport type UseEmployeeBasicDetailsResult = HookLoadingResult | UseEmployeeBasicDetailsReady\n\nexport function useEmployeeBasicDetails({\n employeeId,\n}: UseEmployeeBasicDetailsProps): UseEmployeeBasicDetailsResult {\n const employeeQuery = useEmployeesGetSuspense({\n employeeId,\n include: ['all_compensations'],\n })\n const addressesQuery = useEmployeeAddressesGetSuspense({ employeeId })\n const workAddressesQuery = useEmployeeAddressesGetWorkAddressesSuspense({ employeeId })\n\n const employee = employeeQuery.data.employee\n const employeeAddressList = addressesQuery.data.employeeAddressList\n const employeeWorkAddressesList = workAddressesQuery.data.employeeWorkAddressesList\n\n // Derive current addresses\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 const isPending =\n employeeQuery.isFetching || addressesQuery.isFetching || workAddressesQuery.isFetching\n const isLoading = !employee && isPending\n\n const errorHandling = composeErrorHandler([employeeQuery, addressesQuery, workAddressesQuery])\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\n }\n\n return {\n isLoading: false,\n data: {\n employee: employee!,\n currentHomeAddress,\n currentWorkAddress,\n },\n status: {\n isPending,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeBasicDetails","employeeId","employeeQuery","useEmployeesGetSuspense","addressesQuery","useEmployeeAddressesGetSuspense","workAddressesQuery","useEmployeeAddressesGetWorkAddressesSuspense","employee","employeeAddressList","employeeWorkAddressesList","currentHomeAddress","useMemo","address","currentWorkAddress","isPending","isLoading","errorHandling","composeErrorHandler"],"mappings":";;;;;AAyBO,SAASA,EAAwB;AAAA,EACtC,YAAAC;AACF,GAAgE;AAC9D,QAAMC,IAAgBC,EAAwB;AAAA,IAC5C,YAAAF;AAAA,IACA,SAAS,CAAC,mBAAmB;AAAA,EAAA,CAC9B,GACKG,IAAiBC,EAAgC,EAAE,YAAAJ,GAAY,GAC/DK,IAAqBC,EAA6C,EAAE,YAAAN,GAAY,GAEhFO,IAAWN,EAAc,KAAK,UAC9BO,IAAsBL,EAAe,KAAK,qBAC1CM,IAA4BJ,EAAmB,KAAK,2BAGpDK,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,GAExBK,IACJb,EAAc,cAAcE,EAAe,cAAcE,EAAmB,YACxEU,IAAY,CAACR,KAAYO,GAEzBE,IAAgBC,EAAoB,CAAChB,GAAeE,GAAgBE,CAAkB,CAAC;AAE7F,SAAIU,IACK;AAAA,IACL,WAAW;AAAA,IACX,eAAAC;AAAA,EAAA,IAIG;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,UAAAT;AAAA,MACA,oBAAAG;AAAA,MACA,oBAAAG;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAAC;AAAA,IAAA;AAAA,IAEF,eAAAE;AAAA,EAAA;AAEJ;"}
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, HookLoadingResult, HookSubmitResult } from '../../../../partner-hook-utils/types';
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 UseEmployeeCompensationReady extends BaseHookReady<{
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
- export type UseEmployeeCompensationResult = HookLoadingResult | UseEmployeeCompensationReady;
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 v } from "react";
2
- import { useEmployeesGetSuspense as A } from "@gusto/embedded-api/react-query/employeesGet";
3
- import { useJobsAndCompensationsDeleteCompensationMutation as D } from "@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation";
4
- import { usePayrollsGetPayStubsSuspense as H } from "@gusto/embedded-api/react-query/payrollsGetPayStubs";
5
- import { getPendingCompensationChanges as q } from "../getPendingCompensationChanges.js";
6
- import { derivePrimaryFlsaStatus as w } from "../../Compensation/shared/derivePrimaryFlsaStatus.js";
7
- import { useBaseSubmit as G } from "../../../Base/useBaseSubmit.js";
8
- import { composeErrorHandler as I } from "../../../../partner-hook-utils/composeErrorHandler.js";
9
- import { usePagination as N } from "../../../../hooks/usePagination/usePagination.js";
10
- function T({
11
- employeeId: m
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: g, itemsPerPage: b, getPaginationProps: p } = N({
15
+ const { currentPage: c, itemsPerPage: d, getPaginationProps: m } = D({
14
16
  defaultItemsPerPage: 10
15
- }), i = A({
16
- employeeId: m,
17
- include: ["all_compensations"]
18
- }), s = H({
19
- employeeId: m,
20
- page: g,
21
- per: b
22
- }), o = D(), {
23
- baseSubmitHandler: u,
24
- error: y,
25
- setError: P
26
- } = G("Employee.Dashboard.JobAndPay.Compensation"), e = i.data.employee, r = s.data, t = a(() => e?.jobs ?? [], [e?.jobs]), f = a(() => t.find((n) => n.primary === !0), [t]), h = a(() => w(t), [t]), S = t.length > 1, C = a(
27
- () => q(e?.jobs),
28
- [e?.jobs]
29
- ), E = r.employeePayStubsList || [], F = a(() => {
30
- const n = r.httpMeta.response.headers;
31
- return p(n, s.isFetching);
32
- }, [r.httpMeta.response.headers, s.isFetching, p]), M = o.isPending ? o.variables.request.compensationId : null, j = v(
33
- async (n) => {
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
- }), d;
38
+ }), u;
40
39
  },
41
- [u, o]
42
- ), c = i.isFetching || s.isFetching || o.isPending, J = !e && c, l = I([i, s], {
43
- submitError: y,
44
- setSubmitError: P
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 J ? {
47
- isLoading: !0,
48
- errorHandling: l
49
- } : {
45
+ return {
50
46
  isLoading: !1,
51
47
  data: {
52
48
  jobs: t,
53
- primaryJob: f,
54
- primaryFlsaStatus: h,
55
- hasMultipleJobs: S,
56
- pendingChanges: C,
57
- payStubs: E,
58
- employeeFirstName: e?.firstName ?? void 0
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: c,
62
- cancellingCompensationUuid: M
57
+ isPending: J,
58
+ cancellingCompensationUuid: E,
59
+ isCompensationLoading: o.isLoading,
60
+ isPayStubsLoading: e.isLoading
63
61
  },
64
62
  pagination: {
65
- payStubs: F
63
+ payStubs: S
66
64
  },
67
65
  actions: {
68
- cancelPendingChange: j
66
+ cancelPendingChange: F
69
67
  },
70
- errorHandling: l
68
+ errorHandling: I
71
69
  };
72
70
  }
73
71
  export {
74
- T as useEmployeeCompensation
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 { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useJobsAndCompensationsDeleteCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation'\nimport { usePayrollsGetPayStubsSuspense } 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, HookLoadingResult, 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\ninterface UseEmployeeCompensationReady 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 { isPending: boolean; cancellingCompensationUuid: string | null }\n> {\n pagination: {\n payStubs?: PaginationControlProps\n }\n actions: {\n cancelPendingChange: (\n pendingChange: PendingCompensationChange,\n ) => Promise<HookSubmitResult<unknown> | undefined>\n }\n}\n\nexport type UseEmployeeCompensationResult = HookLoadingResult | UseEmployeeCompensationReady\n\nexport function useEmployeeCompensation({\n employeeId,\n}: UseEmployeeCompensationProps): UseEmployeeCompensationResult {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination({\n defaultItemsPerPage: 10,\n })\n\n const employeeQuery = useEmployeesGetSuspense({\n employeeId,\n include: ['all_compensations'],\n })\n const payStubsQuery = usePayrollsGetPayStubsSuspense({\n employeeId,\n page: currentPage,\n per: itemsPerPage,\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 const payStubsData = payStubsQuery.data\n\n const jobs = useMemo(() => employee?.jobs ?? [], [employee?.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(\n () => getPendingCompensationChanges(employee?.jobs),\n [employee?.jobs],\n )\n\n const payStubs = payStubsData.employeePayStubsList || []\n\n const payStubsPagination = useMemo(() => {\n const headers = payStubsData.httpMeta.response.headers\n return getPaginationProps(headers, payStubsQuery.isFetching)\n }, [payStubsData.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 employeeQuery.isFetching || payStubsQuery.isFetching || cancelCompensationMutation.isPending\n\n const isLoading = !employee && isPending\n\n const errorHandling = composeErrorHandler([employeeQuery, payStubsQuery], {\n submitError,\n setSubmitError,\n })\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\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 },\n pagination: {\n payStubs: payStubsPagination,\n },\n actions: {\n cancelPendingChange,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeCompensation","employeeId","currentPage","itemsPerPage","getPaginationProps","usePagination","employeeQuery","useEmployeesGetSuspense","payStubsQuery","usePayrollsGetPayStubsSuspense","cancelCompensationMutation","useJobsAndCompensationsDeleteCompensationMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","employee","payStubsData","jobs","useMemo","primaryJob","job","primaryFlsaStatus","derivePrimaryFlsaStatus","hasMultipleJobs","pendingChanges","getPendingCompensationChanges","payStubs","payStubsPagination","headers","cancellingCompensationUuid","cancelPendingChange","useCallback","pendingChange","submitResult","compensationUuid","isPending","isLoading","errorHandling","composeErrorHandler"],"mappings":";;;;;;;;;AAoDO,SAASA,EAAwB;AAAA,EACtC,YAAAC;AACF,GAAgE;AAC9D,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAc;AAAA,IACtE,qBAAqB;AAAA,EAAA,CACtB,GAEKC,IAAgBC,EAAwB;AAAA,IAC5C,YAAAN;AAAA,IACA,SAAS,CAAC,mBAAmB;AAAA,EAAA,CAC9B,GACKO,IAAgBC,EAA+B;AAAA,IACnD,YAAAR;AAAA,IACA,MAAMC;AAAA,IACN,KAAKC;AAAA,EAAA,CACN,GACKO,IAA6BC,EAAA,GAC7B;AAAA,IACJ,mBAAAC;AAAA,IACA,OAAOC;AAAA,IACP,UAAUC;AAAA,EAAA,IACRC,EAAc,2CAA2C,GAEvDC,IAAWV,EAAc,KAAK,UAC9BW,IAAeT,EAAc,MAE7BU,IAAOC,EAAQ,MAAMH,GAAU,QAAQ,IAAI,CAACA,GAAU,IAAI,CAAC,GAC3DI,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;AAAA,IACrB,MAAMO,EAA8BV,GAAU,IAAI;AAAA,IAClD,CAACA,GAAU,IAAI;AAAA,EAAA,GAGXW,IAAWV,EAAa,wBAAwB,CAAA,GAEhDW,IAAqBT,EAAQ,MAAM;AACvC,UAAMU,IAAUZ,EAAa,SAAS,SAAS;AAC/C,WAAOb,EAAmByB,GAASrB,EAAc,UAAU;AAAA,EAC7D,GAAG,CAACS,EAAa,SAAS,SAAS,SAAST,EAAc,YAAYJ,CAAkB,CAAC,GAEnF0B,IAA6BpB,EAA2B,YAC1DA,EAA2B,UAAU,QAAQ,iBAC7C,MAEEqB,IAAsBC;AAAA,IAC1B,OACEC,MACmD;AACnD,UAAIC;AACJ,mBAAMtB,EAAkBqB,GAAe,OAAO,EAAE,kBAAAE,QAAuB;AAIrE,QAAAD,IAAe,EAAE,MAAM,UAAU,MAHpB,MAAMxB,EAA2B,YAAY;AAAA,UACxD,SAAS,EAAE,gBAAgByB,EAAA;AAAA,QAAiB,CAC7C,EACgC;AAAA,MACnC,CAAC,GACMD;AAAA,IACT;AAAA,IACA,CAACtB,GAAmBF,CAA0B;AAAA,EAAA,GAG1C0B,IACJ9B,EAAc,cAAcE,EAAc,cAAcE,EAA2B,WAE/E2B,IAAY,CAACrB,KAAYoB,GAEzBE,IAAgBC,EAAoB,CAACjC,GAAeE,CAAa,GAAG;AAAA,IACxE,aAAAK;AAAA,IACA,gBAAAC;AAAA,EAAA,CACD;AAED,SAAIuB,IACK;AAAA,IACL,WAAW;AAAA,IACX,eAAAC;AAAA,EAAA,IAIG;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,MAAApB;AAAA,MACA,YAAAE;AAAA,MACA,mBAAAE;AAAA,MACA,iBAAAE;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAE;AAAA,MACA,mBAAmBX,GAAU,aAAa;AAAA,IAAA;AAAA,IAE5C,QAAQ;AAAA,MACN,WAAAoB;AAAA,MACA,4BAAAN;AAAA,IAAA;AAAA,IAEF,YAAY;AAAA,MACV,UAAUF;AAAA,IAAA;AAAA,IAEZ,SAAS;AAAA,MACP,qBAAAG;AAAA,IAAA;AAAA,IAEF,eAAAO;AAAA,EAAA;AAEJ;"}
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 { HookLoadingResult, BaseHookReady } from '../../../../partner-hook-utils/types';
2
+ import { BaseHookReady } from '../../../../partner-hook-utils/types';
3
3
  export interface UseEmployeeFormsProps {
4
4
  employeeId: string;
5
5
  }
6
- type UseEmployeeFormsReady = BaseHookReady<{
6
+ export type UseEmployeeFormsResult = BaseHookReady<{
7
7
  formList: Form[];
8
8
  }, {
9
9
  isPending: boolean;
10
+ isFormsLoading: boolean;
10
11
  }>;
11
- export type UseEmployeeFormsResult = HookLoadingResult | UseEmployeeFormsReady;
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 { useEmployeeFormsListSuspense as i } from "@gusto/embedded-api/react-query/employeeFormsList";
2
- import { composeErrorHandler as m } from "../../../../partner-hook-utils/composeErrorHandler.js";
3
- function u({ employeeId: e }) {
4
- const o = i({ employeeId: e }), s = o.data.forms, r = o.isFetching, n = !s && r, t = m([o]);
5
- return n ? {
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: s || []
8
+ formList: o.data?.forms ?? []
12
9
  },
13
10
  status: {
14
- isPending: r
11
+ isPending: o.isFetching,
12
+ isFormsLoading: o.isLoading
15
13
  },
16
- errorHandling: t
14
+ errorHandling: i([o])
17
15
  };
18
16
  }
19
17
  export {
20
- u as useEmployeeForms
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 { useEmployeeFormsListSuspense } 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 { HookLoadingResult, BaseHookReady } from '@/partner-hook-utils/types'\n\nexport interface UseEmployeeFormsProps {\n employeeId: string\n}\n\ntype UseEmployeeFormsReady = BaseHookReady<{ formList: Form[] }, { isPending: boolean }>\n\nexport type UseEmployeeFormsResult = HookLoadingResult | UseEmployeeFormsReady\n\nexport function useEmployeeForms({ employeeId }: UseEmployeeFormsProps): UseEmployeeFormsResult {\n const formsQuery = useEmployeeFormsListSuspense({ employeeId })\n\n const formList = formsQuery.data.forms\n\n const isPending = formsQuery.isFetching\n const isLoading = !formList && isPending\n\n const errorHandling = composeErrorHandler([formsQuery])\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\n }\n\n return {\n isLoading: false,\n data: {\n formList: formList || [],\n },\n status: {\n isPending,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeForms","employeeId","formsQuery","useEmployeeFormsListSuspense","formList","isPending","isLoading","errorHandling","composeErrorHandler"],"mappings":";;AAaO,SAASA,EAAiB,EAAE,YAAAC,KAA6D;AAC9F,QAAMC,IAAaC,EAA6B,EAAE,YAAAF,GAAY,GAExDG,IAAWF,EAAW,KAAK,OAE3BG,IAAYH,EAAW,YACvBI,IAAY,CAACF,KAAYC,GAEzBE,IAAgBC,EAAoB,CAACN,CAAU,CAAC;AAEtD,SAAII,IACK;AAAA,IACL,WAAW;AAAA,IACX,eAAAC;AAAA,EAAA,IAIG;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,UAAUH,KAAY,CAAA;AAAA,IAAC;AAAA,IAEzB,QAAQ;AAAA,MACN,WAAAC;AAAA,IAAA;AAAA,IAEF,eAAAE;AAAA,EAAA;AAEJ;"}
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 { HookLoadingResult, BaseHookReady } from '../../../../partner-hook-utils/types';
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 UseEmployeeTaxesReady = BaseHookReady<{
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
- export type UseEmployeeTaxesResult = HookLoadingResult | UseEmployeeTaxesReady;
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 { useEmployeeTaxSetupGetFederalTaxesSuspense as p } from "@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes";
2
- import { useEmployeeTaxSetupGetStateTaxesSuspense as l } from "@gusto/embedded-api/react-query/employeeTaxSetupGetStateTaxes";
3
- import { composeErrorHandler as m } from "../../../../partner-hook-utils/composeErrorHandler.js";
4
- function T({ employeeId: s }) {
5
- const e = p({ employeeUuid: s }), t = l({ employeeUuid: s }), a = e.data.employeeFederalTax, i = t.data.employeeStateTaxesList, o = e.isFetching || t.isFetching, n = !a && o, r = m([e, t]);
6
- return n ? {
7
- isLoading: !0,
8
- errorHandling: r
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: a,
13
- employeeStateTaxesList: i || []
15
+ employeeFederalTax: e.data?.employeeFederalTax,
16
+ employeeStateTaxesList: a.data?.employeeStateTaxesList ?? []
14
17
  },
15
18
  status: {
16
- isPending: o
19
+ isPending: e.isFetching || a.isFetching,
20
+ isFederalTaxesLoading: e.isLoading,
21
+ isStateTaxesLoading: a.isLoading
17
22
  },
18
- errorHandling: r
23
+ errorHandling: o([e, a])
19
24
  };
20
25
  }
21
26
  export {
22
- T as useEmployeeTaxes
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 { useEmployeeTaxSetupGetFederalTaxesSuspense } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupGetStateTaxesSuspense } 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 { HookLoadingResult, BaseHookReady } from '@/partner-hook-utils/types'\n\n// Derive types from operations responses\ntype EmployeeFederalTax = NonNullable<\n GetV1EmployeesEmployeeIdFederalTaxesResponse['employeeFederalTax']\n>\ntype EmployeeStateTax = NonNullable<\n GetV1EmployeesEmployeeIdStateTaxesResponse['employeeStateTaxesList']\n>[number]\n\nexport interface UseEmployeeTaxesProps {\n employeeId: string\n}\n\ntype UseEmployeeTaxesReady = BaseHookReady<\n {\n employeeFederalTax?: EmployeeFederalTax\n employeeStateTaxesList: EmployeeStateTax[]\n },\n { isPending: boolean }\n>\n\nexport type UseEmployeeTaxesResult = HookLoadingResult | UseEmployeeTaxesReady\n\nexport function useEmployeeTaxes({ employeeId }: UseEmployeeTaxesProps): UseEmployeeTaxesResult {\n const federalTaxesQuery = useEmployeeTaxSetupGetFederalTaxesSuspense({ employeeUuid: employeeId })\n const stateTaxesQuery = useEmployeeTaxSetupGetStateTaxesSuspense({ employeeUuid: employeeId })\n\n const employeeFederalTax = federalTaxesQuery.data.employeeFederalTax\n const employeeStateTaxesList = stateTaxesQuery.data.employeeStateTaxesList\n\n const isPending = federalTaxesQuery.isFetching || stateTaxesQuery.isFetching\n const isLoading = !employeeFederalTax && isPending\n\n const errorHandling = composeErrorHandler([federalTaxesQuery, stateTaxesQuery])\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\n }\n\n return {\n isLoading: false,\n data: {\n employeeFederalTax,\n employeeStateTaxesList: employeeStateTaxesList || [],\n },\n status: {\n isPending,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeTaxes","employeeId","federalTaxesQuery","useEmployeeTaxSetupGetFederalTaxesSuspense","stateTaxesQuery","useEmployeeTaxSetupGetStateTaxesSuspense","employeeFederalTax","employeeStateTaxesList","isPending","isLoading","errorHandling","composeErrorHandler"],"mappings":";;;AA6BO,SAASA,EAAiB,EAAE,YAAAC,KAA6D;AAC9F,QAAMC,IAAoBC,EAA2C,EAAE,cAAcF,GAAY,GAC3FG,IAAkBC,EAAyC,EAAE,cAAcJ,GAAY,GAEvFK,IAAqBJ,EAAkB,KAAK,oBAC5CK,IAAyBH,EAAgB,KAAK,wBAE9CI,IAAYN,EAAkB,cAAcE,EAAgB,YAC5DK,IAAY,CAACH,KAAsBE,GAEnCE,IAAgBC,EAAoB,CAACT,GAAmBE,CAAe,CAAC;AAE9E,SAAIK,IACK;AAAA,IACL,WAAW;AAAA,IACX,eAAAC;AAAA,EAAA,IAIG;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,oBAAAJ;AAAA,MACA,wBAAwBC,KAA0B,CAAA;AAAA,IAAC;AAAA,IAErD,QAAQ;AAAA,MACN,WAAAC;AAAA,IAAA;AAAA,IAEF,eAAAE;AAAA,EAAA;AAEJ;"}
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 { SelectHookField as n } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
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(n, { ...e, name: "state" });
6
+ return /* @__PURE__ */ r(t, { ...e, name: "state" });
7
7
  }
8
8
  function f(e) {
9
- return /* @__PURE__ */ r(n, { ...e, name: "fipsCode" });
9
+ return /* @__PURE__ */ r(t, { ...e, name: "fipsCode" });
10
10
  }
11
11
  function c(e) {
12
- return /* @__PURE__ */ r(t, { ...e, name: "caseNumber" });
12
+ return /* @__PURE__ */ r(n, { ...e, name: "caseNumber" });
13
13
  }
14
14
  function l(e) {
15
- return /* @__PURE__ */ r(t, { ...e, name: "orderNumber" });
15
+ return /* @__PURE__ */ r(n, { ...e, name: "orderNumber" });
16
16
  }
17
17
  function F(e) {
18
- return /* @__PURE__ */ r(t, { ...e, name: "remittanceNumber" });
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(n, { ...e, name: "paymentPeriod" });
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 { SelectHookField as o } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
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(i, { ...n, name: "description" });
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(o, { ...n, name: "garnishmentType" });
25
+ return /* @__PURE__ */ e(i, { ...n, name: "garnishmentType" });
26
26
  }
27
27
  export {
28
28
  F as AmountField,
@@ -1,8 +1,24 @@
1
- import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
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
- const [m, n] = t("DocumentListContext");
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
- n as DocumentListProvider,
6
- m as useDocumentList
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":";;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
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" });