@gusto/embedded-react-sdk 0.48.0 → 0.48.2

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 (451) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/components/Common/DocumentList/DocumentList.js +12 -12
  3. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  4. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +3 -5
  5. package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
  6. package/dist/components/Common/EmptyData/EmptyData.d.ts +1 -1
  7. package/dist/components/Common/EmptyData/EmptyData.js +10 -12
  8. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  9. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -10
  10. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  11. package/dist/components/Common/Form/Form.d.ts +1 -1
  12. package/dist/components/Common/Form/Form.js +8 -7
  13. package/dist/components/Common/Form/Form.js.map +1 -1
  14. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes.d.ts +1 -0
  15. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +7 -3
  16. package/dist/components/Common/PayrollLoading/PayrollLoadingTypes.d.ts +1 -0
  17. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +1 -0
  18. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  19. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +1 -0
  20. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
  21. package/dist/components/Common/UI/Banner/BannerTypes.d.ts +1 -0
  22. package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
  23. package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -0
  24. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +1 -0
  25. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -1
  26. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -0
  27. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
  28. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -2
  29. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
  30. package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +3 -2
  31. package/dist/components/Common/UI/Card/Card.js +8 -8
  32. package/dist/components/Common/UI/Card/Card.js.map +1 -1
  33. package/dist/components/Common/UI/Card/Card.module.scss.js +5 -3
  34. package/dist/components/Common/UI/Card/Card.module.scss.js.map +1 -1
  35. package/dist/components/Common/UI/Card/CardTypes.d.ts +1 -0
  36. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +1 -0
  37. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
  38. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +2 -0
  39. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
  40. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -0
  41. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +1 -0
  42. package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +2 -0
  43. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +2 -0
  44. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
  45. package/dist/components/Common/UI/Dialog/DialogTypes.d.ts +1 -0
  46. package/dist/components/Common/UI/Dialog/DialogTypes.js.map +1 -1
  47. package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +1 -0
  48. package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -1
  49. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -0
  50. package/dist/components/Common/UI/Link/LinkTypes.d.ts +4 -3
  51. package/dist/components/Common/UI/List/ListTypes.d.ts +13 -4
  52. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +1 -0
  53. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
  54. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +2 -0
  55. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  56. package/dist/components/Common/UI/Modal/ModalTypes.d.ts +1 -0
  57. package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -1
  58. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -0
  59. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +1 -0
  60. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +1 -0
  61. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +1 -0
  62. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
  63. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -0
  64. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  65. package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -0
  66. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +1 -0
  67. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
  68. package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -0
  69. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  70. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -0
  71. package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -0
  72. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
  73. package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +1 -0
  74. package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -1
  75. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -0
  76. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  77. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  78. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  79. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  80. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  81. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  82. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  83. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  84. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  85. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  86. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  87. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  88. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  89. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  90. package/dist/components/Company/Industry/Context.js +8 -7
  91. package/dist/components/Company/Industry/Context.js.map +1 -1
  92. package/dist/components/Company/Industry/IndustrySelect.js +6 -8
  93. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  95. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  97. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  98. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  99. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  100. package/dist/components/Company/PaySchedule/PayScheduleForm.js +3 -1
  101. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  103. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  104. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  105. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  106. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  107. package/dist/components/Contractor/Address/useAddress.js +7 -6
  108. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  109. package/dist/components/Contractor/Profile/useContractorProfile.js +26 -27
  110. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  111. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +6 -6
  112. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +10 -10
  113. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +1 -1
  114. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +2 -2
  115. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +25 -5
  116. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  117. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/index.d.ts +3 -0
  118. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  119. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  120. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +28 -5
  121. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -1
  122. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  123. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/index.d.ts +3 -0
  124. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +26 -5
  125. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js +3 -1
  126. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  127. package/dist/components/Employee/Documents/shared/SignatureForm/index.d.ts +3 -0
  128. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +2 -2
  129. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +1 -1
  130. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  131. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  132. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +6 -6
  133. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  134. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  135. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -0
  136. package/dist/components/Employee/exports/employeeOnboarding.js +28 -22
  137. package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -1
  138. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +36 -2
  139. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  140. package/dist/components/InformationRequests/InformationRequestForm/index.d.ts +1 -1
  141. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +22 -2
  142. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  143. package/dist/components/InformationRequests/InformationRequestList/index.d.ts +1 -1
  144. package/dist/components/InformationRequests/InformationRequests.d.ts +29 -2
  145. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  146. package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +2 -0
  147. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
  148. package/dist/components/InformationRequests/index.d.ts +3 -3
  149. package/dist/components/InformationRequests/informationRequestsStateMachine.d.ts +2 -0
  150. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
  151. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +36 -3
  152. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +6 -2
  153. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  154. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +1 -0
  155. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  156. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +14 -0
  157. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
  158. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -8
  159. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -2
  160. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  161. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +1 -1
  162. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +0 -1
  163. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  164. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +11 -0
  165. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
  166. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -2
  167. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +23 -0
  168. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +18 -0
  169. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  170. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +15 -0
  171. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  172. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +24 -0
  173. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  174. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +7 -0
  175. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  176. package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +2 -0
  177. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -1
  178. package/dist/components/Payroll/Dismissal/index.d.ts +1 -1
  179. package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -0
  180. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  181. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  182. package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +5 -0
  183. package/dist/components/Payroll/GrossUpModal/index.d.ts +0 -1
  184. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +31 -0
  185. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  186. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +20 -0
  187. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  188. package/dist/components/Payroll/OffCycle/offCycleStateMachine.d.ts +2 -0
  189. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
  190. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +20 -0
  191. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  192. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -0
  193. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  194. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +24 -0
  195. package/dist/components/Payroll/OffCycleCreation/index.d.ts +1 -1
  196. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +16 -0
  197. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  198. package/dist/components/Payroll/OffCycleDeductionsSetting/types.d.ts +13 -0
  199. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +1 -0
  200. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  201. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +18 -1
  202. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  203. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -1
  204. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +0 -1
  205. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  206. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +15 -0
  207. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  208. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +1 -0
  209. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  210. package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +43 -0
  211. package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -1
  212. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.d.ts +1 -0
  213. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  214. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModalTypes.d.ts +5 -1
  215. package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +0 -1
  216. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.d.ts +1 -0
  217. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
  218. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +14 -0
  219. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
  220. package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +0 -2
  221. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.d.ts +3 -0
  222. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  223. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +19 -5
  224. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  225. package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
  226. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +17 -11
  227. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +0 -2
  228. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  229. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +31 -3
  230. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +1 -2
  231. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  232. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -0
  233. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  234. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +2 -0
  235. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
  236. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -0
  237. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  238. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +42 -3
  239. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +1 -2
  240. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  241. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +3 -1
  242. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +0 -1
  243. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  244. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +8 -6
  245. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +0 -1
  246. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  247. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +65 -0
  248. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  249. package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +0 -1
  250. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +2 -0
  251. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  252. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
  253. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
  254. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.d.ts +1 -0
  255. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  256. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +38 -0
  257. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  258. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +27 -0
  259. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  260. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
  261. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
  262. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  263. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  264. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +25 -1
  265. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +1 -2
  266. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  267. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -0
  268. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  269. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +33 -4
  270. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +1 -2
  271. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  272. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +19 -0
  273. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  274. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +2 -0
  275. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  276. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +32 -13
  277. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  278. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -0
  279. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +65 -68
  280. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  281. package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
  282. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +39 -3
  283. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +1 -2
  284. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  285. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -0
  286. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  287. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.d.ts +1 -0
  288. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js.map +1 -1
  289. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +1 -0
  290. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  291. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -0
  292. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  293. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +26 -3
  294. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +2 -7
  295. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  296. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -0
  297. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  298. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +1 -0
  299. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -1
  300. package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +0 -2
  301. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +26 -0
  302. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
  303. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +2 -0
  304. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -1
  305. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +21 -1
  306. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  307. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +5 -0
  308. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js.map +1 -1
  309. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +1 -0
  310. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  311. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +1 -0
  312. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  313. package/dist/components/Payroll/RecoveryCases/index.d.ts +0 -1
  314. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +5 -0
  315. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
  316. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +5 -0
  317. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  318. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +21 -0
  319. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  320. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +23 -0
  321. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  322. package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +2 -0
  323. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
  324. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +20 -0
  325. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  326. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +7 -0
  327. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  328. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +27 -0
  329. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
  330. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -0
  331. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  332. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +5 -0
  333. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  334. package/dist/components/Payroll/helpers.d.ts +157 -26
  335. package/dist/components/Payroll/helpers.js +0 -1
  336. package/dist/components/Payroll/helpers.js.map +1 -1
  337. package/dist/components/Payroll/index.d.ts +11 -2
  338. package/dist/components/Payroll/payrollTypes.d.ts +24 -0
  339. package/dist/components/Payroll/payrollTypes.js.map +1 -1
  340. package/dist/components/Payroll/usePreparedPayrollData.d.ts +12 -0
  341. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  342. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  343. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.d.ts +7 -0
  344. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
  345. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +19 -0
  346. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  347. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +44 -0
  348. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  349. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +4 -0
  350. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  351. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -0
  352. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  353. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +28 -2
  354. package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +0 -2
  355. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +26 -0
  356. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  357. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +1 -0
  358. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  359. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +10 -0
  360. package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +25 -0
  361. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  362. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -0
  363. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  364. package/dist/components/TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
  365. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +22 -0
  366. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  367. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +14 -0
  368. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  369. package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +31 -0
  370. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +23 -0
  371. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  372. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -0
  373. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  374. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +10 -0
  375. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +42 -0
  376. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
  377. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +26 -0
  378. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  379. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +15 -2
  380. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js +1 -6
  381. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -1
  382. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +1 -0
  383. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  384. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +29 -0
  385. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  386. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -0
  387. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  388. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +59 -1
  389. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -3
  390. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +1 -0
  391. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  392. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -0
  393. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +43 -42
  394. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  395. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +2 -0
  396. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +1 -0
  397. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  398. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +3 -0
  399. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  400. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +9 -0
  401. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  402. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +25 -0
  403. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  404. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +14 -0
  405. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  406. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +97 -6
  407. package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +1 -5
  408. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +23 -0
  409. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -1
  410. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +22 -0
  411. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -1
  412. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +22 -0
  413. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -1
  414. package/dist/components/TimeOff/index.d.ts +8 -2
  415. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -0
  416. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +48 -49
  417. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  418. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +66 -0
  419. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -0
  420. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  421. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +28 -0
  422. package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +0 -1
  423. package/dist/components/TimeOff/shared/holidayHelpers.d.ts +5 -0
  424. package/dist/components/TimeOff/shared/holidayHelpers.js.map +1 -1
  425. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +4 -4
  426. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +39 -39
  427. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  428. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +42 -42
  429. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  430. package/dist/i18n/en/common.json.d.ts +0 -1
  431. package/dist/i18n/en/common.json.js +2 -2
  432. package/dist/index.d.ts +1 -1
  433. package/dist/index.js +206 -205
  434. package/dist/node_modules/react-dnd/dist/core/DndProvider.js +1 -1
  435. package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -1
  436. package/dist/partner-hook-utils/composeErrorHandler.js +3 -1
  437. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
  438. package/dist/shared/constants.d.ts +12 -1
  439. package/dist/shared/constants.js.map +1 -1
  440. package/dist/style.css +1 -1
  441. package/dist/types/i18next.d.ts +0 -1
  442. package/docs/reference/endpoint-inventory.json +55 -0
  443. package/package.json +24 -11
  444. package/dist/assets/icons/feature-icon-check.svg.js +0 -10
  445. package/dist/assets/icons/feature-icon-check.svg.js.map +0 -1
  446. package/dist/assets/icons/magnifyingGlass.png.js +0 -5
  447. package/dist/assets/icons/magnifyingGlass.png.js.map +0 -1
  448. package/dist/components/Payroll/PayrollEditEmployee/index.d.ts +0 -4
  449. package/dist/components/Payroll/PayrollFlow/index.d.ts +0 -3
  450. package/dist/components/TimeOff/TimeOffFlow/index.d.ts +0 -3
  451. package/dist/components/TimeOff/shared/EmployeeTable/index.d.ts +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"payrollStateMachine.js","sources":["../../../../src/components/Payroll/PayrollFlow/payrollStateMachine.ts"],"sourcesContent":["import { state, transition, reduce, guard } from 'robot3'\nimport type { PayrollPayPeriodType } from '@gusto/embedded-api-v-2025-11-15/models/components/payrollpayperiodtype'\nimport type { PayrollExecutionInitialState } from '../PayrollExecutionFlow'\nimport {\n PayrollLandingContextual,\n PayrollBlockerContextual,\n PayrollOverviewContextual,\n PayrollReceiptsContextual,\n type PayrollFlowContextInterface,\n} from './PayrollFlowComponents'\nimport { PayrollExecutionFlowContextual } from './PayrollExecutionFlowContextual'\nimport { TransitionFlowContextual } from './TransitionFlowContextual'\nimport { OffCycleFlowContextual } from './OffCycleFlowContextual'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { patchBreadcrumbsHeader, updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype PayrollFlowEventPayloads = {\n [componentEvents.RUN_PAYROLL_SELECTED]: {\n payrollUuid: string\n }\n [componentEvents.REVIEW_PAYROLL]: {\n payrollUuid: string\n }\n [componentEvents.RUN_PAYROLL_PROCESSED]: {\n payPeriod?: PayrollPayPeriodType\n payrollUuid?: string\n }\n [componentEvents.RUN_TRANSITION_PAYROLL]: {\n startDate: string\n endDate: string\n payScheduleUuid: string\n }\n}\n\nexport const payrollFlowBreadcrumbsNodes: BreadcrumbNodes = {\n landing: {\n parent: null,\n item: {\n id: 'landing',\n label: 'breadcrumbs.landing',\n namespace: 'Payroll.PayrollLanding',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PayrollLandingContextual,\n payrollUuid: undefined,\n executionInitialState: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n blockers: {\n parent: 'landing',\n item: {\n id: 'blockers',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollBlocker',\n },\n },\n submittedOverview: {\n parent: 'landing',\n item: {\n id: 'submittedOverview',\n label: 'breadcrumbs.overview',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n submittedReceipts: {\n parent: 'landing',\n item: {\n id: 'submittedReceipts',\n label: 'breadcrumbs.receipt',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PayrollFlowContextInterface>()\n\nfunction toLandingReducer(ctx: PayrollFlowContextInterface): PayrollFlowContextInterface {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PayrollLandingContextual,\n payrollUuid: undefined,\n payPeriod: undefined,\n executionInitialState: undefined,\n }\n}\n\nfunction toExecutionReducer(\n ctx: PayrollFlowContextInterface,\n ev: { payload: { payrollUuid: string } },\n executionInitialState: PayrollExecutionInitialState,\n): PayrollFlowContextInterface {\n return {\n ...ctx,\n component: PayrollExecutionFlowContextual,\n payrollUuid: ev.payload.payrollUuid,\n showPayrollCancelledAlert: false,\n executionInitialState,\n }\n}\n\nconst landingBreadcrumbNavigateTransition = transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n 'landing',\n guard(\n (_ctx: PayrollFlowContextInterface, ev: { payload: { key: string } }) =>\n ev.payload.key === 'landing',\n ),\n reduce(toLandingReducer),\n)\n\nconst exitFlowTransition = transition(\n componentEvents.PAYROLL_EXIT_FLOW,\n 'landing',\n reduce(toLandingReducer),\n)\n\nconst cancelledToLandingTransition = transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'landing',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...toLandingReducer(ctx),\n showPayrollCancelledAlert: true,\n }),\n ),\n)\n\nconst processedToSubmittedOverviewTransition = transition(\n componentEvents.RUN_PAYROLL_PROCESSED,\n 'submittedOverview',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<PayrollFlowEventPayloads, typeof componentEvents.RUN_PAYROLL_PROCESSED>,\n ): PayrollFlowContextInterface => {\n const payPeriod = ev.payload.payPeriod ?? ctx.payPeriod\n return {\n ...updateBreadcrumbs('submittedOverview', ctx, {\n startDate: payPeriod?.startDate ?? '',\n endDate: payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n payrollUuid: ev.payload.payrollUuid ?? ctx.payrollUuid,\n payPeriod,\n executionInitialState: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n },\n ),\n)\n\nexport const payrollFlowMachine = {\n landing: state<MachineTransition>(\n transition(\n componentEvents.RUN_PAYROLL_SELECTED,\n 'execution',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<\n PayrollFlowEventPayloads,\n typeof componentEvents.RUN_PAYROLL_SELECTED\n >,\n ) => toExecutionReducer(ctx, ev, 'configuration'),\n ),\n ),\n transition(\n componentEvents.REVIEW_PAYROLL,\n 'execution',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<PayrollFlowEventPayloads, typeof componentEvents.REVIEW_PAYROLL>,\n ) => toExecutionReducer(ctx, ev, 'overview'),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...updateBreadcrumbs('blockers', ctx),\n component: PayrollBlockerContextual,\n showPayrollCancelledAlert: false,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollBlocker',\n },\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED,\n 'landing',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...ctx,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_TRANSITION_PAYROLL,\n 'transition',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<\n PayrollFlowEventPayloads,\n typeof componentEvents.RUN_TRANSITION_PAYROLL\n >,\n ): PayrollFlowContextInterface => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: TransitionFlowContextual,\n transitionStartDate: ev.payload.startDate,\n transitionEndDate: ev.payload.endDate,\n transitionPayScheduleUuid: ev.payload.payScheduleUuid,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_OFF_CYCLE_PAYROLL,\n 'offCycle',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: OffCycleFlowContextual,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n ),\n execution: state<MachineTransition>(\n landingBreadcrumbNavigateTransition,\n exitFlowTransition,\n cancelledToLandingTransition,\n processedToSubmittedOverviewTransition,\n ),\n blockers: state<MachineTransition>(breadcrumbNavigateTransition('landing'), exitFlowTransition),\n submittedOverview: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'submittedReceipts',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...updateBreadcrumbs('submittedReceipts', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollReceiptsContextual,\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollReceipts',\n },\n }),\n ),\n ),\n cancelledToLandingTransition,\n exitFlowTransition,\n ),\n submittedReceipts: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n exitFlowTransition,\n ),\n transition: state<MachineTransition>(\n landingBreadcrumbNavigateTransition,\n exitFlowTransition,\n cancelledToLandingTransition,\n processedToSubmittedOverviewTransition,\n ),\n offCycle: state<MachineTransition>(\n landingBreadcrumbNavigateTransition,\n exitFlowTransition,\n cancelledToLandingTransition,\n processedToSubmittedOverviewTransition,\n ),\n}\n"],"names":["payrollFlowBreadcrumbsNodes","ctx","patchBreadcrumbsHeader","PayrollLandingContextual","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","toLandingReducer","toExecutionReducer","ev","executionInitialState","PayrollExecutionFlowContextual","landingBreadcrumbNavigateTransition","transition","componentEvents","guard","_ctx","reduce","exitFlowTransition","cancelledToLandingTransition","processedToSubmittedOverviewTransition","payPeriod","updateBreadcrumbs","PayrollOverviewContextual","payrollFlowMachine","state","PayrollBlockerContextual","TransitionFlowContextual","OffCycleFlowContextual","PayrollReceiptsContextual"],"mappings":";;;;;;;;AAqCO,MAAMA,IAA+C;AAAA,EAC1D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAsC;AAAA,QAClD,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWE;AAAA,QACX,aAAa;AAAA,QACb,uBAAuB;AAAA,MAAA;AAAA,IACzB;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,mBAAmB;AAAA,IACjB,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;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EAAG,QAAQ;AAAA,UACtC,2BAA2B;AAAA,QAAA;AAAA,MAC7B;AAAA,IACF;AAAA,IAEFI;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAG;AAAA,QACE,CAACf,OAAmE;AAAA,UAClE,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,UACjE,WAAW0B;AAAA,UACX,2BAA2B;AAAA,QAAA;AAAA,MAC7B;AAAA,IACF;AAAA,EACF;AAAA,EAEF,WAAWH;AAAA,IACTb;AAAA,IACAM;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAAA,EAEF,UAAUK,EAAyBpB,EAA6B,SAAS,GAAGa,CAAkB;AAAA,EAC9F,mBAAmBO;AAAA,IACjBpB,EAA6B,SAAS;AAAA,IACtCQ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAG;AAAA,QACE,CAACf,OAAmE;AAAA,UAClE,GAAGoB,EAAkB,qBAAqBpB,GAAK;AAAA,YAC7C,WAAWA,EAAI,WAAW,aAAa;AAAA,YACvC,SAASA,EAAI,WAAW,WAAW;AAAA,UAAA,CACpC;AAAA,UACD,WAAW2B;AAAA,UACX,QAAQ;AAAA,UACR,WAAW;AAAA,YACT,UAAU;AAAA,YACV,WAAW;AAAA,UAAA;AAAA,QACb;AAAA,MACF;AAAA,IACF;AAAA,IAEFV;AAAA,IACAD;AAAA,EAAA;AAAA,EAEF,mBAAmBO;AAAA,IACjBpB,EAA6B,SAAS;AAAA,IACtCa;AAAA,EAAA;AAAA,EAEF,YAAYO;AAAA,IACVb;AAAA,IACAM;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAAA,EAEF,UAAUK;AAAA,IACRb;AAAA,IACAM;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"payrollStateMachine.js","sources":["../../../../src/components/Payroll/PayrollFlow/payrollStateMachine.ts"],"sourcesContent":["import { state, transition, reduce, guard } from 'robot3'\nimport type { PayrollPayPeriodType } from '@gusto/embedded-api-v-2025-11-15/models/components/payrollpayperiodtype'\nimport type { PayrollExecutionInitialState } from '../PayrollExecutionFlow'\nimport {\n PayrollLandingContextual,\n PayrollBlockerContextual,\n PayrollOverviewContextual,\n PayrollReceiptsContextual,\n type PayrollFlowContextInterface,\n} from './PayrollFlowComponents'\nimport { PayrollExecutionFlowContextual } from './PayrollExecutionFlowContextual'\nimport { TransitionFlowContextual } from './TransitionFlowContextual'\nimport { OffCycleFlowContextual } from './OffCycleFlowContextual'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport { patchBreadcrumbsHeader, updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype PayrollFlowEventPayloads = {\n [componentEvents.RUN_PAYROLL_SELECTED]: {\n payrollUuid: string\n }\n [componentEvents.REVIEW_PAYROLL]: {\n payrollUuid: string\n }\n [componentEvents.RUN_PAYROLL_PROCESSED]: {\n payPeriod?: PayrollPayPeriodType\n payrollUuid?: string\n }\n [componentEvents.RUN_TRANSITION_PAYROLL]: {\n startDate: string\n endDate: string\n payScheduleUuid: string\n }\n}\n\n/** @internal */\nexport const payrollFlowBreadcrumbsNodes: BreadcrumbNodes = {\n landing: {\n parent: null,\n item: {\n id: 'landing',\n label: 'breadcrumbs.landing',\n namespace: 'Payroll.PayrollLanding',\n onNavigate: ((ctx: PayrollFlowContextInterface) => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PayrollLandingContextual,\n payrollUuid: undefined,\n executionInitialState: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n blockers: {\n parent: 'landing',\n item: {\n id: 'blockers',\n label: 'breadcrumbLabel',\n namespace: 'Payroll.PayrollBlocker',\n },\n },\n submittedOverview: {\n parent: 'landing',\n item: {\n id: 'submittedOverview',\n label: 'breadcrumbs.overview',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n submittedReceipts: {\n parent: 'landing',\n item: {\n id: 'submittedReceipts',\n label: 'breadcrumbs.receipt',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PayrollFlowContextInterface>()\n\nfunction toLandingReducer(ctx: PayrollFlowContextInterface): PayrollFlowContextInterface {\n return {\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: PayrollLandingContextual,\n payrollUuid: undefined,\n payPeriod: undefined,\n executionInitialState: undefined,\n }\n}\n\nfunction toExecutionReducer(\n ctx: PayrollFlowContextInterface,\n ev: { payload: { payrollUuid: string } },\n executionInitialState: PayrollExecutionInitialState,\n): PayrollFlowContextInterface {\n return {\n ...ctx,\n component: PayrollExecutionFlowContextual,\n payrollUuid: ev.payload.payrollUuid,\n showPayrollCancelledAlert: false,\n executionInitialState,\n }\n}\n\nconst landingBreadcrumbNavigateTransition = transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n 'landing',\n guard(\n (_ctx: PayrollFlowContextInterface, ev: { payload: { key: string } }) =>\n ev.payload.key === 'landing',\n ),\n reduce(toLandingReducer),\n)\n\nconst exitFlowTransition = transition(\n componentEvents.PAYROLL_EXIT_FLOW,\n 'landing',\n reduce(toLandingReducer),\n)\n\nconst cancelledToLandingTransition = transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'landing',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...toLandingReducer(ctx),\n showPayrollCancelledAlert: true,\n }),\n ),\n)\n\nconst processedToSubmittedOverviewTransition = transition(\n componentEvents.RUN_PAYROLL_PROCESSED,\n 'submittedOverview',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<PayrollFlowEventPayloads, typeof componentEvents.RUN_PAYROLL_PROCESSED>,\n ): PayrollFlowContextInterface => {\n const payPeriod = ev.payload.payPeriod ?? ctx.payPeriod\n return {\n ...updateBreadcrumbs('submittedOverview', ctx, {\n startDate: payPeriod?.startDate ?? '',\n endDate: payPeriod?.endDate ?? '',\n }),\n component: PayrollOverviewContextual,\n payrollUuid: ev.payload.payrollUuid ?? ctx.payrollUuid,\n payPeriod,\n executionInitialState: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollOverview',\n },\n }\n },\n ),\n)\n\n/** @internal */\nexport const payrollFlowMachine = {\n landing: state<MachineTransition>(\n transition(\n componentEvents.RUN_PAYROLL_SELECTED,\n 'execution',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<\n PayrollFlowEventPayloads,\n typeof componentEvents.RUN_PAYROLL_SELECTED\n >,\n ) => toExecutionReducer(ctx, ev, 'configuration'),\n ),\n ),\n transition(\n componentEvents.REVIEW_PAYROLL,\n 'execution',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<PayrollFlowEventPayloads, typeof componentEvents.REVIEW_PAYROLL>,\n ) => toExecutionReducer(ctx, ev, 'overview'),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL,\n 'blockers',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...updateBreadcrumbs('blockers', ctx),\n component: PayrollBlockerContextual,\n showPayrollCancelledAlert: false,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollBlocker',\n },\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED,\n 'landing',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...ctx,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_TRANSITION_PAYROLL,\n 'transition',\n reduce(\n (\n ctx: PayrollFlowContextInterface,\n ev: MachineEventType<\n PayrollFlowEventPayloads,\n typeof componentEvents.RUN_TRANSITION_PAYROLL\n >,\n ): PayrollFlowContextInterface => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: TransitionFlowContextual,\n transitionStartDate: ev.payload.startDate,\n transitionEndDate: ev.payload.endDate,\n transitionPayScheduleUuid: ev.payload.payScheduleUuid,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_OFF_CYCLE_PAYROLL,\n 'offCycle',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...patchBreadcrumbsHeader(ctx, { currentBreadcrumbId: undefined }),\n component: OffCycleFlowContextual,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n ),\n execution: state<MachineTransition>(\n landingBreadcrumbNavigateTransition,\n exitFlowTransition,\n cancelledToLandingTransition,\n processedToSubmittedOverviewTransition,\n ),\n blockers: state<MachineTransition>(breadcrumbNavigateTransition('landing'), exitFlowTransition),\n submittedOverview: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'submittedReceipts',\n reduce(\n (ctx: PayrollFlowContextInterface): PayrollFlowContextInterface => ({\n ...updateBreadcrumbs('submittedReceipts', ctx, {\n startDate: ctx.payPeriod?.startDate ?? '',\n endDate: ctx.payPeriod?.endDate ?? '',\n }),\n component: PayrollReceiptsContextual,\n alerts: undefined,\n ctaConfig: {\n labelKey: 'exitFlowCta',\n namespace: 'Payroll.PayrollReceipts',\n },\n }),\n ),\n ),\n cancelledToLandingTransition,\n exitFlowTransition,\n ),\n submittedReceipts: state<MachineTransition>(\n breadcrumbNavigateTransition('landing'),\n exitFlowTransition,\n ),\n transition: state<MachineTransition>(\n landingBreadcrumbNavigateTransition,\n exitFlowTransition,\n cancelledToLandingTransition,\n processedToSubmittedOverviewTransition,\n ),\n offCycle: state<MachineTransition>(\n landingBreadcrumbNavigateTransition,\n exitFlowTransition,\n cancelledToLandingTransition,\n processedToSubmittedOverviewTransition,\n ),\n}\n"],"names":["payrollFlowBreadcrumbsNodes","ctx","patchBreadcrumbsHeader","PayrollLandingContextual","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","toLandingReducer","toExecutionReducer","ev","executionInitialState","PayrollExecutionFlowContextual","landingBreadcrumbNavigateTransition","transition","componentEvents","guard","_ctx","reduce","exitFlowTransition","cancelledToLandingTransition","processedToSubmittedOverviewTransition","payPeriod","updateBreadcrumbs","PayrollOverviewContextual","payrollFlowMachine","state","PayrollBlockerContextual","TransitionFlowContextual","OffCycleFlowContextual","PayrollReceiptsContextual"],"mappings":";;;;;;;;AAsCO,MAAMA,IAA+C;AAAA,EAC1D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAAsC;AAAA,QAClD,GAAGC,EAAuBD,GAAK,EAAE,qBAAqB,QAAW;AAAA,QACjE,WAAWE;AAAA,QACX,aAAa;AAAA,QACb,uBAAuB;AAAA,MAAA;AAAA,IACzB;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,mBAAmB;AAAA,IACjB,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,mBAAmB;AAAA,IACjB,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAEJ,GAEMC,IACJC,EAAA;AAEF,SAASC,EAAiBL,GAA+D;AACvF,SAAO;AAAA,IACL,GAAGC,EAAuBD,GAAK,EAAE,q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,EAEF,WAAWH;AAAA,IACTb;AAAA,IACAM;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAAA,EAEF,UAAUK,EAAyBpB,EAA6B,SAAS,GAAGa,CAAkB;AAAA,EAC9F,mBAAmBO;AAAA,IACjBpB,EAA6B,SAAS;AAAA,IACtCQ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAG;AAAA,QACE,CAACf,OAAmE;AAAA,UAClE,GAAGoB,EAAkB,qBAAqBpB,GAAK;AAAA,YAC7C,WAAWA,EAAI,WAAW,aAAa;AAAA,YACvC,SAASA,EAAI,WAAW,WAAW;AAAA,UAAA,CACpC;AAAA,UACD,WAAW2B;AAAA,UACX,QAAQ;AAAA,UACR,WAAW;AAAA,YACT,UAAU;AAAA,YACV,WAAW;AAAA,UAAA;AAAA,QACb;AAAA,MACF;AAAA,IACF;AAAA,IAEFV;AAAA,IACAD;AAAA,EAAA;AAAA,EAEF,mBAAmBO;AAAA,IACjBpB,EAA6B,SAAS;AAAA,IACtCa;AAAA,EAAA;AAAA,EAEF,YAAYO;AAAA,IACVb;AAAA,IACAM;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAAA,EAEF,UAAUK;AAAA,IACRb;AAAA,IACAM;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAEJ;"}
@@ -1,6 +1,30 @@
1
1
  import { BaseComponentInterface } from '../../Base/Base';
2
+ /**
3
+ * Props for the {@link PayrollHistory} component.
4
+ *
5
+ * @public
6
+ */
2
7
  export interface PayrollHistoryProps extends BaseComponentInterface<'Payroll.PayrollHistory'> {
8
+ /** Identifier of the company whose processed payrolls should be listed. */
3
9
  companyId: string;
4
10
  }
11
+ /**
12
+ * Displays historical payroll records with filtering and management capabilities.
13
+ *
14
+ * @remarks
15
+ * Lists processed regular, off-cycle, and external payrolls for a company and supports filtering by
16
+ * check date (3 months, 6 months, or 1 year), viewing payroll summaries and receipts, and
17
+ * cancelling processed payrolls when they remain within the cancellation window. Each row shows
18
+ * the pay period, payroll type, pay date, status, and total pay amount.
19
+ *
20
+ * | Event | Description | Data |
21
+ * | ----- | ----------- | ---- |
22
+ * | `runPayroll/summary/viewed` | User views a payroll summary | `{ payrollId: string; startDate?: string; endDate?: string }` |
23
+ * | `runPayroll/receipt/viewed` | User views a payroll receipt | `{ payrollId: string; startDate?: string; endDate?: string }` |
24
+ * | `runPayroll/cancelled` | A payroll is cancelled | `{ payrollId: string; result: PayrollsCancelResponse }` |
25
+ *
26
+ * @param props - See {@link PayrollHistoryProps}.
27
+ * @returns The rendered payroll history view.
28
+ * @public
29
+ */
5
30
  export declare function PayrollHistory(props: PayrollHistoryProps): import("react").JSX.Element;
6
- export declare const Root: ({ onEvent, companyId, dictionary }: PayrollHistoryProps) => import("react").JSX.Element;
@@ -78,7 +78,6 @@ const T = ({ onEvent: e, companyId: o, dictionary: p }) => {
78
78
  );
79
79
  };
80
80
  export {
81
- oe as PayrollHistory,
82
- T as Root
81
+ oe as PayrollHistory
83
82
  };
84
83
  //# sourceMappingURL=PayrollHistory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollHistory.js","sources":["../../../../src/components/Payroll/PayrollHistory/PayrollHistory.tsx"],"sourcesContent":["import { useState, useCallback } from 'react'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/payrollsList'\nimport { usePayrollsCancelMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/payrollsCancel'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/wireInRequestsList'\nimport {\n DateFilterBy,\n ProcessingStatuses,\n QueryParamPayrollTypes,\n SortOrder,\n} from '@gusto/embedded-api-v-2025-11-15/models/operations/getv1companiescompanyidpayrolls'\nimport type { Payroll } from '@gusto/embedded-api-v-2025-11-15/models/components/payroll'\nimport { PayrollHistoryPresentation } from './PayrollHistoryPresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport { useDateRangeFilter } from '@/hooks/useDateRangeFilter/useDateRangeFilter'\n\nexport interface PayrollHistoryProps extends BaseComponentInterface<'Payroll.PayrollHistory'> {\n companyId: string\n}\n\nexport function PayrollHistory(props: PayrollHistoryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport const Root = ({ onEvent, companyId, dictionary }: PayrollHistoryProps) => {\n useComponentDictionary('Payroll.PayrollHistory', dictionary)\n useI18n('Payroll.PayrollHistory')\n\n const [cancelDialogItem, setCancelDialogItem] = useState<Payroll | null>(null)\n const { baseSubmitHandler } = useBase()\n const { currentPage, itemsPerPage, getPaginationProps, resetPage } = usePagination()\n\n const dateRangeFilter = useDateRangeFilter({\n onFilterChange: useCallback(() => {\n resetPage()\n }, [resetPage]),\n })\n const dateFilterParams = dateRangeFilter.getApiDateParams()\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processingStatuses: [ProcessingStatuses.Processed],\n payrollTypes: [\n QueryParamPayrollTypes.Regular,\n QueryParamPayrollTypes.OffCycle,\n QueryParamPayrollTypes.External,\n ],\n includeOffCycle: true,\n include: ['totals', 'payroll_status_meta'],\n sortOrder: SortOrder.Desc,\n startDate: dateFilterParams.startDate,\n endDate: dateFilterParams.endDate,\n dateFilterBy: dateRangeFilter.isFilterActive ? DateFilterBy.CheckDate : undefined,\n page: currentPage,\n per: itemsPerPage,\n })\n\n const payrollHistory = payrollsData.payrollList || []\n const paginationProps = getPaginationProps(payrollsData.httpMeta.response.headers)\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const wireInRequests = wireInRequestsData.wireInRequestList ?? []\n\n const { mutateAsync: cancelPayroll, isPending: isCancelling } = usePayrollsCancelMutation()\n\n const handleViewSummary = (payrollId: string, startDate?: string, endDate?: string) => {\n onEvent(componentEvents.RUN_PAYROLL_SUMMARY_VIEWED, { payrollId, startDate, endDate })\n }\n\n const handleViewReceipt = (payrollId: string, startDate?: string, endDate?: string) => {\n onEvent(componentEvents.RUN_PAYROLL_RECEIPT_VIEWED, { payrollId, startDate, endDate })\n }\n\n const handleCancelPayroll = async (item: Payroll) => {\n const payrollId = item.payrollUuid || item.uuid!\n try {\n await baseSubmitHandler(payrollId, async id => {\n const result = await cancelPayroll({\n request: {\n companyId,\n payrollId: id,\n },\n })\n\n onEvent(componentEvents.RUN_PAYROLL_CANCELLED, { payrollId: id, result })\n })\n } finally {\n setCancelDialogItem(null)\n }\n }\n\n return (\n <PayrollHistoryPresentation\n payrollHistory={payrollHistory}\n wireInRequests={wireInRequests}\n pagination={paginationProps}\n onViewSummary={handleViewSummary}\n onViewReceipt={handleViewReceipt}\n onCancelPayroll={handleCancelPayroll}\n cancelDialogItem={cancelDialogItem}\n onCancelDialogOpen={setCancelDialogItem}\n onCancelDialogClose={() => {\n setCancelDialogItem(null)\n }}\n isLoading={isCancelling}\n dateRangeFilter={dateRangeFilter}\n />\n )\n}\n"],"names":["PayrollHistory","props","jsx","BaseComponent","Root","onEvent","companyId","dictionary","useComponentDictionary","useI18n","cancelDialogItem","setCancelDialogItem","useState","baseSubmitHandler","useBase","currentPage","itemsPerPage","getPaginationProps","resetPage","usePagination","dateRangeFilter","useDateRangeFilter","useCallback","dateFilterParams","payrollsData","usePayrollsListSuspense","ProcessingStatuses","QueryParamPayrollTypes","SortOrder","DateFilterBy","payrollHistory","paginationProps","wireInRequestsData","useWireInRequestsListSuspense","wireInRequests","cancelPayroll","isCancelling","usePayrollsCancelMutation","PayrollHistoryPresentation","payrollId","startDate","endDate","componentEvents","item","id","result"],"mappings":";;;;;;;;;;;;;AAwBO,SAASA,GAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,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gBAAAnC;AAAA,IAACoC;AAAA,IAAA;AAAA,MACC,gBAAAR;AAAA,MACA,gBAAAI;AAAA,MACA,YAAYH;AAAA,MACZ,eA/BsB,CAACQ,GAAmBC,GAAoBC,MAAqB;AACrF,QAAApC,EAAQqC,EAAgB,4BAA4B,EAAE,WAAAH,GAAW,WAAAC,GAAW,SAAAC,GAAS;AAAA,MACvF;AAAA,MA8BI,eA5BsB,CAACF,GAAmBC,GAAoBC,MAAqB;AACrF,QAAApC,EAAQqC,EAAgB,4BAA4B,EAAE,WAAAH,GAAW,WAAAC,GAAW,SAAAC,GAAS;AAAA,MACvF;AAAA,MA2BI,iBAzBwB,OAAOE,MAAkB;AACnD,cAAMJ,IAAYI,EAAK,eAAeA,EAAK;AAC3C,YAAI;AACF,gBAAM9B,EAAkB0B,GAAW,OAAMK,MAAM;AAC7C,kBAAMC,IAAS,MAAMV,EAAc;AAAA,cACjC,SAAS;AAAA,gBACP,WAAA7B;AAAA,gBACA,WAAWsC;AAAA,cAAA;AAAA,YACb,CACD;AAED,YAAAvC,EAAQqC,EAAgB,uBAAuB,EAAE,WAAWE,GAAI,QAAAC,GAAQ;AAAA,UAC1E,CAAC;AAAA,QACH,UAAA;AACE,UAAAlC,EAAoB,IAAI;AAAA,QAC1B;AAAA,MACF;AAAA,MAUI,kBAAAD;AAAA,MACA,oBAAoBC;AAAA,MACpB,qBAAqB,MAAM;AACzB,QAAAA,EAAoB,IAAI;AAAA,MAC1B;AAAA,MACA,WAAWyB;AAAA,MACX,iBAAAhB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PayrollHistory.js","sources":["../../../../src/components/Payroll/PayrollHistory/PayrollHistory.tsx"],"sourcesContent":["import { useState, useCallback } from 'react'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/payrollsList'\nimport { usePayrollsCancelMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/payrollsCancel'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/wireInRequestsList'\nimport {\n DateFilterBy,\n ProcessingStatuses,\n QueryParamPayrollTypes,\n SortOrder,\n} from '@gusto/embedded-api-v-2025-11-15/models/operations/getv1companiescompanyidpayrolls'\nimport type { Payroll } from '@gusto/embedded-api-v-2025-11-15/models/components/payroll'\nimport { PayrollHistoryPresentation } from './PayrollHistoryPresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\nimport { useDateRangeFilter } from '@/hooks/useDateRangeFilter/useDateRangeFilter'\n\n/**\n * Props for the {@link PayrollHistory} component.\n *\n * @public\n */\nexport interface PayrollHistoryProps extends BaseComponentInterface<'Payroll.PayrollHistory'> {\n /** Identifier of the company whose processed payrolls should be listed. */\n companyId: string\n}\n\n/**\n * Displays historical payroll records with filtering and management capabilities.\n *\n * @remarks\n * Lists processed regular, off-cycle, and external payrolls for a company and supports filtering by\n * check date (3 months, 6 months, or 1 year), viewing payroll summaries and receipts, and\n * cancelling processed payrolls when they remain within the cancellation window. Each row shows\n * the pay period, payroll type, pay date, status, and total pay amount.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `runPayroll/summary/viewed` | User views a payroll summary | `{ payrollId: string; startDate?: string; endDate?: string }` |\n * | `runPayroll/receipt/viewed` | User views a payroll receipt | `{ payrollId: string; startDate?: string; endDate?: string }` |\n * | `runPayroll/cancelled` | A payroll is cancelled | `{ payrollId: string; result: PayrollsCancelResponse }` |\n *\n * @param props - See {@link PayrollHistoryProps}.\n * @returns The rendered payroll history view.\n * @public\n */\nexport function PayrollHistory(props: PayrollHistoryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ onEvent, companyId, dictionary }: PayrollHistoryProps) => {\n useComponentDictionary('Payroll.PayrollHistory', dictionary)\n useI18n('Payroll.PayrollHistory')\n\n const [cancelDialogItem, setCancelDialogItem] = useState<Payroll | null>(null)\n const { baseSubmitHandler } = useBase()\n const { currentPage, itemsPerPage, getPaginationProps, resetPage } = usePagination()\n\n const dateRangeFilter = useDateRangeFilter({\n onFilterChange: useCallback(() => {\n resetPage()\n }, [resetPage]),\n })\n const dateFilterParams = dateRangeFilter.getApiDateParams()\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processingStatuses: [ProcessingStatuses.Processed],\n payrollTypes: [\n QueryParamPayrollTypes.Regular,\n QueryParamPayrollTypes.OffCycle,\n QueryParamPayrollTypes.External,\n ],\n includeOffCycle: true,\n include: ['totals', 'payroll_status_meta'],\n sortOrder: SortOrder.Desc,\n startDate: dateFilterParams.startDate,\n endDate: dateFilterParams.endDate,\n dateFilterBy: dateRangeFilter.isFilterActive ? DateFilterBy.CheckDate : undefined,\n page: currentPage,\n per: itemsPerPage,\n })\n\n const payrollHistory = payrollsData.payrollList || []\n const paginationProps = getPaginationProps(payrollsData.httpMeta.response.headers)\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const wireInRequests = wireInRequestsData.wireInRequestList ?? []\n\n const { mutateAsync: cancelPayroll, isPending: isCancelling } = usePayrollsCancelMutation()\n\n const handleViewSummary = (payrollId: string, startDate?: string, endDate?: string) => {\n onEvent(componentEvents.RUN_PAYROLL_SUMMARY_VIEWED, { payrollId, startDate, endDate })\n }\n\n const handleViewReceipt = (payrollId: string, startDate?: string, endDate?: string) => {\n onEvent(componentEvents.RUN_PAYROLL_RECEIPT_VIEWED, { payrollId, startDate, endDate })\n }\n\n const handleCancelPayroll = async (item: Payroll) => {\n const payrollId = item.payrollUuid || item.uuid!\n try {\n await baseSubmitHandler(payrollId, async id => {\n const result = await cancelPayroll({\n request: {\n companyId,\n payrollId: id,\n },\n })\n\n onEvent(componentEvents.RUN_PAYROLL_CANCELLED, { payrollId: id, result })\n })\n } finally {\n setCancelDialogItem(null)\n }\n }\n\n return (\n <PayrollHistoryPresentation\n payrollHistory={payrollHistory}\n wireInRequests={wireInRequests}\n pagination={paginationProps}\n onViewSummary={handleViewSummary}\n onViewReceipt={handleViewReceipt}\n onCancelPayroll={handleCancelPayroll}\n cancelDialogItem={cancelDialogItem}\n onCancelDialogOpen={setCancelDialogItem}\n onCancelDialogClose={() => {\n setCancelDialogItem(null)\n }}\n isLoading={isCancelling}\n dateRangeFilter={dateRangeFilter}\n />\n )\n}\n"],"names":["PayrollHistory","props","jsx","BaseComponent","Root","onEvent","companyId","dictionary","useComponentDictionary","useI18n","cancelDialogItem","setCancelDialogItem","useState","baseSubmitHandler","useBase","currentPage","itemsPerPage","getPaginationProps","resetPage","usePagination","dateRangeFilter","useDateRangeFilter","useCallback","dateFilterParams","payrollsData","usePayrollsListSuspense","ProcessingStatuses","QueryParamPayrollTypes","SortOrder","DateFilterBy","payrollHistory","paginationProps","wireInRequestsData","useWireInRequestsListSuspense","wireInRequests","cancelPayroll","isCancelling","usePayrollsCancelMutation","PayrollHistoryPresentation","payrollId","startDate","endDate","componentEvents","item","id","result"],"mappings":";;;;;;;;;;;;;AAiDO,SAASA,GAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,SAAAC,GAAS,WAAAC,GAAW,YAAAC,QAAsC;AACxE,EAAAC,EAAuB,0BAA0BD,CAAU,GAC3DE,EAAQ,wBAAwB;AAEhC,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAyB,IAAI,GACvE,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxB,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,GAAoB,WAAAC,EAAA,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AW,SAAAC,GAAS;AAAA,MACvF;AAAA,MA2BI,iBAzBwB,OAAOE,MAAkB;AACnD,cAAMJ,IAAYI,EAAK,eAAeA,EAAK;AAC3C,YAAI;AACF,gBAAM9B,EAAkB0B,GAAW,OAAMK,MAAM;AAC7C,kBAAMC,IAAS,MAAMV,EAAc;AAAA,cACjC,SAAS;AAAA,gBACP,WAAA7B;AAAA,gBACA,WAAWsC;AAAA,cAAA;AAAA,YACb,CACD;AAED,YAAAvC,EAAQqC,EAAgB,uBAAuB,EAAE,WAAWE,GAAI,QAAAC,GAAQ;AAAA,UAC1E,CAAC;AAAA,QACH,UAAA;AACE,UAAAlC,EAAoB,IAAI;AAAA,QAC1B;AAAA,MACF;AAAA,MAUI,kBAAAD;AAAA,MACA,oBAAoBC;AAAA,MACpB,qBAAqB,MAAM;AACzB,QAAAA,EAAoB,IAAI;AAAA,MAC1B;AAAA,MACA,WAAWyB;AAAA,MACX,iBAAAhB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -15,5 +15,6 @@ interface PayrollHistoryPresentationProps {
15
15
  isLoading?: boolean;
16
16
  dateRangeFilter: UseDateRangeFilterResult;
17
17
  }
