@gusto/embedded-react-sdk 0.31.0 → 0.31.1-rc.1

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 (387) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/assets/icons/icon-arrow-right.svg.js +10 -0
  3. package/dist/assets/icons/icon-arrow-right.svg.js.map +1 -0
  4. package/dist/components/Base/Base.js +12 -13
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/DataView/DataView.js +1 -1
  7. package/dist/components/Common/DocumentList/DocumentList.js +1 -1
  8. package/dist/components/Common/DocumentViewer/DocumentViewer.js +1 -1
  9. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +1 -1
  10. package/dist/components/Common/RequirementsList/RequirementsList.js +1 -1
  11. package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
  12. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
  14. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormActions.js +2 -3
  16. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  17. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
  18. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  19. package/dist/components/Common/UI/Box/Box.d.ts +2 -0
  20. package/dist/components/Common/UI/Box/Box.js +13 -0
  21. package/dist/components/Common/UI/Box/Box.js.map +1 -0
  22. package/dist/components/Common/UI/Box/Box.module.scss.js +12 -0
  23. package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -0
  24. package/dist/components/Common/UI/Box/BoxTypes.d.ts +15 -0
  25. package/dist/components/Common/UI/Box/index.d.ts +2 -0
  26. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  27. package/dist/components/Common/UI/Dialog/Dialog.js +1 -1
  28. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  29. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  30. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  31. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  32. package/dist/components/Common/UI/Modal/Modal.js +1 -1
  33. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  34. package/dist/components/Common/UI/Tabs/Tabs.js +1 -1
  35. package/dist/components/Common/UI/TextInput/TextInput.js +30 -28
  36. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  37. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  38. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  40. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -4
  42. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  52. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  53. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/TitleSelect.js +4 -6
  56. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  58. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  60. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  61. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -7
  62. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  63. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  64. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  65. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
  66. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  67. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
  68. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  69. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -7
  70. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  72. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  73. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
  74. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  76. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -4
  78. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  79. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  80. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  81. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  82. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  83. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -4
  84. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  85. package/dist/components/Company/FederalTaxes/Form.js +3 -5
  86. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  87. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  88. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  89. package/dist/components/Company/Industry/Actions.js +7 -8
  90. package/dist/components/Company/Industry/Actions.js.map +1 -1
  91. package/dist/components/Company/Industry/Context.js +6 -7
  92. package/dist/components/Company/Industry/Context.js.map +1 -1
  93. package/dist/components/Company/Industry/Edit.js +2 -3
  94. package/dist/components/Company/Industry/Edit.js.map +1 -1
  95. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  96. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  98. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  100. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  105. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -4
  107. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  109. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  110. package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
  111. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  112. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +37 -28
  113. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -8
  115. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  116. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  117. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  119. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
  121. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  122. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  123. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -13
  124. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  125. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  126. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  127. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  128. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  134. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  135. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  136. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  137. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  138. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  139. package/dist/components/Company/index.js +20 -20
  140. package/dist/components/Contractor/Address/Address.js +6 -8
  141. package/dist/components/Contractor/Address/Address.js.map +1 -1
  142. package/dist/components/Contractor/Address/Form.js +1 -1
  143. package/dist/components/Contractor/Address/useAddress.js +5 -6
  144. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  145. package/dist/components/Contractor/ContractorList/index.js +31 -32
  146. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  147. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  148. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  149. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +11 -12
  150. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  151. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  152. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  153. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -4
  154. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  155. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -4
  156. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  157. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  158. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -9
  159. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  160. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
  161. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  162. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +0 -1
  163. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  164. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -4
  165. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  166. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
  167. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  168. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
  169. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  170. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -4
  171. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  172. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  173. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  174. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  175. package/dist/components/Contractor/Submit/Submit.js +20 -21
  176. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  177. package/dist/components/Employee/Compensation/Actions.js +12 -13
  178. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  179. package/dist/components/Employee/Compensation/Edit.js +16 -17
  180. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  181. package/dist/components/Employee/Compensation/List.js +22 -23
  182. package/dist/components/Employee/Compensation/List.js.map +1 -1
  183. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -11
  184. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  185. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -12
  186. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  187. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
  188. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  189. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -8
  190. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  191. package/dist/components/Employee/Deductions/stateMachine.js +1 -1
  192. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +5 -6
  193. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  194. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -3
  195. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  196. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  197. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  198. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  199. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  200. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +25 -37
  201. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  202. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +47 -45
  203. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  204. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +146 -109
  205. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  206. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  207. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  208. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  209. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  210. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.d.ts +1 -0
  211. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  212. package/dist/components/Employee/DocumentSigner/stateMachine.js +34 -22
  213. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
  214. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -4
  215. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  216. package/dist/components/Employee/EmployeeList/Actions.js +6 -7
  217. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  218. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  219. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  220. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  221. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  222. package/dist/components/Employee/EmployeeList/List.js +2 -3
  223. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  224. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  225. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  226. package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
  227. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  228. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -12
  229. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  230. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  231. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  232. package/dist/components/Employee/Landing/Landing.js +49 -45
  233. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  234. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  235. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  236. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  237. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
  238. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  239. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  240. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  241. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
  242. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  243. package/dist/components/Employee/PaymentMethod/Split.js +10 -11
  244. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  246. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  247. package/dist/components/Employee/Profile/Actions.js +5 -6
  248. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  249. package/dist/components/Employee/Profile/AdminPersonalDetails.js +8 -9
  250. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  251. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  252. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  253. package/dist/components/Employee/Profile/useProfile.js +3 -4
  254. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  255. package/dist/components/Employee/StateTaxes/Actions.js +5 -6
  256. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  257. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  258. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  259. package/dist/components/Employee/Taxes/Actions.js +6 -7
  260. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  261. package/dist/components/Employee/Taxes/FederalForm.js +13 -14
  262. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  263. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  264. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  265. package/dist/components/Employee/index.js +22 -22
  266. package/dist/components/Flow/Flow.js +7 -9
  267. package/dist/components/Flow/Flow.js.map +1 -1
  268. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -17
  269. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  270. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +0 -1
  271. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +36 -43
  272. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  273. package/dist/components/InformationRequests/InformationRequests.d.ts +1 -2
  274. package/dist/components/InformationRequests/InformationRequests.js +37 -46
  275. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  276. package/dist/components/InformationRequests/index.js +4 -4
  277. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -10
  278. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  279. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +23 -21
  280. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  281. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +2 -0
  282. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +70 -0
  283. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -0
  284. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +2 -0
  285. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +25 -0
  286. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -0
  287. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +13 -0
  288. package/dist/components/Payroll/OffCycleCreation/index.d.ts +3 -0
  289. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +2 -0
  290. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +50 -0
  291. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -0
  292. package/dist/components/Payroll/OffCycleDeductionsSetting/index.d.ts +3 -0
  293. package/dist/components/Payroll/OffCycleDeductionsSetting/types.d.ts +11 -0
  294. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +1 -2
  295. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +36 -0
  296. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -0
  297. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +12 -0
  298. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js.map +1 -0
  299. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +0 -4
  300. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +48 -0
  301. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -0
  302. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +18 -0
  303. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -0
  304. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +26 -27
  305. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  306. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +3 -3
  307. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +18 -18
  308. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  309. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.d.ts +2 -0
  310. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModalTypes.d.ts +8 -0
  311. package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +3 -0
  312. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.d.ts +2 -0
  313. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +17 -0
  314. package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +3 -0
  315. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.d.ts +3 -8
  316. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +38 -39
  317. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  318. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +25 -33
  319. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  320. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +1 -0
  321. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +22 -19
  322. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  323. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +26 -26
  324. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  325. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -36
  326. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
  327. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  328. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +15 -17
  329. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  330. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +32 -32
  331. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  332. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +18 -20
  333. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  334. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +2 -3
  335. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  336. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
  337. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
  338. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  339. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -4
  340. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  341. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -4
  342. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  343. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -12
  344. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  345. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -5
  346. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  347. package/dist/components/Payroll/index.d.ts +4 -0
  348. package/dist/components/Payroll/index.js +22 -18
  349. package/dist/components/Payroll/index.js.map +1 -1
  350. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  351. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  352. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  353. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  354. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  355. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  356. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  357. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  358. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  359. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  360. package/dist/contexts/ThemeProvider/theme.js +1 -0
  361. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  362. package/dist/helpers/dateFormatting.js +61 -45
  363. package/dist/helpers/dateFormatting.js.map +1 -1
  364. package/dist/hooks/useOverflowDetection/useOverflowDetection.js +5 -6
  365. package/dist/i18n/I18n.js +7 -7
  366. package/dist/i18n/I18n.js.map +1 -1
  367. package/dist/i18n/en/Employee.EmployeeDocuments.json.js +1 -1
  368. package/dist/i18n/en/Employee.I9SignatureForm.json.js +83 -65
  369. package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -1
  370. package/dist/i18n/en/Employee.Landing.json.js +7 -9
  371. package/dist/i18n/en/Employee.Landing.json.js.map +1 -1
  372. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +14 -0
  373. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -0
  374. package/dist/i18n/en/Payroll.OffCycleDeductionsSetting.json.js +12 -0
  375. package/dist/i18n/en/Payroll.OffCycleDeductionsSetting.json.js.map +1 -0
  376. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +18 -0
  377. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js.map +1 -0
  378. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +21 -19
  379. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  380. package/dist/shared/constants.d.ts +4 -0
  381. package/dist/shared/constants.js +6 -4
  382. package/dist/shared/constants.js.map +1 -1
  383. package/dist/style.css +1 -1
  384. package/dist/types/i18next.d.ts +72 -2
  385. package/package.json +19 -7
  386. package/dist/components/Employee/Landing/Landing.module.scss.js +0 -8
  387. package/dist/components/Employee/Landing/Landing.module.scss.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOffCyclePayPeriodDateValidation.js","sources":["../../../../src/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { addBusinessDays } from '@/helpers/dateFormatting'\n\nconst ACH_LEAD_TIME_BUSINESS_DAYS = 2\n\nexport function useOffCyclePayPeriodDateValidation() {\n const today = useMemo(() => {\n const now = new Date()\n now.setHours(0, 0, 0, 0)\n return now\n }, [])\n\n const minCheckDate = useMemo(() => {\n return addBusinessDays(today, ACH_LEAD_TIME_BUSINESS_DAYS)\n }, [today])\n\n return {\n today,\n minCheckDate,\n achLeadTimeBusinessDays: ACH_LEAD_TIME_BUSINESS_DAYS,\n }\n}\n"],"names":["ACH_LEAD_TIME_BUSINESS_DAYS","useOffCyclePayPeriodDateValidation","today","useMemo","now","minCheckDate","addBusinessDays"],"mappings":";;AAGA,MAAMA,IAA8B;AAE7B,SAASC,IAAqC;AACnD,QAAMC,IAAQC,EAAQ,MAAM;AAC1B,UAAMC,wBAAU,KAAA;AAChB,WAAAA,EAAI,SAAS,GAAG,GAAG,GAAG,CAAC,GAChBA;AAAA,EACT,GAAG,CAAA,CAAE,GAECC,IAAeF,EAAQ,MACpBG,EAAgBJ,GAAOF,CAA2B,GACxD,CAACE,CAAK,CAAC;AAEV,SAAO;AAAA,IACL,OAAAA;AAAA,IACA,cAAAG;AAAA,IACA,yBAAyBL;AAAA,EAAA;AAE7B;"}
