@gusto/embedded-react-sdk 0.25.0 → 0.26.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 (404) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/assets/icons/icon-file-jpg.svg.js +10 -0
  3. package/dist/assets/icons/icon-file-jpg.svg.js.map +1 -0
  4. package/dist/assets/icons/icon-file-pdf.svg.js +10 -0
  5. package/dist/assets/icons/icon-file-pdf.svg.js.map +1 -0
  6. package/dist/assets/icons/icon-file-png.svg.js +10 -0
  7. package/dist/assets/icons/icon-file-png.svg.js.map +1 -0
  8. package/dist/assets/icons/icon-trashcan.svg.js +10 -0
  9. package/dist/assets/icons/icon-trashcan.svg.js.map +1 -0
  10. package/dist/components/Base/Base.js +12 -13
  11. package/dist/components/Base/Base.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
  13. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -4
  15. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  16. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
  17. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  18. package/dist/components/Common/UI/Alert/Alert.js +10 -10
  19. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  20. package/dist/components/Common/UI/Alert/Alert.module.scss.js +14 -14
  21. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  22. package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
  23. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
  24. package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
  25. package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
  26. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +30 -28
  27. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
  28. package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
  29. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  30. package/dist/components/Common/UI/Modal/Modal.js +41 -40
  31. package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
  32. package/dist/components/Common/UI/Modal/Modal.module.scss.js +4 -4
  33. package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
  34. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +4 -4
  35. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  36. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
  38. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  40. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  42. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +5 -6
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  46. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  48. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +4 -5
  49. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  51. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -4
  52. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  55. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +4 -6
  57. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
  60. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  61. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  63. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  64. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  65. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  66. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  67. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
  68. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  70. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -4
  71. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  72. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  73. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  74. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  75. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -4
  76. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  77. package/dist/components/Company/FederalTaxes/Form.js +2 -4
  78. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  79. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  80. package/dist/components/Company/Industry/Actions.js +7 -8
  81. package/dist/components/Company/Industry/Actions.js.map +1 -1
  82. package/dist/components/Company/Industry/Context.js +1 -1
  83. package/dist/components/Company/Industry/Edit.js +2 -3
  84. package/dist/components/Company/Industry/Edit.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  86. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  87. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  88. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  89. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  90. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  91. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  92. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  93. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  95. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -8
  97. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  99. package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
  100. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  101. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  102. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  103. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -8
  104. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  105. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  106. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  107. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  108. package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
  109. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  110. package/dist/components/Company/PaySchedule/_parts/Edit.js +9 -10
  111. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  112. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -13
  113. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  114. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  115. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  116. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  117. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  118. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  119. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  120. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  121. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  122. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  123. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  125. package/dist/components/Contractor/Address/Address.js +4 -5
  126. package/dist/components/Contractor/Address/Address.js.map +1 -1
  127. package/dist/components/Contractor/Address/Form.js +6 -7
  128. package/dist/components/Contractor/Address/Form.js.map +1 -1
  129. package/dist/components/Contractor/Address/useAddress.js +1 -1
  130. package/dist/components/Contractor/ContractorList/index.js +31 -32
  131. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  132. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  133. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  134. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -11
  135. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  136. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  137. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  138. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  139. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  140. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
  141. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  142. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -4
  143. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  144. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +13 -14
  145. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  146. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +8 -0
  147. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +58 -0
  148. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
  149. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
  150. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
  151. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
  152. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  153. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -56
  154. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  155. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  156. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
  157. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  158. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  159. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
  160. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  161. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +9 -11
  162. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  163. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
  164. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  165. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
  166. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
  167. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
  168. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
  169. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +125 -0
  170. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
  171. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
  172. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
  173. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  174. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
  175. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -49
  176. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  177. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  178. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  179. package/dist/components/Contractor/Submit/Submit.js +20 -21
  180. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  181. package/dist/components/Employee/Compensation/Actions.js +12 -13
  182. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  183. package/dist/components/Employee/Compensation/Edit.js +2 -3
  184. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  185. package/dist/components/Employee/Compensation/List.js +22 -23
  186. package/dist/components/Employee/Compensation/List.js.map +1 -1
  187. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -2
  188. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -2
  189. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -2
  190. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +3 -4
  191. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  192. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
  193. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  194. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +2 -3
  195. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  196. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -3
  197. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  198. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  199. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  200. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  201. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  202. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  204. package/dist/components/Employee/EmployeeList/Actions.js +6 -7
  205. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  206. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  207. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  208. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  209. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  210. package/dist/components/Employee/EmployeeList/List.js +2 -3
  211. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  212. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  213. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
  214. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
  215. package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
  216. package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
  217. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  218. package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
  219. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  220. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +1 -1
  221. package/dist/components/Employee/Landing/Landing.js +10 -11
  222. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  223. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  224. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  225. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  226. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
  227. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  228. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  229. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  230. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +5 -6
  231. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  232. package/dist/components/Employee/PaymentMethod/Split.js +2 -3
  233. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  234. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  235. package/dist/components/Employee/Profile/Actions.js +5 -6
  236. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  237. package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
  238. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  239. package/dist/components/Employee/Profile/HomeAddress.js +8 -9
  240. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  241. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  242. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  243. package/dist/components/Employee/Profile/useProfile.js +1 -1
  244. package/dist/components/Employee/StateTaxes/Actions.js +5 -6
  245. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  246. package/dist/components/Employee/StateTaxes/useStateTaxes.js +1 -1
  247. package/dist/components/Employee/Taxes/Actions.js +6 -7
  248. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  249. package/dist/components/Employee/Taxes/FederalForm.js +6 -7
  250. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  251. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  252. package/dist/components/Flow/Flow.js +7 -9
  253. package/dist/components/Flow/Flow.js.map +1 -1
  254. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
  255. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +162 -0
  256. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
  257. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
  258. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
  259. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
  260. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +96 -0
  261. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
  262. package/dist/components/InformationRequests/InformationRequests.d.ts +7 -0
  263. package/dist/components/InformationRequests/InformationRequests.js +68 -0
  264. package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
  265. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
  266. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
  267. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
  268. package/dist/components/InformationRequests/index.d.ts +4 -0
  269. package/dist/components/InformationRequests/index.js +9 -0
  270. package/dist/components/InformationRequests/index.js.map +1 -0
  271. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
  272. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
  273. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
  274. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
  275. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  276. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +0 -1
  277. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  278. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
  279. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  280. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -24
  281. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  282. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
  283. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +102 -28
  284. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  285. package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
  286. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
  287. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  288. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
  289. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
  290. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  291. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
  292. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  293. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
  294. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  295. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -16
  296. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  297. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  298. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
  299. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  300. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
  301. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  302. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +36 -38
  303. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  304. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
  305. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
  306. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  307. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
  308. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
  309. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  310. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
  311. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  312. package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
  313. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  314. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
  315. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +89 -96
  316. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  317. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +29 -30
  318. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  319. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
  320. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
  321. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  322. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
  323. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
  324. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  325. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
  326. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  327. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
  328. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  329. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
  330. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
  331. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +83 -52
  332. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  333. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
  334. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
  335. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -36
  336. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  337. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
  338. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +65 -0
  339. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
  340. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
  341. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
  342. package/dist/components/Payroll/helpers.js.map +1 -1
  343. package/dist/components/Payroll/index.d.ts +1 -2
  344. package/dist/components/Payroll/index.js +8 -10
  345. package/dist/components/Payroll/index.js.map +1 -1
  346. package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
  347. package/dist/components/Payroll/usePreparedPayrollData.js +1 -1
  348. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  349. package/dist/components/index.d.ts +1 -0
  350. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +1 -1
  351. package/dist/contexts/ThemeProvider/theme.js +5 -5
  352. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  353. package/dist/helpers/formattedStrings.js +12 -11
  354. package/dist/helpers/formattedStrings.js.map +1 -1
  355. package/dist/i18n/I18n.js +8 -8
  356. package/dist/i18n/I18n.js.map +1 -1
  357. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
  358. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  359. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
  360. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
  361. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
  362. package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
  363. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
  364. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
  365. package/dist/i18n/en/{Payroll.InformationRequestList.json.js → InformationRequests.InformationRequestList.json.js} +6 -6
  366. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
  367. package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
  368. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
  369. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  370. package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
  371. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
  372. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
  373. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
  374. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
  375. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
  376. package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
  377. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  378. package/dist/index.js +10 -8
  379. package/dist/index.js.map +1 -1
  380. package/dist/shared/constants.d.ts +6 -0
  381. package/dist/shared/constants.js +12 -9
  382. package/dist/shared/constants.js.map +1 -1
  383. package/dist/style.css +1 -1
  384. package/dist/types/i18next.d.ts +248 -46
  385. package/package.json +16 -16
  386. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
  387. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
  388. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
  389. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
  390. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
  391. package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
  392. package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
  393. package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
  394. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
  395. package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
  396. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
  397. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
  398. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
  399. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
  400. package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
  401. package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
  402. package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
  403. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
  404. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
