@gusto/embedded-react-sdk 0.39.0 → 0.41.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 (717) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/dist/components/Base/Base.js +3 -2
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  5. package/dist/components/Common/Form/Form.d.ts +1 -1
  6. package/dist/components/Common/Form/Form.js +15 -5
  7. package/dist/components/Common/Form/Form.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
  9. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormActions.js +11 -9
  11. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js +12 -10
  13. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  14. package/dist/components/Common/UI/Alert/Alert.module.scss.js +12 -12
  15. package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
  16. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
  18. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
  20. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -6
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
  38. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  40. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +3 -2
  42. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -7
  44. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  46. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
  48. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
  50. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  52. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  54. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
  56. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  58. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  59. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +80 -61
  60. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  61. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.d.ts +3 -3
  62. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.js +2 -2
  63. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -0
  64. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/index.d.ts +1 -3
  65. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.d.ts +2 -2
  66. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.js +1 -1
  67. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
  68. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +33 -0
  69. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +106 -0
  70. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
  71. package/dist/components/Company/FederalTaxes/Actions.js +6 -5
  72. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  73. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -7
  74. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  75. package/dist/components/Company/FederalTaxes/Form.js +3 -2
  76. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  77. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  78. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  79. package/dist/components/Company/Industry/Actions.js +3 -2
  80. package/dist/components/Company/Industry/Actions.js.map +1 -1
  81. package/dist/components/Company/Industry/Context.js +7 -6
  82. package/dist/components/Company/Industry/Context.js.map +1 -1
  83. package/dist/components/Company/Industry/Edit.js +5 -4
  84. package/dist/components/Company/Industry/Edit.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  86. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  87. package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
  88. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  89. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -2
  90. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  91. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  92. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  93. package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
  94. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  95. package/dist/components/Company/Locations/LocationsList/List.js +7 -6
  96. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -6
  98. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  99. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  100. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  101. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
  102. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  103. package/dist/components/Company/OnboardingOverview/Completed.js +6 -5
  104. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  105. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
  106. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  107. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +4 -2
  108. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  109. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  110. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  111. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +6 -1
  112. package/dist/components/Company/PaySchedule/PaySchedule.js +31 -148
  113. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  114. package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +10 -0
  115. package/dist/components/Company/PaySchedule/PayScheduleComponents.js +26 -0
  116. package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -0
  117. package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +8 -0
  118. package/dist/components/Company/PaySchedule/PayScheduleForm.js +199 -0
  119. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -0
  120. package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +8 -0
  121. package/dist/components/Company/PaySchedule/PayScheduleList.js +103 -0
  122. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -0
  123. package/dist/components/Company/PaySchedule/{_parts/List.module.scss.js → PayScheduleList.module.scss.js} +1 -1
  124. package/dist/components/Company/PaySchedule/PayScheduleList.module.scss.js.map +1 -0
  125. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +6 -0
  126. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +49 -0
  127. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -0
  128. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.d.ts +6 -6
  129. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.js +5 -5
  130. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -0
  131. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/index.d.ts +0 -2
  132. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.d.ts +2 -2
  133. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.js +2 -2
  134. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -0
  135. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +33 -0
  136. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/usePayScheduleForm.js +30 -26
  137. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
  138. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  139. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  141. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  142. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  143. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +6 -5
  145. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  147. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  148. package/dist/components/Company/exports/companyOnboarding.d.ts +14 -0
  149. package/dist/components/Company/exports/companyOnboarding.js +31 -0
  150. package/dist/components/Company/exports/companyOnboarding.js.map +1 -0
  151. package/dist/components/Contractor/Address/Address.js +4 -2
  152. package/dist/components/Contractor/Address/Address.js.map +1 -1
  153. package/dist/components/Contractor/Address/Form.js +3 -2
  154. package/dist/components/Contractor/Address/Form.js.map +1 -1
  155. package/dist/components/Contractor/Address/useAddress.js +6 -5
  156. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  157. package/dist/components/Contractor/ContractorList/index.js +3 -2
  158. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  159. package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -2
  160. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  161. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -4
  162. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  163. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  164. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  165. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  166. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  167. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
  168. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  169. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
  170. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  171. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +3 -2
  172. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  173. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -2
  174. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  175. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
  176. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  177. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +14 -13
  178. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  179. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
  180. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  181. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
  182. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  183. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  184. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  185. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  186. package/dist/components/Contractor/Submit/Submit.js +74 -50
  187. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  188. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +7 -0
  189. package/dist/components/Contractor/exports/contractorOnboarding.js +17 -0
  190. package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -0
  191. package/dist/components/Employee/Compensation/Actions.js +5 -4
  192. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  193. package/dist/components/Employee/Compensation/Edit.js +23 -22
  194. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  195. package/dist/components/Employee/Compensation/List.js +23 -22
  196. package/dist/components/Employee/Compensation/List.js.map +1 -1
  197. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.d.ts +2 -2
  198. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.js +4 -4
  199. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -0
  200. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.d.ts +8 -8
  201. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.js +6 -6
  202. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -0
  203. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/index.d.ts +0 -2
  204. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +43 -0
  205. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/useCompensationForm.js +28 -24
  206. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -0
  207. package/dist/components/Employee/Dashboard/Dashboard.js +79 -79
  208. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  209. package/dist/components/Employee/Dashboard/DocumentsView.js +2 -5
  210. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  211. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +8 -11
  212. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +8 -8
  213. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  214. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +10 -12
  215. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +11 -11
  216. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  217. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +6 -9
  218. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -10
  219. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
  220. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +7 -10
  221. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +8 -8
  222. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
  223. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +3 -2
  224. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  225. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +3 -2
  226. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  227. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +3 -2
  228. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  229. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -6
  230. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  231. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
  232. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  233. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
  234. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  235. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +11 -9
  236. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  237. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  238. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  239. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  240. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  241. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +23 -22
  242. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  243. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -2
  244. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  245. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +13 -11
  246. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  247. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  248. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  249. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.d.ts +5 -5
  250. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.js +4 -4
  251. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -0
  252. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/index.d.ts +0 -4
  253. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.d.ts +1 -1
  254. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.js +1 -1
  255. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  256. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +47 -0
  257. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/useSignEmployeeForm.js +66 -59
  258. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  259. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
  260. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  261. package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
  262. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  263. package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -4
  264. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  265. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  266. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  267. package/dist/components/Employee/Landing/Landing.js +7 -6
  268. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  269. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  270. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  271. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  272. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  273. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
  274. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  275. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
  276. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  277. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
  278. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  279. package/dist/components/Employee/PaymentMethod/Split.js +3 -2
  280. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  281. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  282. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  283. package/dist/components/Employee/Profile/AdminProfile.d.ts +2 -0
  284. package/dist/components/Employee/Profile/AdminProfile.js +358 -0
  285. package/dist/components/Employee/Profile/AdminProfile.js.map +1 -0
  286. package/dist/components/Employee/Profile/AdminProfile.module.scss.js +10 -0
  287. package/dist/components/Employee/Profile/AdminProfile.module.scss.js.map +1 -0
  288. package/dist/components/Employee/Profile/EmployeeProfile.d.ts +2 -0
  289. package/dist/components/Employee/Profile/EmployeeProfile.js +211 -0
  290. package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -0
  291. package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js +10 -0
  292. package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js.map +1 -0
  293. package/dist/components/Employee/Profile/Profile.d.ts +3 -3
  294. package/dist/components/Employee/Profile/Profile.js +25 -261
  295. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  296. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
  297. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.js +2 -2
  298. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
  299. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.d.ts +4 -4
  300. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.js +5 -5
  301. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -0
  302. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/index.d.ts +0 -2
  303. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +15 -33
  304. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.js +31 -27
  305. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
  306. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +22 -0
  307. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +36 -0
  308. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -0
  309. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +41 -0
  310. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +32 -0
  311. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -0
  312. package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +5 -0
  313. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +44 -0
  314. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +161 -0
  315. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -0
  316. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.d.ts +3 -3
  317. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.js +2 -2
  318. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -0
  319. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/index.d.ts +0 -2
  320. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.d.ts +11 -32
  321. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.js +34 -30
  322. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
  323. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.d.ts +3 -5
  324. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.js +7 -9
  325. package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -0
  326. package/dist/components/Employee/StateTaxes/Actions.js +8 -7
  327. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  328. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  329. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  330. package/dist/components/Employee/Taxes/Actions.js +9 -8
  331. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  332. package/dist/components/Employee/Taxes/FederalForm.js +5 -4
  333. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  334. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  335. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  336. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +5 -5
  337. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  338. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +13 -12
  339. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  340. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -8
  341. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  342. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +3 -2
  343. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  344. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.d.ts +1 -1
  345. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.js +7 -7
  346. package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +1 -0
  347. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.d.ts +1 -1
  348. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.js +15 -14
  349. package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -0
  350. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.d.ts +1 -1
  351. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.js +7 -7
  352. package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +1 -0
  353. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeListView.d.ts +1 -1
  354. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js +131 -0
  355. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -0
  356. package/dist/components/Employee/employee-list/shared/index.d.ts +2 -0
  357. package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.d.ts +8 -10
  358. package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.js +32 -28
  359. package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +1 -0
  360. package/dist/components/Employee/exports/employeeManagement.d.ts +6 -0
  361. package/dist/components/Employee/exports/employeeManagement.js +15 -0
  362. package/dist/components/Employee/exports/employeeManagement.js.map +1 -0
  363. package/dist/components/Employee/exports/employeeOnboarding.d.ts +14 -0
  364. package/dist/components/Employee/exports/employeeOnboarding.js +31 -0
  365. package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -0
  366. package/dist/components/Employee/index.d.ts +1 -2
  367. package/dist/components/Employee/index.js +35 -37
  368. package/dist/components/Employee/index.js.map +1 -1
  369. package/dist/components/Flow/Flow.js +12 -11
  370. package/dist/components/Flow/Flow.js.map +1 -1
  371. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +18 -17
  372. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  373. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +8 -7
  374. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  375. package/dist/components/InformationRequests/InformationRequests.js +3 -2
  376. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  377. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +11 -10
  378. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  379. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +9 -8
  380. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  381. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
  382. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  383. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +19 -18
  384. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  385. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +2 -1
  386. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  387. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +7 -6
  388. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  389. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +3 -2
  390. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  391. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -7
  392. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  393. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +17 -17
  394. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  395. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
  396. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  397. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +3 -2
  398. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  399. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -4
  400. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  401. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  402. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  403. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +13 -12
  404. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  405. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
  406. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  407. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
  408. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  409. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
  410. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  411. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +106 -108
  412. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  413. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
  414. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  415. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -0
  416. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  417. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
  418. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  419. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +13 -12
  420. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  421. package/dist/components/Payroll/usePreparedPayrollData.js +10 -9
  422. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  423. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -12
  424. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  425. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +1 -1
  426. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +96 -62
  427. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
  428. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
  429. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +48 -45
  430. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  431. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +2 -0
  432. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +18 -0
  433. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js.map +1 -0
  434. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +2 -0
  435. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +166 -0
  436. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
  437. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsTypes.d.ts +18 -0
  438. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +3 -2
  439. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  440. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +24 -22
  441. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  442. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +3 -2
  443. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  444. package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -0
  445. package/dist/components/UNSTABLE_TimeOff/index.js +24 -22
  446. package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -1
  447. package/dist/components/index.d.ts +7 -0
  448. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +11 -10
  449. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  450. package/dist/contexts/ObservabilityProvider/useObservability.js +6 -6
  451. package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -1
  452. package/dist/i18n/I18n.js +9 -9
  453. package/dist/i18n/I18n.js.map +1 -1
  454. package/dist/i18n/en/Company.PaySchedule.json.js +15 -13
  455. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  456. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +1 -1
  457. package/dist/i18n/en/Contractor.Submit.json.js +16 -12
  458. package/dist/i18n/en/Contractor.Submit.json.js.map +1 -1
  459. package/dist/i18n/en/common.json.d.ts +1 -0
  460. package/dist/i18n/en/common.json.js +1 -1
  461. package/dist/index.d.ts +16 -0
  462. package/dist/index.js +102 -26
  463. package/dist/index.js.map +1 -1
  464. package/dist/partner-hook-utils/collectErrors.js.map +1 -0
  465. package/dist/partner-hook-utils/composeErrorHandler.d.ts +24 -0
  466. package/dist/partner-hook-utils/composeErrorHandler.js +30 -0
  467. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -0
  468. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.d.ts +2 -2
  469. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.js +3 -3
  470. package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js.map +1 -0
  471. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.d.ts +2 -2
  472. package/dist/partner-hook-utils/form/FormFieldsMetadataProvider.js.map +1 -0
  473. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.d.ts +2 -2
  474. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -0
  475. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.d.ts +1 -1
  476. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -0
  477. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.d.ts +29 -3
  478. package/dist/partner-hook-utils/form/composeSubmitHandler.js +40 -0
  479. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -0
  480. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/CheckboxHookField.d.ts +3 -3
  481. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +37 -0
  482. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -0
  483. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.d.ts +3 -3
  484. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.js +1 -1
  485. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -0
  486. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/NumberInputHookField.d.ts +3 -3
  487. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +43 -0
  488. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -0
  489. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.d.ts +3 -3
  490. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +43 -0
  491. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -0
  492. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.d.ts +3 -3
  493. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.js +18 -16
  494. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -0
  495. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SwitchHookField.d.ts +3 -3
  496. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +37 -0
  497. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -0
  498. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/TextInputHookField.d.ts +3 -3
  499. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +41 -0
  500. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -0
  501. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/index.d.ts +7 -7
  502. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.d.ts +1 -1
  503. package/dist/partner-hook-utils/form/getFieldWithOptions.js.map +1 -0
  504. package/dist/partner-hook-utils/form/getFormSubmissionValues.js.map +1 -0
  505. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/index.d.ts +2 -2
  506. package/dist/partner-hook-utils/form/preprocessors.js.map +1 -0
  507. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.d.ts +2 -2
  508. package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -0
  509. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useDeriveFieldsMetadata.d.ts +1 -1
  510. package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js +21 -0
  511. package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js.map +1 -0
  512. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.d.ts +1 -1
  513. package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -0
  514. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.d.ts +2 -2
  515. package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -0
  516. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.d.ts +1 -1
  517. package/dist/partner-hook-utils/form/withOptions.js.map +1 -0
  518. package/dist/partner-hook-utils/index.d.ts +5 -0
  519. package/dist/{types/sdkHooks.d.ts → partner-hook-utils/types.d.ts} +37 -9
  520. package/dist/shared/constants.d.ts +1 -1
  521. package/dist/shared/constants.js +15 -16
  522. package/dist/shared/constants.js.map +1 -1
  523. package/dist/style.css +1 -1
  524. package/dist/types/i18next.d.ts +24 -252
  525. package/dist/types/sdkError.js.map +1 -1
  526. package/docs/reference/endpoint-inventory.json +531 -170
  527. package/package.json +15 -19
  528. package/dist/UNSTABLE_Hooks.d.ts +0 -1
  529. package/dist/UNSTABLE_Hooks.js +0 -71
  530. package/dist/UNSTABLE_Hooks.js.map +0 -1
  531. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
  532. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js +0 -20
  533. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +0 -1
  534. package/dist/components/Company/DocumentSigner/SignatureForm/Form.d.ts +0 -1
  535. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js +0 -20
  536. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +0 -1
  537. package/dist/components/Company/DocumentSigner/SignatureForm/Head.d.ts +0 -1
  538. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js +0 -35
  539. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +0 -1
  540. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
  541. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js +0 -20
  542. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +0 -1
  543. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
  544. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +0 -22
  545. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
  546. package/dist/components/Company/PaySchedule/_parts/Actions.d.ts +0 -1
  547. package/dist/components/Company/PaySchedule/_parts/Actions.js +0 -63
  548. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +0 -1
  549. package/dist/components/Company/PaySchedule/_parts/Edit.d.ts +0 -1
  550. package/dist/components/Company/PaySchedule/_parts/Edit.js +0 -134
  551. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +0 -1
  552. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +0 -14
  553. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js.map +0 -1
  554. package/dist/components/Company/PaySchedule/_parts/Head.d.ts +0 -1
  555. package/dist/components/Company/PaySchedule/_parts/Head.js +0 -47
  556. package/dist/components/Company/PaySchedule/_parts/Head.js.map +0 -1
  557. package/dist/components/Company/PaySchedule/_parts/List.d.ts +0 -1
  558. package/dist/components/Company/PaySchedule/_parts/List.js +0 -57
  559. package/dist/components/Company/PaySchedule/_parts/List.js.map +0 -1
  560. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +0 -1
  561. package/dist/components/Company/PaySchedule/_parts/index.d.ts +0 -5
  562. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -39
  563. package/dist/components/Company/PaySchedule/usePaySchedule.js +0 -30
  564. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +0 -1
  565. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +0 -1
  566. package/dist/components/Employee/EmployeeList/EmployeeListView.js +0 -130
  567. package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +0 -1
  568. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +0 -1
  569. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +0 -1
  570. package/dist/components/Employee/EmployeeList/index.d.ts +0 -3
  571. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +0 -1
  572. package/dist/components/Employee/Profile/Actions.d.ts +0 -1
  573. package/dist/components/Employee/Profile/Actions.js +0 -14
  574. package/dist/components/Employee/Profile/Actions.js.map +0 -1
  575. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +0 -33
  576. package/dist/components/Employee/Profile/AdminPersonalDetails.js +0 -59
  577. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +0 -1
  578. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +0 -8
  579. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +0 -1
  580. package/dist/components/Employee/Profile/Head.d.ts +0 -1
  581. package/dist/components/Employee/Profile/Head.js +0 -14
  582. package/dist/components/Employee/Profile/Head.js.map +0 -1
  583. package/dist/components/Employee/Profile/HomeAddress.d.ts +0 -31
  584. package/dist/components/Employee/Profile/HomeAddress.js +0 -128
  585. package/dist/components/Employee/Profile/HomeAddress.js.map +0 -1
  586. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +0 -49
  587. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +0 -146
  588. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +0 -1
  589. package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +0 -16
  590. package/dist/components/Employee/Profile/SelfPersonalDetails.js +0 -29
  591. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +0 -1
  592. package/dist/components/Employee/Profile/WorkAddress.d.ts +0 -1
  593. package/dist/components/Employee/Profile/WorkAddress.js +0 -21
  594. package/dist/components/Employee/Profile/WorkAddress.js.map +0 -1
  595. package/dist/components/Employee/Profile/WorkAddress.module.scss.js +0 -8
  596. package/dist/components/Employee/Profile/WorkAddress.module.scss.js.map +0 -1
  597. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.d.ts +0 -2
  598. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js +0 -8
  599. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +0 -1
  600. package/dist/components/Employee/Profile/useProfile.d.ts +0 -16
  601. package/dist/components/Employee/Profile/useProfile.js +0 -20
  602. package/dist/components/Employee/Profile/useProfile.js.map +0 -1
  603. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +0 -1
  604. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +0 -1
  605. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +0 -1
  606. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +0 -1
  607. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +0 -34
  608. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +0 -1
  609. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +0 -35
  610. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +0 -1
  611. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +0 -1
  612. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +0 -41
  613. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +0 -1
  614. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +0 -41
  615. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +0 -1
  616. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +0 -1
  617. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +0 -35
  618. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +0 -1
  619. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +0 -39
  620. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +0 -1
  621. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +0 -1
  622. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +0 -1
  623. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +0 -1
  624. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +0 -1
  625. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +0 -21
  626. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +0 -1
  627. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +0 -1
  628. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +0 -1
  629. package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +0 -1
  630. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +0 -5
  631. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +0 -149
  632. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +0 -1
  633. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +0 -1
  634. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +0 -1
  635. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +0 -102
  636. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +0 -1
  637. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +0 -5
  638. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +0 -112
  639. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +0 -1
  640. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +0 -1
  641. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +0 -1
  642. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +0 -1
  643. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +0 -5
  644. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +0 -172
  645. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +0 -1
  646. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +0 -1
  647. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +0 -1
  648. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +0 -69
  649. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +0 -1
  650. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +0 -5
  651. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +0 -69
  652. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +0 -1
  653. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +0 -1
  654. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +0 -1
  655. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +0 -57
  656. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +0 -101
  657. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +0 -1
  658. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +0 -5
  659. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +0 -71
  660. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +0 -1
  661. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +0 -5
  662. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +0 -179
  663. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +0 -1
  664. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +0 -1
  665. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  666. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -151
  667. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  668. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +0 -5
  669. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +0 -69
  670. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +0 -1
  671. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +0 -1
  672. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +0 -1
  673. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +0 -1
  674. package/dist/components/UNSTABLE_Hooks/index.d.ts +0 -12
  675. package/dist/helpers/buildQueryErrorHandling.d.ts +0 -22
  676. package/dist/helpers/buildQueryErrorHandling.js +0 -11
  677. package/dist/helpers/buildQueryErrorHandling.js.map +0 -1
  678. package/dist/helpers/collectErrors.js.map +0 -1
  679. package/dist/hooks/useErrorHandling.d.ts +0 -9
  680. package/dist/hooks/useErrorHandling.js +0 -12
  681. package/dist/hooks/useErrorHandling.js.map +0 -1
  682. package/dist/hooks/useErrorHandling.test.d.ts +0 -1
  683. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +0 -58
  684. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +0 -1
  685. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +0 -34
  686. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +0 -1
  687. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +0 -24
  688. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +0 -1
  689. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +0 -20
  690. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +0 -1
  691. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +0 -22
  692. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +0 -1
  693. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +0 -70
  694. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +0 -1
  695. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +0 -24
  696. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +0 -1
  697. /package/dist/components/{UNSTABLE_Hooks/hooks/usePayScheduleForm → Company/PaySchedule}/PayScheduleForm.module.scss.js +0 -0
  698. /package/dist/components/{UNSTABLE_Hooks/hooks/usePayScheduleForm → Company/PaySchedule}/PayScheduleForm.module.scss.js.map +0 -0
  699. /package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchemaParity.test.d.ts +0 -0
  700. /package/dist/{helpers → partner-hook-utils}/collectErrors.d.ts +0 -0
  701. /package/dist/{helpers → partner-hook-utils}/collectErrors.js +0 -0
  702. /package/dist/{components/Employee/Profile/getEmployeeAddressForProfile.test.d.ts → partner-hook-utils/composeErrorHandler.test.d.ts} +0 -0
  703. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.js +0 -0
  704. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.js +0 -0
  705. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.js +0 -0
  706. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.test.d.ts +0 -0
  707. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.test.d.ts +0 -0
  708. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.js +0 -0
  709. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.d.ts +0 -0
  710. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.js +0 -0
  711. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.test.d.ts +0 -0
  712. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.d.ts +0 -0
  713. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.js +0 -0
  714. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.js +0 -0
  715. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.js +0 -0
  716. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.js +0 -0
  717. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.js +0 -0
