@gusto/embedded-react-sdk 0.24.0 → 0.25.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 (292) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/assets/icons/slash-circle.svg.js +10 -0
  3. package/dist/assets/icons/slash-circle.svg.js.map +1 -0
  4. package/dist/components/Base/Base.d.ts +1 -1
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/Fields/FileInputField/FileInputField.d.ts +5 -0
  7. package/dist/components/Common/Fields/FileInputField/FileInputField.js +34 -0
  8. package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -0
  9. package/dist/components/Common/Fields/FileInputField/index.d.ts +2 -0
  10. package/dist/components/Common/PaginationControl/PaginationControl.js +41 -40
  11. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  12. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -0
  13. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  14. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  15. package/dist/components/Common/UI/FileInput/FileInput.d.ts +2 -0
  16. package/dist/components/Common/UI/FileInput/FileInput.js +151 -0
  17. package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -0
  18. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +34 -0
  19. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -0
  20. package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +45 -0
  21. package/dist/components/Common/UI/FileInput/FileInputTypes.js +8 -0
  22. package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -0
  23. package/dist/components/Common/UI/FileInput/index.d.ts +4 -0
  24. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  25. package/dist/components/Common/UI/TextInput/TextInput.js +27 -23
  26. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  27. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  28. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  37. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  38. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +1 -1
  39. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  40. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +1 -1
  42. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  43. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  44. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  45. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  46. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  47. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
  48. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  49. package/dist/components/Company/Industry/Context.js +7 -6
  50. package/dist/components/Company/Industry/Context.js.map +1 -1
  51. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  52. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  53. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  54. package/dist/components/Company/Locations/LocationsList/List.js +35 -33
  55. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  56. package/dist/components/Company/Locations/LocationsList/LocationsList.js +29 -28
  57. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  58. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
  59. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  60. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  61. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  62. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  63. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  64. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  65. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  66. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  67. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  68. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  69. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  70. package/dist/components/Contractor/Address/Form.js +1 -1
  71. package/dist/components/Contractor/Address/useAddress.js +6 -5
  72. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  73. package/dist/components/Contractor/ContractorList/index.js +16 -15
  74. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  75. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  76. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  77. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +61 -59
  78. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  79. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +24 -22
  80. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  81. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +38 -19
  82. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  83. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  84. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +26 -25
  85. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  86. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  87. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +25 -19
  88. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  89. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  90. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +86 -56
  91. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  92. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +1 -2
  93. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +46 -21
  94. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  95. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +6 -15
  96. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +115 -99
  97. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  98. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js +8 -0
  99. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js.map +1 -0
  100. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +8 -0
  101. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +51 -0
  102. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -0
  103. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +11 -0
  104. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +157 -0
  105. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -0
  106. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +22 -0
  107. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -0
  108. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +40 -43
  109. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  110. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  111. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  112. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  113. package/dist/components/Employee/Compensation/Edit.js +14 -14
  114. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -9
  115. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  116. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -10
  117. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  118. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -10
  119. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  120. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  121. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  122. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  123. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  124. package/dist/components/Employee/EmployeeList/EmployeeList.js +57 -56
  125. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  126. package/dist/components/Employee/EmployeeList/List.js +34 -32
  127. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  128. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +1 -0
  129. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  130. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  131. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  132. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  133. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  134. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  135. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  136. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  137. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  138. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  139. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  140. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  141. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  142. package/dist/components/Employee/Profile/useProfile.js +4 -3
  143. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  144. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  145. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  146. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  147. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  148. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  149. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  150. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +15 -0
  151. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +142 -0
  152. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
  153. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +18 -0
  154. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -0
  155. package/dist/components/Payroll/InformationRequests/InformationRequestForm/index.d.ts +2 -0
  156. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.d.ts +7 -0
  157. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +88 -0
  158. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
  159. package/dist/components/Payroll/InformationRequests/InformationRequestList/index.d.ts +2 -0
  160. package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +6 -0
  161. package/dist/components/Payroll/InformationRequests/InformationRequests.js +55 -0
  162. package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +1 -0
  163. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.d.ts +19 -0
  164. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js +20 -0
  165. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +1 -0
  166. package/dist/components/Payroll/InformationRequests/index.d.ts +3 -0
  167. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.d.ts +13 -0
  168. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js +47 -0
  169. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +1 -0
  170. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +116 -130
  171. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  172. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -2
  173. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +107 -99
  174. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  175. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +2 -4
  176. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
  177. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +21 -0
  178. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +105 -0
  179. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -0
  180. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +41 -37
  181. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  182. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -4
  183. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +137 -131
  184. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  185. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +16 -15
  186. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  187. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  188. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +174 -106
  189. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  190. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +28 -28
  191. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  192. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
  193. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +85 -104
  194. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  195. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +24 -20
  196. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  197. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
  198. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +51 -46
  199. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  200. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +2 -0
  201. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +111 -45
  202. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  203. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +136 -125
  204. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  205. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -4
  206. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  207. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +117 -110
  208. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  209. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -2
  210. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +282 -278
  211. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  212. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.d.ts +6 -0
  213. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js +5 -0
  214. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js.map +1 -0
  215. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +6 -0
  216. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +55 -0
  217. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -0
  218. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +19 -0
  219. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js +19 -0
  220. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js.map +1 -0
  221. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +7 -0
  222. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +73 -0
  223. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -0
  224. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +10 -0
  225. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -0
  226. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/index.d.ts +2 -0
  227. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +14 -0
  228. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +46 -0
  229. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -0
  230. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/index.d.ts +2 -0
  231. package/dist/components/Payroll/RecoveryCases/index.d.ts +3 -0
  232. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +13 -0
  233. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +47 -0
  234. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -0
  235. package/dist/components/Payroll/helpers.d.ts +12 -0
  236. package/dist/components/Payroll/helpers.js +129 -117
  237. package/dist/components/Payroll/helpers.js.map +1 -1
  238. package/dist/components/Payroll/index.d.ts +2 -0
  239. package/dist/components/Payroll/index.js +18 -14
  240. package/dist/components/Payroll/index.js.map +1 -1
  241. package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
  242. package/dist/components/Payroll/usePreparedPayrollData.js +43 -31
  243. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  244. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +27 -25
  245. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  246. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  247. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  248. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +17 -15
  249. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  250. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  251. package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
  252. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  253. package/dist/helpers/dateFormatting.d.ts +1 -0
  254. package/dist/helpers/dateFormatting.js +1 -0
  255. package/dist/helpers/dateFormatting.js.map +1 -1
  256. package/dist/helpers/formattedStrings.d.ts +1 -0
  257. package/dist/helpers/formattedStrings.js +23 -18
  258. package/dist/helpers/formattedStrings.js.map +1 -1
  259. package/dist/helpers/responsive.js +1 -1
  260. package/dist/helpers/responsive.js.map +1 -1
  261. package/dist/i18n/I18n.js +3 -3
  262. package/dist/i18n/I18n.js.map +1 -1
  263. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -32
  264. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  265. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +11 -11
  266. package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js +28 -0
  267. package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js.map +1 -0
  268. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +14 -14
  269. package/dist/i18n/en/Payroll.InformationRequestForm.json.js +18 -0
  270. package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +1 -0
  271. package/dist/i18n/en/Payroll.InformationRequestList.json.js +18 -0
  272. package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +1 -0
  273. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +27 -21
  274. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  275. package/dist/i18n/en/Payroll.PayrollHistory.json.js +6 -6
  276. package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
  277. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
  278. package/dist/i18n/en/Payroll.PayrollOverview.json.js +32 -28
  279. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  280. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -0
  281. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -0
  282. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +8 -0
  283. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -0
  284. package/dist/i18n/en/common.json.d.ts +6 -0
  285. package/dist/i18n/en/common.json.js +4 -2
  286. package/dist/i18n/en/common.json.js.map +1 -1
  287. package/dist/shared/constants.d.ts +25 -1
  288. package/dist/shared/constants.js +72 -55
  289. package/dist/shared/constants.js.map +1 -1
  290. package/dist/style.css +1 -1
  291. package/dist/types/i18next.d.ts +120 -3
  292. package/package.json +31 -20