@@ -1,73 +1,104 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { useTranslation as u } from "react-i18next";
3
- import l from "./RecoveryCasesList.module.scss.js";
4
- import { BaseComponent as h } from "../../../Base/Base.js";
1
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
+ import { useTranslation as l } from "react-i18next";
3
+ import { useRecoveryCasesGet as v } from "@gusto/embedded-api/react-query/recoveryCasesGet";
4
+ import { useRecoveryCaseErrorCode as g } from "../useRecoveryCaseErrorCode.js";
5
+ import R from "./RecoveryCasesList.module.scss.js";
6
+ import { BaseComponent as L } from "../../../Base/Base.js";
5
7
  import "../../../Base/useBase.js";
6
- import { useComponentContext as f } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- import { useComponentDictionary as p, useI18n as y } from "../../../../i18n/I18n.js";
8
- import { DataView as C } from "../../../Common/DataView/DataView.js";
9
- import { useDataView as v } from "../../../Common/DataView/useDataView.js";
10
- import { FlexItem as x, Flex as o } from "../../../Common/Flex/Flex.js";
11
- import "classnames";
12
- import { recoveryCasesEvents as g } from "../../../../shared/constants.js";
8
+ import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { useComponentDictionary as b, useI18n as u } from "../../../../i18n/I18n.js";
10
+ import { DataView as E } from "../../../Common/DataView/DataView.js";
11
+ import { useDataView as x } from "../../../Common/DataView/useDataView.js";
12
+ import { FlexItem as D, Flex as d } from "../../../Common/Flex/Flex.js";
13
13
  import "react";