@@ -1,33 +1,32 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useState as l } from "react";
3
- import { OffCycleReasonSelectionPresentation as c } from "./OffCycleReasonSelectionPresentation.js";
4
- import { OFF_CYCLE_REASON_DEFAULTS as f } from "./types.js";
5
- import { BaseComponent as m } from "../../Base/Base.js";
6
- import { useBase as i } from "../../Base/useBase.js";
7
- import { useComponentDictionary as C, useI18n as R } from "../../../i18n/I18n.js";
8
- import { componentEvents as p } from "../../../shared/constants.js";
9
- function g(e) {
10
- return /* @__PURE__ */ n(m, { ...e, children: /* @__PURE__ */ n(u, { ...e }) });
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useCallback as a } from "react";
3
+ import { useForm as f, FormProvider as i } from "react-hook-form";
4
+ import { OffCycleReasonSelectionPresentation as l } from "./OffCycleReasonSelectionPresentation.js";
5
+ import { OFF_CYCLE_REASON_DEFAULTS as c } from "./types.js";
6
+ import { BaseComponent as C } from "../../Base/Base.js";
7
+ import { useBase as u } from "../../Base/useBase.js";
8
+ import { useComponentDictionary as p, useI18n as E } from "../../../i18n/I18n.js";
9
+ import { componentEvents as O } from "../../../shared/constants.js";
10
+ function A(o) {
11
+ return /* @__PURE__ */ e(C, { ...o, children: /* @__PURE__ */ e(R, { ...o }) });
11
12
  }
