@gusto/embedded-react-sdk 0.26.0 → 0.27.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 (360) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/assets/icons/plus-circle.svg.js +5 -5
  3. package/dist/assets/icons/plus-circle.svg.js.map +1 -1
  4. package/dist/components/Base/Base.js +13 -12
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/DocumentList/DocumentList.js +23 -23
  7. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  8. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +6 -10
  9. package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +12 -12
  11. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +1 -1
  12. package/dist/components/Common/InternalError/InternalError.module.scss.js +4 -4
  13. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +8 -8
  14. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -10
  16. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  17. package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -2
  18. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  19. package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -6
  20. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  21. package/dist/components/Common/UI/Alert/Alert.module.scss.js +9 -9
  22. package/dist/components/Common/UI/Banner/Banner.module.scss.js +1 -1
  23. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  24. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +4 -4
  25. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  26. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +1 -1
  27. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +3 -3
  28. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +4 -4
  29. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
  30. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +2 -2
  31. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +26 -26
  32. package/dist/components/Common/UI/Input/Input.module.scss.js +8 -8
  33. package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
  34. package/dist/components/Common/UI/Radio/Radio.module.scss.js +6 -6
  35. package/dist/components/Common/UI/Select/Select.module.scss.js +4 -4
  36. package/dist/components/Common/UI/Table/Table.js +1 -1
  37. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  38. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  39. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +1 -1
  40. package/dist/components/Common/UI/Text/Text.module.scss.js +17 -15
  41. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  42. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +4 -4
  43. package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
  44. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +4 -3
  46. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  50. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  51. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  52. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  58. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/TitleSelect.js +4 -3
  60. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  62. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  63. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  64. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  65. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -5
  66. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  67. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  68. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  69. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +3 -2
  70. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  71. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -6
  72. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  73. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -5
  74. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  76. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  78. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  79. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  80. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  81. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +4 -3
  82. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  83. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  84. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  85. package/dist/components/Company/FederalTaxes/Actions.js +7 -6
  86. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  87. package/dist/components/Company/FederalTaxes/FederalTaxes.js +4 -3
  88. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  89. package/dist/components/Company/FederalTaxes/Form.js +5 -3
  90. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  91. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  92. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  93. package/dist/components/Company/Industry/Actions.js +8 -7
  94. package/dist/components/Company/Industry/Actions.js.map +1 -1
  95. package/dist/components/Company/Industry/Context.js +7 -6
  96. package/dist/components/Company/Industry/Context.js.map +1 -1
  97. package/dist/components/Company/Industry/Edit.js +3 -2
  98. package/dist/components/Company/Industry/Edit.js.map +1 -1
  99. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  100. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  101. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  102. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -3
  103. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  105. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/Actions.js +3 -2
  107. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/List.js +7 -6
  109. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -7
  111. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  112. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  113. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
  115. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  116. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
  117. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  118. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +8 -7
  119. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  120. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  121. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  122. package/dist/components/Company/PaySchedule/PaySchedule.js +4 -3
  123. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  124. package/dist/components/Company/PaySchedule/_parts/Actions.js +3 -2
  125. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  126. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  127. package/dist/components/Company/PaySchedule/_parts/Head.js +13 -11
  128. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  129. package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
  130. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  131. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  132. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  134. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  135. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  136. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  137. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  138. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  139. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  140. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  141. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  142. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  143. package/dist/components/Contractor/Address/Address.js +5 -4
  144. package/dist/components/Contractor/Address/Address.js.map +1 -1
  145. package/dist/components/Contractor/Address/Form.js +1 -1
  146. package/dist/components/Contractor/Address/useAddress.js +6 -5
  147. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  148. package/dist/components/Contractor/ContractorList/index.js +32 -31
  149. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  150. package/dist/components/Contractor/NewHireReport/NewHireReport.js +14 -13
  151. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  152. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +12 -11
  153. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  154. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  155. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  156. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +4 -3
  157. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  158. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +4 -2
  159. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  160. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  161. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +9 -7
  162. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  163. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +9 -8
  164. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  165. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +11 -9
  166. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  167. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +8 -6
  168. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  169. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +14 -14
  170. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +4 -2
  171. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  172. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +4 -2
  173. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  174. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  175. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +1 -1
  176. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  177. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  178. package/dist/components/Contractor/Submit/Submit.js +21 -20
  179. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  180. package/dist/components/Employee/Compensation/Actions.js +13 -12
  181. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  182. package/dist/components/Employee/Compensation/Edit.js +17 -16
  183. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  184. package/dist/components/Employee/Compensation/List.js +23 -22
  185. package/dist/components/Employee/Compensation/List.js.map +1 -1
  186. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +3 -1
  187. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +145 -137
  188. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  189. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -1
  190. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +106 -101
  191. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  192. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -87
  193. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  194. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +2 -1
  195. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +110 -104
  196. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  197. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +51 -45
  198. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  199. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +31 -30
  200. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  201. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +4 -8
  202. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +3 -2
  204. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  205. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +3 -2
  206. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  207. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  208. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  209. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  210. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  211. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
  212. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  213. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  214. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  215. package/dist/components/Employee/EmployeeList/Actions.js +7 -6
  216. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  217. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  218. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  219. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  220. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  221. package/dist/components/Employee/EmployeeList/List.js +3 -2
  222. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  223. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  224. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  225. package/dist/components/Employee/FederalTaxes/Actions.js +6 -5
  226. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  227. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  228. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  229. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  230. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  231. package/dist/components/Employee/Landing/Landing.js +11 -10
  232. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  233. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  234. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  235. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  236. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
  237. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  238. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
  239. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  240. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
  241. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  242. package/dist/components/Employee/PaymentMethod/Split.js +11 -10
  243. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  244. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  245. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  246. package/dist/components/Employee/Profile/Actions.js +6 -5
  247. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  248. package/dist/components/Employee/Profile/AdminPersonalDetails.js +6 -5
  249. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  250. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +1 -1
  251. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  252. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  253. package/dist/components/Employee/Profile/useProfile.js +4 -3
  254. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  255. package/dist/components/Employee/StateTaxes/Actions.js +6 -5
  256. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  257. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  258. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  259. package/dist/components/Employee/Taxes/Actions.js +7 -6
  260. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  261. package/dist/components/Employee/Taxes/FederalForm.js +14 -13
  262. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  263. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  264. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  265. package/dist/components/Flow/Flow.js +9 -7
  266. package/dist/components/Flow/Flow.js.map +1 -1
  267. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +17 -16
  268. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  269. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +4 -4
  270. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +38 -36
  271. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  272. package/dist/components/InformationRequests/InformationRequests.d.ts +7 -2
  273. package/dist/components/InformationRequests/InformationRequests.js +78 -45
  274. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  275. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -9
  276. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  277. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +10 -10
  278. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +2 -0
  279. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +33 -0
  280. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -0
  281. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +7 -0
  282. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +39 -0
  283. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -0
  284. package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +5 -0
  285. package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +15 -0
  286. package/dist/components/Payroll/OffCycleReasonSelection/types.js +14 -0
  287. package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -0
  288. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +2 -0
  289. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +35 -0
  290. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +1 -0
  291. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +2 -0
  292. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +65 -0
  293. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +1 -0
  294. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +18 -0
  295. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +1 -0
  296. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormTypes.d.ts +53 -0
  297. package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +3 -0
  298. package/dist/components/Payroll/PayPeriodDateForm/usePayPeriodDateValidation.d.ts +5 -0
  299. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +4 -2
  300. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  301. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +19 -18
  302. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  303. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -36
  304. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +5 -5
  305. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +21 -19
  306. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  307. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +17 -15
  308. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  309. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +26 -24
  310. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  311. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
  312. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  313. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +4 -2
  314. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  315. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  316. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  317. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +18 -18
  318. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +4 -1
  319. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +34 -28
  320. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  321. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +29 -29
  322. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  323. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +12 -11
  324. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  325. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -2
  326. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  327. package/dist/components/Payroll/index.d.ts +4 -0
  328. package/dist/components/Payroll/index.js +12 -8
  329. package/dist/components/Payroll/index.js.map +1 -1
  330. package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
  331. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  332. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  333. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  334. package/dist/contexts/ThemeProvider/theme.d.ts +8 -3
  335. package/dist/contexts/ThemeProvider/theme.js +29 -24
  336. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  337. package/dist/helpers/dateFormatting.d.ts +3 -0
  338. package/dist/helpers/dateFormatting.js.map +1 -1
  339. package/dist/i18n/I18n.js +1 -1
  340. package/dist/i18n/I18n.js.map +1 -1
  341. package/dist/i18n/en/Employee.Deductions.json.js +157 -161
  342. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  343. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +12 -10
  344. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -1
  345. package/dist/i18n/en/InformationRequests.json.js +8 -0
  346. package/dist/i18n/en/InformationRequests.json.js.map +1 -0
  347. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js +12 -0
  348. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js.map +1 -0
  349. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +32 -0
  350. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +1 -0
  351. package/dist/shared/constants.d.ts +4 -0
  352. package/dist/shared/constants.js +10 -8
  353. package/dist/shared/constants.js.map +1 -1
  354. package/dist/style.css +1 -1
  355. package/dist/types/i18next.d.ts +51 -3
  356. package/package.json +11 -11
  357. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
  358. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
  359. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
  360. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