14
- function F(n) {
15
- return /* @__PURE__ */ e(h, { ...n, children: /* @__PURE__ */ e(R, { ...n, children: n.children }) });
14
+ import { recoveryCasesEvents as P } from "../../../../shared/constants.js";
15
+ import { formatNumberAsCurrency as y } from "../../../../helpers/formattedStrings.js";
16
+ function z(t) {
17
+ return /* @__PURE__ */ e(L, { ...t, children: /* @__PURE__ */ e(S, { ...t, children: t.children }) });
16
18
  }
17
- function R({ dictionary: n, onEvent: s }) {
18
- p("Payroll.RecoveryCasesList", n), y("Payroll.RecoveryCasesList");
19
- const { t } = u("Payroll.RecoveryCasesList"), { Heading: c, Text: r, Button: a, Badge: d } = f(), m = v({
20
- data: [{ id: "placeholder" }],
21
- columns: [
22
- {
23
- title: t("columns.originalDebitDate"),
24
- render: () => /* @__PURE__ */ e(x, { flexGrow: 1, children: /* @__PURE__ */ e(r, { children: "2025-10-11" }) })
19
+ function A(t) {
20
+ return t === "open" ? "info" : "warning";
21
+ }
22
+ function k({ errorCode: t }) {
23
+ u("Payroll.RecoveryCasesList");
24
+ const { t: n } = l("Payroll.RecoveryCasesList"), { Text: s } = c(), { title: r, subtitle: i } = g(t);
25
+ return !r && !i ? /* @__PURE__ */ e("span", { "aria-label": n("labels.noLatestErrorCodeAriaLabel"), "aria-live": "polite", children: n("labels.noLatestErrorCode") }) : /* @__PURE__ */ m(d, { flexDirection: "column", gap: 4, children: [
26
+ r && /* @__PURE__ */ e(s, { weight: "semibold", children: r }),
27
+ i && /* @__PURE__ */ e(s, { children: i })
28
+ ] });
29
+ }
30
+ function w({ status: t }) {
31
+ u("Payroll.RecoveryCasesList");
32
+ const { t: n } = l("Payroll.RecoveryCasesList"), { Badge: s } = c();
33
+ if (!t)
34
+ return null;
35
+ const r = A(t), i = n(`status.${t}`);
36
+ return /* @__PURE__ */ e(s, { status: r, children: i });
37
+ }
38
+ function O({
39
+ recoveryCase: t,
40
+ onEvent: n
41
+ }) {
42
+ u("Payroll.RecoveryCasesList");
43
+ const { t: s } = l("Payroll.RecoveryCasesList"), { Button: r } = c();
44
+ return t.status !== "open" ? null : /* @__PURE__ */ e(
45
+ r,
46
+ {
47
+ variant: "secondary",
48
+ onClick: () => {
49
+ n(P.RECOVERY_CASE_RESOLVE, {
50
+ recoveryCaseId: t.uuid
51
+ });
25
52
  },
53
+ children: s("cta.resolve")
54
+ }
55
+ );
56
+ }
57
+ function S({ companyId: t, dictionary: n, onEvent: s }) {
58
+ b("Payroll.RecoveryCasesList", n), u("Payroll.RecoveryCasesList");
59
+ const { t: r } = l("Payroll.RecoveryCasesList"), { Heading: i, Text: a } = c(), { data: C, isFetching: f } = v({
60
+ companyUuid: t
61
+ }), p = (C?.recoveryCaseList ?? []).filter((o) => o.status !== "recovered"), h = x({
62
+ data: p,
63
+ isFetching: f,
64
+ columns: [
26
65
  {
27
- title: t("columns.totalAmount"),
28
- render: () => /* @__PURE__ */ e(r, { children: "$30,093.45" })
66
+ key: "originalDebitDate",
67
+ title: r("columns.originalDebitDate"),
68
+ render: (o) => /* @__PURE__ */ e(D, { flexGrow: 1, children: /* @__PURE__ */ e(a, { children: o.originalDebitDate ?? "-" }) })
29
69
  },
30
70
  {
31
- title: t("columns.amountOutstanding"),
32
- render: () => /* @__PURE__ */ e(r, { children: "$30,093.45" })
71
+ key: "totalAmount",
72
+ title: r("columns.totalAmount"),
73
+ render: (o) => /* @__PURE__ */ e(a, { children: o.eventTotalAmount ? y(parseFloat(o.eventTotalAmount)) : "-" })
33
74
  },
34
75
  {
35
- title: t("columns.latestErrorCode"),
36
- render: () => /* @__PURE__ */ i(o, { flexDirection: "column", gap: 4, children: [
37
- /* @__PURE__ */ e(r, { weight: "semibold", children: "R01: Insufficient funds" }),
38
- /* @__PURE__ */ e(r, { children: "Ensure sufficient funds to unblock your account" })
39
- ] })
76
+ key: "amountOutstanding",
77
+ title: r("columns.amountOutstanding"),
78
+ render: (o) => /* @__PURE__ */ e(a, { children: o.amountOutstanding ? y(parseFloat(o.amountOutstanding)) : "-" })
40
79
  },
41
80
  {
42
- title: t("columns.status"),
43
- render: () => /* @__PURE__ */ e(o, { gap: 8, alignItems: "center", children: /* @__PURE__ */ e(d, { status: "info", children: "Open" }) })
81
+ key: "latestErrorCode",
82
+ title: r("columns.latestErrorCode"),
83
+ render: (o) => /* @__PURE__ */ e(k, { errorCode: o.latestErrorCode })
44
84
  },
45
85
  {
46
- title: "",
47
- render: () => /* @__PURE__ */ e(o, { justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ e(
48
- a,
49
- {
50
- variant: "secondary",
51
- onClick: () => {
52
- s(g.RECOVERY_CASE_RESOLVE, {
53
- recoveryCaseId: "placeholder-id"
54
- });
55
- },
56
- children: t("cta.resolve")
57
- }
58
- ) })
86
+ key: "status",
87
+ title: r("columns.status"),
88
+ render: (o) => /* @__PURE__ */ e(w, { status: o.status })
59
89
  }
60
- ]
90
+ ],
91
+ itemMenu: (o) => /* @__PURE__ */ e(O, { recoveryCase: o, onEvent: s })
61
92
  });
62
- return /* @__PURE__ */ e("div", { className: l.root, children: /* @__PURE__ */ i(o, { flexDirection: "column", gap: 24, children: [
63
- /* @__PURE__ */ i("div", { className: l.header, children: [
64
- /* @__PURE__ */ e(c, { as: "h2", styledAs: "h3", children: t("title") }),
65
- /* @__PURE__ */ e(r, { children: t("description") })
93
+ return /* @__PURE__ */ e("div", { className: R.root, children: /* @__PURE__ */ m(d, { flexDirection: "column", gap: 20, children: [
94
+ /* @__PURE__ */ m(d, { flexDirection: "column", gap: 2, children: [
95
+ /* @__PURE__ */ e(i, { as: "h2", styledAs: "h4", children: r("title") }),
96
+ /* @__PURE__ */ e(a, { children: r("description") })
66
97
  ] }),
67
- /* @__PURE__ */ e(C, { ...m, label: t("title") })
98
+ /* @__PURE__ */ e(E, { ...h, label: r("title") })
68
99
  ] }) });
69
100
  }
70
101
  export {
71
- F as RecoveryCasesList
102
+ z as RecoveryCasesList
72
103
  };
73
104
  //# 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 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'\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 Root({ dictionary, onEvent }: RecoveryCasesListProps) {\n useComponentDictionary('Payroll.RecoveryCasesList', dictionary)\n useI18n('Payroll.RecoveryCasesList')\n const { t } = useTranslation('Payroll.RecoveryCasesList')\n const { Heading, Text, Button, Badge } = useComponentContext()\n\n // TODO: Replace with actual recovery cases data from API\n\n const dataViewProps = useDataView({\n data: [{ id: 'placeholder' }],\n columns: [\n {\n title: t('columns.originalDebitDate'),\n render: () => (\n <FlexItem flexGrow={1}>\n <Text>2025-10-11</Text>\n </FlexItem>\n ),\n },\n {\n title: t('columns.totalAmount'),\n render: () => <Text>$30,093.45</Text>,\n },\n {\n title: t('columns.amountOutstanding'),\n render: () => <Text>$30,093.45</Text>,\n },\n {\n title: t('columns.latestErrorCode'),\n render: () => (\n <Flex flexDirection=\"column\" gap={4}>\n <Text weight=\"semibold\">R01: Insufficient funds</Text>\n <Text>Ensure sufficient funds to unblock your account</Text>\n </Flex>\n ),\n },\n {\n title: t('columns.status'),\n render: () => (\n <Flex gap={8} alignItems=\"center\">\n <Badge status=\"info\">Open</Badge>\n </Flex>\n ),\n },\n {\n title: '',\n render: () => (\n <Flex justifyContent=\"flex-end\" alignItems=\"center\">\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESOLVE, {\n recoveryCaseId: 'placeholder-id',\n })\n }}\n >\n {t('cta.resolve')}\n </Button>\n </Flex>\n ),\n },\n ],\n })\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={24}>\n <div className={styles.header}>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text>{t('description')}</Text>\n </div>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n </div>\n )\n}\n"],"names":["RecoveryCasesList","props","jsx","BaseComponent","Root","dictionary","onEvent","useComponentDictionary","useI18n","useTranslation","Heading","Text","Button","Badge","useComponentContext","dataViewProps","useDataView","FlexItem","jsxs","Flex","recoveryCasesEvents","styles","DataView"],"mappings":";;;;;;;;;;;;;AAeO,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,SAASG,EAAK,EAAE,YAAAC,GAAY,SAAAC,KAAmC;AAC7D,EAAAC,EAAuB,6BAA6BF,CAA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AW,UACzC,UAAA,gBAAAjB;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,SAAS,MAAM;AACb,cAAAN,EAAQc,EAAoB,uBAAuB;AAAA,gBACjD,gBAAgB;AAAA,cAAA,CACjB;AAAA,YACH;AAAA,YAEC,YAAE,aAAa;AAAA,UAAA;AAAA,QAAA,EAClB,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF,CACD;AAED,SACE,gBAAAlB,EAAC,OAAA,EAAI,WAAWmB,EAAO,MACrB,4BAACF,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWG,EAAO,QACrB,UAAA;AAAA,MAAA,gBAAAnB,EAACQ,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAA,EAAE,OAAO,GACZ;AAAA,MACA,gBAAAR,EAACS,GAAA,EAAM,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GAC1B;AAAA,sBAECW,GAAA,EAAU,GAAGP,GAAe,OAAO,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 { useRecoveryCasesGet } 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, isFetching } = useRecoveryCasesGet({\n companyUuid: companyId,\n })\n\n const recoveryCases = (data?.recoveryCaseList ?? []).filter(rc => rc.status !== 'recovered')\n\n const dataViewProps = useDataView({\n data: recoveryCases,\n isFetching,\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","isFetching","useRecoveryCasesGet","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,UAAAA,EAAE,0BAA0B,EAAA,CAC/B,IAKF,gBAAAO,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAC/B,UAAA;AAAA,IAAAJ,KAAS,gBAAAZ,EAACU,GAAA,EAAK,QAAO,YAAY,UAAAE,GAAM;AAAA,IACxCC,KAAY,gBAA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A,EAAI,WAAWuC,EAAO,MACrB,4BAACvB,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,sBAECgC,GAAA,EAAU,GAAGL,GAAe,OAAO3B,EAAE,OAAO,EAAA,CAAG;AAAA,EAAA,EAAA,CAClD,EAAA,CACF;AAEJ;"}
@@ -1,10 +1,8 @@
1
- const o = "_root_5swl6_1", e = "_header_5swl6_7", t = {
2
- root: o,
3
- header: e
1
+ const o = "_root_whd9a_1", t = {
2
+ root: o
4
3
  };
5
4
  export {
6
5
  t as default,
7
- e as header,
8
6
  o as root
9
7
  };
10
8
  //# sourceMappingURL=RecoveryCasesList.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryCasesList.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"RecoveryCasesList.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,46 +1,69 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { useTranslation as u } from "react-i18next";
3
- import { BaseComponent as R } from "../../../Base/Base.js";
4
- import { useBase as C } from "../../../Base/useBase.js";
5
- import { Flex as y } from "../../../Common/Flex/Flex.js";
6
- import "classnames";
7
- import { recoveryCasesEvents as s } from "../../../../shared/constants.js";
8
- import { ActionsLayout as h } from "../../../Common/ActionsLayout/ActionsLayout.js";
9
- import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
1
+ import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
+ import { useTranslation as h } from "react-i18next";
3
+ import { useIsMutating as g } from "@tanstack/react-query";
4
+ import { useRecoveryCasesRedebitMutation as _, mutationKeyRecoveryCasesRedebit as M } from "@gusto/embedded-api/react-query/recoveryCasesRedebit";
5
+ import { useRecoveryCasesGet as S } from "@gusto/embedded-api/react-query/recoveryCasesGet";
6
+ import { useRecoveryCaseErrorCode as x } from "../useRecoveryCaseErrorCode.js";
7
+ import { BaseComponent as D } from "../../../Base/Base.js";
8
+ import { useBase as B } from "../../../Base/useBase.js";
9
+ import { Flex as d } from "../../../Common/Flex/Flex.js";
10
+ import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
11
  import "react";
11
- import { Form as b } from "../../../Common/Form/Form.js";
12
- import { useComponentDictionary as E, useI18n as a } from "../../../../i18n/I18n.js";
13
- const m = "gusto-sdk-recovery-cases-resubmit-form";
14
- function f(o) {
15
- return /* @__PURE__ */ e(R, { ...o, children: /* @__PURE__ */ e(p, { ...o, children: o.children }) });
12
+ import { Form as F } from "../../../Common/Form/Form.js";
13
+ import { useFlow as A } from "../../../Flow/useFlow.js";
14
+ import { useComponentDictionary as I, useI18n as O } from "../../../../i18n/I18n.js";
15
+ import { recoveryCasesEvents as y } from "../../../../shared/constants.js";
16
+ const R = "gusto-sdk-recovery-cases-resubmit-form";
17
+ function T(e) {
18
+ return /* @__PURE__ */ t(D, { ...e, children: /* @__PURE__ */ t(U, { ...e, children: e.children }) });
16
19
  }
17
- function p({ dictionary: o, recoveryCaseId: n }) {
18
- E("Payroll.RecoveryCasesResubmit", o), a("Payroll.RecoveryCasesResubmit");
19
- const { Heading: r, Text: t } = c(), { onEvent: l, baseSubmitHandler: d } = C();
20
- return /* @__PURE__ */ i(y, { flexDirection: "column", gap: 16, children: [
21
- /* @__PURE__ */ e(r, { as: "h2", children: "[Placeholder title based on R code]" }),
22
- /* @__PURE__ */ e(t, { children: "[Placeholder subtitle based on R code]" }),
23
- /* @__PURE__ */ e(t, { children: "[Placeholder body based on R code]" }),
24
- /* @__PURE__ */ e(t, { children: "[Placeholder instruction based on R code]" }),
25
- /* @__PURE__ */ e(b, { id: m, onSubmit: async () => {
26
- await d({}, async () => {
27
- l(s.RECOVERY_CASE_RESUBMIT_DONE);
20
+ function U({ dictionary: e, recoveryCaseId: o }) {
21
+ I("Payroll.RecoveryCasesResubmit", e);
22
+ const { Heading: r, Text: i } = C(), { onEvent: n, baseSubmitHandler: a } = B(), { companyId: f } = A(), { data: p } = S({
23
+ companyUuid: f
24
+ }), v = p?.recoveryCaseList?.find((s) => s.uuid === o), { title: c, subtitle: m, description: u } = x(
25
+ v?.latestErrorCode ?? void 0
26
+ ), E = _(), b = async (s) => {
27
+ s.preventDefault(), await a({}, async () => {
28
+ await E.mutateAsync({
29
+ request: {
30
+ recoveryCaseUuid: o
31
+ }
32
+ }), n(y.RECOVERY_CASE_RESUBMIT_DONE, {
33
+ recoveryCaseId: o
28
34
  });
29
- }, "aria-hidden": "true" })
35
+ });
36
+ };
37
+ return /* @__PURE__ */ l(d, { flexDirection: "column", gap: 16, children: [
38
+ c && /* @__PURE__ */ t(r, { as: "h2", children: c }),
39
+ m && /* @__PURE__ */ t(i, { children: m }),
40
+ u.length > 0 && u,
41
+ /* @__PURE__ */ t(F, { id: R, onSubmit: b, "aria-hidden": "true" })
30
42
  ] });
31
43
  }
32
- const v = ({ onEvent: o }) => {
33
- a("Payroll.RecoveryCasesResubmit");
34
- const { t: n } = u("Payroll.RecoveryCasesResubmit"), { Button: r } = c();
35
- return /* @__PURE__ */ i(h, { children: [
36
- /* @__PURE__ */ e(r, { variant: "secondary", onClick: () => {
37
- o(s.RECOVERY_CASE_RESUBMIT_CANCEL);
38
- }, children: n("cta.cancel") }),
39
- /* @__PURE__ */ e(r, { variant: "primary", type: "submit", form: m, children: n("cta.resubmit") })
44
+ const P = ({ onEvent: e }) => {
45
+ O("Payroll.RecoveryCasesResubmit");
46
+ const { t: o } = h("Payroll.RecoveryCasesResubmit"), { Button: r } = C(), n = g({
47
+ mutationKey: M()
48
+ }) > 0;
49
+ return /* @__PURE__ */ l(d, { justifyContent: "flex-end", gap: 12, children: [
50
+ /* @__PURE__ */ t(r, { variant: "secondary", onClick: () => {
51
+ e(y.RECOVERY_CASE_RESUBMIT_CANCEL);
52
+ }, isDisabled: n, children: o("cta.cancel") }),
53
+ /* @__PURE__ */ t(
54
+ r,
55
+ {
56
+ variant: "primary",
57
+ type: "submit",
58
+ form: R,
59
+ isLoading: n,
60
+ children: o("cta.resubmit")
61
+ }
62
+ )
40
63
  ] });
41
64
  };
42
- f.Footer = v;
65
+ T.Footer = P;
43
66
  export {
44
- f as RecoveryCasesResubmit
67
+ T as RecoveryCasesResubmit
45
68
  };
46
69
  //# sourceMappingURL=RecoveryCasesResubmit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryCasesResubmit.js","sources":["../../../../../src/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\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 useI18n('Payroll.RecoveryCasesResubmit')\n const { Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n\n // TODO: Wire up resubmit API call\n const onSubmit = async () => {\n // TODO: remove this lint ignore once we wire this up and await the api call\n // eslint-disable-next-line @typescript-eslint/require-await\n await baseSubmitHandler({}, async () => {\n // TODO: Call API resubmit payment endpoint here\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE)\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">[Placeholder title based on R code]</Heading>\n <Text>[Placeholder subtitle based on R code]</Text>\n <Text>[Placeholder body based on R code]</Text>\n <Text>[Placeholder instruction based on R code]</Text>\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 handleCancel = () => {\n onEvent(recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_CANCEL)\n }\n\n return (\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={handleCancel}>\n {t('cta.cancel')}\n </Button>\n <Button variant=\"primary\" type=\"submit\" form={RECOVERY_CASES_RESUBMIT_FORM_ID}>\n {t('cta.resubmit')}\n </Button>\n </ActionsLayout>\n )\n}\n\nRecoveryCasesResubmit.Footer = Footer\n"],"names":["RECOVERY_CASES_RESUBMIT_FORM_ID","RecoveryCasesResubmit","props","jsx","BaseComponent","Root","dictionary","recoveryCaseId","useComponentDictionary","useI18n","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","jsxs","Flex","Form","recoveryCasesEvents","Footer","t","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EAAQM,EAAoB,6BAA6B;AAAA,IAC3D,GAKO,UAAAE,EAAE,YAAY,GACjB;AAAA,IACA,gBAAAlB,EAACoB,GAAA,EAAO,SAAQ,WAAU,MAAK,UAAS,MAAMvB,GAC3C,UAAAqB,EAAE,cAAc,EAAA,CACnB;AAAA,EAAA,GACF;AAEJ;AAEApB,EAAsB,SAASmB;"}
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,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,gBAAAC,KAA8C;AACxE,EAAAC,EAAuB,iCAAiCF,CAAU;AAClE,QAAM,EAAE,SAAAG,GAAS,MAAAC,EAAA,IAASC,EAAA,GACpB,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAEhB,EAAE,MAAMC,EAAA,IAAsBC,EAAoB;AAAA,IACtD,aAAaH;AAAA,EAAA,CACd,GAEKI,IAAeF,GAAmB,kBAAkB,KAAK,CAAAG,MAAMA,EAAG,SAASb,CAAc,GAEzF,EAAE,OAAAc,GAAO,UAAAC,GAAU,aAAAC,EAAA,IAAgBC;AAAA,IACvCL,GAAc,mBAAmB;AAAA,EAAA,GAG7BM,IAAkBC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AAWsC;AAAA,QAEV,YAAE,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEArC,EAAsB,SAASgC;"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface RecoveryCaseErrorCodeContent {
3
+ title: string | null;
4
+ subtitle: string | null;
5
+ description: ReactNode[];
6
+ }
7
+ export declare function useRecoveryCaseErrorCode(errorCode: string | null | undefined): RecoveryCaseErrorCodeContent;
@@ -0,0 +1,65 @@
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { useTranslation as a, Trans as c } from "react-i18next";
3
+ import p from "./RecoveryCaseErrorCode.module.scss.js";
4
+ import { Flex as C } from "../../Common/Flex/Flex.js";
5
+ import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import "react";
7
+ import { useI18n as f } from "../../../i18n/I18n.js";
8
+ function h(s) {
9
+ switch (s) {
10
+ case "R01":
11
+ return "R01";
12
+ case "R02":
13
+ return "R02";
14
+ case "R16":
15
+ return "R16";
16
+ case "R29":
17
+ return "R29";
18
+ default:
19
+ return "bankError";
20
+ }
21
+ }
22
+ function g(s) {
23
+ f("Payroll.RecoveryCasesResubmit");
24
+ const { t: r } = a("Payroll.RecoveryCasesResubmit"), { Text: o } = R();
25
+ if (!s)
26
+ return {
27
+ title: null,
28
+ subtitle: null,
29
+ description: []
30
+ };
31
+ const t = h(s), n = {
32
+ medium: /* @__PURE__ */ e(o, { as: "span", weight: "medium" })
33
+ }, i = [
34
+ /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(c, { t: r, i18nKey: `errorCodes.${t}.body`, components: n }) }, "body")
35
+ ];
36
+ if (t === "R29") {
37
+ const u = Object.values(r("errorCodes.R29.achCodes", { returnObjects: !0 }));
38
+ i.push(
39
+ /* @__PURE__ */ d(C, { flexDirection: "column", gap: 16, children: [
40
+ /* @__PURE__ */ e(o, { children: r("errorCodes.R29.listDescription") }),
41
+ /* @__PURE__ */ e("ul", { className: p.compactList, children: u.map((l, m) => /* @__PURE__ */ e("li", { children: l }, m)) }),
42
+ /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(c, { t: r, i18nKey: "errorCodes.R29.instruction", components: n }) })
43
+ ] }, "instruction")
44
+ );
45
+ } else
46
+ r(`errorCodes.${t}.instruction`) && i.push(
47
+ /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
48
+ c,
49
+ {
50
+ t: r,
51
+ i18nKey: `errorCodes.${t}.instruction`,
52
+ components: n
53
+ }
54
+ ) }, "instruction")
55
+ );
56
+ return {
57
+ title: r(`errorCodes.${t}.title`),
58
+ subtitle: r(`errorCodes.${t}.subtitle`),
59
+ description: i
60
+ };
61
+ }
62
+ export {
63
+ g as useRecoveryCaseErrorCode
64
+ };
65
+ //# sourceMappingURL=useRecoveryCaseErrorCode.js.map
@@ -0,0 +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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cI,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,4 +1,4 @@
1
- import { PayrollShow } from '@gusto/embedded-api/models/components/payrollshow';
1
+ import { PayrollShow } from '@gusto/embedded-api/models/components/payroll';
2
2
  export interface PayrollConfigurationContextValue {
3
3
  payrollData: {
4
4
  payrollShow?: PayrollShow | null;
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollConfigurationContext.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { PayrollShow } from '@gusto/embedded-api/models/components/payrollshow'\n\nexport interface PayrollConfigurationContextValue {\n payrollData: {\n payrollShow?: PayrollShow | null\n }\n}\n\nexport const PayrollConfigurationContext = createContext<\n PayrollConfigurationContextValue | undefined\n>(undefined)\n"],"names":["PayrollConfigurationContext","createContext"],"mappings":";AASO,MAAMA,IAA8BC,EAEzC,MAAS;"}
1
+ {"version":3,"file":"PayrollConfigurationContext.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { PayrollShow } from '@gusto/embedded-api/models/components/payroll'\n\nexport interface PayrollConfigurationContextValue {\n payrollData: {\n payrollShow?: PayrollShow | null\n }\n}\n\nexport const PayrollConfigurationContext = createContext<\n PayrollConfigurationContextValue | undefined\n>(undefined)\n"],"names":["PayrollConfigurationContext","createContext"],"mappings":";AASO,MAAMA,IAA8BC,EAEzC,MAAS;"}