@@ -1,218 +1,216 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as c } from "react/jsx-runtime";
2
2
  import { useRef as z } from "react";
3
3
  import { useTranslation as I } from "react-i18next";
4
- import p from "classnames";
4
+ import d from "classnames";
5
5
  import s from "./PayrollReceiptsPresentation.module.scss.js";
6
- import { Flex as m } from "../../Common/Flex/Flex.js";
6
+ import { Flex as i } from "../../Common/Flex/Flex.js";
7
7
  import { useComponentContext as M } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import { formatNumberAsCurrency as i } from "../../../helpers/formattedStrings.js";
8
+ import { formatNumberAsCurrency as r } from "../../../helpers/formattedStrings.js";
9
9
  import { useI18n as $ } from "../../../i18n/I18n.js";
10
10
  import A from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
11
11
  import B from "../../../assets/icons/receipt-check.svg.js";
12
- import { DataTable as f } from "../../Common/DataView/DataTable/DataTable.js";
12
+ import { DataTable as h } from "../../Common/DataView/DataTable/DataTable.js";
13
13
  import { DataView as H } from "../../Common/DataView/DataView.js";
14
14
  const Z = ({
15
- receiptData: l,
15
+ receiptData: o,
16
16
  withReimbursements: u = !0
17
17
  }) => {
18
- const h = M(), { Heading: b, Text: o } = h;
18
+ const b = M(), { Heading: y, Text: m } = b;
19
19
  $("Payroll.PayrollReceipts");
20
- const { t } = I("Payroll.PayrollReceipts"), y = z(null), d = !A({ ref: y }).includes("small"), g = (n) => `${n.employeeFirstName || ""} ${n.employeeLastName || ""}`.trim(), x = () => (l.employeeCompensations || []).reduce(
21
- (n, a) => n + parseFloat(a.childSupportGarnishment || "0"),
20
+ const { t: e } = I("Payroll.PayrollReceipts"), f = z(null), p = !A({ ref: f }).includes("small"), x = (t) => `${t.employeeFirstName || ""} ${t.employeeLastName || ""}`.trim(), g = () => (o.employeeCompensations || []).reduce(
21
+ (t, a) => t + parseFloat(a.childSupportGarnishment || "0"),
22
22
  0
23
- ), w = () => (l.employeeCompensations || []).reduce(
24
- (n, a) => n + parseFloat(a.totalReimbursement || "0"),
23
+ ), F = () => (o.employeeCompensations || []).reduce(
24
+ (t, a) => t + parseFloat(a.totalReimbursement || "0"),
25
25
  0
26
- ), F = () => (l.employeeCompensations || []).reduce(
27
- (n, a) => n + parseFloat(a.netPay || "0"),
26
+ ), k = () => (o.employeeCompensations || []).reduce(
27
+ (t, a) => t + parseFloat(a.netPay || "0"),
28
28
  0
29
- ), k = () => (l.employeeCompensations || []).reduce(
30
- (n, a) => n + parseFloat(a.totalTax || "0"),
29
+ ), C = () => (o.employeeCompensations || []).reduce(
30
+ (t, a) => t + parseFloat(a.totalTax || "0"),
31
31
  0
32
- ), C = [
32
+ ), N = [
33
33
  {
34
- label: t("breakdown.directDeposits"),
35
- amount: parseFloat(l.totals?.netPayDebit || "0")
34
+ label: e("breakdown.directDeposits"),
35
+ amount: parseFloat(o.totals?.netPayDebit || "0")
36
36
  },
37
37
  ...u ? [
38
38
  {
39
- label: t("breakdown.reimbursements"),
40
- amount: parseFloat(l.totals?.reimbursementDebit || "0")
39
+ label: e("breakdown.reimbursements"),
40
+ amount: parseFloat(o.totals?.reimbursementDebit || "0")
41
41
  }
42
42
  ] : [],
43
43
  {
44
- label: t("breakdown.garnishments"),
45
- amount: parseFloat(l.totals?.childSupportDebit || "0")
44
+ label: e("breakdown.garnishments"),
45
+ amount: parseFloat(o.totals?.childSupportDebit || "0")
46
46
  },
47
- { label: t("breakdown.taxes"), amount: parseFloat(l.totals?.taxDebit || "0") }
48
- ], N = [
47
+ { label: e("breakdown.taxes"), amount: parseFloat(o.totals?.taxDebit || "0") }
48
+ ], v = [
49
49
  {
50
- label: t("receipt.receiptId"),
51
- value: l.payrollUuid || ""
50
+ label: e("receipt.receiptId"),
51
+ value: o.payrollUuid || ""
52
52
  },
53
53
  {
54
- label: t("receipt.from"),
55
- value: l.nameOfSender || ""
54
+ label: e("receipt.from"),
55
+ value: o.nameOfSender || ""
56
56
  },
57
57
  {
58
- label: t("receipt.to"),
59
- value: l.nameOfRecipient || "Payroll Recipients"
58
+ label: e("receipt.to"),
59
+ value: o.nameOfRecipient || "Payroll Recipients"
60
60
  },
61
61
  {
62
- label: t("receipt.debitDate"),
63
- value: l.debitDate || ""
62
+ label: e("receipt.debitDate"),
63
+ value: o.debitDate || ""
64
64
  }
65
- ], v = () => /* @__PURE__ */ e("div", { className: p(s.receiptHeader, d && s.receiptHeaderMobile), children: /* @__PURE__ */ c(m, { flexDirection: "column", gap: 24, children: [
66
- /* @__PURE__ */ c(m, { flexDirection: "column", alignItems: "center", gap: 16, children: [
67
- /* @__PURE__ */ e("div", { className: s.receiptIcon, children: /* @__PURE__ */ e(B, { className: s.checkmarkIcon }) }),
68
- /* @__PURE__ */ c(m, { flexDirection: "column", alignItems: "center", gap: 8, children: [
69
- /* @__PURE__ */ e(o, { size: "sm", variant: "supporting", children: t("receipt.totalLabel") }),
70
- /* @__PURE__ */ e(b, { as: "h1", styledAs: "h2", className: s.totalAmount, children: i(parseFloat(l.totals?.companyDebit || "0")) })
65
+ ], w = () => /* @__PURE__ */ l("div", { className: d(s.receiptHeader, p && s.receiptHeaderMobile), children: /* @__PURE__ */ c(i, { flexDirection: "column", gap: 24, children: [
66
+ /* @__PURE__ */ c(i, { flexDirection: "column", alignItems: "center", gap: 16, children: [
67
+ /* @__PURE__ */ l("div", { className: s.receiptIcon, children: /* @__PURE__ */ l(B, { className: s.checkmarkIcon }) }),
68
+ /* @__PURE__ */ c(i, { flexDirection: "column", alignItems: "center", gap: 8, children: [
69
+ /* @__PURE__ */ l(m, { size: "sm", variant: "supporting", children: e("receipt.totalLabel") }),
70
+ /* @__PURE__ */ l(y, { as: "h1", styledAs: "h2", className: s.totalAmount, children: r(parseFloat(o.totals?.companyDebit || "0")) })
71
71
  ] })
72
72
  ] }),
73
- /* @__PURE__ */ e(
74
- h.DescriptionList,
73
+ /* @__PURE__ */ l(
74
+ b.DescriptionList,
75
75
  {
76
76
  layout: "horizontal",
77
77
  showSeparators: !1,
78
- items: N.map(
79
- ({ label: n, value: a }) => ({
80
- term: /* @__PURE__ */ e(o, { size: "sm", variant: "supporting", children: n }),
81
- description: /* @__PURE__ */ e(o, { size: "sm", children: a })
78
+ items: v.map(
79
+ ({ label: t, value: a }) => ({
80
+ term: /* @__PURE__ */ l(m, { size: "sm", variant: "supporting", children: t }),
81
+ description: /* @__PURE__ */ l(m, { size: "sm", children: a })
82
82
  })
83
83
  )
84
84
  }
85
85
  ),
86
- /* @__PURE__ */ c(m, { flexDirection: "column", alignItems: "center", gap: 12, children: [
87
- /* @__PURE__ */ e(
88
- o,
86
+ /* @__PURE__ */ c(i, { flexDirection: "column", alignItems: "center", gap: 12, children: [
87
+ /* @__PURE__ */ l(
88
+ m,
89
89
  {
90
90
  size: "sm",
91
91
  variant: "supporting",
92
- className: p(s.disclaimer, d && s.textMobile),
93
- children: l.recipientNotice
92
+ className: d(s.disclaimer, p && s.textMobile),
93
+ children: o.recipientNotice
94
94
  }
95
95
  ),
96
- /* @__PURE__ */ e(
97
- o,
96
+ /* @__PURE__ */ l(
97
+ m,
98
98
  {
99
99
  size: "sm",
100
100
  variant: "supporting",
101
- className: p(s.companyInfo, d && s.textMobile),
102
- children: l.license
101
+ className: d(s.companyInfo, p && s.textMobile),
102
+ children: o.license
103
103
  }
104
104
  ),
105
- /* @__PURE__ */ e(
106
- o,
105
+ /* @__PURE__ */ l(
106
+ m,
107
107
  {
108
108
  size: "sm",
109
109
  variant: "supporting",
110
- className: p(s.address, d && s.textMobile),
111
- children: l.licensee && `${l.licensee.address || ""}, ${l.licensee.city || ""}, ${l.licensee.state || ""} ${l.licensee.postalCode || ""}`
110
+ className: d(s.address, p && s.textMobile),
111
+ children: o.licensee && `${o.licensee.address || ""}, ${o.licensee.city || ""}, ${o.licensee.state || ""} ${o.licensee.postalCode || ""}`
112
112
  }
113
113
  )
114
114
  ] })
115
- ] }) }), P = () => /* @__PURE__ */ e(m, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ e(
116
- f,
115
+ ] }) }), P = () => /* @__PURE__ */ l(i, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ l(
116
+ h,
117
117
  {
118
- label: t("sections.debitedLabel"),
118
+ label: e("sections.debitedLabel"),
119
119
  columns: [
120
120
  {
121
- title: t("sections.debitedLabel"),
122
- render: (n) => /* @__PURE__ */ e(o, { children: n.label })
121
+ title: e("sections.debitedLabel"),
122
+ render: (t) => t.label
123
123
  },
124
124
  {
125
- title: t("breakdown.amount"),
126
- render: (n) => /* @__PURE__ */ e(o, { children: i(n.amount) })
125
+ title: e("breakdown.amount"),
126
+ render: (t) => r(t.amount)
127
127
  }
128
128
  ],
129
- data: C,
129
+ data: N,
130
130
  footer: () => ({
131
- "column-0": /* @__PURE__ */ e(o, { weight: "semibold", children: t("breakdown.totals") }),
132
- "column-1": /* @__PURE__ */ e(o, { weight: "semibold", children: i(parseFloat(l.totals?.companyDebit || "0")) })
131
+ "column-0": e("breakdown.totals"),
132
+ "column-1": r(parseFloat(o.totals?.companyDebit || "0"))
133
133
  })
134
134
  }
135
- ) }), T = () => /* @__PURE__ */ e(m, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ e(
136
- f,
135
+ ) }), T = () => /* @__PURE__ */ l(i, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ l(
136
+ h,
137
137
  {
138
- label: t("sections.taxLabel"),
138
+ label: e("sections.taxLabel"),
139
139
  columns: [
140
140
  {
141
- title: t("sections.taxLabel"),
142
- render: (n) => /* @__PURE__ */ e(o, { children: n.name })
141
+ title: e("sections.taxLabel"),
142
+ render: (t) => t.name
143
143
  },
144
144
  {
145
- title: t("tax.amount"),
146
- render: (n) => /* @__PURE__ */ e(o, { children: i(parseFloat(n.amount || "0")) })
145
+ title: e("tax.amount"),
146
+ render: (t) => r(parseFloat(t.amount || "0"))
147
147
  }
148
148
  ],
149
- data: l.taxes || [],
149
+ data: o.taxes || [],
150
150
  footer: () => ({
151
- "column-0": /* @__PURE__ */ e(o, { weight: "semibold", children: t("breakdown.totals") }),
152
- "column-1": /* @__PURE__ */ e(o, { weight: "semibold", children: i(parseFloat(l.totals?.taxDebit || "0")) })
151
+ "column-0": e("breakdown.totals"),
152
+ "column-1": r(parseFloat(o.totals?.taxDebit || "0"))
153
153
  })
154
154
  }
155
155
  ) }), R = () => {
156
156
  const a = [
157
- /* @__PURE__ */ c(m, { flexDirection: "column", gap: 4, children: [
158
- /* @__PURE__ */ e(o, { weight: "semibold", children: t("breakdown.totals") }),
159
- /* @__PURE__ */ e(o, { size: "sm", variant: "supporting", children: t("employee.totalEmployees", {
160
- count: l.employeeCompensations?.length || 0
157
+ /* @__PURE__ */ c(i, { flexDirection: "column", gap: 4, children: [
158
+ e("breakdown.totals"),
159
+ /* @__PURE__ */ l(m, { size: "sm", variant: "supporting", children: e("employee.totalEmployees", {
160
+ count: o.employeeCompensations?.length || 0
161
161
  }) })
162
162
  ] }, "totals"),
163
- /* @__PURE__ */ e(o, { children: " " }, "spacer"),
164
- /* @__PURE__ */ e(o, { weight: "semibold", children: i(x()) }, "childSupport"),
165
- ...u ? [
166
- /* @__PURE__ */ e(o, { weight: "semibold", children: i(w()) }, "reimbursements")
167
- ] : [],
168
- /* @__PURE__ */ e(o, { weight: "semibold", children: i(k()) }, "taxes"),
169
- /* @__PURE__ */ e(o, { weight: "semibold", children: i(F()) }, "netPay")
163
+ " ",
164
+ r(g()),
165
+ ...u ? [r(F())] : [],
166
+ r(C()),
167
+ r(k())
170
168
  ].reduce(
171
- (r, S, L) => (r[`column-${L}`] = S, r),
169
+ (n, L, S) => (n[`column-${S}`] = L, n),
172
170
  {}
173
171
  );
174
- return /* @__PURE__ */ c(m, { flexDirection: "column", gap: 16, children: [
175
- d && /* @__PURE__ */ e(b, { as: "h2", children: t("sections.employeesLabel") }),
176
- /* @__PURE__ */ e(
172
+ return /* @__PURE__ */ c(i, { flexDirection: "column", gap: 16, children: [
173
+ p && /* @__PURE__ */ l(y, { as: "h2", children: e("sections.employeesLabel") }),
174
+ /* @__PURE__ */ l(
177
175
  H,
178
176
  {
179
- label: t("sections.employeesLabel"),
177
+ label: e("sections.employeesLabel"),
180
178
  columns: [
181
179
  {
182
- title: t("employee.name"),
183
- render: (r) => /* @__PURE__ */ e(o, { children: g(r) })
180
+ title: e("employee.name"),
181
+ render: (n) => x(n)
184
182
  },
185
183
  {
186
- title: t("employee.paymentMethod"),
187
- render: (r) => /* @__PURE__ */ e(o, { children: r.paymentMethod || "N/A" })
184
+ title: e("employee.paymentMethod"),
185
+ render: (n) => n.paymentMethod || "N/A"
188
186
  },
189
187
  {
190
- title: t("employee.childSupport"),
191
- render: (r) => /* @__PURE__ */ e(o, { children: i(parseFloat(r.childSupportGarnishment || "0")) })
188
+ title: e("employee.childSupport"),
189
+ render: (n) => r(parseFloat(n.childSupportGarnishment || "0"))
192
190
  },
193
191
  ...u ? [
194
192
  {
195
- title: t("employee.reimbursement"),
196
- render: (r) => /* @__PURE__ */ e(o, { children: i(parseFloat(r.totalReimbursement || "0")) })
193
+ title: e("employee.reimbursement"),
194
+ render: (n) => r(parseFloat(n.totalReimbursement || "0"))
197
195
  }
198
196
  ] : [],
199
197
  {
200
- title: t("employee.totalTaxes"),
201
- render: (r) => /* @__PURE__ */ e(o, { children: i(parseFloat(r.totalTax || "0")) })
198
+ title: e("employee.totalTaxes"),
199
+ render: (n) => r(parseFloat(n.totalTax || "0"))
202
200
  },
203
201
  {
204
- title: t("employee.netPay"),
205
- render: (r) => /* @__PURE__ */ e(o, { children: i(parseFloat(r.netPay || "0")) })
202
+ title: e("employee.netPay"),
203
+ render: (n) => r(parseFloat(n.netPay || "0"))
206
204
  }
207
205
  ],
208
- data: l.employeeCompensations || [],
206
+ data: o.employeeCompensations || [],
209
207
  footer: () => a
210
208
  }
211
209
  )
212
210
  ] });
213
211
  };
214
- return /* @__PURE__ */ e("div", { className: s.container, ref: y, children: /* @__PURE__ */ c(m, { flexDirection: "column", gap: 24, children: [
215
- v(),
212
+ return /* @__PURE__ */ l("div", { className: s.container, ref: f, children: /* @__PURE__ */ c(i, { flexDirection: "column", gap: 24, children: [
213
+ w(),
216
214
  P(),
217
215
  T(),
218
216
  R()
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollReceiptsPresentation.js","sources":["../../../../src/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport type {\n PayrollReceipt,\n Taxes as TaxBreakdownItem,\n PayrollReceiptEmployeeCompensations as EmployeeBreakdownItem,\n} from '@gusto/embedded-api/models/components/payrollreceipt'\nimport styles from './PayrollReceiptsPresentation.module.scss'\nimport { DataView, DataTable, Flex } from '@/components/Common'\nimport type { DescriptionListItem } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport ReceiptCheck from '@/assets/icons/receipt-check.svg?react'\n\ninterface PayrollReceiptsPresentationProps {\n receiptData: PayrollReceipt\n withReimbursements?: boolean\n}\n\nexport const PayrollReceiptsPresentation = ({\n receiptData,\n withReimbursements = true,\n}: PayrollReceiptsPresentationProps) => {\n const Components = useComponentContext()\n const { Heading, Text } = Components\n useI18n('Payroll.PayrollReceipts')\n const { t } = useTranslation('Payroll.PayrollReceipts')\n\n const containerRef = useRef<HTMLDivElement>(null)\n const breakpoints = useContainerBreakpoints({ ref: containerRef })\n const isMobile = !breakpoints.includes('small')\n\n // Helper to get employee full name\n const getEmployeeFullName = (emp: EmployeeBreakdownItem) =>\n `${emp.employeeFirstName || ''} ${emp.employeeLastName || ''}`.trim()\n\n const getTotalChildSupport = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.childSupportGarnishment || '0'),\n 0,\n )\n\n const getTotalReimbursements = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.totalReimbursement || '0'),\n 0,\n )\n\n const getTotalNetPay = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.netPay || '0'),\n 0,\n )\n\n const getTotalTaxes = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.totalTax || '0'),\n 0,\n )\n\n const breakdownData = [\n {\n label: t('breakdown.directDeposits'),\n amount: parseFloat(receiptData.totals?.netPayDebit || '0'),\n },\n ...(withReimbursements\n ? [\n {\n label: t('breakdown.reimbursements'),\n amount: parseFloat(receiptData.totals?.reimbursementDebit || '0'),\n },\n ]\n : []),\n {\n label: t('breakdown.garnishments'),\n amount: parseFloat(receiptData.totals?.childSupportDebit || '0'),\n },\n { label: t('breakdown.taxes'), amount: parseFloat(receiptData.totals?.taxDebit || '0') },\n ]\n\n const receiptDetailsConfig = [\n {\n label: t('receipt.receiptId'),\n value: receiptData.payrollUuid || '',\n },\n {\n label: t('receipt.from'),\n value: receiptData.nameOfSender || '',\n },\n {\n label: t('receipt.to'),\n value: receiptData.nameOfRecipient || 'Payroll Recipients',\n },\n {\n label: t('receipt.debitDate'),\n value: receiptData.debitDate || '',\n },\n ]\n\n const renderReceiptHeader = () => (\n <div className={classNames(styles.receiptHeader, isMobile && styles.receiptHeaderMobile)}>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={16}>\n <div className={styles.receiptIcon}>\n <ReceiptCheck className={styles.checkmarkIcon} />\n </div>\n\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <Text size=\"sm\" variant=\"supporting\">\n {t('receipt.totalLabel')}\n </Text>\n <Heading as=\"h1\" styledAs=\"h2\" className={styles.totalAmount}>\n {formatNumberAsCurrency(parseFloat(receiptData.totals?.companyDebit || '0'))}\n </Heading>\n </Flex>\n </Flex>\n\n <Components.DescriptionList\n layout=\"horizontal\"\n showSeparators={false}\n items={receiptDetailsConfig.map(\n ({ label, value }): DescriptionListItem => ({\n term: (\n <Text size=\"sm\" variant=\"supporting\">\n {label}\n </Text>\n ),\n description: <Text size=\"sm\">{value}</Text>,\n }),\n )}\n />\n\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={12}>\n <Text\n size=\"sm\"\n variant=\"supporting\"\n className={classNames(styles.disclaimer, isMobile && styles.textMobile)}\n >\n {receiptData.recipientNotice}\n </Text>\n\n <Text\n size=\"sm\"\n variant=\"supporting\"\n className={classNames(styles.companyInfo, isMobile && styles.textMobile)}\n >\n {receiptData.license}\n </Text>\n\n <Text\n size=\"sm\"\n variant=\"supporting\"\n className={classNames(styles.address, isMobile && styles.textMobile)}\n >\n {receiptData.licensee &&\n `${receiptData.licensee.address || ''}, ${receiptData.licensee.city || ''}, ${receiptData.licensee.state || ''} ${receiptData.licensee.postalCode || ''}`}\n </Text>\n </Flex>\n </Flex>\n </div>\n )\n\n const renderBreakdownSection = () => (\n <Flex flexDirection=\"column\" gap={16}>\n <DataTable\n label={t('sections.debitedLabel')}\n columns={[\n {\n title: t('sections.debitedLabel'),\n render: (item: { label: string; amount: number }) => <Text>{item.label}</Text>,\n },\n {\n title: t('breakdown.amount'),\n render: (item: { label: string; amount: number }) => (\n <Text>{formatNumberAsCurrency(item.amount)}</Text>\n ),\n },\n ]}\n data={breakdownData}\n footer={() => ({\n 'column-0': <Text weight=\"semibold\">{t('breakdown.totals')}</Text>,\n 'column-1': (\n <Text weight=\"semibold\">\n {formatNumberAsCurrency(parseFloat(receiptData.totals?.companyDebit || '0'))}\n </Text>\n ),\n })}\n />\n </Flex>\n )\n\n const renderTaxBreakdown = () => (\n <Flex flexDirection=\"column\" gap={16}>\n <DataTable\n label={t('sections.taxLabel')}\n columns={[\n {\n title: t('sections.taxLabel'),\n render: (tax: TaxBreakdownItem) => <Text>{tax.name}</Text>,\n },\n {\n title: t('tax.amount'),\n render: (tax: TaxBreakdownItem) => (\n <Text>{formatNumberAsCurrency(parseFloat(tax.amount || '0'))}</Text>\n ),\n },\n ]}\n data={receiptData.taxes || []}\n footer={() => ({\n 'column-0': <Text weight=\"semibold\">{t('breakdown.totals')}</Text>,\n 'column-1': (\n <Text weight=\"semibold\">\n {formatNumberAsCurrency(parseFloat(receiptData.totals?.taxDebit || '0'))}\n </Text>\n ),\n })}\n />\n </Flex>\n )\n\n const renderEmployeeBreakdown = () => {\n const footerValues = [\n <Flex flexDirection=\"column\" gap={4} key=\"totals\">\n <Text weight=\"semibold\">{t('breakdown.totals')}</Text>\n <Text size=\"sm\" variant=\"supporting\">\n {t('employee.totalEmployees', {\n count: receiptData.employeeCompensations?.length || 0,\n })}\n </Text>\n </Flex>,\n <Text key=\"spacer\">{'\\u00A0'}</Text>,\n <Text weight=\"semibold\" key=\"childSupport\">\n {formatNumberAsCurrency(getTotalChildSupport())}\n </Text>,\n ...(withReimbursements\n ? [\n <Text weight=\"semibold\" key=\"reimbursements\">\n {formatNumberAsCurrency(getTotalReimbursements())}\n </Text>,\n ]\n : []),\n <Text weight=\"semibold\" key=\"taxes\">\n {formatNumberAsCurrency(getTotalTaxes())}\n </Text>,\n <Text weight=\"semibold\" key=\"netPay\">\n {formatNumberAsCurrency(getTotalNetPay())}\n </Text>,\n ]\n\n const footerContent = footerValues.reduce<Record<string, React.ReactNode>>(\n (acc, value, index) => {\n acc[`column-${index}`] = value\n return acc\n },\n {},\n )\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {isMobile && <Heading as=\"h2\">{t('sections.employeesLabel')}</Heading>}\n <DataView\n label={t('sections.employeesLabel')}\n columns={[\n {\n title: t('employee.name'),\n render: (employee: EmployeeBreakdownItem) => (\n <Text>{getEmployeeFullName(employee)}</Text>\n ),\n },\n {\n title: t('employee.paymentMethod'),\n render: (employee: EmployeeBreakdownItem) => (\n <Text>{employee.paymentMethod || 'N/A'}</Text>\n ),\n },\n {\n title: t('employee.childSupport'),\n render: (employee: EmployeeBreakdownItem) => (\n <Text>\n {formatNumberAsCurrency(parseFloat(employee.childSupportGarnishment || '0'))}\n </Text>\n ),\n },\n ...(withReimbursements\n ? [\n {\n title: t('employee.reimbursement'),\n render: (employee: EmployeeBreakdownItem) => (\n <Text>\n {formatNumberAsCurrency(parseFloat(employee.totalReimbursement || '0'))}\n </Text>\n ),\n },\n ]\n : []),\n {\n title: t('employee.totalTaxes'),\n render: (employee: EmployeeBreakdownItem) => (\n <Text>{formatNumberAsCurrency(parseFloat(employee.totalTax || '0'))}</Text>\n ),\n },\n {\n title: t('employee.netPay'),\n render: (employee: EmployeeBreakdownItem) => (\n <Text>{formatNumberAsCurrency(parseFloat(employee.netPay || '0'))}</Text>\n ),\n },\n ]}\n data={receiptData.employeeCompensations || []}\n footer={() => footerContent}\n />\n </Flex>\n )\n }\n\n return (\n <div className={styles.container} ref={containerRef}>\n <Flex flexDirection=\"column\" gap={24}>\n {renderReceiptHeader()}\n {renderBreakdownSection()}\n {renderTaxBreakdown()}\n {renderEmployeeBreakdown()}\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollReceiptsPresentation","receiptData","withReimbursements","Components","useComponentContext","Heading","Text","useI18n","useTranslation","containerRef","useRef","isMobile","useContainerBreakpoints","getEmployeeFullName","emp","getTotalChildSupport","sum","getTotalReimbursements","getTotalNetPay","getTotalTaxes","breakdownData","receiptDetailsConfig","renderReceiptHeader","jsx","classNames","styles","jsxs","Flex","ReceiptCheck","formatNumberAsCurrency","label","value","renderBreakdownSection","DataTable","item","renderTaxBreakdown","tax","renderEmployeeBreakdown","footerContent","acc","index","DataView","employee"],"mappings":";;;;;;;;;;;;;AAsBO,MAAMA,IAA8B,CAAC;AAAA,EAC1C,aAAAC;AAAA,EACA,oBAAAC,IAAqB;AACvB,MAAwC;AACtC,QAAMC,IAAaC,EAAA,GACb,EAAE,SAAAC,GAAS,MAAAC,EAAA,IAASH;AAC1B,EAAAI,EAAQ,yBAAyB;AACjC,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAEhDC,IAAeC,EAAuB,IAAI,GAE1CC,IAAW,CADGC,EAAwB,EAAE,KAAKH,GAAc,EACnC,SAAS,OAAO,GAGxCI,IAAsB,CAACC,MAC3B,GAAGA,EAAI,qBAAqB,EAAE,IAAIA,EAAI,oBAAoB,EAAE,GAAG,KAAA,GAE3DC,IAAuB,OAC1Bd,EAAY,yBAAyB,CAAA,GAAI;AAAA,IACxC,CAACe,GAAKF,MAAQE,IAAM,WAAWF,EAAI,2BAA2B,GAAG;AAAA,IACjE;AAAA,EAAA,GAGEG,IAAyB,OAC5BhB,EAAY,yBAAyB,CAAA,GAAI;AAAA,IACxC,CAACe,GAAKF,MAAQE,IAAM,WAAWF,EAAI,sBAAsB,GAAG;AAAA,IAC5D;AAAA,EAAA,GAGEI,IAAiB,OACpBjB,EAAY,yBAAyB,CAAA,GAAI;AAAA,IACxC,CAACe,GAAKF,MAAQE,IAAM,WAAWF,EAAI,UAAU,GAAG;AAAA,IAChD;AAAA,EAAA,GAGEK,IAAgB,OACnBlB,EAAY,yBAAyB,CAAA,GAAI;AAAA,IACxC,CAACe,GAAKF,MAAQE,IAAM,WAAWF,EAAI,YAAY,GAAG;AAAA,IAClD;AAAA,EAAA,GAGEM,IAAgB;AAAA,IACpB;AAAA,MACE,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C9B,QAAQ,CAACA,MACP,gBAAAnB,EAACjB,GAAA,EAAM,UAAAuB,EAAuB,WAAWa,EAAS,YAAY,GAAG,CAAC,EAAA,CAAE;AAAA,YAAA;AAAA,YAGxE;AAAA,cACE,OAAO,EAAE,iBAAiB;AAAA,cAC1B,QAAQ,CAACA,MACP,gBAAAnB,EAACjB,GAAA,EAAM,UAAAuB,EAAuB,WAAWa,EAAS,UAAU,GAAG,CAAC,EAAA,CAAE;AAAA,YAAA;AAAA,UAEtE;AAAA,UAEF,MAAMzC,EAAY,yBAAyB,CAAA;AAAA,UAC3C,QAAQ,MAAMqC;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GACF;AAAA,EAEJ;AAEA,SACE,gBAAAf,EAAC,OAAA,EAAI,WAAWE,EAAO,WAAW,KAAKhB,GACrC,UAAA,gBAAAiB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,IAAAL,EAAA;AAAA,IACAU,EAAA;AAAA,IACAG,EAAA;AAAA,IACAE,EAAA;AAAA,EAAwB,EAAA,CAC3B,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"PayrollReceiptsPresentation.js","sources":["../../../../src/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport type {\n PayrollReceipt,\n Taxes as TaxBreakdownItem,\n PayrollReceiptEmployeeCompensations as EmployeeBreakdownItem,\n} from '@gusto/embedded-api/models/components/payrollreceipt'\nimport styles from './PayrollReceiptsPresentation.module.scss'\nimport { DataView, DataTable, Flex } from '@/components/Common'\nimport type { DescriptionListItem } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport ReceiptCheck from '@/assets/icons/receipt-check.svg?react'\n\ninterface PayrollReceiptsPresentationProps {\n receiptData: PayrollReceipt\n withReimbursements?: boolean\n}\n\nexport const PayrollReceiptsPresentation = ({\n receiptData,\n withReimbursements = true,\n}: PayrollReceiptsPresentationProps) => {\n const Components = useComponentContext()\n const { Heading, Text } = Components\n useI18n('Payroll.PayrollReceipts')\n const { t } = useTranslation('Payroll.PayrollReceipts')\n\n const containerRef = useRef<HTMLDivElement>(null)\n const breakpoints = useContainerBreakpoints({ ref: containerRef })\n const isMobile = !breakpoints.includes('small')\n\n // Helper to get employee full name\n const getEmployeeFullName = (emp: EmployeeBreakdownItem) =>\n `${emp.employeeFirstName || ''} ${emp.employeeLastName || ''}`.trim()\n\n const getTotalChildSupport = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.childSupportGarnishment || '0'),\n 0,\n )\n\n const getTotalReimbursements = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.totalReimbursement || '0'),\n 0,\n )\n\n const getTotalNetPay = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.netPay || '0'),\n 0,\n )\n\n const getTotalTaxes = () =>\n (receiptData.employeeCompensations || []).reduce(\n (sum, emp) => sum + parseFloat(emp.totalTax || '0'),\n 0,\n )\n\n const breakdownData = [\n {\n label: t('breakdown.directDeposits'),\n amount: parseFloat(receiptData.totals?.netPayDebit || '0'),\n },\n ...(withReimbursements\n ? [\n {\n label: t('breakdown.reimbursements'),\n amount: parseFloat(receiptData.totals?.reimbursementDebit || '0'),\n },\n ]\n : []),\n {\n label: t('breakdown.garnishments'),\n amount: parseFloat(receiptData.totals?.childSupportDebit || '0'),\n },\n { label: t('breakdown.taxes'), amount: parseFloat(receiptData.totals?.taxDebit || '0') },\n ]\n\n const receiptDetailsConfig = [\n {\n label: t('receipt.receiptId'),\n value: receiptData.payrollUuid || '',\n },\n {\n label: t('receipt.from'),\n value: receiptData.nameOfSender || '',\n },\n {\n label: t('receipt.to'),\n value: receiptData.nameOfRecipient || 'Payroll Recipients',\n },\n {\n label: t('receipt.debitDate'),\n value: receiptData.debitDate || '',\n },\n ]\n\n const renderReceiptHeader = () => (\n <div className={classNames(styles.receiptHeader, isMobile && styles.receiptHeaderMobile)}>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={16}>\n <div className={styles.receiptIcon}>\n <ReceiptCheck className={styles.checkmarkIcon} />\n </div>\n\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <Text size=\"sm\" variant=\"supporting\">\n {t('receipt.totalLabel')}\n </Text>\n <Heading as=\"h1\" styledAs=\"h2\" className={styles.totalAmount}>\n {formatNumberAsCurrency(parseFloat(receiptData.totals?.companyDebit || '0'))}\n </Heading>\n </Flex>\n </Flex>\n\n <Components.DescriptionList\n layout=\"horizontal\"\n showSeparators={false}\n items={receiptDetailsConfig.map(\n ({ label, value }): DescriptionListItem => ({\n term: (\n <Text size=\"sm\" variant=\"supporting\">\n {label}\n </Text>\n ),\n description: <Text size=\"sm\">{value}</Text>,\n }),\n )}\n />\n\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={12}>\n <Text\n size=\"sm\"\n variant=\"supporting\"\n className={classNames(styles.disclaimer, isMobile && styles.textMobile)}\n >\n {receiptData.recipientNotice}\n </Text>\n\n <Text\n size=\"sm\"\n variant=\"supporting\"\n className={classNames(styles.companyInfo, isMobile && styles.textMobile)}\n >\n {receiptData.license}\n </Text>\n\n <Text\n size=\"sm\"\n variant=\"supporting\"\n className={classNames(styles.address, isMobile && styles.textMobile)}\n >\n {receiptData.licensee &&\n `${receiptData.licensee.address || ''}, ${receiptData.licensee.city || ''}, ${receiptData.licensee.state || ''} ${receiptData.licensee.postalCode || ''}`}\n </Text>\n </Flex>\n </Flex>\n </div>\n )\n\n const renderBreakdownSection = () => (\n <Flex flexDirection=\"column\" gap={16}>\n <DataTable\n label={t('sections.debitedLabel')}\n columns={[\n {\n title: t('sections.debitedLabel'),\n render: (item: { label: string; amount: number }) => item.label,\n },\n {\n title: t('breakdown.amount'),\n render: (item: { label: string; amount: number }) =>\n formatNumberAsCurrency(item.amount),\n },\n ]}\n data={breakdownData}\n footer={() => ({\n 'column-0': t('breakdown.totals'),\n 'column-1': formatNumberAsCurrency(parseFloat(receiptData.totals?.companyDebit || '0')),\n })}\n />\n </Flex>\n )\n\n const renderTaxBreakdown = () => (\n <Flex flexDirection=\"column\" gap={16}>\n <DataTable\n label={t('sections.taxLabel')}\n columns={[\n {\n title: t('sections.taxLabel'),\n render: (tax: TaxBreakdownItem) => tax.name,\n },\n {\n title: t('tax.amount'),\n render: (tax: TaxBreakdownItem) =>\n formatNumberAsCurrency(parseFloat(tax.amount || '0')),\n },\n ]}\n data={receiptData.taxes || []}\n footer={() => ({\n 'column-0': t('breakdown.totals'),\n 'column-1': formatNumberAsCurrency(parseFloat(receiptData.totals?.taxDebit || '0')),\n })}\n />\n </Flex>\n )\n\n const renderEmployeeBreakdown = () => {\n const footerValues = [\n <Flex flexDirection=\"column\" gap={4} key=\"totals\">\n {t('breakdown.totals')}\n <Text size=\"sm\" variant=\"supporting\">\n {t('employee.totalEmployees', {\n count: receiptData.employeeCompensations?.length || 0,\n })}\n </Text>\n </Flex>,\n '\\u00A0',\n\n formatNumberAsCurrency(getTotalChildSupport()),\n ...(withReimbursements ? [formatNumberAsCurrency(getTotalReimbursements())] : []),\n formatNumberAsCurrency(getTotalTaxes()),\n formatNumberAsCurrency(getTotalNetPay()),\n ]\n\n const footerContent = footerValues.reduce<Record<string, React.ReactNode>>(\n (acc, value, index) => {\n acc[`column-${index}`] = value\n return acc\n },\n {},\n )\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {isMobile && <Heading as=\"h2\">{t('sections.employeesLabel')}</Heading>}\n <DataView\n label={t('sections.employeesLabel')}\n columns={[\n {\n title: t('employee.name'),\n render: (employee: EmployeeBreakdownItem) => getEmployeeFullName(employee),\n },\n {\n title: t('employee.paymentMethod'),\n render: (employee: EmployeeBreakdownItem) => employee.paymentMethod || 'N/A',\n },\n {\n title: t('employee.childSupport'),\n render: (employee: EmployeeBreakdownItem) =>\n formatNumberAsCurrency(parseFloat(employee.childSupportGarnishment || '0')),\n },\n ...(withReimbursements\n ? [\n {\n title: t('employee.reimbursement'),\n render: (employee: EmployeeBreakdownItem) =>\n formatNumberAsCurrency(parseFloat(employee.totalReimbursement || '0')),\n },\n ]\n : []),\n {\n title: t('employee.totalTaxes'),\n render: (employee: EmployeeBreakdownItem) =>\n formatNumberAsCurrency(parseFloat(employee.totalTax || '0')),\n },\n {\n title: t('employee.netPay'),\n render: (employee: EmployeeBreakdownItem) =>\n formatNumberAsCurrency(parseFloat(employee.netPay || '0')),\n },\n ]}\n data={receiptData.employeeCompensations || []}\n footer={() => footerContent}\n />\n </Flex>\n )\n }\n\n return (\n <div className={styles.container} ref={containerRef}>\n <Flex flexDirection=\"column\" gap={24}>\n {renderReceiptHeader()}\n {renderBreakdownSection()}\n {renderTaxBreakdown()}\n {renderEmployeeBreakdown()}\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollReceiptsPresentation","receiptData","withReimbursements","Components","useComponentContext","Heading","Text","useI18n","t","useTranslation","containerRef","useRef","isMobile","useContainerBreakpoints","getEmployeeFullName","emp","getTotalChildSupport","sum","getTotalReimbursements","getTotalNetPay","getTotalTaxes","breakdownData","receiptDetailsConfig","renderReceiptHeader","jsx","classNames","styles","jsxs","Flex","ReceiptCheck","formatNumberAsCurrency","label","value","renderBreakdownSection","DataTable","item","renderTaxBreakdown","tax","renderEmployeeBreakdown","footerContent","acc","index","DataView","employee"],"mappings":";;;;;;;;;;;;;AAsBO,MAAMA,IAA8B,CAAC;AAAA,EAC1C,aAAAC;AAAA,EACA,oBAAAC,IAAqB;AACvB,MAAwC;AACtC,QAAMC,IAAaC,EAAA,GACb,EAAE,SAAAC,GAAS,MAAAC,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AAAA,YACzE,IAEF,CAAA;AAAA,YACJ;AAAA,cACE,OAAOnC,EAAE,qBAAqB;AAAA,cAC9B,QAAQ,CAACmC,MACPb,EAAuB,WAAWa,EAAS,YAAY,GAAG,CAAC;AAAA,YAAA;AAAA,YAE/D;AAAA,cACE,OAAOnC,EAAE,iBAAiB;AAAA,cAC1B,QAAQ,CAACmC,MACPb,EAAuB,WAAWa,EAAS,UAAU,GAAG,CAAC;AAAA,YAAA;AAAA,UAC7D;AAAA,UAEF,MAAM1C,EAAY,yBAAyB,CAAA;AAAA,UAC3C,QAAQ,MAAMsC;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GACF;AAAA,EAEJ;AAEA,SACE,gBAAAf,EAAC,OAAA,EAAI,WAAWE,EAAO,WAAW,KAAKhB,GACrC,UAAA,gBAAAiB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,IAAAL,EAAA;AAAA,IACAU,EAAA;AAAA,IACAG,EAAA;AAAA,IACAE,EAAA;AAAA,EAAwB,EAAA,CAC3B,EAAA,CACF;AAEJ;"}
@@ -10,9 +10,10 @@ import { useComponentDictionary as L, useI18n as u } from "../../../../i18n/I18n
10
10
  import { DataView as b } from "../../../Common/DataView/DataView.js";
11
11
  import { useDataView as E } from "../../../Common/DataView/useDataView.js";
12
12
  import { FlexItem as x, Flex as d } from "../../../Common/Flex/Flex.js";
13
+ import "classnames";
13
14
  import { recoveryCasesEvents as D } from "../../../../shared/constants.js";
14
15
  import { formatNumberAsCurrency as y } from "../../../../helpers/formattedStrings.js";
15
- function $(t) {
16
+ function q(t) {
16
17
  return /* @__PURE__ */ e(R, { ...t, children: /* @__PURE__ */ e(w, { ...t, children: t.children }) });
17
18
  }
18
19
  function P(t) {
@@ -97,6 +98,6 @@ function w({ companyId: t, dictionary: n, onEvent: s }) {
97
98
  ] }) });
98
99
  }
99
100
  export {
100
- $ as RecoveryCasesList
101
+ q as RecoveryCasesList
101
102
  };
102
103
  //# sourceMappingURL=RecoveryCasesList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryCasesList.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type {\n RecoveryCase,\n RecoveryCaseStatus,\n} from '@gusto/embedded-api/models/components/recoverycase'\nimport { useRecoveryCasesGetSuspense } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport styles from './RecoveryCasesList.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { recoveryCasesEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\ninterface RecoveryCasesListProps extends BaseComponentInterface<'Payroll.RecoveryCasesList'> {\n companyId: string\n onEvent: BaseComponentInterface['onEvent']\n}\n\nexport function RecoveryCasesList(props: RecoveryCasesListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction getStatusBadgeStatus(status: RecoveryCaseStatus | undefined): BadgeProps['status'] {\n if (status === 'open') {\n return 'info'\n }\n return 'warning'\n}\n\nfunction ErrorCodeCell({ errorCode }: { errorCode: string | null | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Text } = useComponentContext()\n const { title, subtitle } = useRecoveryCaseErrorCode(errorCode)\n\n if (!title && !subtitle) {\n return (\n <span aria-label={t('labels.noLatestErrorCodeAriaLabel')} aria-live=\"polite\">\n {t('labels.noLatestErrorCode')}\n </span>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n {title && <Text weight=\"semibold\">{title}</Text>}\n {subtitle && <Text>{subtitle}</Text>}\n </Flex>\n )\n}\n\nfunction StatusCell({ status }: { status: RecoveryCaseStatus | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Badge } = useComponentContext()\n\n if (!status) {\n return null\n }\n\n const badgeStatus = getStatusBadgeStatus(status)\n const statusLabel = t(`status.${status}`)\n\n return <Badge status={badgeStatus}>{statusLabel}</Badge>\n}\n\nfunction ResolveButton({\n recoveryCase,\n onEvent,\n}: {\n recoveryCase: RecoveryCase\n onEvent: BaseComponentInterface['onEvent']\n}) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Button } = useComponentContext()\n\n if (recoveryCase.status !== 'open') {\n return null\n }\n\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESOLVE, {\n recoveryCaseId: recoveryCase.uuid,\n })\n }}\n >\n {t('cta.resolve')}\n </Button>\n )\n}\n\nfunction Root({ companyId, dictionary, onEvent }: RecoveryCasesListProps) {\n useComponentDictionary('Payroll.RecoveryCasesList', dictionary)\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Heading, Text } = useComponentContext()\n\n const { data } = useRecoveryCasesGetSuspense({\n companyUuid: companyId,\n })\n\n const recoveryCases = (data.recoveryCaseList ?? []).filter(rc => rc.status !== 'recovered')\n\n const dataViewProps = useDataView({\n data: recoveryCases,\n columns: [\n {\n key: 'originalDebitDate',\n title: t('columns.originalDebitDate'),\n render: recoveryCase => (\n <FlexItem flexGrow={1}>\n <Text>{recoveryCase.originalDebitDate ?? '-'}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'totalAmount',\n title: t('columns.totalAmount'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.eventTotalAmount\n ? formatNumberAsCurrency(parseFloat(recoveryCase.eventTotalAmount))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'amountOutstanding',\n title: t('columns.amountOutstanding'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.amountOutstanding\n ? formatNumberAsCurrency(parseFloat(recoveryCase.amountOutstanding))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'latestErrorCode',\n title: t('columns.latestErrorCode'),\n render: recoveryCase => <ErrorCodeCell errorCode={recoveryCase.latestErrorCode} />,\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: recoveryCase => <StatusCell status={recoveryCase.status} />,\n },\n ],\n itemMenu: recoveryCase => <ResolveButton recoveryCase={recoveryCase} onEvent={onEvent} />,\n })\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n <Text>{t('description')}</Text>\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n </div>\n )\n}\n"],"names":["RecoveryCasesList","props","jsx","BaseComponent","Root","getStatusBadgeStatus","status","ErrorCodeCell","errorCode","useI18n","t","useTranslation","Text","useComponentContext","title","subtitle","useRecoveryCaseErrorCode","jsxs","Flex","StatusCell","Badge","badgeStatus","statusLabel","ResolveButton","recoveryCase","onEvent","Button","recoveryCasesEvents","companyId","dictionary","useComponentDictionary","Heading","data","useRecoveryCasesGetSuspense","recoveryCases","rc","dataViewProps","useDataView","FlexItem","formatNumberAsCurrency","styles","DataView"],"mappings":";;;;;;;;;;;;;;AAuBO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASI,EAAqBC,GAA8D;AAC1F,SAAIA,MAAW,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AA,MAAA;AAAA,MAGJ;AAAA,QACE,KAAK;AAAA,QACL,OAAOd,EAAE,yBAAyB;AAAA,QAClC,QAAQ,CAAAc,MAAgB,gBAAAtB,EAACK,GAAA,EAAc,WAAWiB,EAAa,gBAAA,CAAiB;AAAA,MAAA;AAAA,MAElF;AAAA,QACE,KAAK;AAAA,QACL,OAAOd,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAAc,MAAgB,gBAAAtB,EAACiB,GAAA,EAAW,QAAQK,EAAa,OAAA,CAAQ;AAAA,MAAA;AAAA,IACnE;AAAA,IAEF,UAAU,CAAAA,MAAgB,gBAAAtB,EAACqB,GAAA,EAAc,cAAAC,GAA4B,SAAAC,EAAA,CAAkB;AAAA,EAAA,CACxF;AAED,SACE,gBAAAvB,EAAC,OAAA,EAAI,WAAWsC,EAAO,MACrB,4BAACtB,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAhB,EAAC6B,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAArB,EAAE,OAAO,GACZ;AAAA,MACA,gBAAAR,EAACU,GAAA,EAAM,UAAAF,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GAC1B;AAAA,sBAEC+B,GAAA,EAAU,GAAGL,GAAe,OAAO1B,EAAE,OAAO,EAAA,CAAG;AAAA,EAAA,EAAA,CAClD,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"RecoveryCasesList.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type {\n RecoveryCase,\n RecoveryCaseStatus,\n} from '@gusto/embedded-api/models/components/recoverycase'\nimport { useRecoveryCasesGetSuspense } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport styles from './RecoveryCasesList.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { recoveryCasesEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\ninterface RecoveryCasesListProps extends BaseComponentInterface<'Payroll.RecoveryCasesList'> {\n companyId: string\n onEvent: BaseComponentInterface['onEvent']\n}\n\nexport function RecoveryCasesList(props: RecoveryCasesListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction getStatusBadgeStatus(status: RecoveryCaseStatus | undefined): BadgeProps['status'] {\n if (status === 'open') {\n return 'info'\n }\n return 'warning'\n}\n\nfunction ErrorCodeCell({ errorCode }: { errorCode: string | null | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Text } = useComponentContext()\n const { title, subtitle } = useRecoveryCaseErrorCode(errorCode)\n\n if (!title && !subtitle) {\n return (\n <span aria-label={t('labels.noLatestErrorCodeAriaLabel')} aria-live=\"polite\">\n {t('labels.noLatestErrorCode')}\n </span>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={4}>\n {title && <Text weight=\"semibold\">{title}</Text>}\n {subtitle && <Text>{subtitle}</Text>}\n </Flex>\n )\n}\n\nfunction StatusCell({ status }: { status: RecoveryCaseStatus | undefined }) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Badge } = useComponentContext()\n\n if (!status) {\n return null\n }\n\n const badgeStatus = getStatusBadgeStatus(status)\n const statusLabel = t(`status.${status}`)\n\n return <Badge status={badgeStatus}>{statusLabel}</Badge>\n}\n\nfunction ResolveButton({\n recoveryCase,\n onEvent,\n}: {\n recoveryCase: RecoveryCase\n onEvent: BaseComponentInterface['onEvent']\n}) {\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Button } = useComponentContext()\n\n if (recoveryCase.status !== 'open') {\n return null\n }\n\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESOLVE, {\n recoveryCaseId: recoveryCase.uuid,\n })\n }}\n >\n {t('cta.resolve')}\n </Button>\n )\n}\n\nfunction Root({ companyId, dictionary, onEvent }: RecoveryCasesListProps) {\n useComponentDictionary('Payroll.RecoveryCasesList', dictionary)\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Heading, Text } = useComponentContext()\n\n const { data } = useRecoveryCasesGetSuspense({\n companyUuid: companyId,\n })\n\n const recoveryCases = (data.recoveryCaseList ?? []).filter(rc => rc.status !== 'recovered')\n\n const dataViewProps = useDataView({\n data: recoveryCases,\n columns: [\n {\n key: 'originalDebitDate',\n title: t('columns.originalDebitDate'),\n render: recoveryCase => (\n <FlexItem flexGrow={1}>\n <Text>{recoveryCase.originalDebitDate ?? '-'}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'totalAmount',\n title: t('columns.totalAmount'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.eventTotalAmount\n ? formatNumberAsCurrency(parseFloat(recoveryCase.eventTotalAmount))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'amountOutstanding',\n title: t('columns.amountOutstanding'),\n render: recoveryCase => (\n <Text>\n {recoveryCase.amountOutstanding\n ? formatNumberAsCurrency(parseFloat(recoveryCase.amountOutstanding))\n : '-'}\n </Text>\n ),\n },\n {\n key: 'latestErrorCode',\n title: t('columns.latestErrorCode'),\n render: recoveryCase => <ErrorCodeCell errorCode={recoveryCase.latestErrorCode} />,\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: recoveryCase => <StatusCell status={recoveryCase.status} />,\n },\n ],\n itemMenu: recoveryCase => <ResolveButton recoveryCase={recoveryCase} onEvent={onEvent} />,\n })\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n <Text>{t('description')}</Text>\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n </div>\n )\n}\n"],"names":["RecoveryCasesList","props","jsx","BaseComponent","Root","getStatusBadgeStatus","status","ErrorCodeCell","errorCode","useI18n","t","useTranslation","Text","useComponentContext","title","subtitle","useRecoveryCaseErrorCode","jsxs","Flex","StatusCell","Badge","badgeStatus","statusLabel","ResolveButton","recoveryCase","onEvent","Button","recoveryCasesEvents","companyId","dictionary","useComponentDictionary","Heading","data","useRecoveryCasesGetSuspense","recoveryCases","rc","dataViewProps","useDataView","FlexItem","formatNumberAsCurrency","styles","DataView"],"mappings":";;;;;;;;;;;;;;;AAuBO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASI,EAAqBC,GAA8D;AAC1F,SAAIA,MAAW,SACN,SAEF;AACT;AAEA,SAASC,EAAc,EAAE,WAAAC,KAAuD;AAC9E,EAAAC,EAAQ,2BAA2B;AACnC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,2BAA2B,GAClD,EAAE,MAAAC,EAAA,IAASC,EAAA,GACX,EAAE,OAAAC,GAAO,UAAAC,MAAaC,EAAyBR,CAAS;AAE9D,SAAI,CAACM,KAAS,CAACC,IAEX,gBAAAb,EAAC,QAAA,EAAK,cAAYQ,EAAE,mCAAmC,GAAG,aAAU,UACjE,U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AA;AAAA,IACnE;AAAA,IAEF,UAAU,CAAAA,MAAgB,gBAAAtB,EAACqB,GAAA,EAAc,cAAAC,GAA4B,SAAAC,EAAA,CAAkB;AAAA,EAAA,CACxF;AAED,SACE,gBAAAvB,EAAC,OAAA,EAAI,WAAWsC,EAAO,MACrB,4BAACtB,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAhB,EAAC6B,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAArB,EAAE,OAAO,GACZ;AAAA,MACA,gBAAAR,EAACU,GAAA,EAAM,UAAAF,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GAC1B;AAAA,sBAEC+B,GAAA,EAAU,GAAGL,GAAe,OAAO1B,EAAE,OAAO,EAAA,CAAG;AAAA,EAAA,EAAA,CAClD,EAAA,CACF;AAEJ;"}
@@ -7,6 +7,7 @@ import { useRecoveryCaseErrorCode as x } from "../useRecoveryCaseErrorCode.js";
7
7
  import { BaseComponent as D } from "../../../Base/Base.js";
8
8
  import { useBase as B } from "../../../Base/useBase.js";
9
9
  import { Flex as d } from "../../../Common/Flex/Flex.js";
10
+ import "classnames";
10
11
  import { Form as F } from "../../../Common/Form/Form.js";
11
12
  import { useFlow as A } from "../../../Flow/useFlow.js";
12
13
  import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useRecoveryCasesRedebitMutation,\n mutationKeyRecoveryCasesRedebit,\n} from '@gusto/embedded-api/react-query/recoveryCasesRedebit'\nimport { useRecoveryCasesGet } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport type { RecoveryCasesContextInterface } from '../RecoveryCasesComponents'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { recoveryCasesEvents, type EventType } from '@/shared/constants'\n\nconst RECOVERY_CASES_RESUBMIT_FORM_ID = 'gusto-sdk-recovery-cases-resubmit-form'\n\ninterface RecoveryCasesResubmitProps extends BaseComponentInterface<'Payroll.RecoveryCasesResubmit'> {\n recoveryCaseId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function RecoveryCasesResubmit(props: RecoveryCasesResubmitProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary, recoveryCaseId }: RecoveryCasesResubmitProps) {\n useComponentDictionary('Payroll.RecoveryCasesResubmit', dictionary)\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n const { companyId } = useFlow<RecoveryCasesContextInterface>()\n\n const { data: recoveryCasesData } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCase = recoveryCasesData?.recoveryCaseList?.find(rc => rc.uuid === recoveryCaseId)\n\n const { title, subtitle, description } = useRecoveryCaseErrorCode(\n recoveryCase?.latestErrorCode ?? undefined,\n )\n\n const redebitMutation = useRecoveryCasesRedebitMutation()\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n await baseSubmitHandler({}, async () => {\n await redebitMutation.mutateAsync({\n request: {\n recoveryCaseUuid: recoveryCaseId,\n },\n })\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE, {\n recoveryCaseId,\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {title && <Heading as=\"h2\">{title}</Heading>}\n {subtitle && <Text>{subtitle}</Text>}\n {description.length > 0 && description}\n {/*\n This empty form is used to connect the Footer's submit button to the submission logic\n via the form attribute. This is semantically incorrect and hidden from assistive tech.\n */}\n <Form id={RECOVERY_CASES_RESUBMIT_FORM_ID} onSubmit={onSubmit} aria-hidden=\"true\">\n {/* Empty form - submission triggered by footer button via form attribute */}\n </Form>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Button } = useComponentContext()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyRecoveryCasesRedebit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={RECOVERY_CASES_RESUBMIT_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.resubmit')}\n </Button>\n </Flex>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","companyId","useFlow","recoveryCasesData","useRecoveryCasesGet","recoveryCase","rc","title","subtitle","description","useRecoveryCaseErrorCode","redebitMutation","useRecoveryCasesRedebitMutation","onSubmit","e","recoveryCasesEvents","jsxs","Flex","Form","Footer","useI18n","t","useTranslation","Button","isPending","useIsMutating","mutationKeyRecoveryCasesRedebit"],"mappings":";;;;;;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AAA,sBAK1BS,GAAA,EAAK,IAAIhC,GAAiC,UAAA2B,GAAoB,eAAY,OAAA,CAE3E;AAAA,EAAA,GACF;AAEJ;AAEA,MAAMM,IAAS,CAAC,EAAE,SAAArB,QAA4D;AAC5E,EAAAsB,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,QAAAC,EAAA,IAAW1B,EAAA,GAKb2B,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAgC,CAC9C,IAC8B;AAM/B,SACE,gBAAAV,EAACC,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA;AAAA,IAAA,gBAAA5B,EAACkC,GAAA,EAAO,SAAQ,aAAY,SANX,MAAM;AACzB,MAAAzB,EAAQiB,EAAoB,6BAA6B;AAAA,IAC3D,GAIuD,YAAYS,GAC5D,UAAAH,EAAE,YAAY,EAAA,CACjB;AAAA,IACA,gBAAAhC;AAAA,MAACkC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMrC;AAAA,QACN,WAAWsC;AAAA,QAEV,YAAE,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEArC,EAAsB,SAASgC;"}
1
+ {"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useRecoveryCasesRedebitMutation,\n mutationKeyRecoveryCasesRedebit,\n} from '@gusto/embedded-api/react-query/recoveryCasesRedebit'\nimport { useRecoveryCasesGet } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport type { RecoveryCasesContextInterface } from '../RecoveryCasesComponents'\nimport { useRecoveryCaseErrorCode } from '../useRecoveryCaseErrorCode'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { recoveryCasesEvents, type EventType } from '@/shared/constants'\n\nconst RECOVERY_CASES_RESUBMIT_FORM_ID = 'gusto-sdk-recovery-cases-resubmit-form'\n\ninterface RecoveryCasesResubmitProps extends BaseComponentInterface<'Payroll.RecoveryCasesResubmit'> {\n recoveryCaseId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function RecoveryCasesResubmit(props: RecoveryCasesResubmitProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary, recoveryCaseId }: RecoveryCasesResubmitProps) {\n useComponentDictionary('Payroll.RecoveryCasesResubmit', dictionary)\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n const { companyId } = useFlow<RecoveryCasesContextInterface>()\n\n const { data: recoveryCasesData } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCase = recoveryCasesData?.recoveryCaseList?.find(rc => rc.uuid === recoveryCaseId)\n\n const { title, subtitle, description } = useRecoveryCaseErrorCode(\n recoveryCase?.latestErrorCode ?? undefined,\n )\n\n const redebitMutation = useRecoveryCasesRedebitMutation()\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n await baseSubmitHandler({}, async () => {\n await redebitMutation.mutateAsync({\n request: {\n recoveryCaseUuid: recoveryCaseId,\n },\n })\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE, {\n recoveryCaseId,\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {title && <Heading as=\"h2\">{title}</Heading>}\n {subtitle && <Text>{subtitle}</Text>}\n {description.length > 0 && description}\n {/*\n This empty form is used to connect the Footer's submit button to the submission logic\n via the form attribute. This is semantically incorrect and hidden from assistive tech.\n */}\n <Form id={RECOVERY_CASES_RESUBMIT_FORM_ID} onSubmit={onSubmit} aria-hidden=\"true\">\n {/* Empty form - submission triggered by footer button via form attribute */}\n </Form>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Button } = useComponentContext()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyRecoveryCasesRedebit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={RECOVERY_CASES_RESUBMIT_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.resubmit')}\n </Button>\n </Flex>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","companyId","useFlow","recoveryCasesData","useRecoveryCasesGet","recoveryCase","rc","title","subtitle","description","useRecoveryCaseErrorCode","redebitMutation","useRecoveryCasesRedebitMutation","onSubmit","e","recoveryCasesEvents","jsxs","Flex","Form","Footer","useI18n","t","useTranslation","Button","isPending","useIsMutating","mutationKeyRecoveryCasesRedebit"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAMA,IAAkC;AAOjC,SAASC,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,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,EAAE,SAAArB,QAA4D;AAC5E,EAAAsB,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,QAAAC,EAAA,IAAW1B,EAAA,GAKb2B,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAgC,CAC9C,IAC8B;AAM/B,SACE,gBAAAV,EAACC,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA;AAAA,IAAA,gBAAA5B,EAACkC,GAAA,EAAO,SAAQ,aAAY,SANX,MAAM;AACzB,MAAAzB,EAAQiB,EAAoB,6BAA6B;AAAA,IAC3D,GAIuD,YAAYS,GAC5D,UAAAH,EAAE,YAAY,EAAA,CACjB;AAAA,IACA,gBAAAhC;AAAA,MAACkC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMrC;AAAA,QACN,WAAWsC;AAAA,QAEV,YAAE,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEArC,EAAsB,SAASgC;"}
@@ -2,6 +2,7 @@ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import { useTranslation as a, Trans as c } from "react-i18next";
3
3
  import p from "./RecoveryCaseErrorCode.module.scss.js";
4
4
  import { Flex as C } from "../../Common/Flex/Flex.js";
5
+ import "classnames";
5
6
  import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
7
  import { useI18n as f } from "../../../i18n/I18n.js";
7
8
  function h(s) {
@@ -18,7 +19,7 @@ function h(s) {
18
19
  return "bankError";
19
20
  }
20
21
  }
21
- function v(s) {
22
+ function g(s) {
22
23
  f("Payroll.RecoveryCasesResubmit");
23
24
  const { t: r } = a("Payroll.RecoveryCasesResubmit"), { Text: o } = R();
24
25
  if (!s)
@@ -59,6 +60,6 @@ function v(s) {
59
60
  };
60
61
  }
61
62
  export {
62
- v as useRecoveryCaseErrorCode
63
+ g as useRecoveryCaseErrorCode
63
64
  };
64
65
  //# sourceMappingURL=useRecoveryCaseErrorCode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRecoveryCaseErrorCode.js","sources":["../../../../src/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './RecoveryCaseErrorCode.module.scss'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport interface RecoveryCaseErrorCodeContent {\n title: string | null\n subtitle: string | null\n description: ReactNode[]\n}\n\ntype ErrorCodeKey = 'R01' | 'R02' | 'R16' | 'R29' | 'bankError'\n\nfunction getErrorCodeKey(errorCode: string | null | undefined): ErrorCodeKey {\n switch (errorCode) {\n case 'R01':\n return 'R01'\n case 'R02':\n return 'R02'\n case 'R16':\n return 'R16'\n case 'R29':\n return 'R29'\n default:\n return 'bankError'\n }\n}\n\nexport function useRecoveryCaseErrorCode(\n errorCode: string | null | undefined,\n): RecoveryCaseErrorCodeContent {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Text } = useComponentContext()\n\n if (!errorCode) {\n return {\n title: null,\n subtitle: null,\n description: [],\n }\n }\n\n const errorCodeKey = getErrorCodeKey(errorCode)\n\n const transComponents = {\n medium: <Text as=\"span\" weight=\"medium\" />,\n }\n\n const description: ReactNode[] = [\n <Text key=\"body\">\n <Trans t={t} i18nKey={`errorCodes.${errorCodeKey}.body`} components={transComponents} />\n </Text>,\n ]\n\n if (errorCodeKey === 'R29') {\n const achCodes = Object.values(t('errorCodes.R29.achCodes', { returnObjects: true }))\n description.push(\n <Flex key=\"instruction\" flexDirection=\"column\" gap={16}>\n <Text>{t('errorCodes.R29.listDescription')}</Text>\n <ul className={styles.compactList}>\n {achCodes.map((code, index) => (\n <li key={index}>{code}</li>\n ))}\n </ul>\n <Text>\n <Trans t={t} i18nKey=\"errorCodes.R29.instruction\" components={transComponents} />\n </Text>\n </Flex>,\n )\n } else {\n const instruction = t(`errorCodes.${errorCodeKey}.instruction`)\n if (instruction) {\n description.push(\n <Text key=\"instruction\">\n <Trans\n t={t}\n i18nKey={`errorCodes.${errorCodeKey}.instruction`}\n components={transComponents}\n />\n </Text>,\n )\n }\n }\n\n return {\n title: t(`errorCodes.${errorCodeKey}.title`),\n subtitle: t(`errorCodes.${errorCodeKey}.subtitle`),\n description,\n }\n}\n"],"names":["getErrorCodeKey","errorCode","useRecoveryCaseErrorCode","useI18n","t","useTranslation","Text","useComponentContext","errorCodeKey","transComponents","jsx","description","Trans","achCodes","jsxs","Flex","styles","code","index"],"mappings":";;;;;;AAeA,SAASA,EAAgBC,GAAoD;AAC3E,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EAAA;AAEb;AAEO,SAASC,EACdD,GAC8B;AAC9B,EAAAE,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,MAAI,CAACN;AACH,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAa,CAAA;AAAA,IAAC;AAIlB,QAAMO,IAAeR,EAAgBC,CAAS,GAExCQ,IAAkB;AAAA,IACtB,QAAQ,gBAAAC,EAACJ,GAAA,EAAK,IAAG,QAAO,QAAO,SAAA,CAAS;AAAA,EAAA,GAGpCK,IAA2B;AAAA,IAC/B,gBAAAD,EAACJ,GAAA,EACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAS,cAAcI,CAAY,SAAS,YAAYC,EAAA,CAAiB,EAAA,GAD9E,MAEV;AAAA,EAAA;AAGF,MAAID,MAAiB,OAAO;AAC1B,UAAMK,IAAW,OAAO,OAAOT,EAAE,2BAA2B,EAAE,eAAe,GAAA,CAAM,CAAC;AACpF,IAAAO,EAAY;AAAA,MACV,gBAAAG,EAACC,GAAA,EAAuB,eAAc,UAAS,KAAK,IAClD,UAAA;AAAA,QAAA,gBAAAL,EAACJ,GAAA,EAAM,UAAAF,EAAE,gCAAgC,EAAA,CAAE;AAAA,QAC3C,gBAAAM,EAAC,MAAA,EAAG,WAAWM,EAAO,aACnB,UAAAH,EAAS,IAAI,CAACI,GAAMC,MACnB,gBAAAR,EAAC,MAAA,EAAgB,UAAAO,KAARC,CAAa,CACvB,GACH;AAAA,QACA,gBAAAR,EAACJ,KACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAQ,8BAA6B,YAAYK,EAAA,CAAiB,EAAA,CACjF;AAAA,MAAA,EAAA,GATQ,aAUV;AAAA,IAAA;AAAA,EAEJ;AAEE,IADoBL,EAAE,cAAcI,CAAY,cAAc,KAE5DG,EAAY;AAAA,wBACTL,GAAA,EACC,UAAA,gBAAAI;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,GAAAR;AAAA,UACA,SAAS,cAAcI,CAAY;AAAA,UACnC,YAAYC;AAAA,QAAA;AAAA,MAAA,KAJN,aAMV;AAAA,IAAA;AAKN,SAAO;AAAA,IACL,OAAOL,EAAE,cAAcI,CAAY,QAAQ;AAAA,IAC3C,UAAUJ,EAAE,cAAcI,CAAY,WAAW;AAAA,IACjD,aAAAG;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"useRecoveryCaseErrorCode.js","sources":["../../../../src/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './RecoveryCaseErrorCode.module.scss'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport interface RecoveryCaseErrorCodeContent {\n title: string | null\n subtitle: string | null\n description: ReactNode[]\n}\n\ntype ErrorCodeKey = 'R01' | 'R02' | 'R16' | 'R29' | 'bankError'\n\nfunction getErrorCodeKey(errorCode: string | null | undefined): ErrorCodeKey {\n switch (errorCode) {\n case 'R01':\n return 'R01'\n case 'R02':\n return 'R02'\n case 'R16':\n return 'R16'\n case 'R29':\n return 'R29'\n default:\n return 'bankError'\n }\n}\n\nexport function useRecoveryCaseErrorCode(\n errorCode: string | null | undefined,\n): RecoveryCaseErrorCodeContent {\n useI18n('Payroll.RecoveryCasesResubmit')\n const { t } = useTranslation('Payroll.RecoveryCasesResubmit')\n const { Text } = useComponentContext()\n\n if (!errorCode) {\n return {\n title: null,\n subtitle: null,\n description: [],\n }\n }\n\n const errorCodeKey = getErrorCodeKey(errorCode)\n\n const transComponents = {\n medium: <Text as=\"span\" weight=\"medium\" />,\n }\n\n const description: ReactNode[] = [\n <Text key=\"body\">\n <Trans t={t} i18nKey={`errorCodes.${errorCodeKey}.body`} components={transComponents} />\n </Text>,\n ]\n\n if (errorCodeKey === 'R29') {\n const achCodes = Object.values(t('errorCodes.R29.achCodes', { returnObjects: true }))\n description.push(\n <Flex key=\"instruction\" flexDirection=\"column\" gap={16}>\n <Text>{t('errorCodes.R29.listDescription')}</Text>\n <ul className={styles.compactList}>\n {achCodes.map((code, index) => (\n <li key={index}>{code}</li>\n ))}\n </ul>\n <Text>\n <Trans t={t} i18nKey=\"errorCodes.R29.instruction\" components={transComponents} />\n </Text>\n </Flex>,\n )\n } else {\n const instruction = t(`errorCodes.${errorCodeKey}.instruction`)\n if (instruction) {\n description.push(\n <Text key=\"instruction\">\n <Trans\n t={t}\n i18nKey={`errorCodes.${errorCodeKey}.instruction`}\n components={transComponents}\n />\n </Text>,\n )\n }\n }\n\n return {\n title: t(`errorCodes.${errorCodeKey}.title`),\n subtitle: t(`errorCodes.${errorCodeKey}.subtitle`),\n description,\n }\n}\n"],"names":["getErrorCodeKey","errorCode","useRecoveryCaseErrorCode","useI18n","t","useTranslation","Text","useComponentContext","errorCodeKey","transComponents","jsx","description","Trans","achCodes","jsxs","Flex","styles","code","index"],"mappings":";;;;;;;AAeA,SAASA,EAAgBC,GAAoD;AAC3E,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EAAA;AAEb;AAEO,SAASC,EACdD,GAC8B;AAC9B,EAAAE,EAAQ,+BAA+B;AACvC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,+BAA+B,GACtD,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,MAAI,CAACN;AACH,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAa,CAAA;AAAA,IAAC;AAIlB,QAAMO,IAAeR,EAAgBC,CAAS,GAExCQ,IAAkB;AAAA,IACtB,QAAQ,gBAAAC,EAACJ,GAAA,EAAK,IAAG,QAAO,QAAO,SAAA,CAAS;AAAA,EAAA,GAGpCK,IAA2B;AAAA,IAC/B,gBAAAD,EAACJ,GAAA,EACC,UAAA,gBAAAI,EAACE,GAAA,EAAM,GAAAR,GAAM,SAAS,cAAcI,CAAY,SAAS,YAAYC,EAAA,CAAiB,EAAA,GAD9E,MAEV;AAAA,EAAA;AAGF,MAAID,MAAiB,OAAO;AAC1B,UAAMK,IAAW,OAAO,OAAOT,EAAE,2BAA2B,EAAE,eAAe,GAAA,CAAM,CAAC;AACpF,IAAAO,EAAY;AAAA,MACV,gBAAAG,EAACC,GAAA,EAAuB,eAAc,UAAS,KAAK,IAClD,UAAA;AAAA,QAAA,gBAAAL,EAACJ,GAAA,EAAM,UAAAF,EAAE,gCAAgC,EAAA,CAAE;AAAA,QAC3C,gBAAAM,EAAC,MAAA,EAAG,WAAWM,EAAO,aACnB,UAAAH,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