@@ -1,203 +1,214 @@
1
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
- import { useRef as j, useState as N } from "react";
3
- import { useTranslation as Y } from "react-i18next";
4
- import { PayrollBlockerAlerts as U } from "../PayrollBlocker/components/PayrollBlockerAlerts.js";
5
- import { getPayrollType as V } from "../helpers.js";
6
- import C from "./PayrollListPresentation.module.scss.js";
7
- import { Flex as i } from "../../Common/Flex/Flex.js";
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
+ import { useRef as q, useState as E } from "react";
3
+ import { useTranslation as $ } from "react-i18next";
4
+ import { PayrollBlockerAlerts as z } from "../PayrollBlocker/components/PayrollBlockerAlerts.js";
5
+ import { getPayrollType as G } from "../helpers.js";
6
+ import p from "./PayrollListPresentation.module.scss.js";
7
+ import { Flex as c } from "../../Common/Flex/Flex.js";
8
8
  import "classnames";
9
9
  import "../../../shared/constants.js";
10
- import { HamburgerMenu as q } from "../../Common/HamburgerMenu/HamburgerMenu.js";
11
- import { useComponentContext as E } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import { useI18n as $ } from "../../../i18n/I18n.js";
13
- import { formatDateToStringDate as z } from "../../../helpers/dateFormatting.js";
14
- import { useDateFormatter as G } from "../../../hooks/useDateFormatter.js";
15
- import J from "../../../assets/icons/feature-icon-check.svg.js";
16
- import { useContainerBreakpoints as K } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
17
- import { PayrollStatusBadges as Q } from "../PayrollStatusBadges/PayrollStatusBadges.js";
18
- import { DataView as X } from "../../Common/DataView/DataView.js";
19
- const gt = ({
20
- onRunPayroll: x,
21
- onSubmitPayroll: L,
22
- onSkipPayroll: A,
23
- onViewBlockers: I,
24
- payrolls: w,
25
- paySchedules: p,
26
- showSkipSuccessAlert: v,
27
- onDismissSkipSuccessAlert: H,
10
+ import { HamburgerMenu as J } from "../../Common/HamburgerMenu/HamburgerMenu.js";
11
+ import { useComponentContext as K } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import { useI18n as Q } from "../../../i18n/I18n.js";
13
+ import { formatDateToStringDate as X } from "../../../helpers/dateFormatting.js";
14
+ import { useDateFormatter as Z } from "../../../hooks/useDateFormatter.js";
15
+ import _ from "../../../assets/icons/feature-icon-check.svg.js";
16
+ import { useContainerBreakpoints as ee } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
17
+ import { PayrollStatusBadges as te } from "../PayrollStatusBadges/PayrollStatusBadges.js";
18
+ import { DataView as re } from "../../Common/DataView/DataView.js";
19
+ const be = ({
20
+ onRunPayroll: I,
21
+ onSubmitPayroll: H,
22
+ onSkipPayroll: M,
23
+ onViewBlockers: U,
24
+ payrolls: O,
25
+ paySchedules: y,
26
+ showSkipSuccessAlert: T,
27
+ onDismissSkipSuccessAlert: B,
28
28
  skippingPayrollId: f,
29
- blockers: y,
30
- wireInRequests: M
29
+ blockers: h,
30
+ wireInRequests: N
31
31
  }) => {
32
- const { Button: h, Dialog: O, Heading: T, Text: n, Alert: W } = E();
33
- $("Payroll.PayrollList");
34
- const { t: e } = Y("Payroll.PayrollList"), s = G(), D = j(null), B = K({ ref: D }).includes("small"), [m, g] = N({
32
+ const { Button: P, Dialog: W, Heading: F, Text: i, Alert: R } = K();
33
+ Q("Payroll.PayrollList");
34
+ const { t } = $("Payroll.PayrollList"), n = Z(), g = q(null), D = ee({ ref: g }).includes("large"), [d, k] = E({
35
35
  isOpen: !1,
36
36
  payrollId: null,
37
37
  payPeriod: null
38
- }), F = (t, l) => {
39
- g({
38
+ }), j = (e, l) => {
39
+ k({
40
40
  isOpen: !0,
41
- payrollId: t,
41
+ payrollId: e,
42
42
  payPeriod: l
43
43
  });
44
- }, P = () => {
45
- g({
44
+ }, S = () => {
45
+ k({
46
46
  isOpen: !1,
47
47
  payrollId: null,
48
48
  payPeriod: null
49
49
  });
50
- }, R = () => {
51
- m.payrollId && (A({ payrollUuid: m.payrollId }), P());
52
- }, S = (t, l) => {
53
- const a = s.formatShort(t), o = s.formatShortWithYear(l);
50
+ }, Y = () => {
51
+ d.payrollId && (M({ payrollUuid: d.payrollId }), S());
52
+ }, b = (e, l) => {
53
+ const o = n.formatShort(e), a = n.formatShortWithYear(l);
54
54
  return {
55
- startDate: a,
56
- endDate: o,
57
- fullPeriod: s.formatPayPeriodRange(t, l, { useShortMonth: !0 })
55
+ startDate: o,
56
+ endDate: a,
57
+ fullPeriod: n.formatPayPeriodRange(e, l, { useShortMonth: !0 })
58
58
  };
59
+ }, C = (e) => {
60
+ const { payrollUuid: l, calculatedAt: o, processed: a, payPeriod: u } = e;
61
+ if (a)
62
+ return null;
63
+ const m = f === l;
64
+ return o ? /* @__PURE__ */ r(
65
+ P,
66
+ {
67
+ isLoading: m,
68
+ onClick: () => {
69
+ H({ payrollUuid: l, payPeriod: u });
70
+ },
71
+ title: t("submitPayrollCta"),
72
+ variant: "secondary",
73
+ children: t("submitPayrollCta")
74
+ }
75
+ ) : /* @__PURE__ */ r(
76
+ P,
77
+ {
78
+ isLoading: m,
79
+ onClick: () => {
80
+ I({ payrollUuid: l, payPeriod: u });
81
+ },
82
+ title: t("runPayrollTitle"),
83
+ variant: "secondary",
84
+ children: t("runPayrollTitle")
85
+ }
86
+ );
59
87
  };
60
- return /* @__PURE__ */ r("div", { ref: D, className: C.container, children: /* @__PURE__ */ u(i, { flexDirection: "column", gap: 16, children: [
61
- v && /* @__PURE__ */ r("div", { className: C.alertContainer, children: /* @__PURE__ */ r(
62
- W,
88
+ return /* @__PURE__ */ r("div", { ref: g, className: p.container, children: /* @__PURE__ */ s(c, { flexDirection: "column", gap: 16, children: [
89
+ T && /* @__PURE__ */ r("div", { className: p.alertContainer, children: /* @__PURE__ */ r(
90
+ R,
63
91
  {
64
92
  status: "info",
65
- label: e("skipSuccessAlert"),
66
- onDismiss: H
93
+ label: t("skipSuccessAlert"),
94
+ onDismiss: B
67
95
  }
68
96
  ) }),
69
- /* @__PURE__ */ r(U, { blockers: y, onMultipleViewClick: I }),
97
+ /* @__PURE__ */ r(z, { blockers: h, onMultipleViewClick: U }),
70
98
  /* @__PURE__ */ r(
71
- i,
99
+ c,
72
100
  {
73
101
  flexDirection: { base: "column", medium: "row" },
74
102
  justifyContent: "space-between",
75
103
  alignItems: "flex-start",
76
104
  gap: { base: 12, medium: 24 },
77
- children: /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(T, { as: "h2", children: e("title") }) })
105
+ children: /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(F, { as: "h2", children: t("title") }) })
78
106
  }
79
107
  ),
80
108
  /* @__PURE__ */ r(
81
- X,
109
+ re,
82
110
  {
83
- emptyState: () => /* @__PURE__ */ u(i, { flexDirection: "column", alignItems: "center", gap: 24, children: [
84
- /* @__PURE__ */ r(J, {}),
85
- /* @__PURE__ */ r(n, { children: e("emptyState") })
111
+ breakAt: "large",
112
+ emptyState: () => /* @__PURE__ */ s(c, { flexDirection: "column", alignItems: "center", gap: 24, children: [
113
+ /* @__PURE__ */ r(_, {}),
114
+ /* @__PURE__ */ r(i, { children: t("emptyState") })
86
115
  ] }),
87
- data: w,
116
+ data: O,
88
117
  columns: [
89
118
  {
90
- render: ({ payPeriod: t }) => {
91
- const { startDate: l, endDate: a } = S(
92
- t?.startDate,
93
- t?.endDate
119
+ render: ({ payPeriod: e }) => {
120
+ const { startDate: l, endDate: o } = b(
121
+ e?.startDate,
122
+ e?.endDate
94
123
  );
95
- return /* @__PURE__ */ u(i, { flexDirection: "column", gap: 0, children: [
96
- /* @__PURE__ */ u(n, { children: [
124
+ return /* @__PURE__ */ s("div", { className: p.payPeriodCell, children: [
125
+ /* @__PURE__ */ s(i, { weight: "medium", children: [
97
126
  l,
98
127
  " - ",
99
- a
128
+ o
100
129
  ] }),
101
- /* @__PURE__ */ r(n, { variant: "supporting", children: p.find((o) => o.uuid === t?.payScheduleUuid)?.name || p.find((o) => o.uuid === t?.payScheduleUuid)?.customName })
130
+ /* @__PURE__ */ r(i, { variant: "supporting", children: y.find((a) => a.uuid === e?.payScheduleUuid)?.name || y.find((a) => a.uuid === e?.payScheduleUuid)?.customName })
102
131
  ] });
103
132
  },
104
- title: e("tableHeaders.0")
133
+ title: t("tableHeaders.0")
105
134
  },
106
135
  {
107
- render: (t) => /* @__PURE__ */ r(n, { children: e(`type.${V(t)}`) }),
108
- title: e("tableHeaders.1")
136
+ render: (e) => /* @__PURE__ */ r(i, { children: t(`type.${G(e)}`) }),
137
+ title: t("tableHeaders.1")
109
138
  },
110
139
  {
111
- render: ({ checkDate: t }) => /* @__PURE__ */ r(n, { children: s.formatShortWithWeekdayAndYear(t) }),
112
- title: e("tableHeaders.2")
140
+ render: ({ checkDate: e }) => /* @__PURE__ */ r(i, { children: n.formatShortWithWeekdayAndYear(e) }),
141
+ title: t("tableHeaders.2")
113
142
  },
114
143
  {
115
- title: e("tableHeaders.3"),
116
- render: ({ payrollDeadline: t }) => /* @__PURE__ */ r(n, { children: s.formatShortWithWeekdayAndYear(t) })
144
+ title: t("tableHeaders.3"),
145
+ render: ({ payrollDeadline: e }) => /* @__PURE__ */ r(i, { children: n.formatShortWithWeekdayAndYear(e) })
117
146
  },
118
147
  {
119
- title: e("tableHeaders.4"),
120
- render: (t) => {
121
- const l = M.find(
122
- (a) => a.paymentUuid === t.payrollUuid
148
+ title: t("tableHeaders.4"),
149
+ render: (e) => {
150
+ const l = N.find(
151
+ (o) => o.paymentUuid === e.payrollUuid
123
152
  );
124
- return /* @__PURE__ */ r(Q, { payroll: t, wireInRequest: l });
153
+ return /* @__PURE__ */ r(te, { payroll: e, wireInRequest: l });
125
154
  }
126
155
  },
127
- {
128
- title: "",
129
- render: ({ payrollUuid: t, calculatedAt: l, processed: a, payPeriod: o }) => {
130
- if (a)
131
- return null;
132
- const d = f === t, c = l ? /* @__PURE__ */ r(
133
- h,
134
- {
135
- isLoading: d,
136
- onClick: () => {
137
- L({ payrollUuid: t, payPeriod: o });
138
- },
139
- title: e("submitPayrollCta"),
140
- variant: "secondary",
141
- children: e("submitPayrollCta")
142
- }
143
- ) : /* @__PURE__ */ r(
144
- h,
145
- {
146
- isLoading: d,
147
- onClick: () => {
148
- x({ payrollUuid: t, payPeriod: o });
149
- },
150
- title: e("runPayrollTitle"),
151
- variant: "secondary",
152
- children: e("runPayrollTitle")
153
- }
154
- );
155
- return B ? c : /* @__PURE__ */ r(i, { flexDirection: "column", alignItems: "stretch", gap: 12, children: c });
156
+ ...D ? [] : [
157
+ {
158
+ title: "",
159
+ render: (e) => {
160
+ const l = C(e);
161
+ return l ? /* @__PURE__ */ r(c, { flexDirection: "column", alignItems: "stretch", gap: 12, children: l }) : null;
162
+ }
156
163
  }
157
- }
164
+ ]
158
165
  ],
159
- label: e("payrollsListLabel"),
160
- itemMenu: ({ payrollUuid: t, processed: l, payPeriod: a }) => {
161
- if (l)
166
+ label: t("payrollsListLabel"),
167
+ itemMenu: (e) => {
168
+ const { payrollUuid: l, processed: o, payPeriod: a } = e;
169
+ if (o)
162
170
  return null;
163
- const o = f === t, { fullPeriod: d } = S(
171
+ const u = f === l, { fullPeriod: m } = b(
164
172
  a?.startDate,
165
173
  a?.endDate
166
- ), c = z(/* @__PURE__ */ new Date()), k = c ? new Date(c) : null, b = a?.startDate ? new Date(a.startDate) : null;
167
- return y.length === 0 && k && b && k >= b ? /* @__PURE__ */ r(
168
- q,
174
+ ), A = X(/* @__PURE__ */ new Date()), L = A ? new Date(A) : null, x = a?.startDate ? new Date(a.startDate) : null, V = h.length === 0 && L && x && L >= x, v = D ? C(e) : null, w = V ? /* @__PURE__ */ r(
175
+ J,
169
176
  {
170
- isLoading: o,
171
- menuLabel: e("payrollMenuLabel"),
177
+ isLoading: u,
178
+ menuLabel: t("payrollMenuLabel"),
172
179
  items: [
173
180
  {
174
- label: e("skipPayrollCta"),
181
+ label: t("skipPayrollCta"),
175
182
  onClick: () => {
176
- F(t, d);
183
+ j(l, m);
177
184
  }
178
185
  }
179
186
  ]
180
187
  }
181
188
  ) : null;
189
+ return !v && !w ? null : /* @__PURE__ */ s("div", { className: p.actionsContainer, children: [
190
+ v,
191
+ w
192
+ ] });
182
193
  }
183
194
  }
184
195
  ),
185
196
  /* @__PURE__ */ r(
186
- O,
197
+ W,
187
198
  {
188
- isOpen: m.isOpen,
189
- onClose: P,
190
- onPrimaryActionClick: R,
199
+ isOpen: d.isOpen,
200
+ onClose: S,
201
+ onPrimaryActionClick: Y,
191
202
  isDestructive: !0,
192
- title: e("skipPayrollDialog.title", { payPeriod: m.payPeriod }),
193
- primaryActionLabel: e("skipPayrollDialog.confirmCta"),
194
- closeActionLabel: e("skipPayrollDialog.cancelCta"),
195
- children: e("skipPayrollDialog.body")
203
+ title: t("skipPayrollDialog.title", { payPeriod: d.payPeriod }),
204
+ primaryActionLabel: t("skipPayrollDialog.confirmCta"),
205
+ closeActionLabel: t("skipPayrollDialog.cancelCta"),
206
+ children: t("skipPayrollDialog.body")
196
207
  }
197
208
  )
198
209
  ] }) });
199
210
  };
200
211
  export {
201
- gt as PayrollListPresentation
212
+ be as PayrollListPresentation
202
213
  };
203
214
  //# sourceMappingURL=PayrollListPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollListPresentation.js","sources":["../../../../src/components/Payroll/PayrollList/PayrollListPresentation.tsx"],"sourcesContent":["import type { Payroll } from '@gusto/embedded-api/models/components/payroll'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { WireInRequest } from '@gusto/embedded-api/models/components/wireinrequest'\nimport { useState, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { ApiPayrollBlocker } from '../PayrollBlocker/payrollHelpers'\nimport { PayrollBlockerAlerts } from '../PayrollBlocker/components/PayrollBlockerAlerts'\nimport { PayrollStatusBadges } from '../PayrollStatusBadges'\nimport { getPayrollType } from '../helpers'\nimport styles from './PayrollListPresentation.module.scss'\nimport { DataView, Flex, HamburgerMenu } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport FeatureIconCheck from '@/assets/icons/feature-icon-check.svg?react'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\ninterface PayrollListPresentationProps {\n onRunPayroll: ({ payrollUuid, payPeriod }: Pick<Payroll, 'payrollUuid' | 'payPeriod'>) => void\n onSubmitPayroll: ({ payrollUuid, payPeriod }: Pick<Payroll, 'payrollUuid' | 'payPeriod'>) => void\n onSkipPayroll: ({ payrollUuid }: Pick<Payroll, 'payrollUuid'>) => void\n onViewBlockers?: () => void\n payrolls: Payroll[]\n paySchedules: PayScheduleList[]\n showSkipSuccessAlert: boolean\n onDismissSkipSuccessAlert: () => void\n skippingPayrollId: string | null\n blockers: ApiPayrollBlocker[]\n wireInRequests: WireInRequest[]\n}\n\nexport const PayrollListPresentation = ({\n onRunPayroll,\n onSubmitPayroll,\n onSkipPayroll,\n onViewBlockers,\n payrolls,\n paySchedules,\n showSkipSuccessAlert,\n onDismissSkipSuccessAlert,\n skippingPayrollId,\n blockers,\n wireInRequests,\n}: PayrollListPresentationProps) => {\n const { Button, Dialog, Heading, Text, Alert } = useComponentContext()\n useI18n('Payroll.PayrollList')\n const { t } = useTranslation('Payroll.PayrollList')\n const dateFormatter = useDateFormatter()\n const containerRef = useRef<HTMLDivElement>(null)\n const breakpoints = useContainerBreakpoints({ ref: containerRef })\n const isDesktop = breakpoints.includes('small')\n const [skipPayrollDialogState, setSkipPayrollDialogState] = useState<{\n isOpen: boolean\n payrollId: string | null\n payPeriod: string | null\n }>({\n isOpen: false,\n payrollId: null,\n payPeriod: null,\n })\n\n const handleOpenSkipDialog = (payrollId: string, payPeriod: string) => {\n setSkipPayrollDialogState({\n isOpen: true,\n payrollId,\n payPeriod,\n })\n }\n\n const handleCloseSkipDialog = () => {\n setSkipPayrollDialogState({\n isOpen: false,\n payrollId: null,\n payPeriod: null,\n })\n }\n\n const handleConfirmSkipPayroll = () => {\n if (skipPayrollDialogState.payrollId) {\n onSkipPayroll({ payrollUuid: skipPayrollDialogState.payrollId })\n handleCloseSkipDialog()\n }\n }\n\n const formatPayPeriod = (startDate: string | undefined, endDate: string | undefined) => {\n const formattedStartDate = dateFormatter.formatShort(startDate)\n const formattedEndDate = dateFormatter.formatShortWithYear(endDate)\n\n return {\n startDate: formattedStartDate,\n endDate: formattedEndDate,\n fullPeriod: dateFormatter.formatPayPeriodRange(startDate, endDate, { useShortMonth: true }),\n }\n }\n\n return (\n <div ref={containerRef} className={styles.container}>\n <Flex flexDirection=\"column\" gap={16}>\n {showSkipSuccessAlert && (\n <div className={styles.alertContainer}>\n <Alert\n status=\"info\"\n label={t('skipSuccessAlert')}\n onDismiss={onDismissSkipSuccessAlert}\n />\n </div>\n )}\n <PayrollBlockerAlerts blockers={blockers} onMultipleViewClick={onViewBlockers} />\n <Flex\n flexDirection={{ base: 'column', medium: 'row' }}\n justifyContent=\"space-between\"\n alignItems=\"flex-start\"\n gap={{ base: 12, medium: 24 }}\n >\n <Flex>\n <Heading as=\"h2\">{t('title')}</Heading>\n </Flex>\n </Flex>\n\n <DataView\n emptyState={() => (\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={24}>\n <FeatureIconCheck />\n <Text>{t('emptyState')}</Text>\n </Flex>\n )}\n data={payrolls}\n columns={[\n {\n render: ({ payPeriod }) => {\n const { startDate, endDate } = formatPayPeriod(\n payPeriod?.startDate,\n payPeriod?.endDate,\n )\n\n return (\n <Flex flexDirection=\"column\" gap={0}>\n <Text>\n {startDate} - {endDate}\n </Text>\n <Text variant=\"supporting\">\n {paySchedules.find(schedule => schedule.uuid === payPeriod?.payScheduleUuid)\n ?.name ||\n paySchedules.find(schedule => schedule.uuid === payPeriod?.payScheduleUuid)\n ?.customName}\n </Text>\n </Flex>\n )\n },\n title: t('tableHeaders.0'),\n },\n {\n render: payroll => <Text>{t(`type.${getPayrollType(payroll)}`)}</Text>,\n title: t('tableHeaders.1'),\n },\n {\n render: ({ checkDate }) => (\n <Text>{dateFormatter.formatShortWithWeekdayAndYear(checkDate)}</Text>\n ),\n title: t('tableHeaders.2'),\n },\n {\n title: t('tableHeaders.3'),\n render: ({ payrollDeadline }) => (\n <Text>{dateFormatter.formatShortWithWeekdayAndYear(payrollDeadline)}</Text>\n ),\n },\n {\n title: t('tableHeaders.4'),\n render: payroll => {\n const wireInRequest = wireInRequests.find(\n wire => wire.paymentUuid === payroll.payrollUuid,\n )\n return <PayrollStatusBadges payroll={payroll} wireInRequest={wireInRequest} />\n },\n },\n {\n title: '',\n render: ({ payrollUuid, calculatedAt, processed, payPeriod }) => {\n if (processed) {\n return null\n }\n\n const isProcessingSkipPayroll = skippingPayrollId === payrollUuid\n\n const button = calculatedAt ? (\n <Button\n isLoading={isProcessingSkipPayroll}\n onClick={() => {\n onSubmitPayroll({ payrollUuid, payPeriod })\n }}\n title={t('submitPayrollCta')}\n variant=\"secondary\"\n >\n {t('submitPayrollCta')}\n </Button>\n ) : (\n <Button\n isLoading={isProcessingSkipPayroll}\n onClick={() => {\n onRunPayroll({ payrollUuid, payPeriod })\n }}\n title={t('runPayrollTitle')}\n variant=\"secondary\"\n >\n {t('runPayrollTitle')}\n </Button>\n )\n\n return isDesktop ? (\n button\n ) : (\n <Flex flexDirection=\"column\" alignItems=\"stretch\" gap={12}>\n {button}\n </Flex>\n )\n },\n },\n ]}\n label={t('payrollsListLabel')}\n itemMenu={({ payrollUuid, processed, payPeriod }) => {\n if (processed) {\n return null\n }\n\n const isProcessingSkipPayroll = skippingPayrollId === payrollUuid\n\n const { fullPeriod: payPeriodString } = formatPayPeriod(\n payPeriod?.startDate,\n payPeriod?.endDate,\n )\n\n const todayDateString = formatDateToStringDate(new Date())\n const todayAtMidnight = todayDateString ? new Date(todayDateString) : null\n const payPeriodStartDate = payPeriod?.startDate ? new Date(payPeriod.startDate) : null\n\n const canSkipPayroll =\n blockers.length === 0 &&\n todayAtMidnight &&\n payPeriodStartDate &&\n todayAtMidnight >= payPeriodStartDate\n\n if (!canSkipPayroll) {\n return null\n }\n\n return (\n <HamburgerMenu\n isLoading={isProcessingSkipPayroll}\n menuLabel={t('payrollMenuLabel')}\n items={[\n {\n label: t('skipPayrollCta'),\n onClick: () => {\n handleOpenSkipDialog(payrollUuid!, payPeriodString)\n },\n },\n ]}\n />\n )\n }}\n />\n <Dialog\n isOpen={skipPayrollDialogState.isOpen}\n onClose={handleCloseSkipDialog}\n onPrimaryActionClick={handleConfirmSkipPayroll}\n isDestructive={true}\n title={t('skipPayrollDialog.title', { payPeriod: skipPayrollDialogState.payPeriod })}\n primaryActionLabel={t('skipPayrollDialog.confirmCta')}\n closeActionLabel={t('skipPayrollDialog.cancelCta')}\n >\n {t('skipPayrollDialog.body')}\n </Dialog>\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollListPresentation","onRunPayroll","onSubmitPayroll","onSkipPayroll","onViewBlockers","payrolls","paySchedules","showSkipSuccessAlert","onDismissSkipSuccessAlert","skippingPayrollId","blockers","wireInRequests","Button","Dialog","Heading","Text","Alert","useComponentContext","useI18n","t","useTranslation","dateFormatter","useDateFormatter","containerRef","useRef","isDesktop","useContainerBreakpoints","skipPayrollDialogState","setSkipPayrollDialogState","useState","handleOpenSkipDialog","payrollId","payPeriod","handleCloseSkipDialog","handleConfirmSkipPayroll","formatPayPeriod","startDate","endDate","formattedStartDate","formattedEndDate","jsx","styles","jsxs","Flex","PayrollBlockerAlerts","DataView","FeatureIconCheck","schedule","payroll","getPayrollType","checkDate","payrollDeadline","wireInRequest","wire","PayrollStatusBadges","payrollUuid","calculatedAt","processed","isProcessingSkipPayroll","button","payPeriodString","todayDateString","formatDateToStringDate","todayAtMidnight","payPeriodStartDate","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;;;AAgCO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AACF,MAAoC;AAClC,QAAM,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,GAAM,OAAAC,EAAA,IAAUC,EAAA;AACjD,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAgBC,EAAA,GAChBC,IAAeC,EAAuB,IAAI,GAE1CC,IADcC,EAAwB,EAAE,KAAKH,GAAc,EACnC,SAAS,OAAO,GACxC,CAACI,GAAwBC,CAAyB,IAAIC,EAIzD;AAAA,IACD,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,WAAW;AAAA,EAAA,CACZ,GAEKC,IAAuB,CAACC,GAAmBC,MAAsB;AACrE,IAAAJ,EAA0B;AAAA,MACxB,QAAQ;AAAA,MACR,WAAAG;AAAA,MACA,WAAAC;AAAA,IAAA,CACD;AAAA,EACH,GAEMC,IAAwB,MAAM;AAClC,IAAAL,EAA0B;AAAA,MACxB,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,WAAW;AAAA,IAAA,CACZ;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ACF;AAAA,QAEF,OAAOxC,EAAE,mBAAmB;AAAA,QAC5B,UAAU,CAAC,EAAE,aAAAoC,GAAa,WAAAE,GAAW,WAAAzB,QAAgB;AACnD,cAAIyB;AACF,mBAAO;AAGT,gBAAMC,IAA0BjD,MAAsB8C,GAEhD,EAAE,YAAYK,EAAA,IAAoBzB;AAAA,YACtCH,GAAW;AAAA,YACXA,GAAW;AAAA,UAAA,GAGP6B,IAAkBC,EAAuB,oBAAI,MAAM,GACnDC,IAAkBF,IAAkB,IAAI,KAAKA,CAAe,IAAI,MAChEG,IAAqBhC,GAAW,YAAY,IAAI,KAAKA,EAAU,SAAS,IAAI;AAQlF,iBALEtB,EAAS,WAAW,KACpBqD,KACAC,KACAD,KAAmBC,IAOnB,gBAAAxB;AAAA,YAACyB;AAAA,YAAA;AAAA,cACC,WAAWP;AAAA,cACX,WAAWvC,EAAE,kBAAkB;AAAA,cAC/B,OAAO;AAAA,gBACL;AAAA,kBACE,OAAOA,EAAE,gBAAgB;AAAA,kBACzB,SAAS,MAAM;AACb,oBAAAW,EAAqByB,GAAcK,CAAe;AAAA,kBACpD;AAAA,gBAAA;AAAA,cACF;AAAA,YACF;AAAA,UAAA,IAdK;AAAA,QAiBX;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAApB;AAAA,MAAC3B;AAAA,MAAA;AAAA,QACC,QAAQc,EAAuB;AAAA,QAC/B,SAASM;AAAA,QACT,sBAAsBC;AAAA,QACtB,eAAe;AAAA,QACf,OAAOf,EAAE,2BAA2B,EAAE,WAAWQ,EAAuB,WAAW;AAAA,QACnF,oBAAoBR,EAAE,8BAA8B;AAAA,QACpD,kBAAkBA,EAAE,6BAA6B;AAAA,QAEhD,YAAE,wBAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7B,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"PayrollListPresentation.js","sources":["../../../../src/components/Payroll/PayrollList/PayrollListPresentation.tsx"],"sourcesContent":["import type { Payroll } from '@gusto/embedded-api/models/components/payroll'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { WireInRequest } from '@gusto/embedded-api/models/components/wireinrequest'\nimport { useState, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { ApiPayrollBlocker } from '../PayrollBlocker/payrollHelpers'\nimport { PayrollBlockerAlerts } from '../PayrollBlocker/components/PayrollBlockerAlerts'\nimport { PayrollStatusBadges } from '../PayrollStatusBadges'\nimport { getPayrollType } from '../helpers'\nimport styles from './PayrollListPresentation.module.scss'\nimport { DataView, Flex, HamburgerMenu } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport FeatureIconCheck from '@/assets/icons/feature-icon-check.svg?react'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\ninterface PayrollListPresentationProps {\n onRunPayroll: ({ payrollUuid, payPeriod }: Pick<Payroll, 'payrollUuid' | 'payPeriod'>) => void\n onSubmitPayroll: ({ payrollUuid, payPeriod }: Pick<Payroll, 'payrollUuid' | 'payPeriod'>) => void\n onSkipPayroll: ({ payrollUuid }: Pick<Payroll, 'payrollUuid'>) => void\n onViewBlockers?: () => void\n payrolls: Payroll[]\n paySchedules: PayScheduleList[]\n showSkipSuccessAlert: boolean\n onDismissSkipSuccessAlert: () => void\n skippingPayrollId: string | null\n blockers: ApiPayrollBlocker[]\n wireInRequests: WireInRequest[]\n}\n\nexport const PayrollListPresentation = ({\n onRunPayroll,\n onSubmitPayroll,\n onSkipPayroll,\n onViewBlockers,\n payrolls,\n paySchedules,\n showSkipSuccessAlert,\n onDismissSkipSuccessAlert,\n skippingPayrollId,\n blockers,\n wireInRequests,\n}: PayrollListPresentationProps) => {\n const { Button, Dialog, Heading, Text, Alert } = useComponentContext()\n useI18n('Payroll.PayrollList')\n const { t } = useTranslation('Payroll.PayrollList')\n const dateFormatter = useDateFormatter()\n const containerRef = useRef<HTMLDivElement>(null)\n const breakpoints = useContainerBreakpoints({ ref: containerRef })\n const isDesktop = breakpoints.includes('large')\n const [skipPayrollDialogState, setSkipPayrollDialogState] = useState<{\n isOpen: boolean\n payrollId: string | null\n payPeriod: string | null\n }>({\n isOpen: false,\n payrollId: null,\n payPeriod: null,\n })\n\n const handleOpenSkipDialog = (payrollId: string, payPeriod: string) => {\n setSkipPayrollDialogState({\n isOpen: true,\n payrollId,\n payPeriod,\n })\n }\n\n const handleCloseSkipDialog = () => {\n setSkipPayrollDialogState({\n isOpen: false,\n payrollId: null,\n payPeriod: null,\n })\n }\n\n const handleConfirmSkipPayroll = () => {\n if (skipPayrollDialogState.payrollId) {\n onSkipPayroll({ payrollUuid: skipPayrollDialogState.payrollId })\n handleCloseSkipDialog()\n }\n }\n\n const formatPayPeriod = (startDate: string | undefined, endDate: string | undefined) => {\n const formattedStartDate = dateFormatter.formatShort(startDate)\n const formattedEndDate = dateFormatter.formatShortWithYear(endDate)\n\n return {\n startDate: formattedStartDate,\n endDate: formattedEndDate,\n fullPeriod: dateFormatter.formatPayPeriodRange(startDate, endDate, { useShortMonth: true }),\n }\n }\n\n const renderActionButton = (payroll: Payroll) => {\n const { payrollUuid, calculatedAt, processed, payPeriod } = payroll\n\n if (processed) {\n return null\n }\n\n const isProcessingSkipPayroll = skippingPayrollId === payrollUuid\n\n return calculatedAt ? (\n <Button\n isLoading={isProcessingSkipPayroll}\n onClick={() => {\n onSubmitPayroll({ payrollUuid, payPeriod })\n }}\n title={t('submitPayrollCta')}\n variant=\"secondary\"\n >\n {t('submitPayrollCta')}\n </Button>\n ) : (\n <Button\n isLoading={isProcessingSkipPayroll}\n onClick={() => {\n onRunPayroll({ payrollUuid, payPeriod })\n }}\n title={t('runPayrollTitle')}\n variant=\"secondary\"\n >\n {t('runPayrollTitle')}\n </Button>\n )\n }\n\n return (\n <div ref={containerRef} className={styles.container}>\n <Flex flexDirection=\"column\" gap={16}>\n {showSkipSuccessAlert && (\n <div className={styles.alertContainer}>\n <Alert\n status=\"info\"\n label={t('skipSuccessAlert')}\n onDismiss={onDismissSkipSuccessAlert}\n />\n </div>\n )}\n <PayrollBlockerAlerts blockers={blockers} onMultipleViewClick={onViewBlockers} />\n <Flex\n flexDirection={{ base: 'column', medium: 'row' }}\n justifyContent=\"space-between\"\n alignItems=\"flex-start\"\n gap={{ base: 12, medium: 24 }}\n >\n <Flex>\n <Heading as=\"h2\">{t('title')}</Heading>\n </Flex>\n </Flex>\n\n <DataView\n breakAt=\"large\"\n emptyState={() => (\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={24}>\n <FeatureIconCheck />\n <Text>{t('emptyState')}</Text>\n </Flex>\n )}\n data={payrolls}\n columns={[\n {\n render: ({ payPeriod }) => {\n const { startDate, endDate } = formatPayPeriod(\n payPeriod?.startDate,\n payPeriod?.endDate,\n )\n\n return (\n <div className={styles.payPeriodCell}>\n <Text weight=\"medium\">\n {startDate} - {endDate}\n </Text>\n <Text variant=\"supporting\">\n {paySchedules.find(schedule => schedule.uuid === payPeriod?.payScheduleUuid)\n ?.name ||\n paySchedules.find(schedule => schedule.uuid === payPeriod?.payScheduleUuid)\n ?.customName}\n </Text>\n </div>\n )\n },\n title: t('tableHeaders.0'),\n },\n {\n render: payroll => <Text>{t(`type.${getPayrollType(payroll)}`)}</Text>,\n title: t('tableHeaders.1'),\n },\n {\n render: ({ checkDate }) => (\n <Text>{dateFormatter.formatShortWithWeekdayAndYear(checkDate)}</Text>\n ),\n title: t('tableHeaders.2'),\n },\n {\n title: t('tableHeaders.3'),\n render: ({ payrollDeadline }) => (\n <Text>{dateFormatter.formatShortWithWeekdayAndYear(payrollDeadline)}</Text>\n ),\n },\n {\n title: t('tableHeaders.4'),\n render: payroll => {\n const wireInRequest = wireInRequests.find(\n wire => wire.paymentUuid === payroll.payrollUuid,\n )\n return <PayrollStatusBadges payroll={payroll} wireInRequest={wireInRequest} />\n },\n },\n ...(!isDesktop\n ? [\n {\n title: '',\n render: (payroll: Payroll) => {\n const button = renderActionButton(payroll)\n if (!button) return null\n return (\n <Flex flexDirection=\"column\" alignItems=\"stretch\" gap={12}>\n {button}\n </Flex>\n )\n },\n },\n ]\n : []),\n ]}\n label={t('payrollsListLabel')}\n itemMenu={payroll => {\n const { payrollUuid, processed, payPeriod } = payroll\n\n if (processed) {\n return null\n }\n\n const isProcessingSkipPayroll = skippingPayrollId === payrollUuid\n\n const { fullPeriod: payPeriodString } = formatPayPeriod(\n payPeriod?.startDate,\n payPeriod?.endDate,\n )\n\n const todayDateString = formatDateToStringDate(new Date())\n const todayAtMidnight = todayDateString ? new Date(todayDateString) : null\n const payPeriodStartDate = payPeriod?.startDate ? new Date(payPeriod.startDate) : null\n\n const canSkipPayroll =\n blockers.length === 0 &&\n todayAtMidnight &&\n payPeriodStartDate &&\n todayAtMidnight >= payPeriodStartDate\n\n const button = isDesktop ? renderActionButton(payroll) : null\n\n const hamburgerMenu = canSkipPayroll ? (\n <HamburgerMenu\n isLoading={isProcessingSkipPayroll}\n menuLabel={t('payrollMenuLabel')}\n items={[\n {\n label: t('skipPayrollCta'),\n onClick: () => {\n handleOpenSkipDialog(payrollUuid!, payPeriodString)\n },\n },\n ]}\n />\n ) : null\n\n if (!button && !hamburgerMenu) {\n return null\n }\n\n return (\n <div className={styles.actionsContainer}>\n {button}\n {hamburgerMenu}\n </div>\n )\n }}\n />\n <Dialog\n isOpen={skipPayrollDialogState.isOpen}\n onClose={handleCloseSkipDialog}\n onPrimaryActionClick={handleConfirmSkipPayroll}\n isDestructive={true}\n title={t('skipPayrollDialog.title', { payPeriod: skipPayrollDialogState.payPeriod })}\n primaryActionLabel={t('skipPayrollDialog.confirmCta')}\n closeActionLabel={t('skipPayrollDialog.cancelCta')}\n >\n {t('skipPayrollDialog.body')}\n </Dialog>\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollListPresentation","onRunPayroll","onSubmitPayroll","onSkipPayroll","onViewBlockers","payrolls","paySchedules","showSkipSuccessAlert","onDismissSkipSuccessAlert","skippingPayrollId","blockers","wireInRequests","Button","Dialog","Heading","Text","Alert","useComponentContext","useI18n","useTranslation","dateFormatter","useDateFormatter","containerRef","useRef","isDesktop","useContainerBreakpoints","skipPayrollDialogState","setSkipPayrollDialogState","useState","handleOpenSkipDialog","payrollId","payPeriod","handleCloseSkipDialog","handleConfirmSkipPayroll","formatPayPeriod","startDate","endDate","formattedStartDate","formattedEndDate","renderActionButton","payroll","payrollUuid","calculatedAt","processed","isProcessingSkipPayroll","jsx","styles","jsxs","Flex","PayrollBlockerAlerts","DataView","FeatureIconCheck","schedule","getPayrollType","checkDate","payrollDeadline","wireInRequest","wire","PayrollStatusBadges","button","payPeriodString","todayDateString","formatDateToStringDate","todayAtMidnight","payPeriodStartDate","canSkipPayroll","hamburgerMenu","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;;;AAgCO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AACF,MAAoC;AAClC,QAAM,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,GAAM,OAAAC,EAAA,IAAUC,EAAA;AACjD,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAgBC,EAAA,GAChBC,IAAeC,EAAuB,IAAI,GAE1CC,IADcC,GAAwB,EAAE,KAAKH,GAAc,EACnC,SAAS,OAAO,GACxC,CAACI,GAAwBC,CAAyB,IAAIC,EAIzD;AAAA,IACD,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,WAAW;AAAA,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D,KAAU,CAACO,IACP,OAIP,gBAAAnB,EAAC,OAAA,EAAI,WAAWD,EAAO,kBACpB,UAAA;AAAA,YAAAa;AAAA,YACAO;AAAA,UAAA,GACH;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAArB;AAAA,MAAChC;AAAA,MAAA;AAAA,QACC,QAAQa,EAAuB;AAAA,QAC/B,SAASM;AAAA,QACT,sBAAsBC;AAAA,QACtB,eAAe;AAAA,QACf,OAAO,EAAE,2BAA2B,EAAE,WAAWP,EAAuB,WAAW;AAAA,QACnF,oBAAoB,EAAE,8BAA8B;AAAA,QACpD,kBAAkB,EAAE,6BAA6B;AAAA,QAEhD,YAAE,wBAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7B,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -1,10 +1,14 @@
1
- const n = "_alertContainer_8fhuy_8", t = "_container_8fhuy_12", e = {
1
+ const t = "_actionsContainer_t7hus_1", n = "_alertContainer_t7hus_8", e = "_container_t7hus_12", o = "_payPeriodCell_t7hus_17", a = {
2
+ actionsContainer: t,
2
3
  alertContainer: n,
3
- container: t
4
+ container: e,
5
+ payPeriodCell: o
4
6
  };
5
7
  export {
8
+ t as actionsContainer,
6
9
  n as alertContainer,
7
- t as container,
8
- e as default
10
+ e as container,
11
+ a as default,
12
+ o as payPeriodCell
9
13
  };
10
14
  //# sourceMappingURL=PayrollListPresentation.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollListPresentation.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"PayrollListPresentation.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}