@gusto/embedded-react-sdk 0.44.2 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (586) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
  3. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
  4. package/dist/components/Common/UI/Alert/Alert.js +24 -23
  5. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  6. package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
  7. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  8. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
  9. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  10. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  12. package/dist/components/Company/AssignSignatory/Head.js +12 -9
  13. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  16. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
  17. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  18. package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
  19. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  20. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +26 -26
  21. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  22. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  23. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
  24. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  25. package/dist/components/Company/FederalTaxes/Head.js +7 -6
  26. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  27. package/dist/components/Company/Industry/Head.js +10 -9
  28. package/dist/components/Company/Industry/Head.js.map +1 -1
  29. package/dist/components/Company/Industry/IndustrySelect.js +22 -19
  30. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  31. package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
  32. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  33. package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
  34. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  35. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
  36. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  37. package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
  38. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  39. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  40. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
  41. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  42. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
  43. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  44. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
  45. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  46. package/dist/components/Employee/Compensation/index.d.ts +1 -1
  47. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
  48. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +230 -0
  49. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
  50. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
  51. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  52. package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
  53. package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
  54. package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
  55. package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
  56. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
  57. package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
  58. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
  59. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
  60. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
  61. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
  62. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
  63. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
  64. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  65. package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
  66. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
  67. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
  68. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
  69. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
  70. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
  71. package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
  72. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
  73. package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
  74. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
  75. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
  76. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
  77. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
  78. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
  79. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  80. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  81. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
  82. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
  83. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +203 -188
  84. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  85. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  86. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
  87. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +16 -0
  88. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +21 -15
  89. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  90. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +30 -3
  91. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +138 -130
  92. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  93. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +19 -1
  94. package/dist/components/Employee/Dashboard/BasicDetailsView.js +93 -47
  95. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  96. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
  97. package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
  98. package/dist/components/Employee/Dashboard/Dashboard.js +95 -109
  99. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  100. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +19 -0
  101. package/dist/components/Employee/Dashboard/DashboardComponents.js +137 -25
  102. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  103. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
  104. package/dist/components/Employee/Dashboard/DocumentsView.js +34 -20
  105. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  106. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
  107. package/dist/components/Employee/Dashboard/JobAndPayView.js +536 -135
  108. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  109. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +8 -0
  110. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
  111. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
  112. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
  113. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
  114. package/dist/components/Employee/Dashboard/TaxesView.d.ts +19 -1
  115. package/dist/components/Employee/Dashboard/TaxesView.js +92 -56
  116. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  117. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
  118. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +238 -40
  119. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  120. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
  121. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
  122. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
  123. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
  124. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
  125. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -18
  126. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  127. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +26 -10
  128. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +61 -38
  129. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  130. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
  131. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
  132. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
  133. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
  134. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
  135. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
  136. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
  137. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
  138. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
  139. package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
  140. package/dist/components/Employee/Deductions/Deductions.js +25 -52
  141. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  142. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
  143. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
  144. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
  145. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
  146. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
  147. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  148. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
  149. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
  150. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
  151. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
  152. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
  153. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  154. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
  155. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
  156. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  157. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
  158. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  159. package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
  160. package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
  161. package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
  162. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
  163. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
  164. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
  165. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
  166. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
  167. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
  168. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
  169. package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
  170. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
  171. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
  172. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
  173. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
  174. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
  175. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
  176. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
  177. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
  178. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
  179. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
  180. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
  181. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
  182. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
  183. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
  184. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
  185. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
  186. package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
  187. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
  188. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
  189. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
  190. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
  191. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
  192. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
  193. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
  194. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
  195. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
  196. package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
  197. package/dist/components/Employee/Deductions/stateMachine.js +67 -89
  198. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  199. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
  200. package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
  201. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
  202. package/dist/components/Employee/Documents/management/index.d.ts +3 -0
  203. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
  204. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
  205. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
  206. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
  207. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  208. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
  209. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
  210. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
  211. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
  212. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.js +6 -6
  213. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  214. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
  215. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
  216. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
  217. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
  218. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
  219. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
  220. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
  221. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
  222. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
  223. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
  224. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
  225. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
  226. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +13 -13
  227. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
  228. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
  229. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
  230. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  231. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
  232. package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
  233. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
  234. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
  235. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
  236. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
  237. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
  238. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
  239. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +14 -14
  240. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
  241. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
  242. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  243. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  244. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
  245. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
  246. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  247. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
  248. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  249. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  250. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  251. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  252. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
  253. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  254. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
  255. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  256. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
  257. package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
  258. package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
  259. package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
  260. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
  261. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
  262. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
  263. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
  264. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
  265. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
  266. package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
  267. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
  268. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
  269. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
  270. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
  271. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
  272. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
  273. package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
  274. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
  275. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
  276. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
  277. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
  278. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
  279. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
  280. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
  281. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
  282. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
  283. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
  284. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
  285. package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
  286. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
  287. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
  288. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
  289. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
  290. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
  291. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
  292. package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
  293. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
  294. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
  295. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
  296. package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
  297. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
  298. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
  299. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
  300. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
  301. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
  302. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
  303. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
  304. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
  305. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
  306. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
  307. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
  308. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
  309. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
  310. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
  311. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
  312. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
  313. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
  314. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
  315. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
  316. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
  317. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
  318. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
  319. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
  320. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
  321. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
  322. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
  323. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
  324. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
  325. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
  326. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
  327. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
  328. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
  329. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
  330. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
  331. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
  332. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
  333. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  334. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  335. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  336. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  337. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
  338. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  339. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  340. package/dist/components/Employee/Taxes/FederalForm.js +27 -26
  341. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  342. package/dist/components/Employee/Taxes/FederalHead.js +13 -10
  343. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  344. package/dist/components/Employee/Taxes/StateForm.js +17 -14
  345. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  346. package/dist/components/Employee/Taxes/Taxes.js +75 -69
  347. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  348. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
  349. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  350. package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
  351. package/dist/components/Employee/exports/employeeManagement.js +22 -18
  352. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  353. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  354. package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
  355. package/dist/components/Employee/index.d.ts +4 -4
  356. package/dist/components/Employee/index.js +5 -5
  357. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
  358. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  359. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
  360. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  361. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  362. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
  363. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  364. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
  365. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
  366. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  367. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
  368. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  369. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
  370. package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
  371. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  372. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
  373. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  374. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
  375. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
  376. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  377. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  378. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +78 -55
  379. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  380. package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
  381. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
  382. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  383. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
  384. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
  385. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  386. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
  387. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  388. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
  389. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  390. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  391. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
  392. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  393. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  394. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
  395. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  396. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  397. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
  398. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  399. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
  400. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
  401. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
  402. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
  403. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  404. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
  405. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
  406. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  407. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
  408. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  409. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
  410. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  411. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
  412. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  413. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
  414. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
  415. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  416. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
  417. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  418. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
  419. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  420. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
  421. package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
  422. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  423. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
  424. package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
  425. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
  426. package/dist/helpers/formattedStrings.d.ts +12 -0
  427. package/dist/helpers/formattedStrings.js +55 -33
  428. package/dist/helpers/formattedStrings.js.map +1 -1
  429. package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
  430. package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
  431. package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
  432. package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
  433. package/dist/i18n/I18n.js +6 -5
  434. package/dist/i18n/I18n.js.map +1 -1
  435. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  436. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  437. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
  438. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  439. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
  440. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
  441. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
  442. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
  443. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  444. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
  445. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
  446. package/dist/i18n/en/Employee.Compensation.json.js +48 -44
  447. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  448. package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
  449. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  450. package/dist/i18n/en/Employee.Deductions.json.js +104 -76
  451. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  452. package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
  453. package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
  454. package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
  455. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  456. package/dist/i18n/en/common.json.d.ts +14 -0
  457. package/dist/i18n/en/common.json.js +19 -17
  458. package/dist/i18n/en/common.json.js.map +1 -1
  459. package/dist/index.d.ts +16 -6
  460. package/dist/index.js +138 -112
  461. package/dist/index.js.map +1 -1
  462. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
  463. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
  464. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  465. package/dist/shared/constants.d.ts +10 -2
  466. package/dist/shared/constants.js +30 -26
  467. package/dist/shared/constants.js.map +1 -1
  468. package/dist/style.css +1 -1
  469. package/dist/test-utils/assertions.d.ts +16 -0
  470. package/dist/types/i18next.d.ts +161 -5
  471. package/dist/types/sdkError.js +58 -47
  472. package/dist/types/sdkError.js.map +1 -1
  473. package/docs/reference/endpoint-inventory.json +980 -1170
  474. package/package.json +29 -21
  475. package/dist/components/Employee/Compensation/Compensation.js +0 -87
  476. package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
  477. package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
  478. package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
  479. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
  480. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
  481. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
  482. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
  483. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
  484. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
  485. package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
  486. package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
  487. package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
  488. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
  489. package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
  490. package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
  491. package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
  492. package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
  493. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
  494. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
  495. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
  496. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
  497. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
  498. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
  499. package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
  500. package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
  501. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
  502. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
  503. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
  504. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  505. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
  506. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
  507. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  508. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
  509. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
  510. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
  511. package/dist/components/Employee/Deductions/Head.d.ts +0 -1
  512. package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
  513. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
  514. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
  515. package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
  516. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
  517. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
  518. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
  519. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
  520. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
  521. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
  522. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
  523. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
  524. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
  525. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
  526. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
  527. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  528. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  529. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
  530. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
  531. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
  532. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
  533. package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
  534. package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
  535. package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
  536. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
  537. package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
  538. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
  539. package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
  540. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
  541. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
  542. package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
  543. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
  544. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
  545. package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
  546. package/dist/components/Employee/PaymentMethod/Head.js +0 -13
  547. package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
  548. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
  549. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
  550. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
  551. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
  552. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
  553. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
  554. package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
  555. package/dist/components/Employee/PaymentMethod/Split.js +0 -175
  556. package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
  557. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
  558. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
  559. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
  560. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
  561. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
  562. package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
  563. package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
  564. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  565. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
  566. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
  567. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  568. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
  569. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
  570. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
  571. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
  572. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
  573. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
  574. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
  575. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
  576. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
  577. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
  578. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
  579. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
  580. package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
  581. package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +1 -1
  582. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
  583. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
  584. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
  585. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
  586. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
