@gusto/embedded-react-sdk 0.31.1 → 0.33.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 (412) hide show
  1. package/CHANGELOG.md +67 -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 +46 -45
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Base/useBase.d.ts +2 -3
  7. package/dist/components/Base/useBase.js.map +1 -1
  8. package/dist/components/Base/useBaseSubmit.js +32 -19
  9. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  10. package/dist/components/Common/DataView/DataView.js +1 -1
  11. package/dist/components/Common/DocumentList/DocumentList.js +1 -1
  12. package/dist/components/Common/DocumentViewer/DocumentViewer.js +1 -1
  13. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +1 -1
  14. package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBox.d.ts +2 -0
  15. package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +16 -0
  16. package/dist/components/Common/MultiSelectComboBox/index.d.ts +3 -0
  17. package/dist/components/Common/RequirementsList/RequirementsList.js +1 -1
  18. package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
  19. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  20. package/dist/components/Common/SignatureForm/SignatureForm.js +3 -2
  21. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  22. package/dist/components/Common/SignatureForm/SignatureFormActions.js +4 -3
  23. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  24. package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -6
  25. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  26. package/dist/components/Common/UI/Badge/Badge.js +39 -8
  27. package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
  28. package/dist/components/Common/UI/Badge/Badge.module.scss.js +8 -4
  29. package/dist/components/Common/UI/Badge/Badge.module.scss.js.map +1 -1
  30. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +12 -0
  31. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
  32. package/dist/components/Common/UI/Box/Box.d.ts +2 -0
  33. package/dist/components/Common/UI/Box/Box.js +13 -0
  34. package/dist/components/Common/UI/Box/Box.js.map +1 -0
  35. package/dist/components/Common/UI/Box/Box.module.scss.js +12 -0
  36. package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -0
  37. package/dist/components/Common/UI/Box/BoxTypes.d.ts +15 -0
  38. package/dist/components/Common/UI/Box/index.d.ts +2 -0
  39. package/dist/components/Common/UI/Dialog/Dialog.js +1 -1
  40. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  41. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  42. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  43. package/dist/components/Common/UI/Modal/Modal.js +1 -1
  44. package/dist/components/Common/UI/Tabs/Tabs.js +1 -1
  45. package/dist/components/Common/UI/TextInput/TextInput.js +30 -28
  46. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  47. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  48. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
  50. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
  52. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  54. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +6 -5
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +2 -2
  58. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -4
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +2 -2
  63. package/dist/components/Company/AssignSignatory/TitleSelect.js +5 -5
  64. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  65. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +2 -2
  66. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  67. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -4
  69. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  70. package/dist/components/Company/BankAccount/BankAccountForm/context.js +2 -2
  71. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +3 -2
  72. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  73. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -6
  74. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  75. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  76. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  78. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  79. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  80. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  81. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +2 -2
  82. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
  83. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  84. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +2 -2
  85. package/dist/components/Company/FederalTaxes/Actions.js +7 -6
  86. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  87. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -2
  88. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  89. package/dist/components/Company/FederalTaxes/Form.js +3 -2
  90. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  91. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +2 -2
  92. package/dist/components/Company/Industry/Actions.js +8 -7
  93. package/dist/components/Company/Industry/Actions.js.map +1 -1
  94. package/dist/components/Company/Industry/Context.js +2 -2
  95. package/dist/components/Company/Industry/Edit.js +3 -2
  96. package/dist/components/Company/Industry/Edit.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  98. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  99. package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
  100. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  101. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -2
  102. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  103. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +2 -2
  104. package/dist/components/Company/Locations/LocationsList/Actions.js +3 -2
  105. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/List.js +7 -6
  107. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -2
  109. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +2 -2
  111. package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
  112. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  113. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +38 -26
  114. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  115. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -6
  116. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  117. package/dist/components/Company/OnboardingOverview/context.js +2 -2
  118. package/dist/components/Company/PaySchedule/PaySchedule.js +24 -21
  119. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/_parts/Actions.js +3 -2
  121. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  122. package/dist/components/Company/PaySchedule/_parts/Edit.js +10 -9
  123. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  124. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
  125. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  126. package/dist/components/Company/PaySchedule/_parts/List.js +6 -5
  127. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  128. package/dist/components/Company/PaySchedule/usePaySchedule.js +2 -2
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +40 -46
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +2 -2
  134. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  135. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  136. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  137. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  138. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +2 -2
  139. package/dist/components/Company/index.js +20 -20
  140. package/dist/components/Contractor/Address/Address.js +6 -6
  141. package/dist/components/Contractor/Address/Address.js.map +1 -1
  142. package/dist/components/Contractor/Address/Form.js +7 -6
  143. package/dist/components/Contractor/Address/Form.js.map +1 -1
  144. package/dist/components/Contractor/Address/useAddress.js +2 -2
  145. package/dist/components/Contractor/ContractorList/index.js +16 -15
  146. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  147. package/dist/components/Contractor/NewHireReport/NewHireReport.js +14 -13
  148. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  149. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +11 -10
  150. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  151. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  152. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  153. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  154. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  155. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +151 -116
  156. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  157. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +4 -1
  158. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +55 -50
  159. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  160. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +84 -0
  161. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +23 -0
  162. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -0
  163. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +3 -31
  164. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +61 -66
  165. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  166. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
  167. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +21 -22
  168. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  169. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
  170. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +32 -29
  171. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  172. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +0 -1
  173. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  174. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
  175. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  176. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +3 -2
  177. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  178. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
  179. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  180. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +27 -27
  181. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  182. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -2
  183. package/dist/components/Contractor/Submit/Submit.js +20 -19
  184. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  185. package/dist/components/Employee/Compensation/Actions.js +13 -12
  186. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  187. package/dist/components/Employee/Compensation/Edit.js +3 -2
  188. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  189. package/dist/components/Employee/Compensation/List.js +23 -22
  190. package/dist/components/Employee/Compensation/List.js.map +1 -1
  191. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -2
  192. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -2
  193. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -2
  194. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -6
  195. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  196. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
  197. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  198. package/dist/components/Employee/Deductions/stateMachine.js +1 -1
  199. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +9 -8
  200. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  201. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +24 -22
  202. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  204. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  205. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.d.ts +1 -0
  206. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +2 -2
  207. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  208. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +9 -9
  209. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  210. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +46 -41
  211. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  212. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +150 -111
  213. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  214. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
  215. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  216. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +2 -2
  217. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.d.ts +1 -0
  218. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  219. package/dist/components/Employee/DocumentSigner/stateMachine.js +34 -22
  220. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
  221. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
  222. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  223. package/dist/components/Employee/EmployeeList/Actions.js +7 -6
  224. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  225. package/dist/components/Employee/EmployeeList/Head.js +6 -5
  226. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  227. package/dist/components/Employee/EmployeeList/List.js +3 -2
  228. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  229. package/dist/components/Employee/EmployeeList/useEmployeeList.js +2 -2
  230. package/dist/components/Employee/FederalTaxes/Actions.js +6 -5
  231. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  232. package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -4
  233. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  234. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +16 -15
  235. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  236. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +2 -2
  237. package/dist/components/Employee/Landing/Landing.js +50 -44
  238. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  239. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  240. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  241. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +3 -2
  242. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  243. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
  244. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -5
  246. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  247. package/dist/components/Employee/PaymentMethod/Split.js +3 -2
  248. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  249. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +2 -2
  250. package/dist/components/Employee/Profile/Actions.js +6 -5
  251. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  252. package/dist/components/Employee/Profile/AdminPersonalDetails.js +8 -7
  253. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  254. package/dist/components/Employee/Profile/HomeAddress.js +9 -8
  255. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  256. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +9 -8
  257. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  258. package/dist/components/Employee/Profile/useProfile.js +2 -2
  259. package/dist/components/Employee/StateTaxes/Actions.js +6 -5
  260. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  261. package/dist/components/Employee/StateTaxes/StateTaxes.js +29 -29
  262. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  263. package/dist/components/Employee/StateTaxes/useStateTaxes.js +2 -2
  264. package/dist/components/Employee/Taxes/Actions.js +7 -6
  265. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  266. package/dist/components/Employee/Taxes/FederalForm.js +7 -6
  267. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  268. package/dist/components/Employee/Taxes/Taxes.js +19 -19
  269. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  270. package/dist/components/Employee/Taxes/useTaxes.js +2 -2
  271. package/dist/components/Employee/index.js +22 -22
  272. package/dist/components/Flow/Flow.js +8 -7
  273. package/dist/components/Flow/Flow.js.map +1 -1
  274. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +1 -0
  275. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  276. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +0 -1
  277. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +32 -37
  278. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  279. package/dist/components/InformationRequests/InformationRequests.d.ts +1 -2
  280. package/dist/components/InformationRequests/InformationRequests.js +36 -43
  281. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  282. package/dist/components/InformationRequests/index.js +4 -4
  283. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -0
  284. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  285. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +23 -21
  286. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  287. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +2 -0
  288. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +79 -0
  289. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -0
  290. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +2 -0
  291. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +46 -0
  292. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -0
  293. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +14 -0
  294. package/dist/components/Payroll/OffCycleCreation/index.d.ts +3 -0
  295. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +2 -0
  296. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +44 -0
  297. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -0
  298. package/dist/components/Payroll/OffCycleDeductionsSetting/index.d.ts +3 -0
  299. package/dist/components/Payroll/OffCycleDeductionsSetting/types.d.ts +10 -0
  300. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +1 -2
  301. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +37 -0
  302. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -0
  303. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +12 -0
  304. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js.map +1 -0
  305. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +0 -4
  306. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +48 -0
  307. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -0
  308. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +18 -0
  309. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -0
  310. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +26 -27
  311. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  312. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +3 -3
  313. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +17 -16
  314. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  315. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.d.ts +2 -0
  316. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModalTypes.d.ts +8 -0
  317. package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +3 -0
  318. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.d.ts +2 -0
  319. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +17 -0
  320. package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +3 -0
  321. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.d.ts +3 -8
  322. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +37 -35
  323. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  324. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +16 -24
  325. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  326. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +2 -0
  327. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +30 -24
  328. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  329. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.test.d.ts +1 -0
  330. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +12 -8
  331. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  332. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +42 -41
  333. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  334. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +4 -3
  335. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  336. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +6 -5
  337. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  338. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -35
  339. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  340. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  341. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  342. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +16 -15
  343. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  344. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +32 -32
  345. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  346. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +19 -18
  347. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  348. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -67
  349. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  350. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  351. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +39 -36
  352. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  353. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
  354. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +18 -19
  355. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  356. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +1 -1
  357. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
  358. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  359. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +7 -6
  360. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  361. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -3
  362. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  363. package/dist/components/Payroll/index.d.ts +4 -0
  364. package/dist/components/Payroll/index.js +22 -18
  365. package/dist/components/Payroll/index.js.map +1 -1
  366. package/dist/components/Payroll/usePreparedPayrollData.js +2 -2
  367. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  368. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  369. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  370. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  371. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  372. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  373. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  374. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  375. package/dist/contexts/ThemeProvider/theme.js +1 -0
  376. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  377. package/dist/helpers/apiErrorToList.js +14 -8
  378. package/dist/helpers/apiErrorToList.js.map +1 -1
  379. package/dist/helpers/dateFormatting.js +61 -45
  380. package/dist/helpers/dateFormatting.js.map +1 -1
  381. package/dist/helpers/formattedStrings.d.ts +1 -0
  382. package/dist/helpers/formattedStrings.js +21 -20
  383. package/dist/helpers/formattedStrings.js.map +1 -1
  384. package/dist/hooks/useOverflowDetection/useOverflowDetection.js +5 -6
  385. package/dist/i18n/I18n.js +7 -7
  386. package/dist/i18n/I18n.js.map +1 -1
  387. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +12 -12
  388. package/dist/i18n/en/Employee.EmployeeDocuments.json.js +1 -1
  389. package/dist/i18n/en/Employee.I9SignatureForm.json.js +83 -65
  390. package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -1
  391. package/dist/i18n/en/Employee.Landing.json.js +7 -9
  392. package/dist/i18n/en/Employee.Landing.json.js.map +1 -1
  393. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +14 -0
  394. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -0
  395. package/dist/i18n/en/Payroll.OffCycleDeductionsSetting.json.js +12 -0
  396. package/dist/i18n/en/Payroll.OffCycleDeductionsSetting.json.js.map +1 -0
  397. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +18 -0
  398. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js.map +1 -0
  399. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +21 -19
  400. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  401. package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
  402. package/dist/i18n/en/common.json.d.ts +4 -1
  403. package/dist/i18n/en/common.json.js +5 -5
  404. package/dist/shared/constants.d.ts +4 -0
  405. package/dist/shared/constants.js +6 -4
  406. package/dist/shared/constants.js.map +1 -1
  407. package/dist/style.css +1 -1
  408. package/dist/types/i18next.d.ts +79 -2
  409. package/docs/reference/endpoint-inventory.json +1706 -0
  410. package/package.json +29 -13
  411. package/dist/components/Employee/Landing/Landing.module.scss.js +0 -8
  412. package/dist/components/Employee/Landing/Landing.module.scss.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCycleDeductionsSetting.js","sources":["../../../../src/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { OffCycleDeductionsSettingProps } from './types'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype DeductionsValue = 'include' | 'skip'\n\nexport function OffCycleDeductionsSetting({\n dictionary,\n skipRegularDeductions,\n onEvent,\n}: OffCycleDeductionsSettingProps) {\n useComponentDictionary('Payroll.OffCycleDeductionsSetting', dictionary)\n useI18n('Payroll.OffCycleDeductionsSetting')\n\n const { t } = useTranslation('Payroll.OffCycleDeductionsSetting')\n const { RadioGroup } = useComponentContext()\n\n const options = useMemo(\n () => [\n {\n value: 'include' as const,\n label: t('options.include.label'),\n },\n {\n value: 'skip' as const,\n label: t('options.skip.label'),\n },\n ],\n [t],\n )\n\n const handleChange = (value: string) => {\n onEvent(componentEvents.OFF_CYCLE_DEDUCTIONS_CHANGE, {\n skipRegularDeductions: value === 'skip',\n })\n }\n\n const selectedValue: DeductionsValue = skipRegularDeductions ? 'skip' : 'include'\n\n return (\n <RadioGroup\n label={t('title')}\n description={t('description')}\n options={options}\n value={selectedValue}\n onChange={handleChange}\n />\n )\n}\n"],"names":["OffCycleDeductionsSetting","dictionary","skipRegularDeductions","onEvent","useComponentDictionary","useI18n","t","useTranslation","RadioGroup","useComponentContext","options","useMemo","handleChange","value","componentEvents","selectedValue","jsx"],"mappings":";;;;;;AASO,SAASA,EAA0B;AAAA,EACxC,YAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,SAAAC;AACF,GAAmC;AACjC,EAAAC,EAAuB,qCAAqCH,CAAU,GACtEI,EAAQ,mCAAmC;AAE3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mCAAmC,GAC1D,EAAE,YAAAC,EAAA,IAAeC,EAAA,GAEjBC,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,OAAO;AAAA,QACP,OAAOL,EAAE,uBAAuB;AAAA,MAAA;AAAA,MAElC;AAAA,QACE,OAAO;AAAA,QACP,OAAOA,EAAE,oBAAoB;AAAA,MAAA;AAAA,IAC/B;AAAA,IAEF,CAACA,CAAC;AAAA,EAAA,GAGEM,IAAe,CAACC,MAAkB;AACtC,IAAAV,EAAQW,EAAgB,6BAA6B;AAAA,MACnD,uBAAuBD,MAAU;AAAA,IAAA,CAClC;AAAA,EACH,GAEME,IAAiCb,IAAwB,SAAS;AAExE,SACE,gBAAAc;AAAA,IAACR;AAAA,IAAA;AAAA,MACC,OAAOF,EAAE,OAAO;AAAA,MAChB,aAAaA,EAAE,aAAa;AAAA,MAC5B,SAAAI;AAAA,MACA,OAAOK;AAAA,MACP,UAAUH;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