18
+ /** @internal */
18
19
  export declare const PayrollHistoryPresentation: ({ payrollHistory, wireInRequests, pagination, onViewSummary, onViewReceipt, onCancelPayroll, cancelDialogItem, onCancelDialogOpen, onCancelDialogClose, isLoading, dateRangeFilter, }: PayrollHistoryPresentationProps) => import("react").JSX.Element;
19
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollHistoryPresentation.js","sources":["../../../../src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Payroll } from '@gusto/embedded-api-v-2025-11-15/models/components/payroll'\nimport type { WireInRequest } from '@gusto/embedded-api-v-2025-11-15/models/components/wireinrequest'\nimport { PayrollStatusBadges } from '../PayrollStatusBadges'\nimport { getPayrollTypeLabel, calculateTotalPayroll, canCancelPayroll } from '../helpers'\nimport type { MenuItem } from '@/components/Common/UI/Menu/MenuTypes'\nimport { DataView, Flex, DateRangeFilter } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { UseDateRangeFilterResult } from '@/hooks/useDateRangeFilter/useDateRangeFilter'\nimport TrashcanIcon from '@/assets/icons/trashcan.svg?react'\nimport FileIcon from '@/assets/icons/icon-file-outline.svg?react'\nimport ReceiptIcon from '@/assets/icons/icon-receipt-outline.svg?react'\nimport { EmptyData } from '@/components/Common/'\n\ninterface PayrollHistoryPresentationProps {\n payrollHistory: Payroll[]\n wireInRequests: WireInRequest[]\n pagination: PaginationControlProps\n onViewSummary: (payrollId: string, startDate?: string, endDate?: string) => void\n onViewReceipt: (payrollId: string, startDate?: string, endDate?: string) => void\n onCancelPayroll: (item: Payroll) => void\n cancelDialogItem: Payroll | null\n onCancelDialogOpen: (item: Payroll) => void\n onCancelDialogClose: () => void\n isLoading?: boolean\n dateRangeFilter: UseDateRangeFilterResult\n}\n\nexport const PayrollHistoryPresentation = ({\n payrollHistory,\n wireInRequests,\n pagination,\n onViewSummary,\n onViewReceipt,\n onCancelPayroll,\n cancelDialogItem,\n onCancelDialogOpen,\n onCancelDialogClose,\n isLoading = false,\n dateRangeFilter,\n}: PayrollHistoryPresentationProps) => {\n const { Heading, Text, Dialog } = useComponentContext()\n useI18n('Payroll.PayrollHistory')\n const { t } = useTranslation('Payroll.PayrollHistory')\n const dateFormatter = useDateFormatter()\n\n const formatDeadlineForDialog = (item: Payroll): string => {\n const deadline = item.payrollDeadline\n if (!deadline) return ''\n\n const deadlineDate = new Date(deadline)\n const timeZone = 'America/New_York'\n\n const formatter = new Intl.DateTimeFormat('en-US', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n })\n\n const timeFormatter = new Intl.DateTimeFormat('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short',\n timeZone,\n })\n\n const dateStr = formatter.format(deadlineDate)\n const timeStr = timeFormatter.format(deadlineDate)\n\n return `${timeStr} on ${dateStr}`\n }\n\n const handleCancelClick = (item: Payroll) => {\n onCancelDialogOpen(item)\n }\n\n const handleConfirmCancel = () => {\n if (cancelDialogItem) {\n onCancelPayroll(cancelDialogItem)\n }\n }\n\n const getMenuItems = (item: Payroll): MenuItem[] => {\n const payrollId = item.payrollUuid || item.uuid!\n const items: MenuItem[] = [\n {\n label: t('menu.viewSummary'),\n icon: <FileIcon aria-hidden />,\n onClick: () => {\n onViewSummary(payrollId, item.payPeriod?.startDate, item.payPeriod?.endDate)\n },\n },\n {\n label: t('menu.viewReceipt'),\n icon: <ReceiptIcon aria-hidden />,\n onClick: () => {\n onViewReceipt(payrollId, item.payPeriod?.startDate, item.payPeriod?.endDate)\n },\n },\n ]\n\n if (canCancelPayroll(item)) {\n items.push({\n label: t('menu.cancelPayroll'),\n icon: <TrashcanIcon aria-hidden />,\n onClick: () => {\n handleCancelClick(item)\n },\n 'data-destructive': 'true',\n })\n }\n\n return items\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Heading as=\"h2\">{t('title')}</Heading>\n <DateRangeFilter\n startDate={dateRangeFilter.filterStartDate}\n endDate={dateRangeFilter.filterEndDate}\n onStartDateChange={dateRangeFilter.handleStartDateChange}\n onEndDateChange={dateRangeFilter.handleEndDateChange}\n onClear={dateRangeFilter.handleClearFilter}\n startDateLabel={t('dateFilter.startDate')}\n endDateLabel={t('dateFilter.endDate')}\n applyLabel={t('dateFilter.apply')}\n cancelLabel={t('dateFilter.cancel')}\n resetLabel={t('dateFilter.reset')}\n selectDatesLabel={t('dateFilter.selectDates')}\n triggerLabel={t('dateFilter.trigger')}\n isFilterActive={dateRangeFilter.isFilterActive}\n maxEndDate={dateRangeFilter.getMaxEndDate()}\n minStartDate={dateRangeFilter.getMinStartDate()}\n />\n </Flex>\n\n <DataView\n label={t('dataView.label')}\n pagination={pagination}\n emptyState={() => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n )}\n columns={[\n {\n title: t('columns.payPeriod'),\n render: (item: Payroll) =>\n dateFormatter.formatPayPeriodRange(\n item.payPeriod?.startDate,\n item.payPeriod?.endDate,\n ),\n },\n {\n title: t('columns.type'),\n render: (item: Payroll) => getPayrollTypeLabel(item),\n },\n {\n title: t('columns.payDate'),\n render: (item: Payroll) => dateFormatter.formatShortWithYear(item.checkDate),\n },\n {\n title: t('columns.status'),\n render: (item: Payroll) => {\n const wireInRequest = wireInRequests.find(\n wire => wire.paymentUuid === item.payrollUuid,\n )\n return <PayrollStatusBadges payroll={item} wireInRequest={wireInRequest} />\n },\n },\n {\n title: t('columns.totalPayroll'),\n render: (item: Payroll) => formatNumberAsCurrency(calculateTotalPayroll(item)),\n },\n ]}\n data={payrollHistory}\n itemMenu={(item: Payroll) => <HamburgerMenu items={getMenuItems(item)} />}\n />\n\n <Dialog\n isOpen={!!cancelDialogItem}\n onClose={onCancelDialogClose}\n onPrimaryActionClick={handleConfirmCancel}\n isDestructive\n isPrimaryActionLoading={isLoading}\n primaryActionLabel={t('cancelDialog.primaryAction')}\n closeActionLabel={t('cancelDialog.secondaryAction')}\n title={\n cancelDialogItem\n ? t('cancelDialog.title', {\n payPeriod: dateFormatter.formatPayPeriodRange(\n cancelDialogItem.payPeriod?.startDate,\n cancelDialogItem.payPeriod?.endDate,\n ),\n })\n : ''\n }\n >\n {cancelDialogItem && (\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('cancelDialog.body')}</Text>\n {cancelDialogItem.payrollDeadline && (\n <Text>\n {t('cancelDialog.deadline', {\n deadline: formatDeadlineForDialog(cancelDialogItem),\n })}\n </Text>\n )}\n </Flex>\n )}\n </Dialog>\n </Flex>\n )\n}\n"],"names":["PayrollHistoryPresentation","payrollHistory","wireInRequests","pagination","onViewSummary","onViewReceipt","onCancelPayroll","cancelDialogItem","onCancelDialogOpen","onCancelDialogClose","isLoading","dateRangeFilter","Heading","Text","Dialog","useComponentContext","useI18n","useTranslation","dateFormatter","useDateFormatter","formatDeadlineForDialog","item","deadline","deadlineDate","timeZone","formatter","timeFormatter","dateStr","handleCancelClick","handleConfirmCancel","getMenuItems","payrollId","items","jsx","FileIcon","ReceiptIcon","canCancelPayroll","TrashcanIcon","jsxs","Flex","DateRangeFilter","DataView","EmptyData","getPayrollTypeLabel","wireInRequest","wire","PayrollStatusBadges","formatNumberAsCurrency","calculateTotalPayroll","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;AAiCO,MAAMA,KAA6B,CAAC;AAAA,EACzC,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,iBAAAC;AACF,MAAuC;AACrC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA;AAClC,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAgBC,EAAA,GAEhBC,IAA0B,CAACC,MAA0B;AACzD,UAAMC,IAAWD,EAAK;AACtB,QAAI,CAACC,EAAU,QAAO;AAEtB,UAAMC,IAAe,IAAI,KAAKD,CAAQ,GAChCE,IAAW,oBAEXC,IAAY,IAAI,KAAK,eAAe,SAAS;AAAA,MACjD,SAAS;AAAA,MACT,OAAO;AAAA,MACP,KAAK;AAAA,MACL,UAAAD;AAAA,IAAA,CACD,GAEKE,IAAgB,IAAI,KAAK,eAAe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A,CACnD,EAAA,CACH;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
1
+ {"version":3,"file":"PayrollHistoryPresentation.js","sources":["../../../../src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Payroll } from '@gusto/embedded-api-v-2025-11-15/models/components/payroll'\nimport type { WireInRequest } from '@gusto/embedded-api-v-2025-11-15/models/components/wireinrequest'\nimport { PayrollStatusBadges } from '../PayrollStatusBadges'\nimport { getPayrollTypeLabel, calculateTotalPayroll, canCancelPayroll } from '../helpers'\nimport type { MenuItem } from '@/components/Common/UI/Menu/MenuTypes'\nimport { DataView, Flex, DateRangeFilter } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { UseDateRangeFilterResult } from '@/hooks/useDateRangeFilter/useDateRangeFilter'\nimport TrashcanIcon from '@/assets/icons/trashcan.svg?react'\nimport FileIcon from '@/assets/icons/icon-file-outline.svg?react'\nimport ReceiptIcon from '@/assets/icons/icon-receipt-outline.svg?react'\nimport { EmptyData } from '@/components/Common/'\n\ninterface PayrollHistoryPresentationProps {\n payrollHistory: Payroll[]\n wireInRequests: WireInRequest[]\n pagination: PaginationControlProps\n onViewSummary: (payrollId: string, startDate?: string, endDate?: string) => void\n onViewReceipt: (payrollId: string, startDate?: string, endDate?: string) => void\n onCancelPayroll: (item: Payroll) => void\n cancelDialogItem: Payroll | null\n onCancelDialogOpen: (item: Payroll) => void\n onCancelDialogClose: () => void\n isLoading?: boolean\n dateRangeFilter: UseDateRangeFilterResult\n}\n\n/** @internal */\nexport const PayrollHistoryPresentation = ({\n payrollHistory,\n wireInRequests,\n pagination,\n onViewSummary,\n onViewReceipt,\n onCancelPayroll,\n cancelDialogItem,\n onCancelDialogOpen,\n onCancelDialogClose,\n isLoading = false,\n dateRangeFilter,\n}: PayrollHistoryPresentationProps) => {\n const { Heading, Text, Dialog } = useComponentContext()\n useI18n('Payroll.PayrollHistory')\n const { t } = useTranslation('Payroll.PayrollHistory')\n const dateFormatter = useDateFormatter()\n\n const formatDeadlineForDialog = (item: Payroll): string => {\n const deadline = item.payrollDeadline\n if (!deadline) return ''\n\n const deadlineDate = new Date(deadline)\n const timeZone = 'America/New_York'\n\n const formatter = new Intl.DateTimeFormat('en-US', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n })\n\n const timeFormatter = new Intl.DateTimeFormat('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short',\n timeZone,\n })\n\n const dateStr = formatter.format(deadlineDate)\n const timeStr = timeFormatter.format(deadlineDate)\n\n return `${timeStr} on ${dateStr}`\n }\n\n const handleCancelClick = (item: Payroll) => {\n onCancelDialogOpen(item)\n }\n\n const handleConfirmCancel = () => {\n if (cancelDialogItem) {\n onCancelPayroll(cancelDialogItem)\n }\n }\n\n const getMenuItems = (item: Payroll): MenuItem[] => {\n const payrollId = item.payrollUuid || item.uuid!\n const items: MenuItem[] = [\n {\n label: t('menu.viewSummary'),\n icon: <FileIcon aria-hidden />,\n onClick: () => {\n onViewSummary(payrollId, item.payPeriod?.startDate, item.payPeriod?.endDate)\n },\n },\n {\n label: t('menu.viewReceipt'),\n icon: <ReceiptIcon aria-hidden />,\n onClick: () => {\n onViewReceipt(payrollId, item.payPeriod?.startDate, item.payPeriod?.endDate)\n },\n },\n ]\n\n if (canCancelPayroll(item)) {\n items.push({\n label: t('menu.cancelPayroll'),\n icon: <TrashcanIcon aria-hidden />,\n onClick: () => {\n handleCancelClick(item)\n },\n 'data-destructive': 'true',\n })\n }\n\n return items\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Heading as=\"h2\">{t('title')}</Heading>\n <DateRangeFilter\n startDate={dateRangeFilter.filterStartDate}\n endDate={dateRangeFilter.filterEndDate}\n onStartDateChange={dateRangeFilter.handleStartDateChange}\n onEndDateChange={dateRangeFilter.handleEndDateChange}\n onClear={dateRangeFilter.handleClearFilter}\n startDateLabel={t('dateFilter.startDate')}\n endDateLabel={t('dateFilter.endDate')}\n applyLabel={t('dateFilter.apply')}\n cancelLabel={t('dateFilter.cancel')}\n resetLabel={t('dateFilter.reset')}\n selectDatesLabel={t('dateFilter.selectDates')}\n triggerLabel={t('dateFilter.trigger')}\n isFilterActive={dateRangeFilter.isFilterActive}\n maxEndDate={dateRangeFilter.getMaxEndDate()}\n minStartDate={dateRangeFilter.getMinStartDate()}\n />\n </Flex>\n\n <DataView\n label={t('dataView.label')}\n pagination={pagination}\n emptyState={() => (\n <EmptyData title={t('emptyState.title')} description={t('emptyState.description')} />\n )}\n columns={[\n {\n title: t('columns.payPeriod'),\n render: (item: Payroll) =>\n dateFormatter.formatPayPeriodRange(\n item.payPeriod?.startDate,\n item.payPeriod?.endDate,\n ),\n },\n {\n title: t('columns.type'),\n render: (item: Payroll) => getPayrollTypeLabel(item),\n },\n {\n title: t('columns.payDate'),\n render: (item: Payroll) => dateFormatter.formatShortWithYear(item.checkDate),\n },\n {\n title: t('columns.status'),\n render: (item: Payroll) => {\n const wireInRequest = wireInRequests.find(\n wire => wire.paymentUuid === item.payrollUuid,\n )\n return <PayrollStatusBadges payroll={item} wireInRequest={wireInRequest} />\n },\n },\n {\n title: t('columns.totalPayroll'),\n render: (item: Payroll) => formatNumberAsCurrency(calculateTotalPayroll(item)),\n },\n ]}\n data={payrollHistory}\n itemMenu={(item: Payroll) => <HamburgerMenu items={getMenuItems(item)} />}\n />\n\n <Dialog\n isOpen={!!cancelDialogItem}\n onClose={onCancelDialogClose}\n onPrimaryActionClick={handleConfirmCancel}\n isDestructive\n isPrimaryActionLoading={isLoading}\n primaryActionLabel={t('cancelDialog.primaryAction')}\n closeActionLabel={t('cancelDialog.secondaryAction')}\n title={\n cancelDialogItem\n ? t('cancelDialog.title', {\n payPeriod: dateFormatter.formatPayPeriodRange(\n cancelDialogItem.payPeriod?.startDate,\n cancelDialogItem.payPeriod?.endDate,\n ),\n })\n : ''\n }\n >\n {cancelDialogItem && (\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('cancelDialog.body')}</Text>\n {cancelDialogItem.payrollDeadline && (\n <Text>\n {t('cancelDialog.deadline', {\n deadline: formatDeadlineForDialog(cancelDialogItem),\n })}\n </Text>\n )}\n </Flex>\n )}\n </Dialog>\n </Flex>\n )\n}\n"],"names":["PayrollHistoryPresentation","payrollHistory","wireInRequests","pagination","onViewSummary","onViewReceipt","onCancelPayroll","cancelDialogItem","onCancelDialogOpen","onCancelDialogClose","isLoading","dateRangeFilter","Heading","Text","Dialog","useComponentContext","useI18n","useTranslation","dateFormatter","useDateFormatter","formatDeadlineForDialog","item","deadline","deadlineDate","timeZone","formatter","timeFormatter","dateStr","handleCancelClick","handleConfirmCancel","getMenuItems","payrollId","items","jsx","FileIcon","ReceiptIcon","canCancelPayroll","TrashcanIcon","jsxs","Flex","DateRangeFilter","DataView","EmptyData","getPayrollTypeLabel","wireInRequest","wire","PayrollStatusBadges","formatNumberAsCurrency","calculateTotalPayroll","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;AAkCO,MAAMA,KAA6B,CAAC;AAAA,EACzC,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,iBAAAC;AACF,MAAuC;AACrC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,EAAA,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ClD,OACEH,IACI,EAAE,sBAAsB;AAAA,UACtB,WAAWW,EAAc;AAAA,YACvBX,EAAiB,WAAW;AAAA,YAC5BA,EAAiB,WAAW;AAAA,UAAA;AAAA,QAC9B,CACD,IACD;AAAA,QAGL,eACC,gBAAA+B,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,UAAA,gBAAAN,EAACpB,GAAA,EAAM,UAAA,EAAE,mBAAmB,EAAA,CAAE;AAAA,UAC7BN,EAAiB,mBAChB,gBAAA0B,EAACpB,GAAA,EACE,YAAE,yBAAyB;AAAA,YAC1B,UAAUO,EAAwBb,CAAgB;AAAA,UAAA,CACnD,EAAA,CACH;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
@@ -1,12 +1,41 @@
1
1
  import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
2
- import { PayrollLandingFlowProps } from './PayrollLandingFlowComponents';
3
2
  import { BaseComponentInterface } from '../../Base/Base';
4
- interface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
3
+ /**
4
+ * Props for {@link PayrollLanding}.
5
+ *
6
+ * @public
7
+ */
8
+ export interface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
9
+ /** The associated company identifier. */
5
10
  companyId: string;
11
+ /** Whether to show reimbursement fields throughout the landing flow. Defaults to `true`. */
6
12
  withReimbursements?: boolean;
13
+ /** Custom component that replaces the default wire details confirmation UI. */
7
14
  ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
15
+ /** When `true`, displays a dismissible success alert indicating a payroll was cancelled. */
8
16
  showPayrollCancelledAlert?: boolean;
9
17
  }
18
+ /**
19
+ * Main landing surface for payroll operations, with tabs for running payroll and
20
+ * viewing payroll history, plus inline navigation to a payroll's overview and receipt.
21
+ *
22
+ * @remarks
23
+ * | Event | Description | Data |
24
+ * | ----- | ----------- | ---- |
25
+ * | `runPayroll/selected` | User selected a payroll to run | `{ payrollUuid: string, payPeriod: object }` |
26
+ * | `payroll/review` | User selected a calculated payroll to review | `{ payrollUuid: string, payPeriod: object }` |
27
+ * | `payroll/skipped` | A payroll was skipped | `{ payrollId: string }` |
28
+ * | `payroll/deleted` | A cancellable off-cycle payroll was deleted | `{ payrollId: string }` |
29
+ * | `runPayroll/offCycle/start` | User clicked the Run off-cycle call-to-action | — |
30
+ * | `transition/runPayroll` | User started a pending transition payroll | — |
31
+ * | `runPayroll/summary/viewed` | User opened a payroll's summary view | `{ payrollId: string }` |
32
+ * | `runPayroll/receipt/viewed` | User opened a payroll's receipt view | `{ payrollId: string }` |
33
+ * | `runPayroll/blockers/viewAll` | User opened the full list of payroll blockers | — |
34
+ * | `runPayroll/cancelled` | A payroll was cancelled | `{ payrollId: string, result: object }` |
35
+ * | `runPayroll/cancelled/alertDismissed` | User dismissed the payroll-cancelled success alert | — |
36
+ *
37
+ * @param props - See {@link PayrollLandingProps}.
38
+ * @returns The payroll landing flow.
39
+ * @public
40
+ */
10
41
  export declare function PayrollLanding(props: PayrollLandingProps): import("react").JSX.Element;
11
- export declare function PayrollLandingFlow({ companyId, onEvent, dictionary, withReimbursements, ConfirmWireDetailsComponent, showPayrollCancelledAlert, }: PayrollLandingFlowProps): import("react").JSX.Element;
12
- export {};
@@ -42,7 +42,6 @@ function L({
42
42
  return /* @__PURE__ */ o(b, { onEvent: t, machine: i });
43
43
  }
44
44
  export {
45
- k as PayrollLanding,
46
- L as PayrollLandingFlow
45
+ k as PayrollLanding
47
46
  };
48
47
  //# sourceMappingURL=PayrollLanding.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollLanding.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLanding.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport type { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails'\nimport { payrollLandingMachine, payrollLandingBreadcrumbNodes } from './payrollLandingStateMachine'\nimport {\n PayrollLandingTabsContextual,\n type PayrollLandingFlowContextInterface,\n type PayrollLandingFlowProps,\n} from './PayrollLandingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useComponentDictionary } from '@/i18n'\nimport { buildBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\ninterface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n showPayrollCancelledAlert?: boolean\n}\n\nexport function PayrollLanding(props: PayrollLandingProps) {\n return (\n <BaseComponent {...props}>\n <PayrollLandingFlow {...props} />\n </BaseComponent>\n )\n}\n\nexport function PayrollLandingFlow({\n companyId,\n onEvent,\n dictionary,\n withReimbursements = true,\n ConfirmWireDetailsComponent,\n showPayrollCancelledAlert,\n}: PayrollLandingFlowProps) {\n useComponentDictionary('Payroll.PayrollLanding', dictionary)\n\n const machine = useMemo(\n () =>\n createMachine(\n 'tabs',\n payrollLandingMachine,\n (initialContext: PayrollLandingFlowContextInterface) => ({\n ...initialContext,\n component: PayrollLandingTabsContextual,\n companyId,\n selectedTab: 'run-payroll',\n withReimbursements,\n ConfirmWireDetailsComponent,\n header: {\n type: 'breadcrumbs' as const,\n breadcrumbs: buildBreadcrumbs(payrollLandingBreadcrumbNodes),\n },\n showPayrollCancelledAlert,\n }),\n ),\n [companyId, withReimbursements, ConfirmWireDetailsComponent, showPayrollCancelledAlert],\n )\n\n return <Flow onEvent={onEvent} machine={machine} />\n}\n"],"names":["PayrollLanding","props","jsx","BaseComponent","PayrollLandingFlow","companyId","onEvent","dictionary","withReimbursements","ConfirmWireDetailsComponent","showPayrollCancelledAlert","useComponentDictionary","machine","useMemo","createMachine","payrollLandingMachine","initialContext","PayrollLandingTabsContextual","buildBreadcrumbs","payrollLandingBreadcrumbNodes","Flow"],"mappings":";;;;;;;;;AAsBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAoB,GAAGH,GAAO,EAAA,CACjC;AAEJ;AAEO,SAASG,EAAmB;AAAA,EACjC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC,IAAqB;AAAA,EACrB,6BAAAC;AAAA,EACA,2BAAAC;AACF,GAA4B;AAC1B,EAAAC,EAAuB,0BAA0BJ,CAAU;AAE3D,QAAMK,IAAUC;AAAA,IACd,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAwD;AAAA,QACvD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAZ;AAAA,QACA,aAAa;AAAA,QACb,oBAAAG;AAAA,QACA,6BAAAC;AAAA,QACA,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,aAAaS,EAAiBC,CAA6B;AAAA,QAAA;AAAA,QAE7D,2BAAAT;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACL,GAAWG,GAAoBC,GAA6BC,CAAyB;AAAA,EAAA;AAGxF,SAAO,gBAAAR,EAACkB,GAAA,EAAK,SAAAd,GAAkB,SAAAM,EAAA,CAAkB;AACnD;"}
1
+ {"version":3,"file":"PayrollLanding.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLanding.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport type { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails'\nimport { payrollLandingMachine, payrollLandingBreadcrumbNodes } from './payrollLandingStateMachine'\nimport {\n PayrollLandingTabsContextual,\n type PayrollLandingFlowContextInterface,\n type PayrollLandingFlowProps,\n} from './PayrollLandingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useComponentDictionary } from '@/i18n'\nimport { buildBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\n/**\n * Props for {@link PayrollLanding}.\n *\n * @public\n */\nexport interface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n /** The associated company identifier. */\n companyId: string\n /** Whether to show reimbursement fields throughout the landing flow. Defaults to `true`. */\n withReimbursements?: boolean\n /** Custom component that replaces the default wire details confirmation UI. */\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n /** When `true`, displays a dismissible success alert indicating a payroll was cancelled. */\n showPayrollCancelledAlert?: boolean\n}\n\n/**\n * Main landing surface for payroll operations, with tabs for running payroll and\n * viewing payroll history, plus inline navigation to a payroll's overview and receipt.\n *\n * @remarks\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `runPayroll/selected` | User selected a payroll to run | `{ payrollUuid: string, payPeriod: object }` |\n * | `payroll/review` | User selected a calculated payroll to review | `{ payrollUuid: string, payPeriod: object }` |\n * | `payroll/skipped` | A payroll was skipped | `{ payrollId: string }` |\n * | `payroll/deleted` | A cancellable off-cycle payroll was deleted | `{ payrollId: string }` |\n * | `runPayroll/offCycle/start` | User clicked the Run off-cycle call-to-action | — |\n * | `transition/runPayroll` | User started a pending transition payroll | — |\n * | `runPayroll/summary/viewed` | User opened a payroll's summary view | `{ payrollId: string }` |\n * | `runPayroll/receipt/viewed` | User opened a payroll's receipt view | `{ payrollId: string }` |\n * | `runPayroll/blockers/viewAll` | User opened the full list of payroll blockers | — |\n * | `runPayroll/cancelled` | A payroll was cancelled | `{ payrollId: string, result: object }` |\n * | `runPayroll/cancelled/alertDismissed` | User dismissed the payroll-cancelled success alert | — |\n *\n * @param props - See {@link PayrollLandingProps}.\n * @returns The payroll landing flow.\n * @public\n */\nexport function PayrollLanding(props: PayrollLandingProps) {\n return (\n <BaseComponent {...props}>\n <PayrollLandingFlow {...props} />\n </BaseComponent>\n )\n}\n\nfunction PayrollLandingFlow({\n companyId,\n onEvent,\n dictionary,\n withReimbursements = true,\n ConfirmWireDetailsComponent,\n showPayrollCancelledAlert,\n}: PayrollLandingFlowProps) {\n useComponentDictionary('Payroll.PayrollLanding', dictionary)\n\n const machine = useMemo(\n () =>\n createMachine(\n 'tabs',\n payrollLandingMachine,\n (initialContext: PayrollLandingFlowContextInterface) => ({\n ...initialContext,\n component: PayrollLandingTabsContextual,\n companyId,\n selectedTab: 'run-payroll',\n withReimbursements,\n ConfirmWireDetailsComponent,\n header: {\n type: 'breadcrumbs' as const,\n breadcrumbs: buildBreadcrumbs(payrollLandingBreadcrumbNodes),\n },\n showPayrollCancelledAlert,\n }),\n ),\n [companyId, withReimbursements, ConfirmWireDetailsComponent, showPayrollCancelledAlert],\n )\n\n return <Flow onEvent={onEvent} machine={machine} />\n}\n"],"names":["PayrollLanding","props","jsx","BaseComponent","PayrollLandingFlow","companyId","onEvent","dictionary","withReimbursements","ConfirmWireDetailsComponent","showPayrollCancelledAlert","useComponentDictionary","machine","useMemo","createMachine","payrollLandingMachine","initialContext","PayrollLandingTabsContextual","buildBreadcrumbs","payrollLandingBreadcrumbNodes","Flow"],"mappings":";;;;;;;;;AAsDO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAoB,GAAGH,GAAO,EAAA,CACjC;AAEJ;AAEA,SAASG,EAAmB;AAAA,EAC1B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC,IAAqB;AAAA,EACrB,6BAAAC;AAAA,EACA,2BAAAC;AACF,GAA4B;AAC1B,EAAAC,EAAuB,0BAA0BJ,CAAU;AAE3D,QAAMK,IAAUC;AAAA,IACd,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAwD;AAAA,QACvD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAZ;AAAA,QACA,aAAa;AAAA,QACb,oBAAAG;AAAA,QACA,6BAAAC;AAAA,QACA,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,aAAaS,EAAiBC,CAA6B;AAAA,QAAA;AAAA,QAE7D,2BAAAT;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACL,GAAWG,GAAoBC,GAA6BC,CAAyB;AAAA,EAAA;AAGxF,SAAO,gBAAAR,EAACkB,GAAA,EAAK,SAAAd,GAAkB,SAAAM,EAAA,CAAkB;AACnD;"}
@@ -1,24 +1,43 @@
1
1
  import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
2
2
  import { BaseComponentInterface } from '../../Base/Base';
3
3
  import { FlowContextInterface } from '../../Flow/useFlow';
4
+ /** @internal */
4
5
  export interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
6
+ /** @internal */
5
7
  companyId: string;
8
+ /** @internal */
6
9
  withReimbursements?: boolean;
10
+ /** @internal */
7
11
  ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
12
+ /** @internal */
8
13
  showPayrollCancelledAlert?: boolean;
9
14
  }
15
+ /** @internal */
10
16
  export interface PayrollLandingFlowContextInterface extends FlowContextInterface {
17
+ /** @internal */
11
18
  component: (() => React.JSX.Element) | null;
19
+ /** @internal */
12
20
  companyId: string;
21
+ /** @internal */
13
22
  payrollUuid?: string;
23
+ /** @internal */
14
24
  previousState?: 'tabs' | 'overview';
25
+ /** @internal */
15
26
  selectedTab?: string;
27
+ /** @internal */
16
28
  withReimbursements: boolean;
29
+ /** @internal */
17
30
  ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
31
+ /** @internal */
18
32
  startDate?: string;
33
+ /** @internal */
19
34
  endDate?: string;
35
+ /** @internal */
20
36
  showPayrollCancelledAlert?: boolean;
21
37
  }
38
+ /** @internal */
22
39
  export declare function PayrollLandingTabsContextual(): import("react").JSX.Element;
40
+ /** @internal */
23
41
  export declare function PayrollLandingReceiptsContextual(): import("react").JSX.Element;
42
+ /** @internal */
24
43
  export declare function PayrollLandingOverviewContextual(): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollLandingFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/wireInRequestsList'\nimport { usePayrollsGetBlockersSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/payrollsGetBlockers'\nimport { PayrollHistory } from '../PayrollHistory/PayrollHistory'\nimport { PayrollList } from '../PayrollList/PayrollList'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport {\n ConfirmWireDetails,\n type ConfirmWireDetailsComponentType,\n} from '../ConfirmWireDetails/ConfirmWireDetails'\nimport type { ApiPayrollBlocker } from '../PayrollBlocker/payrollHelpers'\nimport { PayrollBlockerAlerts } from '../PayrollBlocker/components/PayrollBlockerAlerts'\nimport { TransitionPayrollAlert } from '../TransitionPayrollAlert'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n showPayrollCancelledAlert?: boolean\n}\n\nexport interface PayrollLandingFlowContextInterface extends FlowContextInterface {\n component: (() => React.JSX.Element) | null\n companyId: string\n payrollUuid?: string\n previousState?: 'tabs' | 'overview'\n selectedTab?: string\n withReimbursements: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n startDate?: string\n endDate?: string\n showPayrollCancelledAlert?: boolean\n}\n\nexport function PayrollLandingTabsContextual() {\n const {\n companyId,\n onEvent,\n selectedTab = 'run-payroll',\n ConfirmWireDetailsComponent = ConfirmWireDetails,\n showPayrollCancelledAlert,\n } = useFlow<PayrollLandingFlowContextInterface>()\n const [currentTab, setCurrentTab] = useState(selectedTab)\n const { Tabs, Alert } = useComponentContext()\n\n useI18n('Payroll.PayrollLanding')\n const { t } = useTranslation('Payroll.PayrollLanding')\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: ensureRequired(companyId),\n })\n\n const hasActiveWireInRequests = (wireInRequestsData.wireInRequestList || []).some(\n r => r.status === 'awaiting_funds',\n )\n\n const handleDismissPayrollCancelledAlert = () => {\n onEvent(componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED)\n }\n\n const { data: blockersData } = usePayrollsGetBlockersSuspense({\n companyUuid: ensureRequired(companyId),\n })\n\n const payrollBlockerList = blockersData.payrollBlockers ?? []\n\n const blockers: ApiPayrollBlocker[] = payrollBlockerList.map(\n (blocker: { key?: string; message?: string }) => ({\n key: blocker.key ?? 'unknown',\n message: blocker.message,\n }),\n )\n\n const onViewBlockers = () => {\n onEvent(componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL)\n }\n\n const tabs = [\n {\n id: 'run-payroll',\n label: t('tabs.runPayroll'),\n content: <PayrollList companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n {\n id: 'payroll-history',\n label: t('tabs.payrollHistory'),\n content: <PayrollHistory companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n {showPayrollCancelledAlert && (\n <Alert\n status=\"success\"\n label={t('alerts.payrollCancelled')}\n onDismiss={handleDismissPayrollCancelledAlert}\n />\n )}\n {hasActiveWireInRequests && (\n <ConfirmWireDetailsComponent companyId={ensureRequired(companyId)} onEvent={onEvent} />\n )}\n <TransitionPayrollAlert companyId={ensureRequired(companyId)} onEvent={onEvent} />\n <PayrollBlockerAlerts blockers={blockers} onViewBlockersClick={onViewBlockers} />\n <Tabs\n tabs={tabs}\n selectedId={currentTab}\n onSelectionChange={setCurrentTab}\n aria-label={t('aria.tabNavigation')}\n />\n </Flex>\n )\n}\n\nexport function PayrollLandingReceiptsContextual() {\n const { payrollUuid, onEvent, withReimbursements } = useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollReceipts\n onEvent={onEvent}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\nexport function PayrollLandingOverviewContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, ConfirmWireDetailsComponent } =\n useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollOverview\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n ConfirmWireDetailsComponent={ConfirmWireDetailsComponent}\n />\n )\n}\n"],"names":["PayrollLandingTabsContextual","companyId","onEvent","selectedTab","ConfirmWireDetailsComponent","ConfirmWireDetails","showPayrollCancelledAlert","useFlow","currentTab","setCurrentTab","useState","Tabs","Alert","useComponentContext","useI18n","t","useTranslation","wireInRequestsData","useWireInRequestsListSuspense","ensureRequired","hasActiveWireInRequests","r","handleDismissPayrollCancelledAlert","componentEvents","blockersData","usePayrollsGetBlockersSuspense","blockers","blocker","onViewBlockers","tabs","jsx","PayrollList","PayrollHistory","jsxs","Flex","TransitionPayrollAlert","PayrollBlockerAlerts","PayrollLandingReceiptsContextual","payrollUuid","withReimbursements","PayrollReceipts","PayrollLandingOverviewContextual","PayrollOverview"],"mappings":";;;;;;;;;;;;;;;;;;AA4CO,SAASA,KAA+B;AAC7C,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,6BAAAC,IAA8BC;AAAA,IAC9B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,KACC,gBAAAwB;AAAA,MAAClB;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,OAAOG,EAAE,yBAAyB;AAAA,QAClC,WAAWO;AAAA,MAAA;AAAA,IAAA;AAAA,IAGdF,KACC,gBAAAU,EAAC1B,GAAA,EAA4B,WAAWe,EAAelB,CAAS,GAAG,SAAAC,GAAkB;AAAA,sBAEtFiC,GAAA,EAAuB,WAAWhB,EAAelB,CAAS,GAAG,SAAAC,GAAkB;AAAA,IAChF,gBAAA4B,EAACM,GAAA,EAAqB,UAAAV,GAAoB,qBAAqBE,EAAA,CAAgB;AAAA,IAC/E,gBAAAE;AAAA,MAACnB;AAAA,MAAA;AAAA,QACC,MAAAkB;AAAA,QACA,YAAYrB;AAAA,QACZ,mBAAmBC;AAAA,QACnB,cAAYM,EAAE,oBAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,GACF;AAEJ;AAEO,SAASsB,KAAmC;AACjD,QAAM,EAAE,aAAAC,GAAa,SAAApC,GAAS,oBAAAqC,EAAA,IAAuBhC,EAAA;AAErD,SACE,gBAAAuB;AAAA,IAACU;AAAA,IAAA;AAAA,MACC,SAAAtC;AAAA,MACA,WAAWiB,EAAemB,CAAW;AAAA,MACrC,oBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASE,KAAmC;AACjD,QAAM,EAAE,WAAAxC,GAAW,aAAAqC,GAAa,SAAApC,GAAS,oBAAAqC,GAAoB,6BAAAnC,EAAA,IAC3DG,EAAA;AAEF,SACE,gBAAAuB;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,SAAAxC;AAAA,MACA,WAAWiB,EAAelB,CAAS;AAAA,MACnC,WAAWkB,EAAemB,CAAW;AAAA,MACrC,oBAAAC;AAAA,MACA,6BAAAnC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PayrollLandingFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/wireInRequestsList'\nimport { usePayrollsGetBlockersSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/payrollsGetBlockers'\nimport { PayrollHistory } from '../PayrollHistory/PayrollHistory'\nimport { PayrollList } from '../PayrollList/PayrollList'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport {\n ConfirmWireDetails,\n type ConfirmWireDetailsComponentType,\n} from '../ConfirmWireDetails/ConfirmWireDetails'\nimport type { ApiPayrollBlocker } from '../PayrollBlocker/payrollHelpers'\nimport { PayrollBlockerAlerts } from '../PayrollBlocker/components/PayrollBlockerAlerts'\nimport { TransitionPayrollAlert } from '../TransitionPayrollAlert'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\n/** @internal */\nexport interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n /** @internal */\n companyId: string\n /** @internal */\n withReimbursements?: boolean\n /** @internal */\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n /** @internal */\n showPayrollCancelledAlert?: boolean\n}\n\n/** @internal */\nexport interface PayrollLandingFlowContextInterface extends FlowContextInterface {\n /** @internal */\n component: (() => React.JSX.Element) | null\n /** @internal */\n companyId: string\n /** @internal */\n payrollUuid?: string\n /** @internal */\n previousState?: 'tabs' | 'overview'\n /** @internal */\n selectedTab?: string\n /** @internal */\n withReimbursements: boolean\n /** @internal */\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n /** @internal */\n startDate?: string\n /** @internal */\n endDate?: string\n /** @internal */\n showPayrollCancelledAlert?: boolean\n}\n\n/** @internal */\nexport function PayrollLandingTabsContextual() {\n const {\n companyId,\n onEvent,\n selectedTab = 'run-payroll',\n ConfirmWireDetailsComponent = ConfirmWireDetails,\n showPayrollCancelledAlert,\n } = useFlow<PayrollLandingFlowContextInterface>()\n const [currentTab, setCurrentTab] = useState(selectedTab)\n const { Tabs, Alert } = useComponentContext()\n\n useI18n('Payroll.PayrollLanding')\n const { t } = useTranslation('Payroll.PayrollLanding')\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: ensureRequired(companyId),\n })\n\n const hasActiveWireInRequests = (wireInRequestsData.wireInRequestList || []).some(\n r => r.status === 'awaiting_funds',\n )\n\n const handleDismissPayrollCancelledAlert = () => {\n onEvent(componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED)\n }\n\n const { data: blockersData } = usePayrollsGetBlockersSuspense({\n companyUuid: ensureRequired(companyId),\n })\n\n const payrollBlockerList = blockersData.payrollBlockers ?? []\n\n const blockers: ApiPayrollBlocker[] = payrollBlockerList.map(\n (blocker: { key?: string; message?: string }) => ({\n key: blocker.key ?? 'unknown',\n message: blocker.message,\n }),\n )\n\n const onViewBlockers = () => {\n onEvent(componentEvents.RUN_PAYROLL_BLOCKERS_VIEW_ALL)\n }\n\n const tabs = [\n {\n id: 'run-payroll',\n label: t('tabs.runPayroll'),\n content: <PayrollList companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n {\n id: 'payroll-history',\n label: t('tabs.payrollHistory'),\n content: <PayrollHistory companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n {showPayrollCancelledAlert && (\n <Alert\n status=\"success\"\n label={t('alerts.payrollCancelled')}\n onDismiss={handleDismissPayrollCancelledAlert}\n />\n )}\n {hasActiveWireInRequests && (\n <ConfirmWireDetailsComponent companyId={ensureRequired(companyId)} onEvent={onEvent} />\n )}\n <TransitionPayrollAlert companyId={ensureRequired(companyId)} onEvent={onEvent} />\n <PayrollBlockerAlerts blockers={blockers} onViewBlockersClick={onViewBlockers} />\n <Tabs\n tabs={tabs}\n selectedId={currentTab}\n onSelectionChange={setCurrentTab}\n aria-label={t('aria.tabNavigation')}\n />\n </Flex>\n )\n}\n\n/** @internal */\nexport function PayrollLandingReceiptsContextual() {\n const { payrollUuid, onEvent, withReimbursements } = useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollReceipts\n onEvent={onEvent}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\n/** @internal */\nexport function PayrollLandingOverviewContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, ConfirmWireDetailsComponent } =\n useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollOverview\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n ConfirmWireDetailsComponent={ConfirmWireDetailsComponent}\n />\n )\n}\n"],"names":["PayrollLandingTabsContextual","companyId","onEvent","selectedTab","ConfirmWireDetailsComponent","ConfirmWireDetails","showPayrollCancelledAlert","useFlow","currentTab","setCurrentTab","useState","Tabs","Alert","useComponentContext","useI18n","t","useTranslation","wireInRequestsData","useWireInRequestsListSuspense","ensureRequired","hasActiveWireInRequests","r","handleDismissPayrollCancelledAlert","componentEvents","blockersData","usePayrollsGetBlockersSuspense","blockers","blocker","onViewBlockers","tabs","jsx","PayrollList","PayrollHistory","jsxs","Flex","TransitionPayrollAlert","PayrollBlockerAlerts","PayrollLandingReceiptsContextual","payrollUuid","withReimbursements","PayrollReceipts","PayrollLandingOverviewContextual","PayrollOverview"],"mappings":";;;;;;;;;;;;;;;;;;AA6DO,SAASA,KAA+B;AAC7C,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC,I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owBreadcrumbs/FlowBreadcrumbsTypes';
2
+ /** @internal */
2
3
  export declare const payrollLandingBreadcrumbNodes: BreadcrumbNodes;
4
+ /** @internal */
3
5
  export declare const payrollLandingMachine: {
4
6
  tabs: import('robot3').MachineState<any>;
5
7
  overview: import('robot3').MachineState<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"payrollLandingStateMachine.js","sources":["../../../../src/components/Payroll/PayrollLanding/payrollLandingStateMachine.ts"],"sourcesContent":["import { transition, reduce, state, guard } from 'robot3'\nimport {\n PayrollLandingTabsContextual,\n PayrollLandingReceiptsContextual,\n PayrollLandingOverviewContextual,\n type PayrollLandingFlowContextInterface,\n} from './PayrollLandingFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype EventPayloads = {\n [componentEvents.RUN_PAYROLL_RECEIPT_VIEWED]: {\n payrollId: string\n startDate?: string\n endDate?: string\n }\n [componentEvents.RUN_PAYROLL_SUMMARY_VIEWED]: {\n payrollId: string\n startDate?: string\n endDate?: string\n }\n [componentEvents.RUN_PAYROLL_RECEIPT_GET]: {\n payrollId: string\n }\n [componentEvents.RUN_PAYROLL_CANCELLED]: undefined\n [componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED]: undefined\n}\n\nexport const payrollLandingBreadcrumbNodes: BreadcrumbNodes = {\n tabs: {\n parent: null,\n item: {\n id: 'tabs',\n label: 'breadcrumbs.landing',\n namespace: 'Payroll.PayrollLanding',\n onNavigate: ((ctx: PayrollLandingFlowContextInterface) => ({\n ...ctx,\n component: PayrollLandingTabsContextual,\n header:\n ctx.header?.type === 'breadcrumbs'\n ? { ...ctx.header, currentBreadcrumbId: undefined }\n : null,\n payrollUuid: undefined,\n previousState: undefined,\n startDate: undefined,\n endDate: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n overview: {\n parent: 'tabs',\n item: {\n id: 'overview',\n label: 'breadcrumbs.overview',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n receipt: {\n parent: 'tabs',\n item: {\n id: 'receipt',\n label: 'breadcrumbs.receipt',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n} as const\n\nconst createReducer = (props: Partial<PayrollLandingFlowContextInterface>) => {\n return (ctx: PayrollLandingFlowContextInterface): PayrollLandingFlowContextInterface => ({\n ...ctx,\n ...props,\n })\n}\n\n/**\n * Reducer that returns the flow to the landing tabs view while preserving\n * the existing breadcrumbs trail data so that re-entering a sub-state can\n * pick it up without rebuilding.\n */\nconst returnToTabs = (\n extra: Partial<PayrollLandingFlowContextInterface> = {},\n): ((ctx: PayrollLandingFlowContextInterface) => PayrollLandingFlowContextInterface) => {\n return (ctx: PayrollLandingFlowContextInterface) => ({\n ...ctx,\n component: PayrollLandingTabsContextual,\n payrollUuid: undefined,\n previousState: undefined,\n startDate: undefined,\n endDate: undefined,\n header:\n ctx.header?.type === 'breadcrumbs' ? { ...ctx.header, currentBreadcrumbId: undefined } : null,\n ...extra,\n })\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PayrollLandingFlowContextInterface>()\n\nexport const payrollLandingMachine = {\n tabs: state<MachineTransition>(\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_VIEWED,\n 'receipt',\n reduce(\n (\n ctx: PayrollLandingFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_RECEIPT_VIEWED>,\n ): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('receipt', ctx, {\n startDate: ev.payload.startDate ?? '',\n endDate: ev.payload.endDate ?? '',\n }),\n component: PayrollLandingReceiptsContextual,\n payrollUuid: ev.payload.payrollId,\n previousState: 'tabs',\n selectedTab: 'payroll-history',\n startDate: ev.payload.startDate,\n endDate: ev.payload.endDate,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_SUMMARY_VIEWED,\n 'overview',\n reduce(\n (\n ctx: PayrollLandingFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_SUMMARY_VIEWED>,\n ): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ev.payload.startDate ?? '',\n endDate: ev.payload.endDate ?? '',\n }),\n component: PayrollLandingOverviewContextual,\n payrollUuid: ev.payload.payrollId,\n previousState: 'tabs',\n selectedTab: 'payroll-history',\n startDate: ev.payload.startDate,\n endDate: ev.payload.endDate,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'tabs',\n reduce(\n createReducer({\n showPayrollCancelledAlert: true,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED,\n 'tabs',\n reduce(\n createReducer({\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n ),\n overview: state<MachineTransition>(\n breadcrumbNavigateTransition('tabs'),\n transition(componentEvents.RUN_PAYROLL_BACK, 'tabs', reduce(returnToTabs())),\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'receipt',\n reduce(\n (\n ctx: PayrollLandingFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_RECEIPT_GET>,\n ): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('receipt', ctx, {\n startDate: ctx.startDate ?? '',\n endDate: ctx.endDate ?? '',\n }),\n component: PayrollLandingReceiptsContextual,\n payrollUuid: ev.payload.payrollId,\n previousState: 'overview',\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'tabs',\n reduce(returnToTabs({ showPayrollCancelledAlert: true })),\n ),\n ),\n receipt: state<MachineTransition>(\n breadcrumbNavigateTransition('tabs'),\n transition(\n componentEvents.RUN_PAYROLL_BACK,\n 'overview',\n reduce(\n (ctx: PayrollLandingFlowContextInterface): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ctx.startDate ?? '',\n endDate: ctx.endDate ?? '',\n }),\n component: PayrollLandingOverviewContextual,\n previousState: 'tabs',\n }),\n ),\n guard((ctx: PayrollLandingFlowContextInterface) => {\n return ctx.previousState === 'overview'\n }),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BACK,\n 'tabs',\n reduce(returnToTabs()),\n guard((ctx: PayrollLandingFlowContextInterface) => {\n return ctx.previousState === 'tabs'\n }),\n ),\n ),\n}\n"],"names":["payrollLandingBreadcrumbNodes","ctx","PayrollLandingTabsContextual","createReducer","props","returnToTabs","extra","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","payrollLandingMachine","state","transition","componentEvents","reduce","ev","updateBreadcrumbs","PayrollLandingReceiptsContextual","PayrollLandingOverviewContextual","guard"],"mappings":";;;;;AA+BO,MAAMA,IAAiD;AAAA,EAC5D,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAA6C;AAAA,QACzD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,QACED,EAAI,QAAQ,SAAS,gBACjB,EAAE,GAAGA,EAAI,QAAQ,qBAAqB,OAAA,IACtC;AAAA,QACN,aAAa;AAAA,QACb,eAAe;AAAA,QACf,WAAW;AAAA,QACX,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;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AA,MACjB;AAAA,MAEFC,EAAM,CAACjB,MACEA,EAAI,kBAAkB,UAC9B;AAAA,IAAA;AAAA,IAEHU;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOR,GAAc;AAAA,MACrBa,EAAM,CAACjB,MACEA,EAAI,kBAAkB,MAC9B;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"payrollLandingStateMachine.js","sources":["../../../../src/components/Payroll/PayrollLanding/payrollLandingStateMachine.ts"],"sourcesContent":["import { transition, reduce, state, guard } from 'robot3'\nimport {\n PayrollLandingTabsContextual,\n PayrollLandingReceiptsContextual,\n PayrollLandingOverviewContextual,\n type PayrollLandingFlowContextInterface,\n} from './PayrollLandingFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\nimport type { BreadcrumbNodes } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { updateBreadcrumbs } from '@/helpers/breadcrumbHelpers'\nimport { createBreadcrumbNavigateTransition } from '@/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers'\n\ntype EventPayloads = {\n [componentEvents.RUN_PAYROLL_RECEIPT_VIEWED]: {\n payrollId: string\n startDate?: string\n endDate?: string\n }\n [componentEvents.RUN_PAYROLL_SUMMARY_VIEWED]: {\n payrollId: string\n startDate?: string\n endDate?: string\n }\n [componentEvents.RUN_PAYROLL_RECEIPT_GET]: {\n payrollId: string\n }\n [componentEvents.RUN_PAYROLL_CANCELLED]: undefined\n [componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED]: undefined\n}\n\n/** @internal */\nexport const payrollLandingBreadcrumbNodes: BreadcrumbNodes = {\n tabs: {\n parent: null,\n item: {\n id: 'tabs',\n label: 'breadcrumbs.landing',\n namespace: 'Payroll.PayrollLanding',\n onNavigate: ((ctx: PayrollLandingFlowContextInterface) => ({\n ...ctx,\n component: PayrollLandingTabsContextual,\n header:\n ctx.header?.type === 'breadcrumbs'\n ? { ...ctx.header, currentBreadcrumbId: undefined }\n : null,\n payrollUuid: undefined,\n previousState: undefined,\n startDate: undefined,\n endDate: undefined,\n })) as (context: unknown) => unknown,\n },\n },\n overview: {\n parent: 'tabs',\n item: {\n id: 'overview',\n label: 'breadcrumbs.overview',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n receipt: {\n parent: 'tabs',\n item: {\n id: 'receipt',\n label: 'breadcrumbs.receipt',\n namespace: 'Payroll.PayrollLanding',\n },\n },\n} as const\n\nconst createReducer = (props: Partial<PayrollLandingFlowContextInterface>) => {\n return (ctx: PayrollLandingFlowContextInterface): PayrollLandingFlowContextInterface => ({\n ...ctx,\n ...props,\n })\n}\n\n/**\n * Reducer that returns the flow to the landing tabs view while preserving\n * the existing breadcrumbs trail data so that re-entering a sub-state can\n * pick it up without rebuilding.\n */\nconst returnToTabs = (\n extra: Partial<PayrollLandingFlowContextInterface> = {},\n): ((ctx: PayrollLandingFlowContextInterface) => PayrollLandingFlowContextInterface) => {\n return (ctx: PayrollLandingFlowContextInterface) => ({\n ...ctx,\n component: PayrollLandingTabsContextual,\n payrollUuid: undefined,\n previousState: undefined,\n startDate: undefined,\n endDate: undefined,\n header:\n ctx.header?.type === 'breadcrumbs' ? { ...ctx.header, currentBreadcrumbId: undefined } : null,\n ...extra,\n })\n}\n\nconst breadcrumbNavigateTransition =\n createBreadcrumbNavigateTransition<PayrollLandingFlowContextInterface>()\n\n/** @internal */\nexport const payrollLandingMachine = {\n tabs: state<MachineTransition>(\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_VIEWED,\n 'receipt',\n reduce(\n (\n ctx: PayrollLandingFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_RECEIPT_VIEWED>,\n ): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('receipt', ctx, {\n startDate: ev.payload.startDate ?? '',\n endDate: ev.payload.endDate ?? '',\n }),\n component: PayrollLandingReceiptsContextual,\n payrollUuid: ev.payload.payrollId,\n previousState: 'tabs',\n selectedTab: 'payroll-history',\n startDate: ev.payload.startDate,\n endDate: ev.payload.endDate,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_SUMMARY_VIEWED,\n 'overview',\n reduce(\n (\n ctx: PayrollLandingFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_SUMMARY_VIEWED>,\n ): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ev.payload.startDate ?? '',\n endDate: ev.payload.endDate ?? '',\n }),\n component: PayrollLandingOverviewContextual,\n payrollUuid: ev.payload.payrollId,\n previousState: 'tabs',\n selectedTab: 'payroll-history',\n startDate: ev.payload.startDate,\n endDate: ev.payload.endDate,\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'tabs',\n reduce(\n createReducer({\n showPayrollCancelledAlert: true,\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED_ALERT_DISMISSED,\n 'tabs',\n reduce(\n createReducer({\n showPayrollCancelledAlert: false,\n }),\n ),\n ),\n ),\n overview: state<MachineTransition>(\n breadcrumbNavigateTransition('tabs'),\n transition(componentEvents.RUN_PAYROLL_BACK, 'tabs', reduce(returnToTabs())),\n transition(\n componentEvents.RUN_PAYROLL_RECEIPT_GET,\n 'receipt',\n reduce(\n (\n ctx: PayrollLandingFlowContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.RUN_PAYROLL_RECEIPT_GET>,\n ): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('receipt', ctx, {\n startDate: ctx.startDate ?? '',\n endDate: ctx.endDate ?? '',\n }),\n component: PayrollLandingReceiptsContextual,\n payrollUuid: ev.payload.payrollId,\n previousState: 'overview',\n }),\n ),\n ),\n transition(\n componentEvents.RUN_PAYROLL_CANCELLED,\n 'tabs',\n reduce(returnToTabs({ showPayrollCancelledAlert: true })),\n ),\n ),\n receipt: state<MachineTransition>(\n breadcrumbNavigateTransition('tabs'),\n transition(\n componentEvents.RUN_PAYROLL_BACK,\n 'overview',\n reduce(\n (ctx: PayrollLandingFlowContextInterface): PayrollLandingFlowContextInterface => ({\n ...updateBreadcrumbs('overview', ctx, {\n startDate: ctx.startDate ?? '',\n endDate: ctx.endDate ?? '',\n }),\n component: PayrollLandingOverviewContextual,\n previousState: 'tabs',\n }),\n ),\n guard((ctx: PayrollLandingFlowContextInterface) => {\n return ctx.previousState === 'overview'\n }),\n ),\n transition(\n componentEvents.RUN_PAYROLL_BACK,\n 'tabs',\n reduce(returnToTabs()),\n guard((ctx: PayrollLandingFlowContextInterface) => {\n return ctx.previousState === 'tabs'\n }),\n ),\n ),\n}\n"],"names":["payrollLandingBreadcrumbNodes","ctx","PayrollLandingTabsContextual","createReducer","props","returnToTabs","extra","breadcrumbNavigateTransition","createBreadcrumbNavigateTransition","payrollLandingMachine","state","transition","componentEvents","reduce","ev","updateBreadcrumbs","PayrollLandingReceiptsContextual","PayrollLandingOverviewContextual","guard"],"mappings":";;;;;AAgCO,MAAMA,IAAiD;AAAA,EAC5D,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa,CAACC,OAA6C;AAAA,QACzD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,QACED,EAAI,QAAQ,SAAS,gBACjB,EAAE,GAAGA,EAAI,QAAQ,qBAAqB,OAAA,IACtC;AAAA,QACN,aAAa;AAAA,QACb,eAAe;AAAA,QACf,WAAW;AAAA,QACX,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EACb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zB;AAAA,UACD,WAAWgB;AAAA,UACX,eAAe;AAAA,QAAA;AAAA,MACjB;AAAA,MAEFC,EAAM,CAACjB,MACEA,EAAI,kBAAkB,UAC9B;AAAA,IAAA;AAAA,IAEHU;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOR,GAAc;AAAA,MACrBa,EAAM,CAACjB,MACEA,EAAI,kBAAkB,MAC9B;AAAA,IAAA;AAAA,EACH;AAEJ;"}
@@ -1,22 +1,41 @@
1
1
  import { BaseComponentInterface } from '../../Base';
2
- interface PayrollListBlockProps extends BaseComponentInterface {
2
+ /**
3
+ * Props for {@link PayrollList}.
4
+ *
5
+ * @public
6
+ */
7
+ export interface PayrollListBlockProps extends BaseComponentInterface {
8
+ /** The associated company identifier. */
3
9
  companyId: string;
4
10
  }
5
11
  /**
6
12
  * Lists upcoming payrolls and lets users start running them.
7
13
  *
8
- * Disables the Run Payroll action on Regular rows when the company has any
9
- * unprocessed transition pay periods within the next 90 days running a
10
- * regular payroll before resolving a transition causes the transition to be
11
- * dropped on the backend, so this gate matches the behavior shipped in
12
- * Gusto-hosted flows. Off-cycle rows and the Run off-cycle CTA are
13
- * intentionally left enabled, since off-cycle is the path used to actually
14
- * run a transition payroll.
14
+ * Displays available payrolls with pay period dates, payroll type, check date,
15
+ * deadline, and status. Each row offers actions to run, submit a calculated
16
+ * payroll, skip, or delete (for cancellable off-cycle payrolls). A separate
17
+ * call-to-action starts an off-cycle payroll.
18
+ *
19
+ * @remarks
20
+ * When the company has unprocessed transition pay periods within the next
21
+ * 90 days, the Run Payroll action on Regular rows is disabled to prevent a
22
+ * regular payroll from being run before the transition is resolved. Off-cycle
23
+ * rows and the Run off-cycle action remain enabled, since off-cycle is the
24
+ * path used to run a transition payroll. {@link PayrollLanding} pairs this
25
+ * list with an alert that lets users run or skip the pending transition; when
26
+ * using `PayrollList` directly, render an equivalent resolution surface
27
+ * alongside it.
28
+ *
29
+ * | Event | Description | Data |
30
+ * | ----- | ----------- | ---- |
31
+ * | `runPayroll/selected` | User selected a payroll to run | `{ payrollUuid, payPeriod }` |
32
+ * | `payroll/review` | User selected a calculated payroll to review and submit | `{ payrollUuid, payPeriod }` |
33
+ * | `payroll/skipped` | A payroll was successfully skipped | `{ payrollId }` |
34
+ * | `payroll/deleted` | A cancellable off-cycle payroll was successfully deleted | `{ payrollId }` |
35
+ * | `runPayroll/offCycle/start` | User clicked the Run off-cycle call-to-action | — |
15
36
  *
16
- * When composed via `Payroll.PayrollLanding`, the alert that explains the
17
- * block (and lets the user resolve it via Run / Skip) is rendered
18
- * automatically. When using `PayrollList` directly, render an equivalent
19
- * resolution surface alongside it.
37
+ * @param props - See {@link PayrollListBlockProps}.
38
+ * @returns The rendered payroll list.
39
+ * @public
20
40
  */
21
41
  export declare function PayrollList(props: PayrollListBlockProps): import("react").JSX.Element;
22
- export {};