@@ -1,28 +1,44 @@
1
1
  import { Job } from '@gusto/embedded-api/models/components/job';
2
- import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
3
- import { GetV1EmployeesEmployeeIdPaymentMethodResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidpaymentmethod';
4
- import { GetV1EmployeesEmployeeIdBankAccountsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidbankaccounts';
5
2
  import { GetV1EmployeesEmployeeUuidPayStubsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeuuidpaystubs';
6
- import { HookLoadingResult, BaseHookReady } from '../../../../partner-hook-utils/types';
3
+ import { PendingCompensationChange } from '../getPendingCompensationChanges';
4
+ import { BaseHookReady, HookSubmitResult } from '../../../../partner-hook-utils/types';
7
5
  import { PaginationControlProps } from '../../../Common/PaginationControl/PaginationControlTypes';
8
- type EmployeeBankAccount = NonNullable<GetV1EmployeesEmployeeIdBankAccountsResponse['employeeBankAccounts']>[number];
9
6
  type EmployeePayStub = NonNullable<GetV1EmployeesEmployeeUuidPayStubsResponse['employeePayStubsList']>[number];
10
7
  export interface UseEmployeeCompensationProps {
11
8
  employeeId: string;
12
9
  }
13
- interface UseEmployeeCompensationReady extends BaseHookReady<{
10
+ export interface UseEmployeeCompensationResult extends BaseHookReady<{
11
+ jobs: Job[];
14
12
  primaryJob?: Job;
15
- employeePaymentMethod?: NonNullable<GetV1EmployeesEmployeeIdPaymentMethodResponse['employeePaymentMethod']>;
16
- bankAccounts: EmployeeBankAccount[];
17
- garnishmentList: Garnishment[];
13
+ primaryFlsaStatus?: string;
14
+ hasMultipleJobs: boolean;
15
+ pendingChanges: PendingCompensationChange[];
18
16
  payStubs: EmployeePayStub[];
17
+ /** First name from the shared employee fetch; useful for cosmetic copy
18
+ * in alerts (e.g. "Heads up, Jane has pending changes"). Optional
19
+ * because the employee record can omit it. */
20
+ employeeFirstName?: string;
19
21
  }, {
20
22
  isPending: boolean;
23
+ cancellingCompensationUuid: string | null;
24
+ /** Compensation card depends on the employee fetch (jobs, pending
25
+ * changes, FLSA status). */
26
+ isEmployeeLoading: boolean;
27
+ /** Paystubs card depends on a separate paginated endpoint. */
28
+ isPayStubsLoading: boolean;
21
29
  }> {
22
30
  pagination: {
23
31
  payStubs?: PaginationControlProps;
24
32
  };
33
+ actions: {
34
+ cancelPendingChange: (pendingChange: PendingCompensationChange) => Promise<HookSubmitResult<unknown> | undefined>;
35
+ };
25
36
  }
26
- 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
+ */
27
43
  export declare function useEmployeeCompensation({ employeeId, }: UseEmployeeCompensationProps): UseEmployeeCompensationResult;
28
44
  export {};
@@ -1,52 +1,75 @@
1
- import { useMemo as u } from "react";
2
- import { useEmployeesGetSuspense as L } from "@gusto/embedded-api/react-query/employeesGet";
3
- import { useEmployeePaymentMethodGetSuspense as k } from "@gusto/embedded-api/react-query/employeePaymentMethodGet";
4
- import { useEmployeePaymentMethodsGetBankAccountsSuspense as A } from "@gusto/embedded-api/react-query/employeePaymentMethodsGetBankAccounts";
5
- import { useGarnishmentsListSuspense as E } from "@gusto/embedded-api/react-query/garnishmentsList";
6
- import { usePayrollsGetPayStubsSuspense as G } from "@gusto/embedded-api/react-query/payrollsGetPayStubs";
7
- import { composeErrorHandler as Q } from "../../../../partner-hook-utils/composeErrorHandler.js";
8
- import { usePagination as j } from "../../../../hooks/usePagination/usePagination.js";
9
- function w({
10
- employeeId: e
1
+ import { useMemo as a, useCallback as j } from "react";
2
+ import { useEmployeesGet as v } from "@gusto/embedded-api/react-query/employeesGet";
3
+ import { useJobsAndCompensationsDeleteCompensationMutation as I } from "@gusto/embedded-api/react-query/jobsAndCompensationsDeleteCompensation";
4
+ import { usePayrollsGetPayStubs as J } from "@gusto/embedded-api/react-query/payrollsGetPayStubs";
5
+ import { getPendingCompensationChanges as A } from "../getPendingCompensationChanges.js";
6
+ import { derivePrimaryFlsaStatus as H } from "../../Compensation/shared/derivePrimaryFlsaStatus.js";
7
+ import { useBaseSubmit as q } from "../../../Base/useBaseSubmit.js";
8
+ import { composeErrorHandler as w } from "../../../../partner-hook-utils/composeErrorHandler.js";
9
+ import { usePagination as D } from "../../../../hooks/usePagination/usePagination.js";
10
+ function z({
11
+ employeeId: r
11
12
  }) {
12
- const { currentPage: h, itemsPerPage: d, getPaginationProps: p } = j({
13
+ const { currentPage: c, itemsPerPage: d, getPaginationProps: m } = D({
13
14
  defaultItemsPerPage: 10
14
- }), s = L({ employeeId: e }), n = k({ employeeId: e }), o = A({ employeeId: e }), a = E({ employeeId: e }), t = G({
15
- employeeId: e,
16
- page: h,
17
- per: d
18
- }), r = s.data.employee, P = n.data.employeePaymentMethod, c = o.data, l = a.data.garnishments, i = t.data, b = u(() => r?.jobs?.find((m) => m.primary === !0), [r?.jobs]), f = u(() => c.employeeBankAccounts || [], [c]), S = i.employeePayStubsList || [], M = u(() => {
19
- const m = i.httpMeta.response.headers;
20
- return p(m, t.isFetching);
21
- }, [i.httpMeta.response.headers, t.isFetching, p]), y = s.isFetching || n.isFetching || o.isFetching || a.isFetching || t.isFetching, F = !r && y, g = Q([
22
- s,
23
- n,
24
- o,
25
- a,
26
- t
27
- ]);
28
- return F ? {
29
- isLoading: !0,
30
- errorHandling: g
31
- } : {
15
+ }), i = v(
16
+ { employeeId: r, include: ["all_compensations"] },
17
+ { staleTime: 1 / 0 }
18
+ ), e = J(
19
+ { employeeId: r, page: c, per: d },
20
+ { staleTime: 1 / 0 }
21
+ ), o = I(), {
22
+ baseSubmitHandler: p,
23
+ error: l,
24
+ setError: g
25
+ } = q("Employee.Dashboard.JobAndPay.Compensation"), n = i.data?.employee, t = a(() => n?.jobs ?? [], [n?.jobs]), y = a(() => t.find((s) => s.primary === !0), [t]), b = a(() => H(t), [t]), P = t.length > 1, f = a(
26
+ () => A(n?.jobs),
27
+ [n?.jobs]
28
+ ), h = e.data?.employeePayStubsList ?? [], S = a(() => {
29
+ const s = e.data?.httpMeta.response.headers;
30
+ if (s)
31
+ return m(s, e.isFetching);
32
+ }, [e.data?.httpMeta.response.headers, e.isFetching, m]), C = o.isPending ? o.variables.request.compensationId : null, E = j(
33
+ async (s) => {
34
+ let u;
35
+ return await p(s, async ({ compensationUuid: M }) => {
36
+ u = { mode: "update", data: await o.mutateAsync({
37
+ request: { compensationId: M }
38
+ }) };
39
+ }), u;
40
+ },
41
+ [p, o]
42
+ ), F = i.isFetching || e.isFetching || o.isPending, L = w([i, e], {
43
+ submitError: l,
44
+ setSubmitError: g
45
+ });
46
+ return {
32
47
  isLoading: !1,
33
48
  data: {
34
- primaryJob: b,
35
- employeePaymentMethod: P || void 0,
36
- bankAccounts: f,
37
- garnishmentList: l || [],
38
- payStubs: S
49
+ jobs: t,
50
+ primaryJob: y,
51
+ primaryFlsaStatus: b,
52
+ hasMultipleJobs: P,
53
+ pendingChanges: f,
54
+ payStubs: h,
55
+ employeeFirstName: n?.firstName ?? void 0
39
56
  },
40
57
  status: {
41
- isPending: y
58
+ isPending: F,
59
+ cancellingCompensationUuid: C,
60
+ isEmployeeLoading: i.isLoading,
61
+ isPayStubsLoading: e.isLoading
42
62
  },
43
63
  pagination: {
44
- payStubs: M
64
+ payStubs: S
65
+ },
66
+ actions: {
67
+ cancelPendingChange: E
45
68
  },
46
- errorHandling: g
69
+ errorHandling: L
47
70
  };
48
71
  }
49
72
  export {
50
- w as useEmployeeCompensation
73
+ z as useEmployeeCompensation
51
74
  };
52
75
  //# sourceMappingURL=useEmployeeCompensation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEmployeeCompensation.js","sources":["../../../../../src/components/Employee/Dashboard/hooks/useEmployeeCompensation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeePaymentMethodGetSuspense } from '@gusto/embedded-api/react-query/employeePaymentMethodGet'\nimport { useEmployeePaymentMethodsGetBankAccountsSuspense } from '@gusto/embedded-api/react-query/employeePaymentMethodsGetBankAccounts'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport { usePayrollsGetPayStubsSuspense } from '@gusto/embedded-api/react-query/payrollsGetPayStubs'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport type { GetV1EmployeesEmployeeIdPaymentMethodResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidpaymentmethod'\nimport type { GetV1EmployeesEmployeeIdBankAccountsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeidbankaccounts'\nimport type { GetV1EmployeesEmployeeUuidPayStubsResponse } from '@gusto/embedded-api/models/operations/getv1employeesemployeeuuidpaystubs'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport type { HookLoadingResult, BaseHookReady } from '@/partner-hook-utils/types'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n// Derive types from operations responses\ntype EmployeeBankAccount = NonNullable<\n GetV1EmployeesEmployeeIdBankAccountsResponse['employeeBankAccounts']\n>[number]\ntype EmployeePayStub = NonNullable<\n GetV1EmployeesEmployeeUuidPayStubsResponse['employeePayStubsList']\n>[number]\n\nexport interface UseEmployeeCompensationProps {\n employeeId: string\n}\n\ninterface UseEmployeeCompensationReady extends BaseHookReady<\n {\n primaryJob?: Job\n employeePaymentMethod?: NonNullable<\n GetV1EmployeesEmployeeIdPaymentMethodResponse['employeePaymentMethod']\n >\n bankAccounts: EmployeeBankAccount[]\n garnishmentList: Garnishment[]\n payStubs: EmployeePayStub[]\n },\n { isPending: boolean }\n> {\n pagination: {\n payStubs?: PaginationControlProps\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({ employeeId })\n const paymentMethodQuery = useEmployeePaymentMethodGetSuspense({ employeeId })\n const bankAccountsQuery = useEmployeePaymentMethodsGetBankAccountsSuspense({ employeeId })\n const garnishmentsQuery = useGarnishmentsListSuspense({ employeeId })\n const payStubsQuery = usePayrollsGetPayStubsSuspense({\n employeeId,\n page: currentPage,\n per: itemsPerPage,\n })\n\n const employee = employeeQuery.data.employee\n const employeePaymentMethod = paymentMethodQuery.data.employeePaymentMethod\n const bankAccountsData = bankAccountsQuery.data\n const garnishmentList = garnishmentsQuery.data.garnishments\n const payStubsData = payStubsQuery.data\n\n // Derive primary job\n const primaryJob = useMemo(() => {\n return employee?.jobs?.find(job => job.primary === true)\n }, [employee?.jobs])\n\n // Derive bank accounts\n const bankAccounts = useMemo(() => {\n return bankAccountsData.employeeBankAccounts || []\n }, [bankAccountsData])\n\n // Extract paystubs from response\n const payStubs = payStubsData.employeePayStubsList || []\n\n // Extract pagination from API response headers\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 isPending =\n employeeQuery.isFetching ||\n paymentMethodQuery.isFetching ||\n bankAccountsQuery.isFetching ||\n garnishmentsQuery.isFetching ||\n payStubsQuery.isFetching\n\n const isLoading = !employee && isPending\n\n const errorHandling = composeErrorHandler([\n employeeQuery,\n paymentMethodQuery,\n bankAccountsQuery,\n garnishmentsQuery,\n payStubsQuery,\n ])\n\n if (isLoading) {\n return {\n isLoading: true,\n errorHandling,\n }\n }\n\n return {\n isLoading: false,\n data: {\n primaryJob,\n employeePaymentMethod: employeePaymentMethod || undefined,\n bankAccounts,\n garnishmentList: garnishmentList || [],\n payStubs,\n },\n status: {\n isPending,\n },\n pagination: {\n payStubs: payStubsPagination,\n },\n errorHandling,\n }\n}\n"],"names":["useEmployeeCompensation","employeeId","currentPage","itemsPerPage","getPaginationProps","usePagination","employeeQuery","useEmployeesGetSuspense","paymentMethodQuery","useEmployeePaymentMethodGetSuspense","bankAccountsQuery","useEmployeePaymentMethodsGetBankAccountsSuspense","garnishmentsQuery","useGarnishmentsListSuspense","payStubsQuery","usePayrollsGetPayStubsSuspense","employee","employeePaymentMethod","bankAccountsData","garnishmentList","payStubsData","primaryJob","useMemo","job","bankAccounts","payStubs","payStubsPagination","headers","isPending","isLoading","errorHandling","composeErrorHandler"],"mappings":";;;;;;;;AA+CO,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,EAAE,YAAAN,GAAY,GACtDO,IAAqBC,EAAoC,EAAE,YAAAR,GAAY,GACvES,IAAoBC,EAAiD,EAAE,YAAAV,GAAY,GACnFW,IAAoBC,EAA4B,EAAE,YAAAZ,GAAY,GAC9Da,IAAgBC,EAA+B;AAAA,IACnD,YAAAd;AAAA,IACA,MAAMC;AAAA,IACN,KAAKC;AAAA,EAAA,CACN,GAEKa,IAAWV,EAAc,KAAK,UAC9BW,IAAwBT,EAAmB,KAAK,uBAChDU,IAAmBR,EAAkB,MACrCS,IAAkBP,EAAkB,KAAK,cACzCQ,IAAeN,EAAc,MAG7BO,IAAaC,EAAQ,MAClBN,GAAU,MAAM,KAAK,CAAAO,MAAOA,EAAI,YAAY,EAAI,GACtD,CAACP,GAAU,IAAI,CAAC,GAGbQ,IAAeF,EAAQ,MACpBJ,EAAiB,wBAAwB,CAAA,GAC/C,CAACA,CAAgB,CAAC,GAGfO,IAAWL,EAAa,wBAAwB,CAAA,GAGhDM,IAAqBJ,EAAQ,MAAM;AACvC,UAAMK,IAAUP,EAAa,SAAS,SAAS;AAC/C,WAAOhB,EAAmBuB,GAASb,EAAc,UAAU;AAAA,EAC7D,GAAG,CAACM,EAAa,SAAS,SAAS,SAASN,EAAc,YAAYV,CAAkB,CAAC,GAEnFwB,IACJtB,EAAc,cACdE,EAAmB,cACnBE,EAAkB,cAClBE,EAAkB,cAClBE,EAAc,YAEVe,IAAY,CAACb,KAAYY,GAEzBE,IAAgBC,EAAoB;AAAA,IACxCzB;AAAA,IACAE;AAAA,IACAE;AAAA,IACAE;AAAA,IACAE;AAAA,EAAA,CACD;AAED,SAAIe,IACK;AAAA,IACL,WAAW;AAAA,IACX,eAAAC;AAAA,EAAA,IAIG;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,YAAAT;AAAA,MACA,uBAAuBJ,KAAyB;AAAA,MAChD,cAAAO;AAAA,MACA,iBAAiBL,KAAmB,CAAA;AAAA,MACpC,UAAAM;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAAG;AAAA,IAAA;AAAA,IAEF,YAAY;AAAA,MACV,UAAUF;AAAA,IAAA;AAAA,IAEZ,eAAAI;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 { 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 employee fetch (jobs, pending\n * changes, FLSA status). */\n isEmployeeLoading: 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 const employeeQuery = useEmployeesGet(\n { employeeId, include: ['all_compensations'] },\n { staleTime: Infinity },\n )\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(() => 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 = 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 employeeQuery.isFetching || payStubsQuery.isFetching || cancelCompensationMutation.isPending\n\n const errorHandling = composeErrorHandler([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 isEmployeeLoading: employeeQuery.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","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":";;;;;;;;;AAgEO,SAASA,EAAwB;AAAA,EACtC,YAAAC;AACF,GAAgE;AAC9D,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAc;AAAA,IACtE,qBAAqB;AAAA,EAAA,CACtB,GAMKC,IAAgBC;AAAA,IACpB,EAAE,YAAAN,GAAY,SAAS,CAAC,mBAAmB,EAAA;AAAA,IAC3C,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBO,IAAgBC;AAAA,IACpB,EAAE,YAAAR,GAAY,MAAMC,GAAa,KAAKC,EAAA;AAAA,IACtC,EAAE,WAAW,MAAA;AAAA,EAAS,GAElBO,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,GAAU,QAAQ,IAAI,CAACA,GAAU,IAAI,CAAC,GAC3DG,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,EAA8BT,GAAU,IAAI;AAAA,IAClD,CAACA,GAAU,IAAI;AAAA,EAAA,GAGXU,IAAWlB,EAAc,MAAM,wBAAwB,CAAA,GAEvDmB,IAAqBT,EAAQ,MAAM;AACvC,UAAMU,IAAUpB,EAAc,MAAM,SAAS,SAAS;AACtD,QAAKoB;AACL,aAAOxB,EAAmBwB,GAASpB,EAAc,UAAU;AAAA,EAC7D,GAAG,CAACA,EAAc,MAAM,SAAS,SAAS,SAASA,EAAc,YAAYJ,CAAkB,CAAC,GAE1FyB,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,IACJ7B,EAAc,cAAcE,EAAc,cAAcE,EAA2B,WAE/E0B,IAAgBC,EAAoB,CAAC/B,GAAeE,CAAa,GAAG;AAAA,IACxE,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,mBAAmBvB,EAAc;AAAA,MACjC,mBAAmBE,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;"}
@@ -0,0 +1,8 @@
1
+ import { PendingChangeDetail } from './getPendingCompensationChanges';
2
+ /**
3
+ * Renders a single `PendingChangeDetail` produced by `getPendingCompensationChanges`
4
+ * into the user-facing bullet string. Resolves FLSA enum values to their human
5
+ * labels via the Compensation namespace and formats pay/min-wage rates with the
6
+ * shared `useFormatPayRate` helper so the copy matches the form.
7
+ */
8
+ export declare function usePendingChangeDetailRenderer(employeeFirstName: string | null | undefined): (detail: PendingChangeDetail) => string;
@@ -0,0 +1,61 @@
1
+ import { useTranslation as g } from "react-i18next";
2
+ import { useFormatCompensationRate as p } from "../../../helpers/formattedStrings.js";
3
+ function c(r) {
4
+ const { t: e } = g("Employee.Dashboard"), { t: m } = g("Employee.Compensation"), t = p(), o = r ?? "";
5
+ return (n) => {
6
+ const a = { interpolation: { escapeValue: !1 } };
7
+ switch (n.kind) {
8
+ case "titleChange":
9
+ return e("jobAndPay.compensation.pendingChange.details.titleChange", {
10
+ title: n.title,
11
+ ...a
12
+ });
13
+ case "payChange":
14
+ return e("jobAndPay.compensation.pendingChange.details.payChange", {
15
+ formattedRate: t(n.rate, n.paymentUnit),
16
+ ...a
17
+ });
18
+ case "flsaChange":
19
+ return e("jobAndPay.compensation.pendingChange.details.flsaChange", {
20
+ flsaLabel: m(`flsaStatusLabels.${n.flsaStatus}`),
21
+ ...a
22
+ });
23
+ case "newJob": {
24
+ const i = n.rate !== null && n.paymentUnit !== null, s = i ? t(n.rate, n.paymentUnit) : null;
25
+ return n.title && i ? e("jobAndPay.compensation.pendingChange.details.newJob", {
26
+ name: o,
27
+ title: n.title,
28
+ formattedRate: s,
29
+ ...a
30
+ }) : i ? e("jobAndPay.compensation.pendingChange.details.newJobNoTitle", {
31
+ name: o,
32
+ formattedRate: s,
33
+ ...a
34
+ }) : n.title ? e("jobAndPay.compensation.pendingChange.details.newJobNoRate", {
35
+ name: o,
36
+ title: n.title,
37
+ ...a
38
+ }) : e("jobAndPay.compensation.pendingChange.details.newJobMinimal", {
39
+ name: o,
40
+ ...a
41
+ });
42
+ }
43
+ case "minWageEnabled":
44
+ return n.wage ? e("jobAndPay.compensation.pendingChange.details.minWageEnabled", {
45
+ formattedWage: t(Number(n.wage), "Hour"),
46
+ ...a
47
+ }) : e("jobAndPay.compensation.pendingChange.details.minWageEnabledNoRate");
48
+ case "minWageDisabled":
49
+ return e("jobAndPay.compensation.pendingChange.details.minWageDisabled");
50
+ case "minWageChanged":
51
+ return n.wage ? e("jobAndPay.compensation.pendingChange.details.minWageChanged", {
52
+ formattedWage: t(Number(n.wage), "Hour"),
53
+ ...a
54
+ }) : e("jobAndPay.compensation.pendingChange.details.minWageChangedNoRate");
55
+ }
56
+ };
57
+ }
58
+ export {
59
+ c as usePendingChangeDetailRenderer
60
+ };
61
+ //# sourceMappingURL=usePendingChangeDetailRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePendingChangeDetailRenderer.js","sources":["../../../../src/components/Employee/Dashboard/usePendingChangeDetailRenderer.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { PendingChangeDetail } from './getPendingCompensationChanges'\nimport { useFormatCompensationRate } from '@/helpers/formattedStrings'\n\n/**\n * Renders a single `PendingChangeDetail` produced by `getPendingCompensationChanges`\n * into the user-facing bullet string. Resolves FLSA enum values to their human\n * labels via the Compensation namespace and formats pay/min-wage rates with the\n * shared `useFormatPayRate` helper so the copy matches the form.\n */\nexport function usePendingChangeDetailRenderer(employeeFirstName: string | null | undefined) {\n const { t: tDashboard } = useTranslation('Employee.Dashboard')\n const { t: tCompensation } = useTranslation('Employee.Compensation')\n const formatCompensationRate = useFormatCompensationRate()\n const name = employeeFirstName ?? ''\n\n return (detail: PendingChangeDetail): string => {\n const interpolation = { interpolation: { escapeValue: false } }\n switch (detail.kind) {\n case 'titleChange':\n return tDashboard('jobAndPay.compensation.pendingChange.details.titleChange', {\n title: detail.title,\n ...interpolation,\n })\n case 'payChange':\n return tDashboard('jobAndPay.compensation.pendingChange.details.payChange', {\n formattedRate: formatCompensationRate(detail.rate, detail.paymentUnit),\n ...interpolation,\n })\n case 'flsaChange':\n return tDashboard('jobAndPay.compensation.pendingChange.details.flsaChange', {\n flsaLabel: tCompensation(`flsaStatusLabels.${detail.flsaStatus}`),\n ...interpolation,\n })\n case 'newJob': {\n const hasRate = detail.rate !== null && detail.paymentUnit !== null\n const formattedRate = hasRate\n ? formatCompensationRate(detail.rate!, detail.paymentUnit!)\n : null\n if (detail.title && hasRate) {\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJob', {\n name,\n title: detail.title,\n formattedRate,\n ...interpolation,\n })\n }\n if (hasRate) {\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJobNoTitle', {\n name,\n formattedRate,\n ...interpolation,\n })\n }\n if (detail.title) {\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJobNoRate', {\n name,\n title: detail.title,\n ...interpolation,\n })\n }\n return tDashboard('jobAndPay.compensation.pendingChange.details.newJobMinimal', {\n name,\n ...interpolation,\n })\n }\n case 'minWageEnabled':\n return detail.wage\n ? tDashboard('jobAndPay.compensation.pendingChange.details.minWageEnabled', {\n formattedWage: formatCompensationRate(Number(detail.wage), 'Hour'),\n ...interpolation,\n })\n : tDashboard('jobAndPay.compensation.pendingChange.details.minWageEnabledNoRate')\n case 'minWageDisabled':\n return tDashboard('jobAndPay.compensation.pendingChange.details.minWageDisabled')\n case 'minWageChanged':\n return detail.wage\n ? tDashboard('jobAndPay.compensation.pendingChange.details.minWageChanged', {\n formattedWage: formatCompensationRate(Number(detail.wage), 'Hour'),\n ...interpolation,\n })\n : tDashboard('jobAndPay.compensation.pendingChange.details.minWageChangedNoRate')\n }\n }\n}\n"],"names":["usePendingChangeDetailRenderer","employeeFirstName","tDashboard","useTranslation","tCompensation","formatCompensationRate","useFormatCompensationRate","name","detail","interpolation","hasRate","formattedRate"],"mappings":";;AAUO,SAASA,EAA+BC,GAA8C;AAC3F,QAAM,EAAE,GAAGC,MAAeC,EAAe,oBAAoB,GACvD,EAAE,GAAGC,MAAkBD,EAAe,uBAAuB,GAC7DE,IAAyBC,EAAA,GACzBC,IAAON,KAAqB;AAElC,SAAO,CAACO,MAAwC;AAC9C,UAAMC,IAAgB,EAAE,eAAe,EAAE,aAAa,KAAM;AAC5D,YAAQD,EAAO,MAAA;AAAA,MACb,KAAK;AACH,eAAON,EAAW,4DAA4D;AAAA,UAC5E,OAAOM,EAAO;AAAA,UACd,GAAGC;AAAA,QAAA,CACJ;AAAA,MACH,KAAK;AACH,eAAOP,EAAW,0DAA0D;AAAA,UAC1E,eAAeG,EAAuBG,EAAO,MAAMA,EAAO,WAAW;AAAA,UACrE,GAAGC;AAAA,QAAA,CACJ;AAAA,MACH,KAAK;AACH,eAAOP,EAAW,2DAA2D;AAAA,UAC3E,WAAWE,EAAc,oBAAoBI,EAAO,UAAU,EAAE;AAAA,UAChE,GAAGC;AAAA,QAAA,CACJ;AAAA,MACH,KAAK,UAAU;AACb,cAAMC,IAAUF,EAAO,SAAS,QAAQA,EAAO,gBAAgB,MACzDG,IAAgBD,IAClBL,EAAuBG,EAAO,MAAOA,EAAO,WAAY,IACxD;AACJ,eAAIA,EAAO,SAASE,IACXR,EAAW,uDAAuD;AAAA,UACvE,MAAAK;AAAA,UACA,OAAOC,EAAO;AAAA,UACd,eAAAG;AAAA,UACA,GAAGF;AAAA,QAAA,CACJ,IAECC,IACKR,EAAW,8DAA8D;AAAA,UAC9E,MAAAK;AAAA,UACA,eAAAI;AAAA,UACA,GAAGF;AAAA,QAAA,CACJ,IAECD,EAAO,QACFN,EAAW,6DAA6D;AAAA,UAC7E,MAAAK;AAAA,UACA,OAAOC,EAAO;AAAA,UACd,GAAGC;AAAA,QAAA,CACJ,IAEIP,EAAW,8DAA8D;AAAA,UAC9E,MAAAK;AAAA,UACA,GAAGE;AAAA,QAAA,CACJ;AAAA,MACH;AAAA,MACA,KAAK;AACH,eAAOD,EAAO,OACVN,EAAW,+DAA+D;AAAA,UACxE,eAAeG,EAAuB,OAAOG,EAAO,IAAI,GAAG,MAAM;AAAA,UACjE,GAAGC;AAAA,QAAA,CACJ,IACDP,EAAW,mEAAmE;AAAA,MACpF,KAAK;AACH,eAAOA,EAAW,8DAA8D;AAAA,MAClF,KAAK;AACH,eAAOM,EAAO,OACVN,EAAW,+DAA+D;AAAA,UACxE,eAAeG,EAAuB,OAAOG,EAAO,IAAI,GAAG,MAAM;AAAA,UACjE,GAAGC;AAAA,QAAA,CACJ,IACDP,EAAW,mEAAmE;AAAA,IAAA;AAAA,EAExF;AACF;"}
@@ -1,11 +1,5 @@
1
- import { BaseComponentInterface } from '../../Base';
1
+ import { BaseComponentInterface } from '../../Base/Base';
2
2
  export interface DeductionsProps extends BaseComponentInterface<'Employee.Deductions'> {
3
3
  employeeId: string;
4
4
  }
5
- export declare function Deductions(props: DeductionsProps): import("react/jsx-runtime").JSX.Element;
6
- export declare namespace Deductions {
7
- var IncludeDeductions: typeof import("./IncludeDeductions/IncludeDeductions").IncludeDeductions;
8
- var DeductionsForm: typeof import("./DeductionsForm/DeductionsForm").DeductionsForm;
9
- var DeductionsList: typeof import("./DeductionsList/DeductionsList").DeductionsList;
10
- }
11
- export declare const DeductionsContextual: () => import("react/jsx-runtime").JSX.Element;
5
+ export declare function Deductions({ employeeId, dictionary, onEvent }: DeductionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,59 +1,32 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useTranslation as l } from "react-i18next";
3
- import { createMachine as D } from "robot3";
4
- import { useGarnishmentsListSuspense as f } from "@gusto/embedded-api/react-query/garnishmentsList";
5
- import { useMemo as d } from "react";
6
- import { DeductionsListContextual as h, IncludeDeductionsFormContextual as w } from "./DeductionsComponents.js";
7
- import { deductionsStateMachine as x } from "./stateMachine.js";
8
- import { DeductionsForm as C } from "./DeductionsForm/DeductionsForm.js";
9
- import { DeductionsList as F } from "./DeductionsList/DeductionsList.js";
10
- import { IncludeDeductions as g } from "./IncludeDeductions/IncludeDeductions.js";
11
- import { Flow as v } from "../../Flow/Flow.js";
12
- import { BaseComponent as E } from "../../Base/Base.js";
13
- import "../../Base/useBase.js";
14
- import { useComponentDictionary as I } from "../../../i18n/I18n.js";
15
- import { useFlow as L } from "../../Flow/useFlow.js";
16
- function M({ employeeId: o, onEvent: i, dictionary: r }) {
17
- I("Employee.Deductions", r);
18
- const { data: a } = f({ employeeId: o }), c = a.garnishments.filter((s) => s.active), t = d(
19
- () => c.length > 0,
20
- [c.length]
21
- ), m = t ? "viewDeductions" : "includeDeductions", u = t ? h : w, p = d(
22
- () => D(
23
- m,
24
- x,
25
- (s) => ({
26
- ...s,
27
- component: u,
28
- employeeId: o,
29
- currentDeductionId: null,
30
- hasExistingDeductions: t
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { createMachine as c } from "robot3";
3
+ import { useMemo as u } from "react";
4
+ import { useGarnishmentsListSuspense as a } from "@gusto/embedded-api/react-query/garnishmentsList";
5
+ import { DeductionsListContextual as p, IncludeDeductionsContextual as d } from "./deductionsContextualComponents.js";
6
+ import { deductionsMachine as f } from "./stateMachine.js";
7
+ import { Flow as D } from "../../Flow/Flow.js";
8
+ import { BaseBoundaries as l } from "../../Base/Base.js";
9
+ import { useComponentDictionary as h, useI18n as x } from "../../../i18n/I18n.js";
10
+ function A({ employeeId: o, dictionary: t, onEvent: e }) {
11
+ return /* @__PURE__ */ s(l, { componentName: "Employee.Deductions", children: /* @__PURE__ */ s(C, { employeeId: o, dictionary: t, onEvent: e }) });
12
+ }
13
+ function C({ employeeId: o, dictionary: t, onEvent: e }) {
14
+ h("Employee.Deductions", t), x("Employee.Deductions");
15
+ const { data: r } = a({ employeeId: o }), n = (r.garnishments ?? []).some((i) => i.active), m = u(
16
+ () => c(
17
+ n ? "list" : "include",
18
+ f,
19
+ (i) => ({
20
+ ...i,
21
+ component: n ? p : d,
22
+ employeeId: o
31
23
  })
32
24
  ),
33
- [m, u, o, t]
25
+ [o, n]
34
26
  );
35
- return /* @__PURE__ */ n(v, { machine: p, onEvent: i });
36
- }
37
- function e(o) {
38
- return /* @__PURE__ */ n(E, { ...o, children: /* @__PURE__ */ n(M, { ...o }) });
27
+ return /* @__PURE__ */ s(D, { machine: m, onEvent: e });
39
28
  }
40
- const N = () => {
41
- const { employeeId: o, onEvent: i } = L(), { t: r } = l("common");
42
- if (!o)
43
- throw new Error(
44
- r("errors.missingParamsOrContext", {
45
- component: "Deductions",
46
- param: "employeeId",
47
- provider: "FlowProvider"
48
- })
49
- );
50
- return /* @__PURE__ */ n(e, { employeeId: o, onEvent: i });
51
- };
52
- e.IncludeDeductions = g;
53
- e.DeductionsForm = C;
54
- e.DeductionsList = F;
55
29
  export {
56
- e as Deductions,
57
- N as DeductionsContextual
30
+ A as Deductions
58
31
  };
59
32
  //# sourceMappingURL=Deductions.js.map