@@ -0,0 +1,3 @@
1
+ import "./types/i18next.d.ts"
2
+ export { OffCycleDeductionsSetting } from './OffCycleDeductionsSetting';
3
+ export type { OffCycleDeductionsSettingProps, OffCycleDeductionsSettingChangePayload, } from './types';
@@ -0,0 +1,10 @@
1
+ import { CommonComponentInterface } from '../../Base/Base';
2
+ import { OnEventType } from '../../Base/useBase';
3
+ import { EventType } from '../../../shared/constants';
4
+ export interface OffCycleDeductionsSettingProps extends CommonComponentInterface<'Payroll.OffCycleDeductionsSetting'> {
5
+ skipRegularDeductions: boolean;
6
+ onEvent: OnEventType<EventType, unknown>;
7
+ }
8
+ export interface OffCycleDeductionsSettingChangePayload {
9
+ skipRegularDeductions: boolean;
10
+ }
@@ -1,2 +1 @@
1
- import { OffCyclePayPeriodDateFormPresentationProps } from './OffCyclePayPeriodDateFormTypes';
2
- export declare function OffCyclePayPeriodDateFormPresentation({ isCheckOnly, onCheckOnlyChange, }: OffCyclePayPeriodDateFormPresentationProps): import("react/jsx-runtime").JSX.Element;
1
+ export declare function OffCyclePayPeriodDateFormPresentation(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import { useFormContext as m, useWatch as d } from "react-hook-form";
3
+ import { useTranslation as h } from "react-i18next";
4
+ import a from "./OffCyclePayPeriodDateFormPresentation.module.scss.js";
5
+ import { useI18n as f } from "../../../i18n/I18n.js";
6
+ import "../../../shared/constants.js";
7
+ import "classnames";
8
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import "react";
10
+ import { CheckboxField as u } from "../../Common/Fields/CheckboxField/CheckboxField.js";
11
+ import { DatePickerField as r } from "../../Common/Fields/DatePickerField/DatePickerField.js";
12
+ function q() {
13
+ f("Payroll.OffCyclePayPeriodDateForm");
14
+ const { t: e } = h("Payroll.OffCyclePayPeriodDateForm"), { control: i, setValue: l } = m(), n = d({ control: i, name: "isCheckOnly" }), c = (s) => {
15
+ s && (l("startDate", null), l("endDate", null));
16
+ };
17
+ return /* @__PURE__ */ o("div", { className: a.root, children: [
18
+ !n && /* @__PURE__ */ o("div", { className: a.dateFields, children: [
19
+ /* @__PURE__ */ t(r, { name: "startDate", label: e("startDateLabel"), isRequired: !0 }),
20
+ /* @__PURE__ */ t(r, { name: "endDate", label: e("endDateLabel"), isRequired: !0 })
21
+ ] }),
22
+ /* @__PURE__ */ t("div", { className: a.checkDateField, children: /* @__PURE__ */ t(r, { name: "checkDate", label: e("checkDateLabel"), isRequired: !0 }) }),
23
+ /* @__PURE__ */ t(
24
+ u,
25
+ {
26
+ name: "isCheckOnly",
27
+ label: e("checkOnlyLabel"),
28
+ description: e("checkOnlyDescription"),
29
+ onChange: c
30
+ }
31
+ )
32
+ ] });
33
+ }
34
+ export {
35
+ q as OffCyclePayPeriodDateFormPresentation
36
+ };
37
+ //# sourceMappingURL=OffCyclePayPeriodDateFormPresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCyclePayPeriodDateFormPresentation.js","sources":["../../../../src/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport styles from './OffCyclePayPeriodDateFormPresentation.module.scss'\nimport type { OffCyclePayPeriodDateFormData } from './OffCyclePayPeriodDateFormTypes'\nimport { useI18n } from '@/i18n'\nimport { CheckboxField, DatePickerField } from '@/components/Common'\n\nexport function OffCyclePayPeriodDateFormPresentation() {\n useI18n('Payroll.OffCyclePayPeriodDateForm')\n const { t } = useTranslation('Payroll.OffCyclePayPeriodDateForm')\n const { control, setValue } = useFormContext<OffCyclePayPeriodDateFormData>()\n const isCheckOnly = useWatch({ control, name: 'isCheckOnly' })\n\n const handleCheckOnlyChange = (checked: boolean) => {\n if (checked) {\n setValue('startDate', null)\n setValue('endDate', null)\n }\n }\n\n return (\n <div className={styles.root}>\n {!isCheckOnly && (\n <div className={styles.dateFields}>\n <DatePickerField name=\"startDate\" label={t('startDateLabel')} isRequired />\n <DatePickerField name=\"endDate\" label={t('endDateLabel')} isRequired />\n </div>\n )}\n\n <div className={styles.checkDateField}>\n <DatePickerField name=\"checkDate\" label={t('checkDateLabel')} isRequired />\n </div>\n\n <CheckboxField\n name=\"isCheckOnly\"\n label={t('checkOnlyLabel')}\n description={t('checkOnlyDescription')}\n onChange={handleCheckOnlyChange}\n />\n </div>\n )\n}\n"],"names":["OffCyclePayPeriodDateFormPresentation","useI18n","t","useTranslation","control","setValue","useFormContext","isCheckOnly","useWatch","handleCheckOnlyChange","checked","jsxs","styles","jsx","DatePickerField","CheckboxField"],"mappings":";;;;;;;;;;;AAOO,SAASA,IAAwC;AACtD,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mCAAmC,GAC1D,EAAE,SAAAC,GAAS,UAAAC,EAAA,IAAaC,EAAA,GACxBC,IAAcC,EAAS,EAAE,SAAAJ,GAAS,MAAM,eAAe,GAEvDK,IAAwB,CAACC,MAAqB;AAClD,IAAIA,MACFL,EAAS,aAAa,IAAI,GAC1BA,EAAS,WAAW,IAAI;AAAA,EAE5B;AAEA,SACE,gBAAAM,EAAC,OAAA,EAAI,WAAWC,EAAO,MACpB,UAAA;AAAA,IAAA,CAACL,KACA,gBAAAI,EAAC,OAAA,EAAI,WAAWC,EAAO,YACrB,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAgB,MAAK,aAAY,OAAOZ,EAAE,gBAAgB,GAAG,YAAU,IAAC;AAAA,MACzE,gBAAAW,EAACC,KAAgB,MAAK,WAAU,OAAOZ,EAAE,cAAc,GAAG,YAAU,GAAA,CAAC;AAAA,IAAA,GACvE;AAAA,IAGF,gBAAAW,EAAC,OAAA,EAAI,WAAWD,EAAO,gBACrB,UAAA,gBAAAC,EAACC,GAAA,EAAgB,MAAK,aAAY,OAAOZ,EAAE,gBAAgB,GAAG,YAAU,IAAC,GAC3E;AAAA,IAEA,gBAAAW;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOb,EAAE,gBAAgB;AAAA,QACzB,aAAaA,EAAE,sBAAsB;AAAA,QACrC,UAAUO;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;"}
@@ -0,0 +1,12 @@
1
+ const e = "_root_erc2u_1", t = "_dateFields_erc2u_7", c = "_checkDateField_erc2u_16", o = {
2
+ root: e,
3
+ dateFields: t,
4
+ checkDateField: c
5
+ };
6
+ export {
7
+ c as checkDateField,
8
+ t as dateFields,
9
+ o as default,
10
+ e as root
11
+ };
12
+ //# sourceMappingURL=OffCyclePayPeriodDateFormPresentation.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCyclePayPeriodDateFormPresentation.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,9 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  export type OffCyclePayrollDateType = 'bonus' | 'correction';
3
- export interface OffCyclePayPeriodDateFormPresentationProps {
4
- isCheckOnly: boolean;
5
- onCheckOnlyChange: (value: boolean) => void;
6
- }
7
3
  export interface OffCyclePayPeriodDateFormData {
8
4
  isCheckOnly: boolean;
9
5
  startDate: Date | null;
@@ -0,0 +1,48 @@
1
+ import { z as s } from "zod";
2
+ const r = (t, c, i) => s.object({
3
+ isCheckOnly: s.boolean(),
4
+ startDate: s.date().nullable(),
5
+ endDate: s.date().nullable(),
6
+ checkDate: s.date().nullable()
7
+ }).superRefine((e, a) => {
8
+ if (!e.isCheckOnly && (e.startDate || a.addIssue({
9
+ code: s.ZodIssueCode.custom,
10
+ path: ["startDate"],
11
+ message: t("validations.startDateRequired")
12
+ }), e.endDate || a.addIssue({
13
+ code: s.ZodIssueCode.custom,
14
+ path: ["endDate"],
15
+ message: t("validations.endDateRequired")
16
+ }), e.startDate && e.endDate && e.endDate < e.startDate && a.addIssue({
17
+ code: s.ZodIssueCode.custom,
18
+ path: ["endDate"],
19
+ message: t("validations.endDateAfterStart")
20
+ }), c === "correction" && e.startDate)) {
21
+ const o = /* @__PURE__ */ new Date();
22
+ o.setHours(0, 0, 0, 0), e.startDate > o && a.addIssue({
23
+ code: s.ZodIssueCode.custom,
24
+ path: ["startDate"],
25
+ message: t("validations.startDateNotFuture")
26
+ });
27
+ }
28
+ if (!e.checkDate)
29
+ a.addIssue({
30
+ code: s.ZodIssueCode.custom,
31
+ path: ["checkDate"],
32
+ message: t("validations.checkDateRequired")
33
+ });
34
+ else if (!e.isCheckOnly) {
35
+ const o = new Date(e.checkDate);
36
+ o.setHours(0, 0, 0, 0);
37
+ const d = new Date(i);
38
+ d.setHours(0, 0, 0, 0), o < d && a.addIssue({
39
+ code: s.ZodIssueCode.custom,
40
+ path: ["checkDate"],
41
+ message: t("validations.checkDateAchLeadTime")
42
+ });
43
+ }
44
+ });
45
+ export {
46
+ r as createOffCyclePayPeriodDateFormSchema
47
+ };
48
+ //# sourceMappingURL=OffCyclePayPeriodDateFormTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffCyclePayPeriodDateFormTypes.js","sources":["../../../../src/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport type OffCyclePayrollDateType = 'bonus' | 'correction'\n\nexport interface OffCyclePayPeriodDateFormData {\n isCheckOnly: boolean\n startDate: Date | null\n endDate: Date | null\n checkDate: Date | null\n}\n\nexport const createOffCyclePayPeriodDateFormSchema = (\n t: (key: string) => string,\n payrollType: OffCyclePayrollDateType,\n minCheckDate: Date,\n) => {\n return z\n .object({\n isCheckOnly: z.boolean(),\n startDate: z.date().nullable(),\n endDate: z.date().nullable(),\n checkDate: z.date().nullable(),\n })\n .superRefine((data, ctx) => {\n if (!data.isCheckOnly) {\n if (!data.startDate) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['startDate'],\n message: t('validations.startDateRequired'),\n })\n }\n\n if (!data.endDate) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['endDate'],\n message: t('validations.endDateRequired'),\n })\n }\n\n if (data.startDate && data.endDate && data.endDate < data.startDate) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['endDate'],\n message: t('validations.endDateAfterStart'),\n })\n }\n\n if (payrollType === 'correction' && data.startDate) {\n const today = new Date()\n today.setHours(0, 0, 0, 0)\n if (data.startDate > today) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['startDate'],\n message: t('validations.startDateNotFuture'),\n })\n }\n }\n }\n\n if (!data.checkDate) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['checkDate'],\n message: t('validations.checkDateRequired'),\n })\n } else if (!data.isCheckOnly) {\n const checkDateNormalized = new Date(data.checkDate)\n checkDateNormalized.setHours(0, 0, 0, 0)\n const minCheckDateNormalized = new Date(minCheckDate)\n minCheckDateNormalized.setHours(0, 0, 0, 0)\n\n if (checkDateNormalized < minCheckDateNormalized) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['checkDate'],\n message: t('validations.checkDateAchLeadTime'),\n })\n }\n }\n })\n}\n\nexport type OffCyclePayPeriodDateFormSchema = ReturnType<\n typeof createOffCyclePayPeriodDateFormSchema\n>\n"],"names":["createOffCyclePayPeriodDateFormSchema","payrollType","minCheckDate","z","data","ctx","today","checkDateNormalized","minCheckDateNormalized"],"mappings":";AAWO,MAAMA,IAAwC,CACnD,GACAC,GACAC,MAEOC,EACJ,OAAO;AAAA,EACN,aAAaA,EAAE,QAAA;AAAA,EACf,WAAWA,EAAE,KAAA,EAAO,SAAA;AAAA,EACpB,SAASA,EAAE,KAAA,EAAO,SAAA;AAAA,EAClB,WAAWA,EAAE,KAAA,EAAO,SAAA;AAAS,CAC9B,EACA,YAAY,CAACC,GAAMC,MAAQ;AAC1B,MAAI,CAACD,EAAK,gBACHA,EAAK,aACRC,EAAI,SAAS;AAAA,IACX,MAAMF,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,WAAW;AAAA,IAClB,SAAS,EAAE,+BAA+B;AAAA,EAAA,CAC3C,GAGEC,EAAK,WACRC,EAAI,SAAS;AAAA,IACX,MAAMF,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,SAAS;AAAA,IAChB,SAAS,EAAE,6BAA6B;AAAA,EAAA,CACzC,GAGCC,EAAK,aAAaA,EAAK,WAAWA,EAAK,UAAUA,EAAK,aACxDC,EAAI,SAAS;AAAA,IACX,MAAMF,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,SAAS;AAAA,IAChB,SAAS,EAAE,+BAA+B;AAAA,EAAA,CAC3C,GAGCF,MAAgB,gBAAgBG,EAAK,YAAW;AAClD,UAAME,wBAAY,KAAA;AAClB,IAAAA,EAAM,SAAS,GAAG,GAAG,GAAG,CAAC,GACrBF,EAAK,YAAYE,KACnBD,EAAI,SAAS;AAAA,MACX,MAAMF,EAAE,aAAa;AAAA,MACrB,MAAM,CAAC,WAAW;AAAA,MAClB,SAAS,EAAE,gCAAgC;AAAA,IAAA,CAC5C;AAAA,EAEL;AAGF,MAAI,CAACC,EAAK;AACR,IAAAC,EAAI,SAAS;AAAA,MACX,MAAMF,EAAE,aAAa;AAAA,MACrB,MAAM,CAAC,WAAW;AAAA,MAClB,SAAS,EAAE,+BAA+B;AAAA,IAAA,CAC3C;AAAA,WACQ,CAACC,EAAK,aAAa;AAC5B,UAAMG,IAAsB,IAAI,KAAKH,EAAK,SAAS;AACnD,IAAAG,EAAoB,SAAS,GAAG,GAAG,GAAG,CAAC;AACvC,UAAMC,IAAyB,IAAI,KAAKN,CAAY;AACpD,IAAAM,EAAuB,SAAS,GAAG,GAAG,GAAG,CAAC,GAEtCD,IAAsBC,KACxBH,EAAI,SAAS;AAAA,MACX,MAAMF,EAAE,aAAa;AAAA,MACrB,MAAM,CAAC,WAAW;AAAA,MAClB,SAAS,EAAE,kCAAkC;AAAA,IAAA,CAC9C;AAAA,EAEL;AACF,CAAC;"}
@@ -0,0 +1,18 @@
1
+ import { useMemo as o } from "react";
2
+ import { addBusinessDays as r } from "../../../helpers/dateFormatting.js";
3
+ const s = 2;
4
+ function u() {
5
+ const e = o(() => {
6
+ const t = /* @__PURE__ */ new Date();
7
+ return t.setHours(0, 0, 0, 0), t;
8
+ }, []), n = o(() => r(e, s), [e]);
9
+ return {
10
+ today: e,
11
+ minCheckDate: n,
12
+ achLeadTimeBusinessDays: s
13
+ };
14
+ }
15
+ export {
16
+ u as useOffCyclePayPeriodDateValidation
17
+ };
18
+ //# sourceMappingURL=useOffCyclePayPeriodDateValidation.js.map
@@ -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,15 @@
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";
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 "classnames";
6
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import { RadioGroupField as l } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
5
8
  function d({
6
- selectedReason: e,
7
- onReasonChange: n
9
+ name: e,
10
+ onChange: i
8
11
  }) {
9
- const { t: o } = a("Payroll.OffCycleReasonSelection"), { RadioGroup: t } = p(), i = c(
12
+ const { t: o } = s("Payroll.OffCycleReasonSelection"), t = n(
10
13
  () => [
11
14
  {
12
15
  value: "correction",
@@ -20,17 +23,15 @@ function d({
20
23
  }
21
24
  ],
22
25
  [o]
23
- ), r = (s) => {
24
- n(s);
25
- };
26
- return /* @__PURE__ */ l(
27
- t,
26
+ );
27
+ return /* @__PURE__ */ r(
28
+ l,
28
29
  {
30
+ name: e,
29
31
  label: o("title"),
30
- options: i,
31
- value: e ?? void 0,
32
- onChange: r,
33
- isRequired: !0
32
+ options: t,
33
+ isRequired: !0,
34
+ onChange: i
34
35
  }
35
36
  );
36
37
  }
@@ -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,53 +1,55 @@
1
- import { jsx as l, jsxs as d } from "react/jsx-runtime";
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";
1
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
+ import { useTranslation as A } from "react-i18next";
3
+ import { hasActionableBlockers as K, getBlockerTranslationKeys as P, isActionableBlocker as D } from "../payrollHelpers.js";
4
+ import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
5
+ import { Flex as B } from "../../../Common/Flex/Flex.js";
6
+ import "classnames";
6
7
  import "react";
7
- import { useI18n as D } from "../../../../i18n/I18n.js";
8
- function F({
8
+ import { useI18n as I } from "../../../../i18n/I18n.js";
9
+ function U({
9
10
  blockers: o,
10
- onMultipleViewClick: i,
11
- multipleViewLabel: f,
12
- className: s
11
+ onViewBlockersClick: n,
12
+ viewBlockersLabel: y,
13
+ className: a
13
14
  }) {
14
- D("Payroll.PayrollBlocker");
15
- const { t: e } = K("Payroll.PayrollBlocker"), { Alert: c, Button: h, Text: a, UnorderedList: x } = v();
15
+ I("Payroll.PayrollBlocker");
16
+ const { t } = A("Payroll.PayrollBlocker"), { Alert: p, Button: d, Text: u, UnorderedList: x } = C();
16
17
  if (o.length === 0)
17
18
  return null;
18
- const y = o.length > 1, p = o.map((r) => {
19
- const n = P(r.key), g = e(n.titleKey, {
20
- defaultValue: e("defaultBlockerDescription")
21
- }), T = e(n.descriptionKey, {
22
- defaultValue: r.message || e("defaultBlockerDescription")
23
- }), k = e(n.helpTextKey, { defaultValue: e("defaultBlockerHelp") });
19
+ const s = o.length > 1, m = !!n && (s || K(o)), h = o.map((r) => {
20
+ const c = P(r.key), T = t(c.titleKey, {
21
+ defaultValue: t("defaultBlockerDescription")
22
+ }), k = t(c.descriptionKey, {
23
+ defaultValue: r.message || t("defaultBlockerDescription")
24
+ }), v = D(r.key) ? void 0 : t(c.helpTextKey, { defaultValue: t("defaultBlockerHelp") });
24
25
  return {
25
26
  ...r,
26
- title: g,
27
- description: T,
28
- helpText: k
27
+ title: T,
28
+ description: k,
29
+ helpText: v
29
30
  };
30
- }), t = p[0];
31
- if (!y && t)
32
- return /* @__PURE__ */ l(c, { status: "error", label: t.title, className: s, children: /* @__PURE__ */ d(m, { flexDirection: "column", gap: 8, children: [
33
- /* @__PURE__ */ l(a, { children: t.description }),
34
- t.helpText && t.helpText !== t.description && /* @__PURE__ */ l(a, { variant: "supporting", size: "sm", children: t.helpText })
31
+ }), i = y || t(s ? "viewAllBlockers" : "viewBlocker"), l = h[0];
32
+ if (!s && l)
33
+ return /* @__PURE__ */ e(p, { status: "error", label: l.title, className: a, children: /* @__PURE__ */ f(B, { flexDirection: "column", gap: 8, children: [
34
+ /* @__PURE__ */ e(u, { children: l.description }),
35
+ l.helpText && l.helpText !== l.description && /* @__PURE__ */ e(u, { variant: "supporting", size: "sm", children: l.helpText }),
36
+ m && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(d, { variant: "secondary", onClick: n, title: i, children: i }) })
35
37
  ] }) });
36
- const B = p.map((r) => r.title), u = f || e("viewAllBlockers");
37
- return /* @__PURE__ */ l(
38
- c,
38
+ const g = h.map((r) => r.title);
39
+ return /* @__PURE__ */ e(
40
+ p,
39
41
  {
40
42
  status: "error",
41
- label: e("multipleIssuesTitle", { count: o.length }),
42
- className: s,
43
- children: /* @__PURE__ */ d(m, { flexDirection: "column", gap: 16, children: [
44
- /* @__PURE__ */ l(x, { items: B }),
45
- i && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(h, { variant: "secondary", onClick: i, title: u, children: u }) })
43
+ label: t("multipleIssuesTitle", { count: o.length }),
44
+ className: a,
45
+ children: /* @__PURE__ */ f(B, { flexDirection: "column", gap: 16, children: [
46
+ /* @__PURE__ */ e(x, { items: g }),
47
+ m && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(d, { variant: "secondary", onClick: n, title: i, children: i }) })
46
48
  ] })
47
49
  }
48
50
  );
49
51
  }
50
52
  export {
51
- F as PayrollBlockerAlerts
53
+ U as PayrollBlockerAlerts
52
54
  };
53
55
  //# 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 isActionableBlocker,\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 = isActionableBlocker(blocker.key)\n ? undefined\n : 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","isActionableBlocker","ctaLabel","singleBlocker","jsx","jsxs","Flex","listItems"],"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,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,IAAWC,EAAoBN,EAAQ,GAAG,IAC5C,SACA,EAAEC,EAAgB,aAAa,EAAE,cAAc,EAAE,oBAAoB,GAAG;AAE5E,WAAO;AAAA,MACL,GAAGD;AAAA,MACH,OAAAG;AAAA,MACA,aAAAC;AAAA,MACA,UAAAC;AAAA,IAAA;AAAA,EAEJ,CAAC,GAEKE,IAAWpB,KAAqB,EAAES,IAAsB,oBAAoB,aAAa,GAEzFY,IAAgBT,EAAiB,CAAC;AAExC,MAAI,CAACH,KAAuBY;AAC1B,WACE,gBAAAC,EAAClB,GAAA,EAAM,QAAO,SAAQ,OAAOiB,EAAc,OAAO,WAAApB,GAChD,UAAA,gBAAAsB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAF,EAAChB,GAAA,EAAM,YAAc,YAAA,CAAY;AAAA,MAChCe,EAAc,YAAYA,EAAc,aAAaA,EAAc,eAClE,gBAAAC,EAAChB,GAAA,EAAK,SAAQ,cAAa,MAAK,MAC7B,YAAc,UACjB;AAAA,MAEDI,KACC,gBAAAY,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACjB,GAAA,EAAO,SAAQ,aAAY,SAASN,GAAqB,OAAOqB,GAC9D,UAAAA,EAAA,CACH,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAIJ,QAAMK,IAAYb,EAAiB,IAAI,CAAAC,MAAWA,EAAQ,KAAK;AAE/D,SACE,gBAAAS;AAAA,IAAClB;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAO,EAAE,uBAAuB,EAAE,OAAON,EAAS,QAAQ;AAAA,MAC1D,WAAAG;AAAA,MAEA,UAAA,gBAAAsB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,QAAA,gBAAAF,EAACf,GAAA,EAAc,OAAOkB,EAAA,CAAW;AAAA,QAChCf,KACC,gBAAAY,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACjB,GAAA,EAAO,SAAQ,aAAY,SAASN,GAAqB,OAAOqB,GAC9D,UAAAA,EAAA,CACH,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;"}