@gusto/embedded-react-sdk 0.44.1 → 0.45.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 (604) hide show
  1. package/CHANGELOG.md +63 -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/CreateSignatory/useCreateSignatory.js +4 -20
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/Head.js +12 -9
  15. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -20
  19. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -22
  21. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  22. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
  23. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  24. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -20
  25. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  26. package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
  27. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  28. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -20
  29. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  30. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +28 -28
  31. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  32. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
  33. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  34. package/dist/components/Company/FederalTaxes/Head.js +7 -6
  35. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  36. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -28
  37. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  38. package/dist/components/Company/Industry/Context.js +7 -23
  39. package/dist/components/Company/Industry/Context.js.map +1 -1
  40. package/dist/components/Company/Industry/Head.js +10 -9
  41. package/dist/components/Company/Industry/Head.js.map +1 -1
  42. package/dist/components/Company/Industry/IndustrySelect.js +22 -19
  43. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  44. package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
  45. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -20
  47. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  48. package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
  49. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  50. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
  51. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  52. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -20
  53. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  54. package/dist/components/Company/OnboardingOverview/context.js +4 -20
  55. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  56. package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
  57. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  58. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -20
  59. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  60. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -20
  61. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  62. package/dist/components/Contractor/Address/useAddress.js +6 -22
  63. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  64. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
  65. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  66. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
  67. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  68. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
  69. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  70. package/dist/components/Contractor/Profile/useContractorProfile.js +42 -52
  71. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  72. package/dist/components/Employee/Compensation/index.d.ts +1 -1
  73. package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
  74. package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
  75. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
  76. package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
  77. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
  78. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
  79. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
  80. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
  81. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
  82. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
  83. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  84. package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
  85. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
  86. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
  87. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
  88. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
  89. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
  90. package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
  91. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
  92. package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
  93. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
  94. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
  95. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
  96. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
  97. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
  98. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  99. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
  100. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
  101. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +193 -181
  102. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  103. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
  104. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
  105. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +14 -13
  106. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  107. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +19 -2
  108. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +133 -130
  109. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  110. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
  111. package/dist/components/Employee/Dashboard/BasicDetailsView.js +87 -65
  112. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
  114. package/dist/components/Employee/Dashboard/Dashboard.js +89 -109
  115. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +15 -0
  117. package/dist/components/Employee/Dashboard/DashboardComponents.js +120 -25
  118. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  119. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
  120. package/dist/components/Employee/Dashboard/DocumentsView.js +24 -17
  121. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  122. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
  123. package/dist/components/Employee/Dashboard/JobAndPayView.js +495 -114
  124. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  125. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
  126. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
  127. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
  128. package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
  129. package/dist/components/Employee/Dashboard/TaxesView.js +82 -60
  130. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  131. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
  132. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +227 -40
  133. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  134. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
  135. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
  136. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
  137. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
  138. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +7 -4
  139. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  140. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +14 -8
  141. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +60 -36
  142. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  143. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
  144. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
  145. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
  146. package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
  147. package/dist/components/Employee/Deductions/Deductions.js +25 -52
  148. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  149. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
  150. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
  151. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
  152. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
  153. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
  154. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  155. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
  156. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
  157. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
  158. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
  159. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
  160. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  161. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
  162. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
  163. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  164. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
  165. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  166. package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
  167. package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
  168. package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
  169. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
  170. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
  171. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
  172. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
  173. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
  174. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
  175. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
  176. package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
  177. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
  178. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
  179. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
  180. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
  181. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
  182. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
  183. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
  184. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
  185. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
  186. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
  187. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
  188. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
  189. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
  190. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
  191. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
  192. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
  193. package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
  194. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
  195. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
  196. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
  197. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
  198. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
  199. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
  200. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
  201. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
  202. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
  203. package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
  204. package/dist/components/Employee/Deductions/stateMachine.js +67 -89
  205. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  206. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
  207. package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
  208. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
  209. package/dist/components/Employee/Documents/management/index.d.ts +3 -0
  210. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
  211. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
  212. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
  213. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
  214. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  215. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
  216. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
  217. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
  218. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
  219. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +8 -0
  220. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  221. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
  222. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
  223. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
  224. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
  225. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
  226. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
  227. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
  228. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
  229. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
  230. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
  231. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
  232. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
  233. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +11 -11
  234. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
  235. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
  236. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
  237. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  238. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
  239. package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
  240. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
  241. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
  242. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
  243. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
  244. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
  245. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
  246. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +11 -11
  247. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
  248. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
  249. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  250. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  251. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
  252. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
  253. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
  254. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  255. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  256. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  257. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  258. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
  259. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  260. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
  261. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  262. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
  263. package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
  264. package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
  265. package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
  266. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
  267. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
  268. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
  269. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
  270. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
  271. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
  272. package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
  273. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
  274. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
  275. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
  276. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
  277. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
  278. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
  279. package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
  280. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
  281. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
  282. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
  283. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
  284. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
  285. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
  286. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
  287. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
  288. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
  289. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
  290. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
  291. package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
  292. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
  293. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
  294. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
  295. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
  296. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
  297. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
  298. package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
  299. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
  300. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
  301. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
  302. package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
  303. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
  304. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
  305. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
  306. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
  307. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
  308. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
  309. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
  310. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
  311. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
  312. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
  313. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
  314. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
  315. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
  316. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
  317. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
  318. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
  319. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
  320. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
  321. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
  322. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
  323. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
  324. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
  325. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
  326. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
  327. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
  328. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
  329. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
  330. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
  331. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
  332. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
  333. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
  334. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
  335. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
  336. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
  337. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
  338. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
  339. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  340. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
  341. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  342. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +19 -17
  343. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  344. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js +8 -0
  345. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js.map +1 -0
  346. package/dist/components/Employee/Taxes/FederalForm.js +27 -26
  347. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  348. package/dist/components/Employee/Taxes/FederalHead.js +13 -10
  349. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  350. package/dist/components/Employee/Taxes/StateForm.js +17 -14
  351. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  352. package/dist/components/Employee/Taxes/Taxes.js +75 -69
  353. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  354. package/dist/components/Employee/Taxes/useTaxes.js +4 -20
  355. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  356. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
  357. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  358. package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
  359. package/dist/components/Employee/exports/employeeManagement.js +22 -18
  360. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  361. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  362. package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
  363. package/dist/components/Employee/index.d.ts +4 -4
  364. package/dist/components/Employee/index.js +5 -5
  365. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +26 -34
  366. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  367. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
  368. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  369. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
  370. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +71 -54
  371. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  372. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
  373. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  374. package/dist/components/Payroll/usePreparedPayrollData.js +22 -36
  375. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  376. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
  377. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  378. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  379. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
  380. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  381. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
  382. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
  383. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  384. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
  385. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  386. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
  387. package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
  388. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  389. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
  390. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  391. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
  392. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
  393. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  394. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  395. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +59 -48
  396. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  397. package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
  398. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
  399. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  400. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
  401. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
  402. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  403. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
  404. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  405. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
  406. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  407. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  408. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
  409. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  410. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  411. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
  412. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  413. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  414. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
  415. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  416. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
  417. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
  418. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
  419. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
  420. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  421. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
  422. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
  423. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  424. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
  425. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  426. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
  427. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  428. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
  429. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  430. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
  431. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
  432. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  433. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
  434. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  435. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
  436. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  437. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
  438. package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
  439. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  440. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
  441. package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
  442. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
  443. package/dist/helpers/dateFormatting.js +52 -56
  444. package/dist/helpers/dateFormatting.js.map +1 -1
  445. package/dist/helpers/formattedStrings.d.ts +12 -0
  446. package/dist/helpers/formattedStrings.js +55 -33
  447. package/dist/helpers/formattedStrings.js.map +1 -1
  448. package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
  449. package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
  450. package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
  451. package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
  452. package/dist/i18n/I18n.js +6 -5
  453. package/dist/i18n/I18n.js.map +1 -1
  454. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  455. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  456. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
  457. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  458. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
  459. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
  460. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
  461. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
  462. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  463. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
  464. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
  465. package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
  466. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  467. package/dist/i18n/en/Employee.Deductions.json.js +104 -76
  468. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  469. package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
  470. package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
  471. package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
  472. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  473. package/dist/i18n/en/common.json.d.ts +7 -0
  474. package/dist/i18n/en/common.json.js +19 -17
  475. package/dist/i18n/en/common.json.js.map +1 -1
  476. package/dist/index.d.ts +16 -6
  477. package/dist/index.js +138 -112
  478. package/dist/index.js.map +1 -1
  479. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
  480. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
  481. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  482. package/dist/shared/constants.d.ts +8 -2
  483. package/dist/shared/constants.js +11 -8
  484. package/dist/shared/constants.js.map +1 -1
  485. package/dist/style.css +1 -1
  486. package/dist/test-utils/assertions.d.ts +20 -0
  487. package/dist/types/i18next.d.ts +140 -4
  488. package/dist/types/sdkError.js +58 -47
  489. package/dist/types/sdkError.js.map +1 -1
  490. package/docs/reference/endpoint-inventory.json +980 -1170
  491. package/package.json +33 -22
  492. package/dist/components/Employee/Compensation/Compensation.js +0 -87
  493. package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
  494. package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
  495. package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
  496. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
  497. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
  498. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
  499. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
  500. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
  501. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
  502. package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
  503. package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
  504. package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
  505. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
  506. package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
  507. package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
  508. package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
  509. package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
  510. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
  511. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
  512. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
  513. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
  514. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
  515. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
  516. package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
  517. package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
  518. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
  519. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
  520. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
  521. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  522. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
  523. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
  524. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  525. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
  526. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
  527. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
  528. package/dist/components/Employee/Deductions/Head.d.ts +0 -1
  529. package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
  530. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
  531. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
  532. package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
  533. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
  534. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +0 -24
  535. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
  536. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
  537. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
  538. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
  539. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
  540. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
  541. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
  542. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
  543. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
  544. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
  545. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  546. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  547. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
  548. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
  549. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
  550. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
  551. package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
  552. package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
  553. package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
  554. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
  555. package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
  556. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
  557. package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
  558. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
  559. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
  560. package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
  561. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
  562. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
  563. package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
  564. package/dist/components/Employee/PaymentMethod/Head.js +0 -13
  565. package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
  566. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
  567. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
  568. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
  569. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
  570. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
  571. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
  572. package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
  573. package/dist/components/Employee/PaymentMethod/Split.js +0 -175
  574. package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
  575. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
  576. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
  577. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
  578. /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
  579. /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
  580. /package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
  581. /package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
  582. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  583. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
  584. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
  585. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  586. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
  587. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
  588. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
  589. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
  590. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
  591. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
  592. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
  593. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
  594. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
  595. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
  596. /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
  597. /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
  598. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
  599. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +0 -0
  600. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
  601. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
  602. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
  603. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
  604. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