12
- function u({ dictionary: e }) {
13
- C("Payroll.OffCycleReasonSelection", e), R("Payroll.OffCycleReasonSelection");
14
- const { onEvent: t } = i(), [r, s] = l(null);
15
- return /* @__PURE__ */ n(
16
- c,
17
- {
18
- selectedReason: r,
19
- onReasonChange: (o) => {
20
- s(o);
21
- const a = f[o];
22
- t(p.OFF_CYCLE_SELECT_REASON, {
23
- reason: o,
24
- defaults: a
25
- });
26
- }
27
- }
13
+ function R({ dictionary: o }) {
14
+ p("Payroll.OffCycleReasonSelection", o), E("Payroll.OffCycleReasonSelection");
15
+ const { onEvent: n } = u(), r = f({
16
+ defaultValues: { reason: "" }
17
+ }), m = a(
18
+ (t) => {
19
+ const s = c[t];
20
+ n(O.OFF_CYCLE_SELECT_REASON, {
21
+ reason: t,
22
+ defaults: s
23
+ });
24
+ },
25
+ [n]
28
26
  );
27
+ return /* @__PURE__ */ e(i, { ...r, children: /* @__PURE__ */ e(l, { name: "reason", onChange: m }) });
29
28
  }
30
29
  export {
31
- g as OffCycleReasonSelection
30
+ A as OffCycleReasonSelection
32
31
  };
33
32
  //# sourceMappingURL=OffCycleReasonSelection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffCycleReasonSelection.js","sources":["../../../../src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { OffCycleReasonSelectionPresentation } from './OffCycleReasonSelectionPresentation'\nimport {\n OFF_CYCLE_REASON_DEFAULTS,\n type OffCycleReason,\n type OffCycleReasonSelectionProps,\n} from './types'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport function OffCycleReasonSelection(props: OffCycleReasonSelectionProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary }: OffCycleReasonSelectionProps) {\n useComponentDictionary('Payroll.OffCycleReasonSelection', dictionary)\n useI18n('Payroll.OffCycleReasonSelection')\n\n const { onEvent } = useBase()\n const [selectedReason, setSelectedReason] = useState<OffCycleReason | null>(null)\n\n const handleReasonChange = (reason: OffCycleReason) => {\n setSelectedReason(reason)\n const defaults = OFF_CYCLE_REASON_DEFAULTS[reason]\n onEvent(componentEvents.OFF_CYCLE_SELECT_REASON, {\n reason,\n defaults,\n })\n }\n\n return (\n <OffCycleReasonSelectionPresentation\n selectedReason={selectedReason}\n onReasonChange={handleReasonChange}\n />\n )\n}\n"],"names":["OffCycleReasonSelection","props","jsx","BaseComponent","Root","dictionary","useComponentDictionary","useI18n","onEvent","useBase","selectedReason","setSelectedReason","useState","OffCycleReasonSelectionPresentation","reason","defaults","OFF_CYCLE_REASON_DEFAULTS","componentEvents"],"mappings":";;;;;;;;AAYO,SAASA,EAAwBC,GAAqC;AAC3E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,KAA4C;AAC1D,EAAAC,EAAuB,mCAAmCD,CAAU,GACpEE,EAAQ,iCAAiC;AAEzC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,CAACC,GAAgBC,CAAiB,IAAIC,EAAgC,IAAI;AAWhF,SACE,gBAAAV;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,gBAAAH;AAAA,MACA,gBAZuB,CAACI,MAA2B;AACrD,QAAAH,EAAkBG,CAAM;AACxB,cAAMC,IAAWC,EAA0BF,CAAM;AACjD,QAAAN,EAAQS,EAAgB,yBAAyB;AAAA,UAC/C,QAAAH;AAAA,UACA,UAAAC;AAAA,QAAA,CACD;AAAA,MACH;AAAA,IAKoB;AAAA,EAAA;AAGtB;"}
1
+ {"version":3,"file":"OffCycleReasonSelection.js","sources":["../../../../src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.tsx"],"sourcesContent":["import { useCallback } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { OffCycleReasonSelectionPresentation } from './OffCycleReasonSelectionPresentation'\nimport {\n OFF_CYCLE_REASON_DEFAULTS,\n type OffCycleReason,\n type OffCycleReasonSelectionProps,\n} from './types'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport function OffCycleReasonSelection(props: OffCycleReasonSelectionProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ dictionary }: OffCycleReasonSelectionProps) {\n useComponentDictionary('Payroll.OffCycleReasonSelection', dictionary)\n useI18n('Payroll.OffCycleReasonSelection')\n\n const { onEvent } = useBase()\n const methods = useForm<{ reason: OffCycleReason | '' }>({\n defaultValues: { reason: '' },\n })\n\n const handleReasonChange = useCallback(\n (reason: OffCycleReason) => {\n const defaults = OFF_CYCLE_REASON_DEFAULTS[reason]\n onEvent(componentEvents.OFF_CYCLE_SELECT_REASON, {\n reason,\n defaults,\n })\n },\n [onEvent],\n )\n\n return (\n <FormProvider {...methods}>\n <OffCycleReasonSelectionPresentation name=\"reason\" onChange={handleReasonChange} />\n </FormProvider>\n )\n}\n"],"names":["OffCycleReasonSelection","props","jsx","BaseComponent","Root","dictionary","useComponentDictionary","useI18n","onEvent","useBase","methods","useForm","handleReasonChange","useCallback","reason","defaults","OFF_CYCLE_REASON_DEFAULTS","componentEvents","FormProvider","OffCycleReasonSelectionPresentation"],"mappings":";;;;;;;;;AAaO,SAASA,EAAwBC,GAAqC;AAC3E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,KAA4C;AAC1D,EAAAC,EAAuB,mCAAmCD,CAAU,GACpEE,EAAQ,iCAAiC;AAEzC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAUC,EAAyC;AAAA,IACvD,eAAe,EAAE,QAAQ,GAAA;AAAA,EAAG,CAC7B,GAEKC,IAAqBC;AAAA,IACzB,CAACC,MAA2B;AAC1B,YAAMC,IAAWC,EAA0BF,CAAM;AACjD,MAAAN,EAAQS,EAAgB,yBAAyB;AAAA,QAC/C,QAAAH;AAAA,QACA,UAAAC;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,CAACP,CAAO;AAAA,EAAA;AAGV,SACE,gBAAAN,EAACgB,GAAA,EAAc,GAAGR,GAChB,UAAA,gBAAAR,EAACiB,KAAoC,MAAK,UAAS,UAAUP,EAAA,CAAoB,EAAA,CACnF;AAEJ;"}
@@ -1,7 +1,7 @@
1
1
  import { OffCycleReason } from './types';
2
2
  interface OffCycleReasonSelectionPresentationProps {
3
- selectedReason: OffCycleReason | null;
4
- onReasonChange: (reason: OffCycleReason) => void;
3
+ name: string;
4
+ onChange?: (value: OffCycleReason) => void;
5
5
  }
6
- export declare function OffCycleReasonSelectionPresentation({ selectedReason, onReasonChange, }: OffCycleReasonSelectionPresentationProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function OffCycleReasonSelectionPresentation({ name, onChange, }: OffCycleReasonSelectionPresentationProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,12 +1,14 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useMemo as c } from "react";
3
- import { useTranslation as a } from "react-i18next";
4
- import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
5
- function d({
6
- selectedReason: e,
7
- onReasonChange: n
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useMemo as n } from "react";
3
+ import { useTranslation as s } from "react-i18next";
4
+ import "../../../shared/constants.js";
5
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import { RadioGroupField as l } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
7
+ function b({
8
+ name: e,
9
+ onChange: i
8
10
  }) {
9
- const { t: o } = a("Payroll.OffCycleReasonSelection"), { RadioGroup: t } = p(), i = c(
11
+ const { t: o } = s("Payroll.OffCycleReasonSelection"), t = n(
10
12
  () => [
11
13
  {
12
14
  value: "correction",
@@ -20,21 +22,19 @@ function d({
20
22
  }
21
23
  ],
22
24
  [o]
23
- ), r = (s) => {
24
- n(s);
25
- };
26
- return /* @__PURE__ */ l(
27
- t,
25
+ );
26
+ return /* @__PURE__ */ r(
27
+ l,
28
28
  {
29
+ name: e,
29
30
  label: o("title"),
30
- options: i,
31
- value: e ?? void 0,
32
- onChange: r,
33
- isRequired: !0
31
+ options: t,
32
+ isRequired: !0,
33
+ onChange: i
34
34
  }
35
35
  );
36
36
  }
37
37
  export {
38
- d as OffCycleReasonSelectionPresentation
38
+ b as OffCycleReasonSelectionPresentation
39
39
  };
40
40
  //# sourceMappingURL=OffCycleReasonSelectionPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffCycleReasonSelectionPresentation.js","sources":["../../../../src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OffCycleReason } from './types'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface OffCycleReasonSelectionPresentationProps {\n selectedReason: OffCycleReason | null\n onReasonChange: (reason: OffCycleReason) => void\n}\n\nexport function OffCycleReasonSelectionPresentation({\n selectedReason,\n onReasonChange,\n}: OffCycleReasonSelectionPresentationProps) {\n const { t } = useTranslation('Payroll.OffCycleReasonSelection')\n const { RadioGroup } = useComponentContext()\n\n const options = useMemo(\n () => [\n {\n value: 'correction' as const,\n label: t('options.correction.label'),\n description: t('options.correction.description'),\n },\n {\n value: 'bonus' as const,\n label: t('options.bonus.label'),\n description: t('options.bonus.description'),\n },\n ],\n [t],\n )\n\n const handleChange = (value: string) => {\n onReasonChange(value as OffCycleReason)\n }\n\n return (\n <RadioGroup\n label={t('title')}\n options={options}\n value={selectedReason ?? undefined}\n onChange={handleChange}\n isRequired\n />\n )\n}\n"],"names":["OffCycleReasonSelectionPresentation","selectedReason","onReasonChange","t","useTranslation","RadioGroup","useComponentContext","options","useMemo","handleChange","value","jsx"],"mappings":";;;;AAUO,SAASA,EAAoC;AAAA,EAClD,gBAAAC;AAAA,EACA,gBAAAC;AACF,GAA6C;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,iCAAiC,GACxD,EAAE,YAAAC,EAAA,IAAeC,EAAA,GAEjBC,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,OAAO;AAAA,QACP,OAAOL,EAAE,0BAA0B;AAAA,QACnC,aAAaA,EAAE,gCAAgC;AAAA,MAAA;AAAA,MAEjD;AAAA,QACE,OAAO;AAAA,QACP,OAAOA,EAAE,qBAAqB;AAAA,QAC9B,aAAaA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC5C;AAAA,IAEF,CAACA,CAAC;AAAA,EAAA,GAGEM,IAAe,CAACC,MAAkB;AACtC,IAAAR,EAAeQ,CAAuB;AAAA,EACxC;AAEA,SACE,gBAAAC;AAAA,IAACN;AAAA,IAAA;AAAA,MACC,OAAOF,EAAE,OAAO;AAAA,MAChB,SAAAI;AAAA,MACA,OAAON,KAAkB;AAAA,MACzB,UAAUQ;AAAA,MACV,YAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
1
+ {"version":3,"file":"OffCycleReasonSelectionPresentation.js","sources":["../../../../src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OffCycleReason } from './types'\nimport { RadioGroupField } from '@/components/Common'\n\ninterface OffCycleReasonSelectionPresentationProps {\n name: string\n onChange?: (value: OffCycleReason) => void\n}\n\nexport function OffCycleReasonSelectionPresentation({\n name,\n onChange,\n}: OffCycleReasonSelectionPresentationProps) {\n const { t } = useTranslation('Payroll.OffCycleReasonSelection')\n\n const options = useMemo(\n () => [\n {\n value: 'correction' as OffCycleReason,\n label: t('options.correction.label'),\n description: t('options.correction.description'),\n },\n {\n value: 'bonus' as OffCycleReason,\n label: t('options.bonus.label'),\n description: t('options.bonus.description'),\n },\n ],\n [t],\n )\n\n return (\n <RadioGroupField<OffCycleReason>\n name={name}\n label={t('title')}\n options={options}\n isRequired\n onChange={onChange}\n />\n )\n}\n"],"names":["OffCycleReasonSelectionPresentation","name","onChange","t","useTranslation","options","useMemo","jsx","RadioGroupField"],"mappings":";;;;;;AAUO,SAASA,EAAoC;AAAA,EAClD,MAAAC;AAAA,EACA,UAAAC;AACF,GAA6C;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,iCAAiC,GAExDC,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,OAAO;AAAA,QACP,OAAOH,EAAE,0BAA0B;AAAA,QACnC,aAAaA,EAAE,gCAAgC;AAAA,MAAA;AAAA,MAEjD;AAAA,QACE,OAAO;AAAA,QACP,OAAOA,EAAE,qBAAqB;AAAA,QAC9B,aAAaA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC5C;AAAA,IAEF,CAACA,CAAC;AAAA,EAAA;AAGJ,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAP;AAAA,MACA,OAAOE,EAAE,OAAO;AAAA,MAChB,SAAAE;AAAA,MACA,YAAU;AAAA,MACV,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,2 @@
1
+ import { OffCycleTaxWithholdingModalProps } from './OffCycleTaxWithholdingModalTypes';
2
+ export declare function OffCycleTaxWithholdingModal({ isOpen, defaultConfig, onDone, onCancel, }: OffCycleTaxWithholdingModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { OffCycleTaxWithholdingConfig } from '../OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes';
2
+ export type { OffCycleTaxWithholdingConfig };
3
+ export interface OffCycleTaxWithholdingModalProps {
4
+ isOpen: boolean;
5
+ defaultConfig: OffCycleTaxWithholdingConfig;
6
+ onDone: (config: OffCycleTaxWithholdingConfig) => void;
7
+ onCancel: () => void;
8
+ }
@@ -0,0 +1,3 @@
1
+ import "./types/i18next.d.ts"
2
+ export { OffCycleTaxWithholdingModal } from './OffCycleTaxWithholdingModal';
3
+ export type { OffCycleTaxWithholdingModalProps } from './OffCycleTaxWithholdingModalTypes';
@@ -0,0 +1,2 @@
1
+ import { OffCycleTaxWithholdingTableProps } from './OffCycleTaxWithholdingTableTypes';
2
+ export declare function OffCycleTaxWithholdingTable({ wageTypeGroups, config, onEditClick, }: OffCycleTaxWithholdingTableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls';
2
+ import { WithholdingType } from '../OffCycleReasonSelection';
3
+ export interface WageTypeGroup {
4
+ id: string;
5
+ label: string;
6
+ description?: string;
7
+ category: 'regular' | 'supplemental' | 'reimbursement';
8
+ }
9
+ export interface OffCycleTaxWithholdingConfig {
10
+ withholdingPayPeriod: WithholdingPayPeriod;
11
+ withholdingRate: WithholdingType;
12
+ }
13
+ export interface OffCycleTaxWithholdingTableProps {
14
+ wageTypeGroups: WageTypeGroup[];
15
+ config: OffCycleTaxWithholdingConfig;
16
+ onEditClick: () => void;
17
+ }
@@ -0,0 +1,3 @@
1
+ import "./types/i18next.d.ts"
2
+ export { OffCycleTaxWithholdingTable } from './OffCycleTaxWithholdingTable';
3
+ export type { OffCycleTaxWithholdingConfig, OffCycleTaxWithholdingTableProps, WageTypeGroup, } from './OffCycleTaxWithholdingTableTypes';
@@ -2,13 +2,8 @@ import { ApiPayrollBlocker } from '../payrollHelpers';
2
2
  interface PayrollBlockerAlertsProps {
3
3
  blockers: ApiPayrollBlocker[];
4
4
  className?: string;
5
- onMultipleViewClick?: () => void;
6
- multipleViewLabel?: string;
5
+ onViewBlockersClick?: () => void;
6
+ viewBlockersLabel?: string;
7
7
  }
8
- /**
9
- * PayrollBlockerAlerts - Alert-style component for inline blocker display
10
- * Shows single blocker as alert, or multiple blockers as summary with "Review" button
11
- * Returns null for empty blocker arrays
12
- */
13
- export declare function PayrollBlockerAlerts({ blockers, onMultipleViewClick, multipleViewLabel, className, }: PayrollBlockerAlertsProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export declare function PayrollBlockerAlerts({ blockers, onViewBlockersClick, viewBlockersLabel, className, }: PayrollBlockerAlertsProps): import("react/jsx-runtime").JSX.Element | null;
14
9
  export {};
@@ -1,55 +1,54 @@
1
- import { jsx as l, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
2
  import { useTranslation as K } from "react-i18next";
3
- import { getBlockerTranslationKeys as P } from "../payrollHelpers.js";
4
- import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
5
- import { Flex as m } from "../../../Common/Flex/Flex.js";
6
- import "classnames";
7
- import "../../../../shared/constants.js";
3
+ import { hasActionableBlockers as P, getBlockerTranslationKeys as A } from "../payrollHelpers.js";
4
+ import { useComponentContext as D } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
5
+ import { Flex as B } from "../../../Common/Flex/Flex.js";
8
6
  import "react";
9
- import { useI18n as D } from "../../../../i18n/I18n.js";
10
- function M({
11
- blockers: o,
12
- onMultipleViewClick: i,
13
- multipleViewLabel: f,
14
- className: s
7
+ import { useI18n as C } from "../../../../i18n/I18n.js";
8
+ function H({
9
+ blockers: r,
10
+ onViewBlockersClick: i,
11
+ viewBlockersLabel: x,
12
+ className: a
15
13
  }) {
16
- D("Payroll.PayrollBlocker");
17
- const { t: e } = K("Payroll.PayrollBlocker"), { Alert: c, Button: h, Text: a, UnorderedList: x } = v();
18
- if (o.length === 0)
14
+ C("Payroll.PayrollBlocker");
15
+ const { t } = K("Payroll.PayrollBlocker"), { Alert: p, Button: u, Text: d, UnorderedList: y } = D();
16
+ if (r.length === 0)
19
17
  return null;
20
- const y = o.length > 1, p = o.map((r) => {
21
- const n = P(r.key), g = e(n.titleKey, {
22
- defaultValue: e("defaultBlockerDescription")
23
- }), T = e(n.descriptionKey, {
24
- defaultValue: r.message || e("defaultBlockerDescription")
25
- }), k = e(n.helpTextKey, { defaultValue: e("defaultBlockerHelp") });
18
+ const s = r.length > 1, h = !!i && (s || P(r)), m = r.map((o) => {
19
+ const c = A(o.key), T = t(c.titleKey, {
20
+ defaultValue: t("defaultBlockerDescription")
21
+ }), k = t(c.descriptionKey, {
22
+ defaultValue: o.message || t("defaultBlockerDescription")
23
+ }), v = t(c.helpTextKey, { defaultValue: t("defaultBlockerHelp") });
26
24
  return {
27
- ...r,
28
- title: g,
29
- description: T,
30
- helpText: k
25
+ ...o,
26
+ title: T,
27
+ description: k,
28
+ helpText: v
31
29
  };
32
- }), t = p[0];
33
- if (!y && t)
34
- return /* @__PURE__ */ l(c, { status: "error", label: t.title, className: s, children: /* @__PURE__ */ d(m, { flexDirection: "column", gap: 8, children: [
35
- /* @__PURE__ */ l(a, { children: t.description }),
36
- t.helpText && t.helpText !== t.description && /* @__PURE__ */ l(a, { variant: "supporting", size: "sm", children: t.helpText })
30
+ }), n = x || t(s ? "viewAllBlockers" : "viewBlocker"), l = m[0];
31
+ if (!s && l)
32
+ return /* @__PURE__ */ e(p, { status: "error", label: l.title, className: a, children: /* @__PURE__ */ f(B, { flexDirection: "column", gap: 8, children: [
33
+ /* @__PURE__ */ e(d, { children: l.description }),
34
+ l.helpText && l.helpText !== l.description && /* @__PURE__ */ e(d, { variant: "supporting", size: "sm", children: l.helpText }),
35
+ h && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(u, { variant: "secondary", onClick: i, title: n, children: n }) })
37
36
  ] }) });
38
- const B = p.map((r) => r.title), u = f || e("viewAllBlockers");
39
- return /* @__PURE__ */ l(
40
- c,
37
+ const g = m.map((o) => o.title);
38
+ return /* @__PURE__ */ e(
39
+ p,
41
40
  {
42
41
  status: "error",
43
- label: e("multipleIssuesTitle", { count: o.length }),
44
- className: s,
45
- children: /* @__PURE__ */ d(m, { flexDirection: "column", gap: 16, children: [
46
- /* @__PURE__ */ l(x, { items: B }),
47
- i && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(h, { variant: "secondary", onClick: i, title: u, children: u }) })
42
+ label: t("multipleIssuesTitle", { count: r.length }),
43
+ className: a,
44
+ children: /* @__PURE__ */ f(B, { flexDirection: "column", gap: 16, children: [
45
+ /* @__PURE__ */ e(y, { items: g }),
46
+ h && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(u, { variant: "secondary", onClick: i, title: n, children: n }) })
48
47
  ] })
49
48
  }
50
49
  );
51
50
  }
52
51
  export {
53
- M as PayrollBlockerAlerts
52
+ H as PayrollBlockerAlerts
54
53
  };
55
54
  //# sourceMappingURL=PayrollBlockerAlerts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollBlockerAlerts.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type ApiPayrollBlocker, getBlockerTranslationKeys } from '../payrollHelpers'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\ninterface PayrollBlockerAlertsProps {\n blockers: ApiPayrollBlocker[]\n className?: string\n onMultipleViewClick?: () => void\n multipleViewLabel?: string\n}\n\n/**\n * PayrollBlockerAlerts - Alert-style component for inline blocker display\n * Shows single blocker as alert, or multiple blockers as summary with \"Review\" button\n * Returns null for empty blocker arrays\n */\nexport function PayrollBlockerAlerts({\n blockers,\n onMultipleViewClick,\n multipleViewLabel,\n className,\n}: PayrollBlockerAlertsProps) {\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Alert, Button, Text, UnorderedList } = useComponentContext()\n\n // Return null for empty blockers array\n if (blockers.length === 0) {\n return null\n }\n\n const hasMultipleBlockers = blockers.length > 1\n\n const enrichedBlockers = blockers.map(blocker => {\n const translationKeys = getBlockerTranslationKeys(blocker.key)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: t('defaultBlockerDescription'),\n })\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n const helpText = t(translationKeys.helpTextKey, { defaultValue: t('defaultBlockerHelp') })\n\n return {\n ...blocker,\n title,\n description,\n helpText,\n }\n })\n\n const singleBlocker = enrichedBlockers[0]\n\n if (!hasMultipleBlockers && singleBlocker) {\n return (\n <Alert status=\"error\" label={singleBlocker.title} className={className}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text>{singleBlocker.description}</Text>\n {singleBlocker.helpText && singleBlocker.helpText !== singleBlocker.description && (\n <Text variant=\"supporting\" size=\"sm\">\n {singleBlocker.helpText}\n </Text>\n )}\n </Flex>\n </Alert>\n )\n }\n\n const listItems = enrichedBlockers.map(blocker => blocker.title)\n const defaultMultipleLabel = multipleViewLabel || t('viewAllBlockers')\n\n return (\n <Alert\n status=\"error\"\n label={t('multipleIssuesTitle', { count: blockers.length })}\n className={className}\n >\n <Flex flexDirection=\"column\" gap={16}>\n <UnorderedList items={listItems} />\n {onMultipleViewClick && (\n <div>\n <Button variant=\"secondary\" onClick={onMultipleViewClick} title={defaultMultipleLabel}>\n {defaultMultipleLabel}\n </Button>\n </div>\n )}\n </Flex>\n </Alert>\n )\n}\n"],"names":["PayrollBlockerAlerts","blockers","onMultipleViewClick","multipleViewLabel","className","useI18n","t","useTranslation","Alert","Button","Text","UnorderedList","useComponentContext","hasMultipleBlockers","enrichedBlockers","blocker","translationKeys","getBlockerTranslationKeys","title","description","helpText","singleBlocker","jsx","jsxs","Flex","listItems","defaultMultipleLabel"],"mappings":";;;;;;;;;AAkBO,SAASA,EAAqB;AAAA,EACnC,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,GAA8B;AAC5B,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,GAAM,eAAAC,EAAA,IAAkBC,EAAA;AAG/C,MAAIX,EAAS,WAAW;AACtB,WAAO;AAGT,QAAMY,IAAsBZ,EAAS,SAAS,GAExCa,IAAmBb,EAAS,IAAI,CAAAc,MAAW;AAC/C,UAAMC,IAAkBC,EAA0BF,EAAQ,GAAG,GAEvDG,IAAQZ,EAAEU,EAAgB,UAAU;AAAA,MACxC,cAAcV,EAAE,2BAA2B;AAAA,IAAA,CAC5C,GACKa,IAAcb,EAAEU,EAAgB,gBAAgB;AAAA,MACpD,cAAcD,EAAQ,WAAWT,EAAE,2BAA2B;AAAA,IAAA,CAC/D,GACKc,IAAWd,EAAEU,EAAgB,aAAa,EAAE,cAAcV,EAAE,oBAAoB,GAAG;AAEzF,WAAO;AAAA,MACL,GAAGS;AAAA,MACH,OAAAG;AAAA,MACA,aAAAC;AAAA,MACA,UAAAC;AAAA,IAAA;AAAA,EAEJ,CAAC,GAEKC,IAAgBP,EAAiB,CAAC;AAExC,MAAI,CAACD,KAAuBQ;AAC1B,WACE,gBAAAC,EAACd,GAAA,EAAM,QAAO,SAAQ,OAAOa,EAAc,OAAO,WAAAjB,GAChD,UAAA,gBAAAmB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAF,EAACZ,GAAA,EAAM,YAAc,YAAA,CAAY;AAAA,MAChCW,EAAc,YAAYA,EAAc,aAAaA,EAAc,eAClE,gBAAAC,EAACZ,GAAA,EAAK,SAAQ,cAAa,MAAK,MAC7B,YAAc,SAAA,CACjB;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAIJ,QAAMe,IAAYX,EAAiB,IAAI,CAAAC,MAAWA,EAAQ,KAAK,GACzDW,IAAuBvB,KAAqBG,EAAE,iBAAiB;AAErE,SACE,gBAAAgB;AAAA,IAACd;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAOF,EAAE,uBAAuB,EAAE,OAAOL,EAAS,QAAQ;AAAA,MAC1D,WAAAG;AAAA,MAEA,UAAA,gBAAAmB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,QAAA,gBAAAF,EAACX,GAAA,EAAc,OAAOc,EAAA,CAAW;AAAA,QAChCvB,KACC,gBAAAoB,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACb,GAAA,EAAO,SAAQ,aAAY,SAASP,GAAqB,OAAOwB,GAC9D,UAAAA,EAAA,CACH,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PayrollBlockerAlerts.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport {\n type ApiPayrollBlocker,\n getBlockerTranslationKeys,\n hasActionableBlockers,\n} from '../payrollHelpers'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\ninterface PayrollBlockerAlertsProps {\n blockers: ApiPayrollBlocker[]\n className?: string\n onViewBlockersClick?: () => void\n viewBlockersLabel?: string\n}\n\nexport function PayrollBlockerAlerts({\n blockers,\n onViewBlockersClick,\n viewBlockersLabel,\n className,\n}: PayrollBlockerAlertsProps) {\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Alert, Button, Text, UnorderedList } = useComponentContext()\n\n if (blockers.length === 0) {\n return null\n }\n\n const hasMultipleBlockers = blockers.length > 1\n const showViewBlockersCta =\n Boolean(onViewBlockersClick) && (hasMultipleBlockers || hasActionableBlockers(blockers))\n\n const enrichedBlockers = blockers.map(blocker => {\n const translationKeys = getBlockerTranslationKeys(blocker.key)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: t('defaultBlockerDescription'),\n })\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n const helpText = t(translationKeys.helpTextKey, { defaultValue: t('defaultBlockerHelp') })\n\n return {\n ...blocker,\n title,\n description,\n helpText,\n }\n })\n\n const ctaLabel = viewBlockersLabel || t(hasMultipleBlockers ? 'viewAllBlockers' : 'viewBlocker')\n\n const singleBlocker = enrichedBlockers[0]\n\n if (!hasMultipleBlockers && singleBlocker) {\n return (\n <Alert status=\"error\" label={singleBlocker.title} className={className}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text>{singleBlocker.description}</Text>\n {singleBlocker.helpText && singleBlocker.helpText !== singleBlocker.description && (\n <Text variant=\"supporting\" size=\"sm\">\n {singleBlocker.helpText}\n </Text>\n )}\n {showViewBlockersCta && (\n <div>\n <Button variant=\"secondary\" onClick={onViewBlockersClick} title={ctaLabel}>\n {ctaLabel}\n </Button>\n </div>\n )}\n </Flex>\n </Alert>\n )\n }\n\n const listItems = enrichedBlockers.map(blocker => blocker.title)\n\n return (\n <Alert\n status=\"error\"\n label={t('multipleIssuesTitle', { count: blockers.length })}\n className={className}\n >\n <Flex flexDirection=\"column\" gap={16}>\n <UnorderedList items={listItems} />\n {showViewBlockersCta && (\n <div>\n <Button variant=\"secondary\" onClick={onViewBlockersClick} title={ctaLabel}>\n {ctaLabel}\n </Button>\n </div>\n )}\n </Flex>\n </Alert>\n )\n}\n"],"names":["PayrollBlockerAlerts","blockers","onViewBlockersClick","viewBlockersLabel","className","useI18n","useTranslation","Alert","Button","Text","UnorderedList","useComponentContext","hasMultipleBlockers","showViewBlockersCta","hasActionableBlockers","enrichedBlockers","blocker","translationKeys","getBlockerTranslationKeys","title","description","helpText","ctaLabel","singleBlocker","jsx","jsxs","Flex","listItems"],"mappings":";;;;;;;AAiBO,SAASA,EAAqB;AAAA,EACnC,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,GAA8B;AAC5B,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,GAAM,eAAAC,EAAA,IAAkBC,EAAA;AAE/C,MAAIV,EAAS,WAAW;AACtB,WAAO;AAGT,QAAMW,IAAsBX,EAAS,SAAS,GACxCY,IACJ,EAAQX,MAAyBU,KAAuBE,EAAsBb,CAAQ,IAElFc,IAAmBd,EAAS,IAAI,CAAAe,MAAW;AAC/C,UAAMC,IAAkBC,EAA0BF,EAAQ,GAAG,GAEvDG,IAAQ,EAAEF,EAAgB,UAAU;AAAA,MACxC,cAAc,EAAE,2BAA2B;AAAA,IAAA,CAC5C,GACKG,IAAc,EAAEH,EAAgB,gBAAgB;AAAA,MACpD,cAAcD,EAAQ,WAAW,EAAE,2BAA2B;AAAA,IAAA,CAC/D,GACKK,IAAW,EAAEJ,EAAgB,aAAa,EAAE,cAAc,EAAE,oBAAoB,GAAG;AAEzF,WAAO;AAAA,MACL,GAAGD;AAAA,MACH,OAAAG;AAAA,MACA,aAAAC;AAAA,MACA,UAAAC;AAAA,IAAA;AAAA,EAEJ,CAAC,GAEKC,IAAWnB,KAAqB,EAAES,IAAsB,oBAAoB,aAAa,GAEzFW,IAAgBR,EAAiB,CAAC;AAExC,MAAI,CAACH,KAAuBW;AAC1B,WACE,gBAAAC,EAACjB,GAAA,EAAM,QAAO,SAAQ,OAAOgB,EAAc,OAAO,WAAAnB,GAChD,UAAA,gBAAAqB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAF,EAACf,GAAA,EAAM,YAAc,YAAA,CAAY;AAAA,MAChCc,EAAc,YAAYA,EAAc,aAAaA,EAAc,eAClE,gBAAAC,EAACf,GAAA,EAAK,SAAQ,cAAa,MAAK,MAC7B,YAAc,UACjB;AAAA,MAEDI,KACC,gBAAAW,EAAC,OAAA,EACC,UAAA,gBAAAA,EAAChB,GAAA,EAAO,SAAQ,aAAY,SAASN,GAAqB,OAAOoB,GAC9D,UAAAA,EAAA,CACH,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAIJ,QAAMK,IAAYZ,EAAiB,IAAI,CAAAC,MAAWA,EAAQ,KAAK;AAE/D,SACE,gBAAAQ;AAAA,IAACjB;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAO,EAAE,uBAAuB,EAAE,OAAON,EAAS,QAAQ;AAAA,MAC1D,WAAAG;AAAA,MAEA,UAAA,gBAAAqB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,QAAA,gBAAAF,EAACd,GAAA,EAAc,OAAOiB,EAAA,CAAW;AAAA,QAChCd,KACC,gBAAAW,EAAC,OAAA,EACC,UAAA,gBAAAA,EAAChB,GAAA,EAAO,SAAQ,aAAY,SAASN,GAAqB,OAAOoB,GAC9D,UAAAA,EAAA,CACH,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -7,23 +7,23 @@ import { useRecoveryCasesGetSuspense as V } from "@gusto/embedded-api/react-quer
7
7
  import { useInformationRequestsGetInformationRequestsSuspense as F } from "@gusto/embedded-api/react-query/informationRequestsGetInformationRequests";
8
8
  import { InformationRequestStatus as K } from "@gusto/embedded-api/models/components/informationrequest";
9
9
  import { getBlockerTranslationKeys as G } from "../payrollHelpers.js";
10
- import B from "./PayrollBlockerList.module.scss.js";
10
+ import v from "./PayrollBlockerList.module.scss.js";
11
11
  import { useComponentContext as M } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import { FlexItem as j, Flex as a } from "../../../Common/Flex/Flex.js";
13
- import { recoveryCasesEvents as $, informationRequestEvents as H } from "../../../../shared/constants.js";
14
- import { DataView as Q } from "../../../Common/DataView/DataView.js";
15
- import { useDataView as Y } from "../../../Common/DataView/useDataView.js";
16
- import { useComponentDictionary as z, useI18n as J } from "../../../../i18n/I18n.js";
17
- import { RecoveryCases as W } from "../../RecoveryCases/RecoveryCases.js";
18
- import { BaseComponent as X } from "../../../Base/Base.js";
13
+ import { DataView as $ } from "../../../Common/DataView/DataView.js";
14
+ import { useDataView as H } from "../../../Common/DataView/useDataView.js";
15
+ import { useComponentDictionary as Q, useI18n as Y } from "../../../../i18n/I18n.js";
16
+ import { RecoveryCases as z } from "../../RecoveryCases/RecoveryCases.js";
17
+ import { BaseComponent as J } from "../../../Base/Base.js";
19
18
  import "../../../Base/useBase.js";
19
+ import { recoveryCasesEvents as W, informationRequestEvents as X } from "../../../../shared/constants.js";
20
20
  import { InformationRequestsFlow as Z } from "../../../InformationRequests/InformationRequests.js";
21
21
  function be(s) {
22
- return /* @__PURE__ */ o(X, { ...s, children: /* @__PURE__ */ o(ee, { ...s, children: s.children }) });
22
+ return /* @__PURE__ */ o(J, { ...s, children: /* @__PURE__ */ o(ee, { ...s, children: s.children }) });
23
23
  }
24
- function ee({ className: s, companyId: n, dictionary: g, onEvent: u }) {
25
- z("Payroll.PayrollBlocker", g), J("Payroll.PayrollBlocker");
26
- const { t: r } = N("Payroll.PayrollBlocker"), { Button: v, Text: i, Heading: b, Alert: D } = M(), [x, f] = _({
24
+ function ee({ className: s, companyId: n, dictionary: B, onEvent: u }) {
25
+ Q("Payroll.PayrollBlocker", B), Y("Payroll.PayrollBlocker");
26
+ const { t: r } = N("Payroll.PayrollBlocker"), { Button: D, Text: i, Heading: b, Alert: g } = M(), [x, f] = _({
27
27
  id: 0,
28
28
  alerts: []
29
29
  }), E = d((e) => {
@@ -38,14 +38,14 @@ function ee({ className: s, companyId: n, dictionary: g, onEvent: u }) {
38
38
  }));
39
39
  }, []), p = d(
40
40
  (e, t) => {
41
- e === $.RECOVERY_CASE_RESUBMIT_DONE && c("recoveryCaseResubmitted"), e === H.INFORMATION_REQUEST_FORM_DONE && c("informationRequestResponded"), u(e, t);
41
+ e === W.RECOVERY_CASE_RESUBMIT_DONE && c("recoveryCaseResubmitted"), e === X.INFORMATION_REQUEST_FORM_DONE && c("informationRequestResponded"), u(e, t);
42
42
  },
43
43
  [u, c]
44
44
  ), { data: A } = O({
45
45
  companyUuid: n
46
- }), { data: P } = V({
46
+ }), { data: S } = V({
47
47
  companyUuid: n
48
- }), { data: S } = F({
48
+ }), { data: q } = F({
49
49
  companyUuid: n
50
50
  }), y = (A.payrollBlockerList ?? []).map((e) => {
51
51
  const t = e.key ?? "unknown", l = G(t), T = r(l.titleKey, {
@@ -58,11 +58,11 @@ function ee({ className: s, companyId: n, dictionary: g, onEvent: u }) {
58
58
  title: T,
59
59
  description: I
60
60
  };
61
- }), q = P.recoveryCaseList ?? [], w = S.informationRequestList ?? [], h = q.some(
61
+ }), w = S.recoveryCaseList ?? [], L = q.informationRequestList ?? [], h = w.some(
62
62
  (e) => e.status !== "recovered"
63
- ), k = w.some(
64
- (e) => e.blockingPayroll && e.status !== K.Approved
65
- ), L = Y({
63
+ ), k = L.some(
64
+ (e) => e.status !== K.Approved
65
+ ), P = H({
66
66
  data: y,
67
67
  columns: [
68
68
  {
@@ -76,14 +76,14 @@ function ee({ className: s, companyId: n, dictionary: g, onEvent: u }) {
76
76
  title: "",
77
77
  render: (e) => {
78
78
  const t = e.action;
79
- return t ? /* @__PURE__ */ o(a, { justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ o(v, { variant: "secondary", onClick: t.onClick, title: t.label, children: t.label }) }) : null;
79
+ return t ? /* @__PURE__ */ o(a, { justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ o(D, { variant: "secondary", onClick: t.onClick, title: t.label, children: t.label }) }) : null;
80
80
  }
81
81
  }
82
82
  ]
83
83
  }), C = y.length > 0;
84
- return C || h || k ? /* @__PURE__ */ o("div", { className: R(B.root, s), children: /* @__PURE__ */ m(a, { flexDirection: "column", gap: 32, children: [
84
+ return C || h || k ? /* @__PURE__ */ o("div", { className: R(v.root, s), children: /* @__PURE__ */ m(a, { flexDirection: "column", gap: 32, children: [
85
85
  x.alerts.map((e) => /* @__PURE__ */ o(
86
- D,
86
+ g,
87
87
  {
88
88
  status: "success",
89
89
  label: r(`alerts.${e.type}.title`),
@@ -96,19 +96,11 @@ function ee({ className: s, companyId: n, dictionary: g, onEvent: u }) {
96
96
  )),
97
97
  C && /* @__PURE__ */ m(a, { flexDirection: "column", gap: 20, children: [
98
98
  /* @__PURE__ */ o(b, { as: "h2", styledAs: "h4", children: r("blockersListTitle") }),
99
- /* @__PURE__ */ o(Q, { ...L, label: r("blockersListTitle") })
99
+ /* @__PURE__ */ o($, { ...P, label: r("blockersListTitle") })
100
100
  ] }),
101
- h && /* @__PURE__ */ o(W, { companyId: n, onEvent: p }),
102
- k && /* @__PURE__ */ o(
103
- Z,
104
- {
105
- companyId: n,
106
- filterByPayrollBlocking: !0,
107
- withAlert: !1,
108
- onEvent: p
109
- }
110
- )
111
- ] }) }) : /* @__PURE__ */ o("div", { className: R(B.root, s), children: /* @__PURE__ */ o(i, { children: r("noBlockersMessage") }) });
101
+ h && /* @__PURE__ */ o(z, { companyId: n, onEvent: p }),
102
+ k && /* @__PURE__ */ o(Z, { companyId: n, withAlert: !1, onEvent: p })
103
+ ] }) }) : /* @__PURE__ */ o("div", { className: R(v.root, s), children: /* @__PURE__ */ o(i, { children: r("noBlockersMessage") }) });
112
104
  }
113
105
  export {
114
106
  be as PayrollBlockerList
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollBlockerList.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerList.tsx"],"sourcesContent":["import { useState, useCallback } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { usePayrollsGetBlockersSuspense } from '@gusto/embedded-api/react-query/payrollsGetBlockers'\nimport { useRecoveryCasesGetSuspense } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport { InformationRequestStatus } from '@gusto/embedded-api/models/components/informationrequest'\nimport { getBlockerTranslationKeys } from '../payrollHelpers'\nimport styles from './PayrollBlockerList.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { RecoveryCases } from '@/components/Payroll/RecoveryCases'\nimport { InformationRequestsFlow } from '@/components/InformationRequests'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { informationRequestEvents, recoveryCasesEvents, type EventType } from '@/shared/constants'\n\ntype ResponseAlertType = 'recoveryCaseResubmitted' | 'informationRequestResponded'\n\ninterface ResponseAlert {\n id: number\n type: ResponseAlertType\n}\n\ninterface ResponseAlertState {\n id: number\n alerts: ResponseAlert[]\n}\n\ninterface PayrollBlocker {\n id: string\n title: string\n description: string\n action?: {\n label: string\n onClick: () => void\n }\n}\n\ninterface PayrollBlockerListProps extends BaseComponentInterface<'Payroll.PayrollBlocker'> {\n companyId: string\n}\n\n/**\n * PayrollBlockerList - DataView-based component displaying payroll blockers\n * Shows each blocker with individual resolution buttons\n * Also displays recovery cases and information requests sections when applicable\n */\nexport function PayrollBlockerList(props: PayrollBlockerListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, companyId, dictionary, onEvent }: PayrollBlockerListProps) {\n useComponentDictionary('Payroll.PayrollBlocker', dictionary)\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Button, Text, Heading, Alert } = useComponentContext()\n\n const [alertState, setAlertState] = useState<ResponseAlertState>({\n id: 0,\n alerts: [],\n })\n\n const handleDismissAlert = useCallback((alertId: number) => {\n setAlertState(prev => ({\n ...prev,\n alerts: prev.alerts.filter(alert => alert.id !== alertId),\n }))\n }, [])\n\n const addAlert = useCallback((alertType: ResponseAlertType) => {\n setAlertState(prev => ({\n id: prev.id + 1,\n alerts: [{ id: prev.id, type: alertType }, ...prev.alerts],\n }))\n }, [])\n\n const handleEvent = useCallback(\n (type: EventType, data?: unknown) => {\n if (type === recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE) {\n addAlert('recoveryCaseResubmitted')\n }\n\n if (type === informationRequestEvents.INFORMATION_REQUEST_FORM_DONE) {\n addAlert('informationRequestResponded')\n }\n\n onEvent(type, data)\n },\n [onEvent, addAlert],\n )\n\n const { data: blockersData } = usePayrollsGetBlockersSuspense({\n companyUuid: companyId,\n })\n\n const { data: recoveryCasesData } = useRecoveryCasesGetSuspense({\n companyUuid: companyId,\n })\n\n const { data: informationRequestsData } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const payrollBlockerList = blockersData.payrollBlockerList ?? []\n const blockers: PayrollBlocker[] = payrollBlockerList.map(blocker => {\n const blockerKey = blocker.key ?? 'unknown'\n const translationKeys = getBlockerTranslationKeys(blockerKey)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: blockerKey.replace(/_/g, ' ').replace(/\\b\\w/g, letter => letter.toUpperCase()),\n })\n\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n\n return {\n id: blockerKey,\n title,\n description,\n }\n })\n\n const recoveryCases = recoveryCasesData.recoveryCaseList ?? []\n const informationRequests = informationRequestsData.informationRequestList ?? []\n\n const hasUnrecoveredCases = recoveryCases.some(\n recoveryCase => recoveryCase.status !== 'recovered',\n )\n\n const hasBlockingInformationRequests = informationRequests.some(\n request => request.blockingPayroll && request.status !== InformationRequestStatus.Approved,\n )\n\n const dataViewProps = useDataView({\n data: blockers,\n columns: [\n {\n title: t('blockerSectionLabel'),\n render: blocker => (\n <FlexItem flexGrow={1}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text weight=\"semibold\">{blocker.title}</Text>\n <Text variant=\"supporting\">{blocker.description}</Text>\n </Flex>\n </FlexItem>\n ),\n },\n {\n title: '',\n render: blocker => {\n const action = blocker.action\n\n if (!action) {\n return null\n }\n\n return (\n <Flex justifyContent=\"flex-end\" alignItems=\"center\">\n <Button variant=\"secondary\" onClick={action.onClick} title={action.label}>\n {action.label}\n </Button>\n </Flex>\n )\n },\n },\n ],\n })\n\n const hasBlockers = blockers.length > 0\n const hasAnyContent = hasBlockers || hasUnrecoveredCases || hasBlockingInformationRequests\n\n if (!hasAnyContent) {\n return (\n <div className={classNames(styles.root, className)}>\n <Text>{t('noBlockersMessage')}</Text>\n </div>\n )\n }\n\n return (\n <div className={classNames(styles.root, className)}>\n <Flex flexDirection=\"column\" gap={32}>\n {alertState.alerts.map(alert => (\n <Alert\n key={alert.id}\n status=\"success\"\n label={t(`alerts.${alert.type}.title`)}\n onDismiss={() => {\n handleDismissAlert(alert.id)\n }}\n >\n <Text>{t(`alerts.${alert.type}.description`)}</Text>\n </Alert>\n ))}\n\n {hasBlockers && (\n <Flex flexDirection=\"column\" gap={20}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('blockersListTitle')}\n </Heading>\n <DataView {...dataViewProps} label={t('blockersListTitle')} />\n </Flex>\n )}\n\n {hasUnrecoveredCases && <RecoveryCases companyId={companyId} onEvent={handleEvent} />}\n\n {hasBlockingInformationRequests && (\n <InformationRequestsFlow\n companyId={companyId}\n filterByPayrollBlocking\n withAlert={false}\n onEvent={handleEvent}\n />\n )}\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollBlockerList","props","jsx","BaseComponent","Root","className","companyId","dictionary","onEvent","useComponentDictionary","useI18n","t","useTranslation","Button","Text","Heading","Alert","useComponentContext","alertState","setAlertState","useState","handleDismissAlert","useCallback","alertId","prev","alert","addAlert","alertType","handleEvent","type","data","recoveryCasesEvents","informationRequestEvents","blockersData","usePayrollsGetBlockersSuspense","recoveryCasesData","useRecoveryCasesGetSuspense","informationRequestsData","useInformationRequestsGetInformationRequestsSuspense","blockers","blocker","blockerKey","translationKeys","getBlockerTranslationKeys","title","letter","description","recoveryCases","informationRequests","hasUnrecoveredCases","recoveryCase","hasBlockingInformationRequests","request","InformationRequestStatus","dataViewProps","useDataView","FlexItem","jsxs","Flex","action","hasBlockers","classNames","styles","DataView","RecoveryCases","InformationRequestsFlow"],"mappings":"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"}
1
+ {"version":3,"file":"PayrollBlockerList.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerList.tsx"],"sourcesContent":["import { useState, useCallback } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { usePayrollsGetBlockersSuspense } from '@gusto/embedded-api/react-query/payrollsGetBlockers'\nimport { useRecoveryCasesGetSuspense } from '@gusto/embedded-api/react-query/recoveryCasesGet'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport { InformationRequestStatus } from '@gusto/embedded-api/models/components/informationrequest'\nimport { getBlockerTranslationKeys } from '../payrollHelpers'\nimport styles from './PayrollBlockerList.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { RecoveryCases } from '@/components/Payroll/RecoveryCases'\nimport { InformationRequestsFlow } from '@/components/InformationRequests'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { informationRequestEvents, recoveryCasesEvents, type EventType } from '@/shared/constants'\n\ntype ResponseAlertType = 'recoveryCaseResubmitted' | 'informationRequestResponded'\n\ninterface ResponseAlert {\n id: number\n type: ResponseAlertType\n}\n\ninterface ResponseAlertState {\n id: number\n alerts: ResponseAlert[]\n}\n\ninterface PayrollBlocker {\n id: string\n title: string\n description: string\n action?: {\n label: string\n onClick: () => void\n }\n}\n\ninterface PayrollBlockerListProps extends BaseComponentInterface<'Payroll.PayrollBlocker'> {\n companyId: string\n}\n\n/**\n * PayrollBlockerList - DataView-based component displaying payroll blockers\n * Shows each blocker with individual resolution buttons\n * Also displays recovery cases and information requests sections when applicable\n */\nexport function PayrollBlockerList(props: PayrollBlockerListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, companyId, dictionary, onEvent }: PayrollBlockerListProps) {\n useComponentDictionary('Payroll.PayrollBlocker', dictionary)\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Button, Text, Heading, Alert } = useComponentContext()\n\n const [alertState, setAlertState] = useState<ResponseAlertState>({\n id: 0,\n alerts: [],\n })\n\n const handleDismissAlert = useCallback((alertId: number) => {\n setAlertState(prev => ({\n ...prev,\n alerts: prev.alerts.filter(alert => alert.id !== alertId),\n }))\n }, [])\n\n const addAlert = useCallback((alertType: ResponseAlertType) => {\n setAlertState(prev => ({\n id: prev.id + 1,\n alerts: [{ id: prev.id, type: alertType }, ...prev.alerts],\n }))\n }, [])\n\n const handleEvent = useCallback(\n (type: EventType, data?: unknown) => {\n if (type === recoveryCasesEvents.RECOVERY_CASE_RESUBMIT_DONE) {\n addAlert('recoveryCaseResubmitted')\n }\n\n if (type === informationRequestEvents.INFORMATION_REQUEST_FORM_DONE) {\n addAlert('informationRequestResponded')\n }\n\n onEvent(type, data)\n },\n [onEvent, addAlert],\n )\n\n const { data: blockersData } = usePayrollsGetBlockersSuspense({\n companyUuid: companyId,\n })\n\n const { data: recoveryCasesData } = useRecoveryCasesGetSuspense({\n companyUuid: companyId,\n })\n\n const { data: informationRequestsData } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const payrollBlockerList = blockersData.payrollBlockerList ?? []\n const blockers: PayrollBlocker[] = payrollBlockerList.map(blocker => {\n const blockerKey = blocker.key ?? 'unknown'\n const translationKeys = getBlockerTranslationKeys(blockerKey)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: blockerKey.replace(/_/g, ' ').replace(/\\b\\w/g, letter => letter.toUpperCase()),\n })\n\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n\n return {\n id: blockerKey,\n title,\n description,\n }\n })\n\n const recoveryCases = recoveryCasesData.recoveryCaseList ?? []\n const informationRequests = informationRequestsData.informationRequestList ?? []\n\n const hasUnrecoveredCases = recoveryCases.some(\n recoveryCase => recoveryCase.status !== 'recovered',\n )\n\n const hasInformationRequests = informationRequests.some(\n request => request.status !== InformationRequestStatus.Approved,\n )\n\n const dataViewProps = useDataView({\n data: blockers,\n columns: [\n {\n title: t('blockerSectionLabel'),\n render: blocker => (\n <FlexItem flexGrow={1}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text weight=\"semibold\">{blocker.title}</Text>\n <Text variant=\"supporting\">{blocker.description}</Text>\n </Flex>\n </FlexItem>\n ),\n },\n {\n title: '',\n render: blocker => {\n const action = blocker.action\n\n if (!action) {\n return null\n }\n\n return (\n <Flex justifyContent=\"flex-end\" alignItems=\"center\">\n <Button variant=\"secondary\" onClick={action.onClick} title={action.label}>\n {action.label}\n </Button>\n </Flex>\n )\n },\n },\n ],\n })\n\n const hasBlockers = blockers.length > 0\n const hasAnyContent = hasBlockers || hasUnrecoveredCases || hasInformationRequests\n\n if (!hasAnyContent) {\n return (\n <div className={classNames(styles.root, className)}>\n <Text>{t('noBlockersMessage')}</Text>\n </div>\n )\n }\n\n return (\n <div className={classNames(styles.root, className)}>\n <Flex flexDirection=\"column\" gap={32}>\n {alertState.alerts.map(alert => (\n <Alert\n key={alert.id}\n status=\"success\"\n label={t(`alerts.${alert.type}.title`)}\n onDismiss={() => {\n handleDismissAlert(alert.id)\n }}\n >\n <Text>{t(`alerts.${alert.type}.description`)}</Text>\n </Alert>\n ))}\n\n {hasBlockers && (\n <Flex flexDirection=\"column\" gap={20}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('blockersListTitle')}\n </Heading>\n <DataView {...dataViewProps} label={t('blockersListTitle')} />\n </Flex>\n )}\n\n {hasUnrecoveredCases && <RecoveryCases companyId={companyId} onEvent={handleEvent} />}\n\n {hasInformationRequests && (\n <InformationRequestsFlow companyId={companyId} withAlert={false} onEvent={handleEvent} />\n )}\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollBlockerList","props","jsx","BaseComponent","Root","className","companyId","dictionary","onEvent","useComponentDictionary","useI18n","t","useTranslation","Button","Text","Heading","Alert","useComponentContext","alertState","setAlertState","useState","handleDismissAlert","useCallback","alertId","prev","alert","addAlert","alertType","handleEvent","type","data","recoveryCasesEvents","informationRequestEvents","blockersData","usePayrollsGetBlockersSuspense","recoveryCasesData","useRecoveryCasesGetSuspense","informationRequestsData","useInformationRequestsGetInformationRequestsSuspense","blockers","blocker","blockerKey","translationKeys","getBlockerTranslationKeys","title","letter","description","recoveryCases","informationRequests","hasUnrecoveredCases","recoveryCase","hasInformationRequests","request","InformationRequestStatus","dataViewProps","useDataView","FlexItem","jsxs","Flex","action","hasBlockers","classNames","styles","DataView","RecoveryCases","InformationRequestsFlow"],"mappings":"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"}
@@ -16,6 +16,7 @@ export interface PayrollSubmitResult {
16
16
  * Returns blockers if found, otherwise throws the error for caller to handle
17
17
  */
18
18
  export declare const payrollSubmitHandler: (payrollHandler: () => Promise<void>) => Promise<PayrollSubmitResult>;
19
+ export declare const hasActionableBlockers: (blockers: ApiPayrollBlocker[]) => boolean;
19
20
  /**
20
21
  * Get translation keys for a blocker - use these in components with useTranslation
21
22
  */