@@ -4,57 +4,58 @@ import { useCompensation as d } from "./useCompensation.js";
4
4
  import C from "../../../assets/icons/pencil.svg.js";
5
5
  import c from "../../../assets/icons/trashcan.svg.js";
6
6
  import "../../../shared/constants.js";
7
+ import "classnames";
7
8
  import { HamburgerMenu as f } from "../../Common/HamburgerMenu/HamburgerMenu.js";
8
9
  import { useDataView as y } from "../../Common/DataView/useDataView.js";
9
10
  import { DataView as g } from "../../Common/DataView/DataView.js";
10
- const P = () => {
11
- const { employeeJobs: i, mode: o, isPending: r, handleEdit: l, handleDelete: s } = d(), { t } = p("Employee.Compensation"), { ...m } = y({
11
+ const U = () => {
12
+ const { employeeJobs: i, mode: o, isPending: r, handleEdit: l, handleDelete: s } = d(), { t: e } = p("Employee.Compensation"), { ...m } = y({
12
13
  data: i,
13
14
  columns: [
14
15
  {
15
16
  key: "title",
16
- title: t("allCompensations.jobColumn"),
17
- render: (e) => e.title || ""
17
+ title: e("allCompensations.jobColumn"),
18
+ render: (t) => t.title || ""
18
19
  },
19
20
  {
20
21
  key: "flsaStatus",
21
- title: t("allCompensations.typeColumn"),
22
- render: (e) => {
23
- const n = e.compensations?.find(
24
- (u) => u.uuid === e.currentCompensationUuid
22
+ title: e("allCompensations.typeColumn"),
23
+ render: (t) => {
24
+ const n = t.compensations?.find(
25
+ (u) => u.uuid === t.currentCompensationUuid
25
26
  )?.flsaStatus;
26
- return n !== void 0 ? t(`flsaStatusLabels.${n}`) : null;
27
+ return n !== void 0 ? e(`flsaStatusLabels.${n}`) : null;
27
28
  }
28
29
  },
29
30
  {
30
31
  key: "rate",
31
- title: t("allCompensations.amountColumn"),
32
- render: (e) => e.rate?.toString() || ""
32
+ title: e("allCompensations.amountColumn"),
33
+ render: (t) => t.rate?.toString() || ""
33
34
  },
34
35
  {
35
36
  key: "paymentUnit",
36
- title: t("allCompensations.perColumn"),
37
- render: (e) => e.paymentUnit || ""
37
+ title: e("allCompensations.perColumn"),
38
+ render: (t) => t.paymentUnit || ""
38
39
  }
39
40
  ],
40
- itemMenu: (e) => /* @__PURE__ */ a(
41
+ itemMenu: (t) => /* @__PURE__ */ a(
41
42
  f,
42
43
  {
43
- triggerLabel: t("hamburgerTitle"),
44
+ triggerLabel: e("hamburgerTitle"),
44
45
  items: [
45
46
  {
46
- label: t("allCompensations.editCta"),
47
+ label: e("allCompensations.editCta"),
47
48
  icon: /* @__PURE__ */ a(C, { "aria-hidden": !0 }),
48
49
  onClick: () => {
49
- l(e.uuid);
50
+ l(t.uuid);
50
51
  }
51
52
  },
52
- ...e.primary ? [] : [
53
+ ...t.primary ? [] : [
53
54
  {
54
- label: t("allCompensations.deleteCta"),
55
+ label: e("allCompensations.deleteCta"),
55
56
  icon: /* @__PURE__ */ a(c, { "aria-hidden": !0 }),
56
57
  onClick: () => {
57
- s(e.uuid);
58
+ s(t.uuid);
58
59
  }
59
60
  }
60
61
  ]
@@ -64,9 +65,9 @@ const P = () => {
64
65
  )
65
66
  });
66
67
  if (o === "LIST")
67
- return /* @__PURE__ */ a(g, { "data-testid": "data-view", label: t("allCompensations.tableLabel"), ...m });
68
+ return /* @__PURE__ */ a(g, { "data-testid": "data-view", label: e("allCompensations.tableLabel"), ...m });
68
69
  };
69
70
  export {
70
- P as List
71
+ U as List
71
72
  };
72
73
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,EAAA,IAAiBC,EAAA,GAC9D,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACS,MAAaA,EAAI,SAAS;AAAA,MAAA;AAAA,MAErC;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,6BAA6B;AAAA,QACtC,QAAQ,CAACA,MAAa;AACpB,gBAAMC,IAAaD,EAAI,eAAe;AAAA,YACpC,CAAAE,MAAQA,EAAK,SAASF,EAAI;AAAA,UAAA,GACzB;AACH,iBAAOC,MAAe,SAAY,EAAE,oBAAoBA,CAAU,EAAE,IAAI;AAAA,QAC1E;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,+BAA+B;AAAA,QACxC,QAAQ,CAACD,MAAaA,EAAI,MAAM,cAAc;AAAA,MAAA;AAAA,MAEhD;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACA,MAAaA,EAAI,eAAe;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEF,UAAU,CAACA,MACT,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAc,EAAE,gBAAgB;AAAA,QAChC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,0BAA0B;AAAA,YACnC,MAAM,gBAAAD,EAACE,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,SAAS,MAAM;AACb,cAAAX,EAAWM,EAAI,IAAI;AAAA,YACrB;AAAA,UAAA;AAAA,UAEF,GAAKA,EAAI,UAUL,CAAA,IATA;AAAA,YACE;AAAA,cACE,OAAO,EAAE,4BAA4B;AAAA,cACrC,MAAM,gBAAAG,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,cAC/B,SAAS,MAAM;AACb,gBAAAX,EAAaK,EAAI,IAAI;AAAA,cACvB;AAAA,YAAA;AAAA,UACF;AAAA,QAED;AAAA,QAEP,WAAWP;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,CAEH;AAED,MAAID,MAAS;AAIb,WACE,gBAAAW,EAACI,KAAS,eAAY,aAAY,OAAO,EAAE,6BAA6B,GAAI,GAAGT,GAAe;AAElG;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","t","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,EAAA,IAAiBC,EAAA,GAC9D,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMT;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA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AED,MAAID,MAAS;AAIb,WACE,gBAAAY,EAACI,KAAS,eAAY,aAAY,OAAOX,EAAE,6BAA6B,GAAI,GAAGE,GAAe;AAElG;"}
@@ -49,7 +49,9 @@ interface ChildSupportFormProps extends CommonComponentInterface<'Employee.Deduc
49
49
  label: string;
50
50
  value: string;
51
51
  }[];
52
+ singleAllCountiesFipsCode: string | null | undefined;
52
53
  selectedAgency?: Agencies;
54
+ onCancel: () => void;
53
55
  }
54
- declare function ChildSupportForm({ deduction, handleStateAgencySelect, stateAgencies, counties, employeeId, selectedAgency, }: ChildSupportFormProps): import("react/jsx-runtime").JSX.Element;
56
+ declare function ChildSupportForm({ deduction, handleStateAgencySelect, stateAgencies, counties, singleAllCountiesFipsCode, employeeId, selectedAgency, onCancel, }: ChildSupportFormProps): import("react/jsx-runtime").JSX.Element;
55
57
  export default ChildSupportForm;
@@ -1,30 +1,30 @@
1
- import { jsx as n, jsxs as c, Fragment as U } from "react/jsx-runtime";
2
- import { useTranslation as k } from "react-i18next";
3
- import { useForm as Y, useWatch as B, FormProvider as L } from "react-hook-form";
4
- import { useMemo as W, useEffect as E } from "react";
1
+ import { jsx as n, jsxs as p } from "react/jsx-runtime";
2
+ import { useTranslation as W } from "react-i18next";
3
+ import { useForm as G, useWatch as H, FormProvider as j } from "react-hook-form";
4
+ import { useMemo as K, useEffect as y } from "react";
5
5
  import { z as i } from "zod";
6
- import { zodResolver as G } from "@hookform/resolvers/zod";
7
- import { PaymentPeriod as H } from "@gusto/embedded-api/models/components/garnishmentchildsupport";
8
- import { useGarnishmentsCreateMutation as j } from "@gusto/embedded-api/react-query/garnishmentsCreate";
9
- import { useGarnishmentsUpdateMutation as K } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
10
- import V from "./ChildSupportForm.module.scss.js";
11
- import { useComponentContext as z } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import { Form as X } from "../../../Common/Form/Form.js";
13
- import { Flex as $ } from "../../../Common/Flex/Flex.js";
14
- import { ActionsLayout as J } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
+ import { zodResolver as V } from "@hookform/resolvers/zod";
7
+ import { PaymentPeriod as z } from "@gusto/embedded-api/models/components/garnishmentchildsupport";
8
+ import { useGarnishmentsCreateMutation as X } from "@gusto/embedded-api/react-query/garnishmentsCreate";
9
+ import { useGarnishmentsUpdateMutation as $ } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
10
+ import { useComponentContext as J } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { Form as Q } 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 { TextInputField as Z } from "../../../Common/Fields/TextInputField/TextInputField.js";
16
+ import { ActionsLayout as ee } from "../../../Common/ActionsLayout/ActionsLayout.js";
17
+ import { NumberInputField as D } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
15
18
  import "react-error-boundary";
16
19
  import "@gusto/embedded-api/models/errors/apierror";
17
20
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
18
21
  import "@tanstack/react-query";
19
- import { useBase as Q } from "../../../Base/useBase.js";
20
- import { componentEvents as g } from "../../../../shared/constants.js";
22
+ import { useBase as re } from "../../../Base/useBase.js";
21
23
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
22
24
  import "dompurify";
23
25
  import "../../../../contexts/LocaleProvider/useLocale.js";
24
- import { SelectField as d } from "../../../Common/Fields/SelectField/SelectField.js";
25
- import { TextInputField as Z } from "../../../Common/Fields/TextInputField/TextInputField.js";
26
- import { NumberInputField as C } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
27
- const ee = 0, re = 0, te = 100, ne = i.nativeEnum(H), ie = i.object({
26
+ import { SelectField as f } from "../../../Common/Fields/SelectField/SelectField.js";
27
+ const te = 0, ne = 0, ie = 100, oe = i.nativeEnum(z), me = i.object({
28
28
  state: i.string(),
29
29
  fipsCode: i.string(),
30
30
  caseNumber: i.string().nullable(),
@@ -32,17 +32,19 @@ const ee = 0, re = 0, te = 100, ne = i.nativeEnum(H), ie = i.object({
32
32
  remittanceNumber: i.string().nullable(),
33
33
  amount: i.number().min(0).transform(String),
34
34
  payPeriodMaximum: i.number().min(0).transform((r) => r > 0 ? r.toString() : null).nullable(),
35
- paymentPeriod: ne
35
+ paymentPeriod: oe
36
36
  });
37
- function ve({
37
+ function Ie({
38
38
  deduction: r,
39
- handleStateAgencySelect: M,
40
- stateAgencies: S,
41
- counties: D,
39
+ handleStateAgencySelect: _,
40
+ stateAgencies: x,
41
+ counties: l,
42
+ singleAllCountiesFipsCode: m,
42
43
  employeeId: A,
43
- selectedAgency: b
44
+ selectedAgency: N,
45
+ onCancel: v
44
46
  }) {
45
- const { onEvent: h, baseSubmitHandler: _ } = Q(), { t: e } = k("Employee.Deductions"), o = z(), y = {
47
+ const { onEvent: E, baseSubmitHandler: R } = re(), { t: e } = W("Employee.Deductions"), a = J(), g = {
46
48
  case_number: {
47
49
  name: "caseNumber",
48
50
  description: e("caseNumberDescription")
@@ -55,11 +57,11 @@ function ve({
55
57
  name: "remittanceNumber",
56
58
  description: e("remittanceNumberDescription")
57
59
  }
58
- }, R = b?.requiredAttributes?.map((t) => ({
59
- name: y[t.key].name,
60
+ }, T = N?.requiredAttributes?.map((t) => ({
61
+ name: g[t.key].name,
60
62
  label: t.label,
61
- description: y[t.key].description
62
- })) || [], { mutateAsync: x, isPending: T } = j(), { mutateAsync: v, isPending: q } = K(), F = T || q, u = W(() => ({
63
+ description: g[t.key].description
64
+ })) || [], { mutateAsync: q, isPending: I } = X(), { mutateAsync: k, isPending: w } = $(), O = I || w, c = K(() => ({
63
65
  amount: r?.amount ? Number(r.amount) : 0,
64
66
  payPeriodMaximum: r?.payPeriodMaximum ? Number(r.payPeriodMaximum) : null,
65
67
  state: r?.childSupport?.state || "",
@@ -68,17 +70,19 @@ function ve({
68
70
  orderNumber: r?.childSupport?.orderNumber || null,
69
71
  remittanceNumber: r?.childSupport?.remittanceNumber || null,
70
72
  paymentPeriod: r?.childSupport?.paymentPeriod
71
- }), [r]), p = Y({
72
- resolver: G(ie),
73
- defaultValues: u
74
- }), { reset: P, setValue: m, control: I } = p, N = B({ control: I, name: "state" });
75
- E(() => {
76
- P(u);
77
- }, [r, u, P]), E(() => {
78
- m("caseNumber", null), m("orderNumber", null), m("remittanceNumber", null);
79
- }, [N, m]);
80
- const w = async (t) => {
81
- const a = {
73
+ }), [r]), d = G({
74
+ resolver: V(me),
75
+ defaultValues: c
76
+ }), { reset: S, setValue: o, control: U } = d, b = H({ control: U, name: "state" });
77
+ y(() => {
78
+ S(c);
79
+ }, [r, c, S]), y(() => {
80
+ o("caseNumber", null), o("orderNumber", null), o("remittanceNumber", null);
81
+ }, [b, o]), y(() => {
82
+ typeof m == "string" && o("fipsCode", m);
83
+ }, [m, o]);
84
+ const F = async (t) => {
85
+ const u = {
82
86
  state: t.state,
83
87
  paymentPeriod: t.paymentPeriod,
84
88
  fipsCode: t.fipsCode,
@@ -86,11 +90,11 @@ function ve({
86
90
  orderNumber: t.orderNumber,
87
91
  remittanceNumber: t.remittanceNumber
88
92
  };
89
- await _(t, async (s) => {
90
- const f = {
93
+ await R(t, async (s) => {
94
+ const C = {
91
95
  active: !0,
92
96
  amount: s.amount,
93
- description: `Child Support - ${a.caseNumber}`,
97
+ description: `Child Support - ${u.caseNumber}`,
94
98
  // child support description follows prefix type + case number convention
95
99
  courtOrdered: !0,
96
100
  garnishmentType: "child_support",
@@ -99,123 +103,127 @@ function ve({
99
103
  // child support must always deduct as percentage up to a pay period maximum limit and is recurring until cancelled
100
104
  payPeriodMaximum: s.payPeriodMaximum,
101
105
  recurring: !0,
102
- childSupport: a
106
+ childSupport: u
103
107
  };
104
108
  if (r) {
105
- const { garnishment: l } = await v({
109
+ const { garnishment: h } = await k({
106
110
  request: {
107
111
  garnishmentId: r.uuid,
108
112
  requestBody: {
109
- ...f,
113
+ ...C,
110
114
  version: r.version
111
115
  }
112
116
  }
113
117
  });
114
- h(g.EMPLOYEE_DEDUCTION_UPDATED, l);
118
+ E(M.EMPLOYEE_DEDUCTION_UPDATED, h);
115
119
  } else {
116
- const { garnishment: l } = await x({
120
+ const { garnishment: h } = await q({
117
121
  request: {
118
122
  employeeId: A,
119
- requestBody: f
123
+ requestBody: C
120
124
  }
121
125
  });
122
- h(g.EMPLOYEE_DEDUCTION_CREATED, l);
126
+ E(M.EMPLOYEE_DEDUCTION_CREATED, h);
123
127
  }
124
128
  });
125
- }, O = b?.manualPaymentRequired;
126
- return /* @__PURE__ */ n(L, { ...p, children: /* @__PURE__ */ n(X, { onSubmit: p.handleSubmit(w), children: /* @__PURE__ */ c($, { flexDirection: "column", gap: 32, children: [
127
- /* @__PURE__ */ n(o.Heading, { as: "h3", children: e("childSupportTitle") }),
128
- /* @__PURE__ */ n(
129
- d,
130
- {
131
- name: "state",
132
- label: e("agency"),
133
- description: e("agencyDescription"),
134
- options: S,
135
- onChange: M,
136
- isRequired: !0
137
- }
138
- ),
139
- N && /* @__PURE__ */ c(U, { children: [
140
- /* @__PURE__ */ n(
141
- d,
142
- {
143
- name: "fipsCode",
144
- label: e("county"),
145
- description: e("countyDescription"),
146
- options: D,
147
- isRequired: !0
148
- }
149
- ),
150
- R.map(({ name: t, label: a, description: s }) => /* @__PURE__ */ n(
151
- Z,
152
- {
153
- name: t,
154
- label: a,
155
- description: s,
156
- isRequired: !0
157
- },
158
- t
159
- )),
160
- /* @__PURE__ */ n(
161
- C,
162
- {
163
- name: "payPeriodMaximum",
164
- label: e("totalAmountWithheld"),
165
- description: e("totalAmountWithheldDescription"),
166
- min: ee,
167
- adornmentStart: "$",
168
- isRequired: !0
169
- }
170
- ),
171
- /* @__PURE__ */ n(
172
- C,
173
- {
174
- name: "amount",
175
- label: e("maxPaycheckPercentage"),
176
- description: e("maxPaycheckPercentageDescription"),
177
- isRequired: !0,
178
- min: re,
179
- max: te,
180
- adornmentEnd: "%"
181
- }
182
- ),
129
+ }, Y = () => {
130
+ v();
131
+ }, B = N?.manualPaymentRequired, L = l.length > 1 || l.length === 1 && m == null;
132
+ return /* @__PURE__ */ n(j, { ...d, children: /* @__PURE__ */ n(Q, { onSubmit: d.handleSubmit(F), children: /* @__PURE__ */ p(P, { flexDirection: "column", gap: 32, children: [
133
+ /* @__PURE__ */ n(a.Heading, { as: "h3", children: e("childSupportTitle") }),
134
+ /* @__PURE__ */ p(P, { flexDirection: "column", gap: 20, children: [
183
135
  /* @__PURE__ */ n(
184
- d,
136
+ f,
185
137
  {
186
- name: "paymentPeriod",
187
- label: e("per"),
188
- description: e("perDescription"),
189
- options: [
190
- {
191
- label: e("everyWeek"),
192
- value: "Every week"
193
- },
194
- {
195
- label: e("everyOtherWeek"),
196
- value: "Every other week"
197
- },
198
- {
199
- label: e("twicePerMonth"),
200
- value: "Twice per month"
201
- },
202
- {
203
- label: e("monthly"),
204
- value: "Monthly"
205
- }
206
- ],
138
+ name: "state",
139
+ label: e("agency"),
140
+ description: e("agencyDescription"),
141
+ options: x,
142
+ onChange: _,
207
143
  isRequired: !0
208
144
  }
209
145
  ),
210
- O && /* @__PURE__ */ c("section", { className: V.manualPaymentReminderBanner, children: [
211
- /* @__PURE__ */ n(o.Text, { weight: "bold", children: e("manualPaymentRequired") }),
212
- /* @__PURE__ */ n(o.Text, { children: e("manualPaymentRequiredDescription") })
213
- ] }),
214
- /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(o.Button, { type: "submit", isLoading: F, children: e("saveCta") }) })
146
+ B && /* @__PURE__ */ n(a.Alert, { status: "warning", label: e("manualPaymentRequired") }),
147
+ b && /* @__PURE__ */ p(P, { flexDirection: "column", gap: 20, children: [
148
+ L && /* @__PURE__ */ n(
149
+ f,
150
+ {
151
+ name: "fipsCode",
152
+ label: e("county"),
153
+ description: e("countyDescription"),
154
+ options: l,
155
+ isRequired: !0
156
+ }
157
+ ),
158
+ T.map(({ name: t, label: u, description: s }) => /* @__PURE__ */ n(
159
+ Z,
160
+ {
161
+ name: t,
162
+ label: u,
163
+ description: s,
164
+ isRequired: !0
165
+ },
166
+ t
167
+ )),
168
+ /* @__PURE__ */ n(
169
+ D,
170
+ {
171
+ name: "payPeriodMaximum",
172
+ label: e("totalAmountWithheld"),
173
+ description: e("totalAmountWithheldDescription"),
174
+ min: te,
175
+ adornmentStart: "$",
176
+ isRequired: !0
177
+ }
178
+ ),
179
+ /* @__PURE__ */ n(
180
+ D,
181
+ {
182
+ name: "amount",
183
+ label: e("maxPaycheckPercentage"),
184
+ description: e("maxPaycheckPercentageDescription"),
185
+ isRequired: !0,
186
+ min: ne,
187
+ max: ie,
188
+ adornmentEnd: "%"
189
+ }
190
+ ),
191
+ /* @__PURE__ */ n(
192
+ f,
193
+ {
194
+ name: "paymentPeriod",
195
+ label: e("per"),
196
+ description: e("perDescription"),
197
+ options: [
198
+ {
199
+ label: e("everyWeek"),
200
+ value: "Every week"
201
+ },
202
+ {
203
+ label: e("everyOtherWeek"),
204
+ value: "Every other week"
205
+ },
206
+ {
207
+ label: e("twicePerMonth"),
208
+ value: "Twice per month"
209
+ },
210
+ {
211
+ label: e("monthly"),
212
+ value: "Monthly"
213
+ }
214
+ ],
215
+ isRequired: !0
216
+ }
217
+ )
218
+ ] })
219
+ ] }),
220
+ /* @__PURE__ */ p(ee, { children: [
221
+ /* @__PURE__ */ n(a.Button, { variant: "secondary", onClick: Y, children: e("cancelCta") }),
222
+ b && /* @__PURE__ */ n(a.Button, { type: "submit", isLoading: O, children: e("saveCta") })
215
223
  ] })
216
224
  ] }) }) });
217
225
  }
218
226
  export {
219
- ve as default
227
+ Ie as default
220
228
  };
221
229
  //# sourceMappingURL=ChildSupportForm.js.map
@@ -1 +1 @@
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 type { GarnishmentType } from '@gusto/embedded-api/models/operations/postv1employeesemployeeidgarnishments'\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 { type Agencies } from '@gusto/embedded-api/models/components/childsupportdata'\nimport styles from './ChildSupportForm.module.scss'\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 ChildSupportPaymentPeriodSchema = z.nativeEnum(PaymentPeriod)\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).transform(String),\n payPeriodMaximum: z\n .number()\n .min(0)\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 selectedAgency?: Agencies\n}\n\nfunction ChildSupportForm({\n deduction,\n handleStateAgencySelect,\n stateAgencies,\n counties,\n employeeId,\n selectedAgency,\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 }\n const requiredSelectedAgencyAttributes =\n selectedAgency?.requiredAttributes?.map(attr => {\n return {\n name: ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER[attr.key!].name,\n label: attr.label as string,\n description: ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER[attr.key!].description,\n }\n }) || []\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 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 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 requestBody: {\n ...requestBody,\n version: deduction.version as string,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_UPDATED, updateDeductionResponse)\n }\n })\n }\n\n const isManualPaymentRequired = selectedAgency?.manualPaymentRequired\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 <SelectField\n name=\"state\"\n label={t('agency')}\n description={t('agencyDescription')}\n options={stateAgencies}\n onChange={handleStateAgencySelect}\n isRequired\n />\n {watchedStateAgency && (\n <>\n <SelectField\n name=\"fipsCode\"\n label={t('county')}\n description={t('countyDescription')}\n options={counties}\n isRequired\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 {isManualPaymentRequired && (\n <section className={styles.manualPaymentReminderBanner}>\n <Components.Text weight=\"bold\">{t('manualPaymentRequired')}</Components.Text>\n <Components.Text>{t('manualPaymentRequiredDescription')}</Components.Text>\n </section>\n )}\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n\nexport default ChildSupportForm\n"],"names":["MINIMUM_PAY_PERIOD_AMOUNT","MINIMUM_PAYCHECK_PERCENTAGE","MAXIMUM_PAYCHECK_PERCENTAGE","ChildSupportPaymentPeriodSchema","z","PaymentPeriod","ChildSupportSchema","val","ChildSupportForm","deduction","handleStateAgencySelect","stateAgencies","counties","employeeId","selectedAgency","onEvent","baseSubmitHandler","useBase","t","useTranslation","Components","useComponentContext","ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER","requiredSelectedAgencyAttributes","attr","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","isManualPaymentRequired","FormProvider","jsx","Form","jsxs","Flex","SelectField","Fragment","name","label","description","TextInputField","NumberInputField","styles","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAMA,KAA4B,GAC5BC,KAA8B,GAC9BC,KAA8B,KAE9BC,KAAkCC,EAAE,WAAWC,CAAa,GAC5DC,KAAqBF,EAAE,OAAO;AAAA,EAClC,OAAOA,EAAE,OAAA;AAAA,EACT,UAAUA,EAAE,OAAA;AAAA,EACZ,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,aAAaA,EAAE,OAAA,EAAS,SAAA;AAAA,EACxB,kBAAkBA,EAAE,OAAA,EAAS,SAAA;AAAA,EAC7B,QAAQA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU,MAAM;AAAA,EAC1C,kBAAkBA,EACf,OAAA,EACA,IAAI,CAAC,EACL,UAAU,CAAAG,MAAQA,IAAM,IAAIA,EAAI,SAAA,IAAa,IAAK,EAClD,SAAA;AAAA,EACH,eAAeJ;AACjB,CAAC;AAcD,SAASK,GAAiB;AAAA,EACxB,WAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,gBAAAC;AACF,GAA0B;AACxB,QAAM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AA,EAAA,CAEJ,GACF,GACF;AAEJ;"}
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 type { GarnishmentType } from '@gusto/embedded-api/models/operations/postv1employeesemployeeidgarnishments'\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 { 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 ChildSupportPaymentPeriodSchema = z.nativeEnum(PaymentPeriod)\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).transform(String),\n payPeriodMaximum: z\n .number()\n .min(0)\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 }\n const requiredSelectedAgencyAttributes =\n selectedAgency?.requiredAttributes?.map(attr => {\n return {\n name: ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER[attr.key!].name,\n label: attr.label as string,\n description: ATTR_KEY_TO_TEXT_FIELD_NAME_MAPPER[attr.key!].description,\n }\n }) || []\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 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 requestBody: {\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","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","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":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAMA,KAA4B,GAC5BC,KAA8B,GAC9BC,KAA8B,KAE9BC,KAAkCC,EAAE,WAAWC,CAAa,GAC5DC,KAAqBF,EAAE,OAAO;AAAA,EACl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;AAAA,YAChC,aAAaA,EAAE,kCAAkC;AAAA,YACjD,YAAU;AAAA,YACV,KAAKnB;AAAA,YACL,KAAKC;AAAA,YACL,cAAa;AAAA,UAAA;AAAA,QAAA;AAAA,QAEf,gBAAAuD;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOzC,EAAE,KAAK;AAAA,YACd,aAAaA,EAAE,gBAAgB;AAAA,YAC/B,SAAS;AAAA,cACP;AAAA,gBACE,OAAOA,EAAE,WAAW;AAAA,gBACpB,OAAO;AAAA,cAAA;AAAA,cAET;AAAA,gBACE,OAAOA,EAAE,gBAAgB;AAAA,gBACzB,OAAO;AAAA,cAAA;AAAA,cAET;AAAA,gBACE,OAAOA,EAAE,eAAe;AAAA,gBACxB,OAAO;AAAA,cAAA;AAAA,cAET;AAAA,gBACE,OAAOA,EAAE,SAAS;AAAA,gBAClB,OAAO;AAAA,cAAA;AAAA,YACT;AAAA,YAEF,YAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACZ,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,sBACC+C,IAAA,EACC,UAAA;AAAA,MAAA,gBAAAV,EAACnC,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAAS+B,GAC7C,UAAAjC,EAAE,WAAW,EAAA,CAChB;AAAA,MACCsB,KACC,gBAAAe,EAACnC,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWW,GACzC,UAAAb,EAAE,SAAS,EAAA,CACd;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -34,6 +34,7 @@ export type DeductionPayload = z.output<typeof DeductionSchema>;
34
34
  interface ChildSupportFormProps extends CommonComponentInterface<'Employee.Deductions'> {
35
35
  employeeId: string;
36
36
  deduction?: Garnishment | null;
37
+ onCancel: () => void;
37
38
  }
38
- declare function CustomDeductionForm({ deduction, employeeId }: ChildSupportFormProps): import("react/jsx-runtime").JSX.Element;
39
+ declare function CustomDeductionForm({ deduction, employeeId, onCancel }: ChildSupportFormProps): import("react/jsx-runtime").JSX.Element;
39
40
  export default CustomDeductionForm;