@@ -1,39 +0,0 @@
1
- import { z } from 'zod';
2
- import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
3
- import { Agencies } from '@gusto/embedded-api/models/components/childsupportdata';
4
- import { CommonComponentInterface } from '../../../Base';
5
- declare const ChildSupportSchema: z.ZodObject<{
6
- state: z.ZodString;
7
- fipsCode: z.ZodString;
8
- caseNumber: z.ZodNullable<z.ZodString>;
9
- orderNumber: z.ZodNullable<z.ZodString>;
10
- remittanceNumber: z.ZodNullable<z.ZodString>;
11
- amount: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
12
- payPeriodMaximum: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<string | null, number>>>;
13
- paymentPeriod: z.ZodEnum<{
14
- readonly EveryWeek: "Every week";
15
- readonly EveryOtherWeek: "Every other week";
16
- readonly TwicePerMonth: "Twice per month";
17
- readonly Monthly: "Monthly";
18
- }>;
19
- }, z.core.$strip>;
20
- export type ChildSupportInputs = z.input<typeof ChildSupportSchema>;
21
- export type ChildSupportPayload = z.output<typeof ChildSupportSchema>;
22
- interface ChildSupportFormProps extends CommonComponentInterface<'Employee.Deductions'> {
23
- employeeId: string;
24
- deduction?: Garnishment | null;
25
- handleStateAgencySelect: (stateAgency: string) => void;
26
- stateAgencies: {
27
- label: string;
28
- value: string;
29
- }[];
30
- counties: {
31
- label: string;
32
- value: string;
33
- }[];
34
- singleAllCountiesFipsCode: string | null | undefined;
35
- selectedAgency?: Agencies;
36
- onCancel: () => void;
37
- }
38
- declare function ChildSupportForm({ deduction, handleStateAgencySelect, stateAgencies, counties, singleAllCountiesFipsCode, employeeId, selectedAgency, onCancel, }: ChildSupportFormProps): import("react/jsx-runtime").JSX.Element;
39
- export default ChildSupportForm;
@@ -1,237 +0,0 @@
1
- import { jsx as n, jsxs as p } from "react/jsx-runtime";
2
- import { useTranslation as j } from "react-i18next";
3
- import { useForm as B, useWatch as H, FormProvider as V } from "react-hook-form";
4
- import { useMemo as K, useEffect as y } from "react";
5
- import { z as o } from "zod";
6
- import { zodResolver as z } from "@hookform/resolvers/zod";
7
- import { PaymentPeriod as X } from "@gusto/embedded-api/models/components/garnishmentchildsupport";
8
- import { useGarnishmentsCreateMutation as $ } from "@gusto/embedded-api/react-query/garnishmentsCreate";
9
- import { useGarnishmentsUpdateMutation as J } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
10
- import { useComponentContext as Q } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { Form as Z } from "../../../Common/Form/Form.js";
12
- import { Flex as P } from "../../../Common/Flex/Flex.js";
13
- import "classnames";
14
- import { componentEvents as M } from "../../../../shared/constants.js";
15
- import { ActionsLayout as ee } from "../../../Common/ActionsLayout/ActionsLayout.js";
16
- import "react-error-boundary";
17
- import "@tanstack/react-query";
18
- import { useBase as re } from "../../../Base/useBase.js";
19
- import "@gusto/embedded-api/models/errors/apierror";
20
- import "@gusto/embedded-api/models/errors/gustoembeddederror";
21
- import "@gusto/embedded-api/models/errors/sdkvalidationerror";
22
- import "@gusto/embedded-api/models/errors/unprocessableentityerror";
23
- import "@gusto/embedded-api/models/errors/httpclienterrors";
24
- import "dompurify";
25
- import "../../../../contexts/LocaleProvider/useLocale.js";
26
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
27
- import { SelectField as f } from "../../../Common/Fields/SelectField/SelectField.js";
28
- import { TextInputField as te } from "../../../Common/Fields/TextInputField/TextInputField.js";
29
- import { NumberInputField as D } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
30
- const ne = 0, oe = 0, ie = 100, R = "Number must be greater than or equal to 0", me = o.enum(X), ae = o.object({
31
- state: o.string(),
32
- fipsCode: o.string(),
33
- caseNumber: o.string().nullable(),
34
- orderNumber: o.string().nullable(),
35
- remittanceNumber: o.string().nullable(),
36
- amount: o.number().min(0, { error: R }).transform(String),
37
- payPeriodMaximum: o.number().min(0, { error: R }).transform((r) => r > 0 ? r.toString() : null).nullable(),
38
- paymentPeriod: me
39
- });
40
- function Ue({
41
- deduction: r,
42
- handleStateAgencySelect: _,
43
- stateAgencies: A,
44
- counties: l,
45
- singleAllCountiesFipsCode: u,
46
- employeeId: x,
47
- selectedAgency: N,
48
- onCancel: T
49
- }) {
50
- const { onEvent: E, baseSubmitHandler: q } = re(), { t: e } = j("Employee.Deductions"), s = Q(), g = {
51
- case_number: {
52
- name: "caseNumber",
53
- description: e("caseNumberDescription")
54
- },
55
- order_number: {
56
- name: "orderNumber",
57
- description: e("orderNumberDescription")
58
- },
59
- remittance_number: {
60
- name: "remittanceNumber",
61
- description: e("remittanceNumberDescription")
62
- }
63
- }, v = N?.requiredAttributes?.map((t) => {
64
- if (!t.key || !Object.prototype.hasOwnProperty.call(g, t.key))
65
- return null;
66
- const a = t.key, i = g[a];
67
- return {
68
- name: i.name,
69
- label: t.label,
70
- description: i.description
71
- };
72
- }).filter((t) => t !== null) || [], { mutateAsync: I, isPending: O } = $(), { mutateAsync: k, isPending: w } = J(), U = O || w, c = K(() => ({
73
- amount: r?.amount ? Number(r.amount) : 0,
74
- payPeriodMaximum: r?.payPeriodMaximum ? Number(r.payPeriodMaximum) : null,
75
- state: r?.childSupport?.state || "",
76
- fipsCode: r?.childSupport?.fipsCode || "",
77
- caseNumber: r?.childSupport?.caseNumber || null,
78
- orderNumber: r?.childSupport?.orderNumber || null,
79
- remittanceNumber: r?.childSupport?.remittanceNumber || null,
80
- paymentPeriod: r?.childSupport?.paymentPeriod
81
- }), [r]), d = B({
82
- resolver: z(ae),
83
- defaultValues: c
84
- }), { reset: S, setValue: m, control: F } = d, b = H({ control: F, name: "state" });
85
- y(() => {
86
- S(c);
87
- }, [r, c, S]), y(() => {
88
- m("caseNumber", null), m("orderNumber", null), m("remittanceNumber", null);
89
- }, [b, m]), y(() => {
90
- typeof u == "string" && m("fipsCode", u);
91
- }, [u, m]);
92
- const G = async (t) => {
93
- const a = {
94
- state: t.state,
95
- paymentPeriod: t.paymentPeriod,
96
- fipsCode: t.fipsCode,
97
- caseNumber: t.caseNumber,
98
- orderNumber: t.orderNumber,
99
- remittanceNumber: t.remittanceNumber
100
- };
101
- await q(t, async (i) => {
102
- const C = {
103
- active: !0,
104
- amount: i.amount,
105
- description: `Child Support - ${a.caseNumber}`,
106
- // child support description follows prefix type + case number convention
107
- courtOrdered: !0,
108
- garnishmentType: "child_support",
109
- times: null,
110
- deductAsPercentage: !0,
111
- // child support must always deduct as percentage up to a pay period maximum limit and is recurring until cancelled
112
- payPeriodMaximum: i.payPeriodMaximum,
113
- recurring: !0,
114
- childSupport: a
115
- };
116
- if (r) {
117
- const { garnishment: h } = await k({
118
- request: {
119
- garnishmentId: r.uuid,
120
- updateGarnishmentRequest: {
121
- ...C,
122
- version: r.version
123
- }
124
- }
125
- });
126
- E(M.EMPLOYEE_DEDUCTION_UPDATED, h);
127
- } else {
128
- const { garnishment: h } = await I({
129
- request: {
130
- employeeId: x,
131
- garnishmentRequest: C
132
- }
133
- });
134
- E(M.EMPLOYEE_DEDUCTION_CREATED, h);
135
- }
136
- });
137
- }, Y = () => {
138
- T();
139
- }, L = N?.manualPaymentRequired, W = l.length > 1 || l.length === 1 && u == null;
140
- return /* @__PURE__ */ n(V, { ...d, children: /* @__PURE__ */ n(Z, { onSubmit: d.handleSubmit(G), children: /* @__PURE__ */ p(P, { flexDirection: "column", gap: 32, children: [
141
- /* @__PURE__ */ n(s.Heading, { as: "h3", children: e("childSupportTitle") }),
142
- /* @__PURE__ */ p(P, { flexDirection: "column", gap: 20, children: [
143
- /* @__PURE__ */ n(
144
- f,
145
- {
146
- name: "state",
147
- label: e("agency"),
148
- description: e("agencyDescription"),
149
- options: A,
150
- onChange: _,
151
- isRequired: !0
152
- }
153
- ),
154
- L && /* @__PURE__ */ n(s.Alert, { status: "warning", label: e("manualPaymentRequired") }),
155
- b && /* @__PURE__ */ p(P, { flexDirection: "column", gap: 20, children: [
156
- W && /* @__PURE__ */ n(
157
- f,
158
- {
159
- name: "fipsCode",
160
- label: e("county"),
161
- description: e("countyDescription"),
162
- options: l,
163
- isRequired: !0
164
- }
165
- ),
166
- v.map(({ name: t, label: a, description: i }) => /* @__PURE__ */ n(
167
- te,
168
- {
169
- name: t,
170
- label: a,
171
- description: i,
172
- isRequired: !0
173
- },
174
- t
175
- )),
176
- /* @__PURE__ */ n(
177
- D,
178
- {
179
- name: "payPeriodMaximum",
180
- label: e("totalAmountWithheld"),
181
- description: e("totalAmountWithheldDescription"),
182
- min: ne,
183
- adornmentStart: "$",
184
- isRequired: !0
185
- }
186
- ),
187
- /* @__PURE__ */ n(
188
- D,
189
- {
190
- name: "amount",
191
- label: e("maxPaycheckPercentage"),
192
- description: e("maxPaycheckPercentageDescription"),
193
- isRequired: !0,
194
- min: oe,
195
- max: ie,
196
- adornmentEnd: "%"
197
- }
198
- ),
199
- /* @__PURE__ */ n(
200
- f,
201
- {
202
- name: "paymentPeriod",
203
- label: e("per"),
204
- description: e("perDescription"),
205
- options: [
206
- {
207
- label: e("everyWeek"),
208
- value: "Every week"
209
- },
210
- {
211
- label: e("everyOtherWeek"),
212
- value: "Every other week"
213
- },
214
- {
215
- label: e("twicePerMonth"),
216
- value: "Twice per month"
217
- },
218
- {
219
- label: e("monthly"),
220
- value: "Monthly"
221
- }
222
- ],
223
- isRequired: !0
224
- }
225
- )
226
- ] })
227
- ] }),
228
- /* @__PURE__ */ p(ee, { children: [
229
- /* @__PURE__ */ n(s.Button, { variant: "secondary", onClick: Y, children: e("cancelCta") }),
230
- b && /* @__PURE__ */ n(s.Button, { type: "submit", isLoading: U, children: e("saveCta") })
231
- ] })
232
- ] }) }) });
233
- }
234
- export {
235
- Ue as default
236
- };
237
- //# sourceMappingURL=ChildSupportForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChildSupportForm.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsForm/ChildSupportForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { useEffect, useMemo } from 'react'\nimport { z } from 'zod'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport'\nimport {\n type Garnishment,\n type GarnishmentType,\n} from '@gusto/embedded-api/models/components/garnishment'\nimport { useGarnishmentsCreateMutation } from '@gusto/embedded-api/react-query/garnishmentsCreate'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { type Agencies } from '@gusto/embedded-api/models/components/childsupportdata'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { NumberInputField, TextInputField, SelectField } from '@/components/Common'\nimport { type CommonComponentInterface, useBase } from '@/components/Base'\nimport { componentEvents } from '@/shared/constants'\n\nconst MINIMUM_PAY_PERIOD_AMOUNT = 0\nconst MINIMUM_PAYCHECK_PERCENTAGE = 0\nconst MAXIMUM_PAYCHECK_PERCENTAGE = 100\n\nconst NON_NEGATIVE_ERROR = 'Number must be greater than or equal to 0'\n\nconst ChildSupportPaymentPeriodSchema = z.enum(PaymentPeriod)\n\nconst ChildSupportSchema = z.object({\n state: z.string(),\n fipsCode: z.string(),\n caseNumber: z.string().nullable(),\n orderNumber: z.string().nullable(),\n remittanceNumber: z.string().nullable(),\n amount: z.number().min(0, { error: NON_NEGATIVE_ERROR }).transform(String),\n payPeriodMaximum: z\n .number()\n .min(0, { error: NON_NEGATIVE_ERROR })\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n paymentPeriod: ChildSupportPaymentPeriodSchema,\n})\n\nexport type ChildSupportInputs = z.input<typeof ChildSupportSchema>\nexport type ChildSupportPayload = z.output<typeof ChildSupportSchema>\n\ninterface ChildSupportFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n deduction?: Garnishment | null\n handleStateAgencySelect: (stateAgency: string) => void\n stateAgencies: { label: string; value: string }[]\n counties: { label: string; value: string }[]\n singleAllCountiesFipsCode: string | null | undefined\n selectedAgency?: Agencies\n onCancel: () => void\n}\n\nfunction ChildSupportForm({\n deduction,\n handleStateAgencySelect,\n stateAgencies,\n counties,\n singleAllCountiesFipsCode,\n employeeId,\n selectedAgency,\n onCancel,\n}: ChildSupportFormProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n const ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER = {\n case_number: {\n name: 'caseNumber',\n description: t('caseNumberDescription'),\n },\n order_number: {\n name: 'orderNumber',\n description: t('orderNumberDescription'),\n },\n remittance_number: {\n name: 'remittanceNumber',\n description: t('remittanceNumberDescription'),\n },\n } as const\n\n const requiredSelectedAgencyAttributes =\n selectedAgency?.requiredAttributes\n ?.map(attr => {\n if (!attr.key) {\n return null\n }\n if (!Object.prototype.hasOwnProperty.call(ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER, attr.key)) {\n return null\n }\n const key = attr.key as keyof typeof ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER\n const mappedAttr = ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER[key]\n return {\n name: mappedAttr.name,\n label: attr.label as string,\n description: mappedAttr.description,\n }\n })\n .filter((attr): attr is NonNullable<typeof attr> => attr !== null) || []\n\n const { mutateAsync: createDeduction, isPending: isPendingCreate } =\n useGarnishmentsCreateMutation()\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n const isPending = isPendingCreate || isPendingUpdate\n\n const defaultChildSupportValues: ChildSupportInputs = useMemo(() => {\n return {\n amount: deduction?.amount ? Number(deduction.amount) : 0,\n payPeriodMaximum: deduction?.payPeriodMaximum ? Number(deduction.payPeriodMaximum) : null,\n state: deduction?.childSupport?.state || '',\n fipsCode: deduction?.childSupport?.fipsCode || '',\n caseNumber: deduction?.childSupport?.caseNumber || null,\n orderNumber: deduction?.childSupport?.orderNumber || null,\n remittanceNumber: deduction?.childSupport?.remittanceNumber || null,\n paymentPeriod: deduction?.childSupport?.paymentPeriod as PaymentPeriod,\n }\n }, [deduction])\n\n const childSupportFormMethods = useForm<ChildSupportInputs, unknown, ChildSupportPayload>({\n resolver: zodResolver(ChildSupportSchema),\n defaultValues: defaultChildSupportValues,\n })\n const { reset: resetChildSupportForm, setValue, control } = childSupportFormMethods\n const watchedStateAgency = useWatch({ control, name: 'state' })\n\n useEffect(() => {\n resetChildSupportForm(defaultChildSupportValues)\n }, [deduction, defaultChildSupportValues, resetChildSupportForm])\n\n // if in edit mode and user elects to change state agency, reset the required attribute values\n // as new selected agency might require different payload inputs, e.g. OH requires case number + order number\n useEffect(() => {\n setValue('caseNumber', null)\n setValue('orderNumber', null)\n setValue('remittanceNumber', null)\n }, [watchedStateAgency, setValue])\n\n useEffect(() => {\n if (typeof singleAllCountiesFipsCode === 'string') {\n setValue('fipsCode', singleAllCountiesFipsCode)\n }\n }, [singleAllCountiesFipsCode, setValue])\n\n const onChildSupportSubmit: SubmitHandler<ChildSupportPayload> = async data => {\n const childSupport = {\n state: data.state,\n paymentPeriod: data.paymentPeriod,\n fipsCode: data.fipsCode,\n caseNumber: data.caseNumber,\n orderNumber: data.orderNumber,\n remittanceNumber: data.remittanceNumber,\n }\n\n await baseSubmitHandler(data, async payload => {\n const requestBody = {\n active: true,\n amount: payload.amount,\n description: `Child Support - ${childSupport.caseNumber}`, // child support description follows prefix type + case number convention\n courtOrdered: true,\n garnishmentType: 'child_support' as GarnishmentType,\n times: null,\n deductAsPercentage: true, // child support must always deduct as percentage up to a pay period maximum limit and is recurring until cancelled\n payPeriodMaximum: payload.payPeriodMaximum,\n recurring: true,\n childSupport,\n }\n\n if (!deduction) {\n const { garnishment: createDeductionResponse } = await createDeduction({\n request: {\n employeeId,\n garnishmentRequest: requestBody,\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CREATED, createDeductionResponse)\n } else {\n const { garnishment: updateDeductionResponse } = await updateDeduction({\n request: {\n garnishmentId: deduction.uuid,\n updateGarnishmentRequest: {\n ...requestBody,\n version: deduction.version as string,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_UPDATED, updateDeductionResponse)\n }\n })\n }\n\n const handleCancel = () => {\n onCancel()\n }\n\n const isManualPaymentRequired = selectedAgency?.manualPaymentRequired\n const hasSelectableCounties =\n counties.length > 1 || (counties.length === 1 && singleAllCountiesFipsCode == null)\n\n return (\n <FormProvider {...childSupportFormMethods}>\n <Form onSubmit={childSupportFormMethods.handleSubmit(onChildSupportSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{t('childSupportTitle')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={20}>\n <SelectField\n name=\"state\"\n label={t('agency')}\n description={t('agencyDescription')}\n options={stateAgencies}\n onChange={handleStateAgencySelect}\n isRequired\n />\n\n {isManualPaymentRequired && (\n <Components.Alert status=\"warning\" label={t('manualPaymentRequired')} />\n )}\n\n {watchedStateAgency && (\n <Flex flexDirection=\"column\" gap={20}>\n {hasSelectableCounties && (\n <SelectField\n name=\"fipsCode\"\n label={t('county')}\n description={t('countyDescription')}\n options={counties}\n isRequired\n />\n )}\n {/* render required inputs for respective agency, e.g. OH requires case number + order number */}\n {requiredSelectedAgencyAttributes.map(({ name, label, description }) => (\n <TextInputField\n key={name}\n name={name}\n label={label}\n description={description}\n isRequired\n />\n ))}\n <NumberInputField\n name=\"payPeriodMaximum\"\n label={t('totalAmountWithheld')}\n description={t('totalAmountWithheldDescription')}\n min={MINIMUM_PAY_PERIOD_AMOUNT}\n adornmentStart=\"$\"\n isRequired\n />\n <NumberInputField\n name=\"amount\"\n label={t('maxPaycheckPercentage')}\n description={t('maxPaycheckPercentageDescription')}\n isRequired\n min={MINIMUM_PAYCHECK_PERCENTAGE}\n max={MAXIMUM_PAYCHECK_PERCENTAGE}\n adornmentEnd=\"%\"\n />\n <SelectField\n name=\"paymentPeriod\"\n label={t('per')}\n description={t('perDescription')}\n options={[\n {\n label: t('everyWeek'),\n value: 'Every week',\n },\n {\n label: t('everyOtherWeek'),\n value: 'Every other week',\n },\n {\n label: t('twicePerMonth'),\n value: 'Twice per month',\n },\n {\n label: t('monthly'),\n value: 'Monthly',\n },\n ]}\n isRequired\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n {watchedStateAgency && (\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('saveCta')}\n </Components.Button>\n )}\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n\nexport default ChildSupportForm\n"],"names":["MINIMUM_PAY_PERIOD_AMOUNT","MINIMUM_PAYCHECK_PERCENTAGE","MAXIMUM_PAYCHECK_PERCENTAGE","NON_NEGATIVE_ERROR","ChildSupportPaymentPeriodSchema","z","PaymentPeriod","ChildSupportSchema","val","ChildSupportForm","deduction","handleStateAgencySelect","stateAgencies","counties","singleAllCountiesFipsCode","employeeId","selectedAgency","onCancel","onEvent","baseSubmitHandler","useBase","t","useTranslation","Components","useComponentContext","ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER","requiredSelectedAgencyAttributes","attr","key","mappedAttr","createDeduction","isPendingCreate","useGarnishmentsCreateMutation","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","isPending","defaultChildSupportValues","useMemo","childSupportFormMethods","useForm","zodResolver","resetChildSupportForm","setValue","control","watchedStateAgency","useWatch","useEffect","onChildSupportSubmit","data","childSupport","payload","requestBody","updateDeductionResponse","componentEvents","createDeductionResponse","handleCancel","isManualPaymentRequired","hasSelectableCounties","FormProvider","jsx","Form","jsxs","Flex","SelectField","name","label","description","TextInputField","NumberInputField","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAMA,KAA4B,GAC5BC,KAA8B,GAC9BC,KAA8B,KAE9BC,IAAqB,6CAErBC,KAAkCC,EAAE,KAAKC,CAAa,GAEtDC,KAAqBF,EAAE,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@
1
- import { z } from 'zod';
2
- import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
3
- import { CommonComponentInterface } from '../../../Base';
4
- export declare const DeductionSchema: z.ZodObject<{
5
- active: z.ZodBoolean;
6
- amount: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
7
- description: z.ZodString;
8
- times: z.ZodNullable<z.ZodNumber>;
9
- recurring: z.ZodBoolean;
10
- annualMaximum: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<string | null, number>>>;
11
- totalAmount: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<string | null, number>>>;
12
- deductAsPercentage: z.ZodBoolean;
13
- }, z.core.$strip>;
14
- export type DeductionInputs = z.input<typeof DeductionSchema>;
15
- export type DeductionPayload = z.output<typeof DeductionSchema>;
16
- interface ChildSupportFormProps extends CommonComponentInterface<'Employee.Deductions'> {
17
- employeeId: string;
18
- deduction?: Garnishment | null;
19
- onCancel: () => void;
20
- }
21
- declare function CustomDeductionForm({ deduction, employeeId, onCancel }: ChildSupportFormProps): import("react/jsx-runtime").JSX.Element;
22
- export default CustomDeductionForm;
@@ -1,162 +0,0 @@
1
- import { jsx as n, jsxs as o, Fragment as F } from "react/jsx-runtime";
2
- import { useTranslation as S } from "react-i18next";
3
- import { useForm as L, useWatch as f, FormProvider as N } from "react-hook-form";
4
- import { useMemo as V } from "react";
5
- import { z as r } from "zod";
6
- import { zodResolver as I } from "@hookform/resolvers/zod";
7
- import { useGarnishmentsCreateMutation as _ } from "@gusto/embedded-api/react-query/garnishmentsCreate";
8
- import { useGarnishmentsUpdateMutation as w } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
9
- import { useComponentContext as G } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { Form as U } from "../../../Common/Form/Form.js";
11
- import { Flex as m } from "../../../Common/Flex/Flex.js";
12
- import "classnames";
13
- import { componentEvents as g } from "../../../../shared/constants.js";
14
- import { ActionsLayout as j } from "../../../Common/ActionsLayout/ActionsLayout.js";
15
- import "react-error-boundary";
16
- import "@tanstack/react-query";
17
- import { useBase as B } from "../../../Base/useBase.js";
18
- import "@gusto/embedded-api/models/errors/apierror";
19
- import "@gusto/embedded-api/models/errors/gustoembeddederror";
20
- import "@gusto/embedded-api/models/errors/sdkvalidationerror";
21
- import "@gusto/embedded-api/models/errors/unprocessableentityerror";
22
- import "@gusto/embedded-api/models/errors/httpclienterrors";
23
- import "dompurify";
24
- import "../../../../contexts/LocaleProvider/useLocale.js";
25
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
26
- import { TextInputField as $ } from "../../../Common/Fields/TextInputField/TextInputField.js";
27
- import { RadioGroupField as h } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
28
- import { NumberInputField as c } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
29
- const p = "Number must be greater than or equal to 0", z = r.object({
30
- active: r.boolean(),
31
- amount: r.number().min(0, { error: p }).transform(String),
32
- description: r.string().min(1),
33
- times: r.number().nullable(),
34
- recurring: r.boolean(),
35
- annualMaximum: r.number().min(0, { error: p }).transform((e) => e > 0 ? e.toString() : null).nullable(),
36
- totalAmount: r.number().min(0, { error: p }).transform((e) => e > 0 ? e.toString() : null).nullable(),
37
- deductAsPercentage: r.boolean()
38
- });
39
- function De({ deduction: e, employeeId: A, onCancel: D }) {
40
- const { onEvent: d, baseSubmitHandler: x } = B(), { t } = S("Employee.Deductions"), u = G(), { mutateAsync: E, isPending: P } = _(), { mutateAsync: R, isPending: y } = w(), v = P || y, C = V(() => ({
41
- amount: e?.amount ? Number(e.amount) : 0,
42
- description: e?.description ?? "",
43
- times: e?.times ?? null,
44
- recurring: e?.recurring ?? !0,
45
- annualMaximum: e?.annualMaximum ? Number(e.annualMaximum) : null,
46
- totalAmount: e?.totalAmount ? Number(e.totalAmount) : null,
47
- deductAsPercentage: e?.deductAsPercentage ?? !0,
48
- active: !0
49
- }), [e]), s = L({
50
- resolver: I(z),
51
- defaultValues: C
52
- }), { control: b } = s, M = f({ control: b, name: "recurring" }), i = f({ control: b, name: "deductAsPercentage" }), q = async (T) => {
53
- await x(T, async (a) => {
54
- if (e) {
55
- const { garnishment: l } = await R({
56
- request: {
57
- garnishmentId: e.uuid,
58
- updateGarnishmentRequest: {
59
- ...a,
60
- version: e.version,
61
- times: a.recurring ? null : 1
62
- }
63
- }
64
- });
65
- d(g.EMPLOYEE_DEDUCTION_UPDATED, l);
66
- } else {
67
- const { garnishment: l } = await E({
68
- request: {
69
- employeeId: A,
70
- // custom deductions cannot be court ordered/garnishment
71
- garnishmentRequest: {
72
- ...a,
73
- courtOrdered: !1,
74
- times: a.recurring ? null : 1
75
- }
76
- }
77
- });
78
- d(g.EMPLOYEE_DEDUCTION_CREATED, l);
79
- }
80
- });
81
- }, O = () => {
82
- D();
83
- };
84
- return /* @__PURE__ */ n(N, { ...s, children: /* @__PURE__ */ n(U, { onSubmit: s.handleSubmit(q), children: /* @__PURE__ */ n(m, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(F, { children: [
85
- /* @__PURE__ */ n(u.Heading, { as: "h3", children: t("customDeductionTitle") }),
86
- /* @__PURE__ */ o(m, { flexDirection: "column", gap: 20, children: [
87
- /* @__PURE__ */ o(m, { flexDirection: "column", gap: 20, children: [
88
- /* @__PURE__ */ n($, { name: "description", label: t("descriptionLabelV2"), isRequired: !0 }),
89
- /* @__PURE__ */ n(
90
- h,
91
- {
92
- name: "recurring",
93
- label: t("frequencyLabel"),
94
- isRequired: !0,
95
- options: [
96
- { value: !0, label: t("frequencyRecurringOptionV2") },
97
- { value: !1, label: t("frequencyOneTimeOptionV2") }
98
- ]
99
- }
100
- ),
101
- /* @__PURE__ */ n(
102
- h,
103
- {
104
- name: "deductAsPercentage",
105
- label: t("deductionTypeLabelV2"),
106
- isRequired: !0,
107
- options: [
108
- { value: !0, label: t("deductionTypePercentageOptionV2") },
109
- { value: !1, label: t("deductionTypeFixedAmountOption") }
110
- ]
111
- }
112
- ),
113
- /* @__PURE__ */ n(
114
- c,
115
- {
116
- name: "amount",
117
- adornmentStart: !i && "$",
118
- adornmentEnd: i && "%",
119
- label: t("deductionAmountLabel"),
120
- isRequired: !0,
121
- min: 0,
122
- format: i ? "percent" : "currency",
123
- description: t(i ? "deductionAmountDescriptionPercentage" : "deductionAmountDescriptionFixed")
124
- }
125
- )
126
- ] }),
127
- M && /* @__PURE__ */ o(m, { flexDirection: "column", gap: 20, children: [
128
- /* @__PURE__ */ n(
129
- c,
130
- {
131
- name: "totalAmount",
132
- adornmentStart: "$",
133
- format: "currency",
134
- label: t("totalAmountLabel"),
135
- description: t("totalAmountDescription"),
136
- min: 0
137
- }
138
- ),
139
- /* @__PURE__ */ n(
140
- c,
141
- {
142
- name: "annualMaximum",
143
- adornmentStart: "$",
144
- format: "currency",
145
- label: t("annualMaxLabel"),
146
- min: 0,
147
- description: t("annualMaxDescription")
148
- }
149
- )
150
- ] })
151
- ] }),
152
- /* @__PURE__ */ o(j, { children: [
153
- /* @__PURE__ */ n(u.Button, { variant: "secondary", onClick: O, children: t("cancelCta") }),
154
- /* @__PURE__ */ n(u.Button, { type: "submit", isLoading: v, children: t("saveCta") })
155
- ] })
156
- ] }) }) }) });
157
- }
158
- export {
159
- z as DeductionSchema,
160
- De as default
161
- };
162
- //# sourceMappingURL=CustomDeductionForm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomDeductionForm.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { useMemo } from 'react'\nimport { z } from 'zod'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { type Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { useGarnishmentsCreateMutation } from '@gusto/embedded-api/react-query/garnishmentsCreate'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { NumberInputField, TextInputField, RadioGroupField } from '@/components/Common'\nimport { type CommonComponentInterface, useBase } from '@/components/Base'\nimport { componentEvents } from '@/shared/constants'\n\nconst NON_NEGATIVE_ERROR = 'Number must be greater than or equal to 0'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0, { error: NON_NEGATIVE_ERROR }).transform(String),\n description: z.string().min(1),\n times: z.number().nullable(),\n recurring: z.boolean(),\n annualMaximum: z\n .number()\n .min(0, { error: NON_NEGATIVE_ERROR })\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n totalAmount: z\n .number()\n .min(0, { error: NON_NEGATIVE_ERROR })\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.boolean(),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ninterface ChildSupportFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n deduction?: Garnishment | null\n onCancel: () => void\n}\n\nfunction CustomDeductionForm({ deduction, employeeId, onCancel }: ChildSupportFormProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n const { mutateAsync: createDeduction, isPending: isPendingCreate } =\n useGarnishmentsCreateMutation()\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n const isPending = isPendingCreate || isPendingUpdate\n\n const defaultValues: DeductionInputs = useMemo(() => {\n return {\n amount: deduction?.amount ? Number(deduction.amount) : 0,\n description: deduction?.description ?? '',\n times: deduction?.times ?? null,\n recurring: deduction?.recurring ?? true,\n annualMaximum: deduction?.annualMaximum ? Number(deduction.annualMaximum) : null,\n totalAmount: deduction?.totalAmount ? Number(deduction.totalAmount) : null,\n deductAsPercentage: deduction?.deductAsPercentage ?? true,\n active: true,\n } as DeductionInputs\n }, [deduction])\n\n const formMethods = useForm<DeductionInputs, unknown, DeductionPayload>({\n resolver: zodResolver(DeductionSchema),\n defaultValues,\n })\n const { control } = formMethods\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n const watchedAmountPercentage = useWatch({ control, name: 'deductAsPercentage' })\n\n const onSubmit: SubmitHandler<DeductionPayload> = async data => {\n await baseSubmitHandler(data, async payload => {\n if (!deduction) {\n const { garnishment: createDeductionResponse } = await createDeduction({\n request: {\n employeeId: employeeId,\n // custom deductions cannot be court ordered/garnishment\n garnishmentRequest: {\n ...payload,\n courtOrdered: false,\n times: payload.recurring ? null : 1,\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CREATED, createDeductionResponse)\n } else {\n const { garnishment: updateDeductionResponse } = await updateDeduction({\n request: {\n garnishmentId: deduction.uuid,\n updateGarnishmentRequest: {\n ...payload,\n version: deduction.version as string,\n times: payload.recurring ? null : 1,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_UPDATED, updateDeductionResponse)\n }\n })\n }\n\n const handleCancel = () => {\n onCancel()\n }\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n <>\n <Components.Heading as=\"h3\">{t('customDeductionTitle')}</Components.Heading>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField name=\"description\" label={t('descriptionLabelV2')} isRequired />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n isRequired\n options={[\n { value: true, label: t('frequencyRecurringOptionV2') },\n { value: false, label: t('frequencyOneTimeOptionV2') },\n ]}\n />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabelV2')}\n isRequired\n options={[\n { value: true, label: t('deductionTypePercentageOptionV2') },\n { value: false, label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <NumberInputField\n name=\"amount\"\n adornmentStart={!watchedAmountPercentage && '$'}\n adornmentEnd={watchedAmountPercentage && '%'}\n label={t('deductionAmountLabel')}\n isRequired\n min={0}\n format={watchedAmountPercentage ? 'percent' : 'currency'}\n description={\n watchedAmountPercentage\n ? t('deductionAmountDescriptionPercentage')\n : t('deductionAmountDescriptionFixed')\n }\n />\n </Flex>\n {watchedRecurring && (\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"totalAmount\"\n adornmentStart=\"$\"\n format=\"currency\"\n label={t('totalAmountLabel')}\n description={t('totalAmountDescription')}\n min={0}\n />\n <NumberInputField\n name=\"annualMaximum\"\n adornmentStart=\"$\"\n format=\"currency\"\n label={t('annualMaxLabel')}\n min={0}\n description={t('annualMaxDescription')}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n </>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n\nexport default CustomDeductionForm\n"],"names":["NON_NEGATIVE_ERROR","DeductionSchema","z","val","CustomDeductionForm","deduction","employeeId","onCancel","onEvent","baseSubmitHandler","useBase","useTranslation","Components","useComponentContext","createDeduction","isPendingCreate","useGarnishmentsCreateMutation","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","isPending","defaultValues","useMemo","formMethods","useForm","zodResolver","control","watchedRecurring","useWatch","watchedAmountPercentage","onSubmit","data","payload","updateDeductionResponse","componentEvents","createDeductionResponse","handleCancel","FormProvider","jsx","Form","Flex","jsxs","Fragment","TextInputField","RadioGroupField","NumberInputField","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,IAAqB,6CAEdC,IAAkBC,EAAE,OAAO;AAAA,EACtC,QA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,QAAA,gBAAAF;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,gBAAe;AAAA,YACf,QAAO;AAAA,YACP,OAAO,EAAE,kBAAkB;AAAA,YAC3B,aAAa,EAAE,wBAAwB;AAAA,YACvC,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP,gBAAAP;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,gBAAe;AAAA,YACf,QAAO;AAAA,YACP,OAAO,EAAE,gBAAgB;AAAA,YACzB,KAAK;AAAA,YACL,aAAa,EAAE,sBAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,MACvC,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,sBACCC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAR,EAAC1B,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASwB,GAC7C,UAAA,EAAE,WAAW,EAAA,CAChB;AAAA,MACA,gBAAAE,EAAC1B,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWQ,GACzC,UAAA,EAAE,SAAS,EAAA,CACd;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -1,34 +0,0 @@
1
- import { z } from 'zod';
2
- import { Garnishment, GarnishmentType } from '@gusto/embedded-api/models/components/garnishment';
3
- import { CommonComponentInterface } from '../../../Base';
4
- export declare const DeductionSchema: z.ZodObject<{
5
- active: z.ZodBoolean;
6
- amount: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
7
- description: z.ZodString;
8
- courtOrdered: z.ZodBoolean;
9
- times: z.ZodNullable<z.ZodNumber>;
10
- recurring: z.ZodBoolean;
11
- annualMaximum: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<string | null, number>>>;
12
- totalAmount: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<string | null, number>>>;
13
- deductAsPercentage: z.ZodBoolean;
14
- garnishmentType: z.ZodEnum<{
15
- readonly ChildSupport: "child_support";
16
- readonly FederalTaxLien: "federal_tax_lien";
17
- readonly StateTaxLien: "state_tax_lien";
18
- readonly StudentLoan: "student_loan";
19
- readonly CreditorGarnishment: "creditor_garnishment";
20
- readonly FederalLoan: "federal_loan";
21
- readonly OtherGarnishment: "other_garnishment";
22
- }>;
23
- }, z.core.$strip>;
24
- export type DeductionInputs = z.input<typeof DeductionSchema>;
25
- export type DeductionPayload = z.output<typeof DeductionSchema>;
26
- interface GarnishmentFormProps extends CommonComponentInterface<'Employee.Deductions'> {
27
- employeeId: string;
28
- deduction?: Garnishment | null;
29
- selectedGarnishmentType: GarnishmentType;
30
- selectedGarnishmentTitle: string;
31
- onCancel: () => void;
32
- }
33
- declare function GarnishmentForm({ deduction, employeeId, selectedGarnishmentType, selectedGarnishmentTitle, onCancel, }: GarnishmentFormProps): import("react/jsx-runtime").JSX.Element;
34
- export default GarnishmentForm;