@gusto/embedded-react-sdk 0.36.0 → 0.37.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  3. package/dist/UNSTABLE_Hooks.js +6 -6
  4. package/dist/components/Base/Base.d.ts +8 -10
  5. package/dist/components/Base/Base.js +121 -100
  6. package/dist/components/Base/Base.js.map +1 -1
  7. package/dist/components/Base/index.d.ts +1 -1
  8. package/dist/components/Base/useBase.d.ts +3 -7
  9. package/dist/components/Base/useBase.js.map +1 -1
  10. package/dist/components/Base/useBaseSubmit.d.ts +3 -5
  11. package/dist/components/Base/useBaseSubmit.js +27 -50
  12. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  15. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  16. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
  17. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  18. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +6 -5
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -8
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -4
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -8
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -10
  28. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  29. package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -8
  30. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  31. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -8
  32. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  33. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +6 -8
  34. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  35. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -13
  36. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  37. package/dist/components/Company/Industry/Context.js +9 -11
  38. package/dist/components/Company/Industry/Context.js.map +1 -1
  39. package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
  40. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  41. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -8
  42. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  43. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -8
  44. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  45. package/dist/components/Company/OnboardingOverview/context.js +6 -8
  46. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  47. package/dist/components/Company/PaySchedule/PaySchedule.js +60 -60
  48. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  49. package/dist/components/Company/PaySchedule/_parts/Edit.js +10 -9
  50. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  51. package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -10
  52. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  53. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -8
  54. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  55. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -8
  56. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  57. package/dist/components/Contractor/Address/Form.js +7 -6
  58. package/dist/components/Contractor/Address/Form.js.map +1 -1
  59. package/dist/components/Contractor/Address/useAddress.js +8 -10
  60. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  61. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
  62. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  63. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  64. package/dist/components/Contractor/Profile/useContractorProfile.js +26 -28
  65. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  66. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +13 -15
  67. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  68. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +5 -7
  69. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  70. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +5 -7
  71. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  72. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
  73. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  74. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +6 -8
  75. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  76. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +6 -8
  77. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  78. package/dist/components/Employee/EmployeeList/useEmployeeList.js +6 -8
  79. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  80. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +42 -42
  81. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  82. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +6 -8
  83. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  84. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +8 -10
  85. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  86. package/dist/components/Employee/Profile/HomeAddress.js +9 -8
  87. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  88. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +15 -14
  89. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  90. package/dist/components/Employee/Profile/Profile.js +30 -29
  91. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  92. package/dist/components/Employee/Profile/useProfile.js +6 -8
  93. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  94. package/dist/components/Employee/StateTaxes/StateTaxes.js +50 -50
  95. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  96. package/dist/components/Employee/StateTaxes/useStateTaxes.js +6 -8
  97. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  98. package/dist/components/Employee/Taxes/Taxes.js +53 -53
  99. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  100. package/dist/components/Employee/Taxes/useTaxes.js +6 -8
  101. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  102. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +11 -0
  103. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +123 -0
  104. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -0
  105. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +11 -0
  106. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +92 -0
  107. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -0
  108. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +2 -0
  109. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +30 -0
  110. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -0
  111. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +23 -0
  112. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +72 -0
  113. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -0
  114. package/dist/components/Employee/Terminations/TerminationFlow/index.d.ts +3 -0
  115. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +7 -0
  116. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +165 -0
  117. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -0
  118. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts +1 -0
  119. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +9 -0
  120. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +86 -0
  121. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -0
  122. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +20 -0
  123. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +103 -0
  124. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -0
  125. package/dist/components/Employee/Terminations/TerminationsData.d.ts +6 -0
  126. package/dist/components/Employee/Terminations/index.d.ts +8 -0
  127. package/dist/components/Employee/Terminations/types.d.ts +1 -0
  128. package/dist/components/Employee/index.d.ts +7 -0
  129. package/dist/components/Employee/index.js +34 -28
  130. package/dist/components/Employee/index.js.map +1 -1
  131. package/dist/components/InformationRequests/InformationRequests.js +31 -31
  132. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  133. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +41 -41
  134. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  135. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +2 -0
  136. package/dist/components/Payroll/Dismissal/DismissalFlow.js +32 -0
  137. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -0
  138. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +16 -0
  139. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +52 -0
  140. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -0
  141. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +6 -0
  142. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +69 -0
  143. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -0
  144. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +9 -0
  145. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +53 -0
  146. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -0
  147. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +3 -0
  148. package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +6 -0
  149. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +51 -0
  150. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -0
  151. package/dist/components/Payroll/Dismissal/dismissalStateMachine.test.d.ts +1 -0
  152. package/dist/components/Payroll/Dismissal/index.d.ts +3 -0
  153. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -3
  154. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
  155. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +19 -18
  156. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  157. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +3 -0
  158. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +32 -24
  159. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  160. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +45 -45
  161. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  162. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  163. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +75 -66
  164. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  165. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js +8 -0
  166. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js.map +1 -0
  167. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +0 -1
  168. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
  169. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +2 -2
  170. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  171. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -0
  172. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +1 -0
  173. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  174. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +186 -159
  175. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  176. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -3
  177. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +71 -70
  178. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  179. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +3 -2
  180. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +8 -8
  181. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
  182. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -3
  183. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +76 -70
  184. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  185. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -42
  186. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  187. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -2
  188. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +225 -194
  189. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  190. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
  191. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +12 -0
  192. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -0
  193. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
  194. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  195. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
  196. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +21 -0
  197. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -0
  198. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  199. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +95 -64
  200. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  201. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +53 -47
  202. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  203. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +8 -8
  204. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  205. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +25 -23
  206. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  207. package/dist/components/Payroll/PayrollList/PayrollList.js +40 -32
  208. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  209. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
  210. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +110 -93
  211. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  212. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +12 -8
  213. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  214. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
  215. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  216. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +2 -0
  217. package/dist/components/Payroll/Transition/TransitionFlow.js +38 -0
  218. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -0
  219. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +19 -0
  220. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +54 -0
  221. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -0
  222. package/dist/components/Payroll/Transition/index.d.ts +3 -0
  223. package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +6 -0
  224. package/dist/components/Payroll/Transition/transitionStateMachine.js +58 -0
  225. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -0
  226. package/dist/components/Payroll/Transition/transitionStateMachine.test.d.ts +1 -0
  227. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +2 -0
  228. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +92 -0
  229. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -0
  230. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +2 -0
  231. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +111 -0
  232. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -0
  233. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js +8 -0
  234. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js.map +1 -0
  235. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +28 -0
  236. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +21 -0
  237. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -0
  238. package/dist/components/Payroll/TransitionCreation/index.d.ts +3 -0
  239. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +8 -0
  240. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +83 -0
  241. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -0
  242. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +16 -0
  243. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +100 -0
  244. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -0
  245. package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +2 -0
  246. package/dist/components/Payroll/helpers.d.ts +2 -1
  247. package/dist/components/Payroll/helpers.js +98 -87
  248. package/dist/components/Payroll/helpers.js.map +1 -1
  249. package/dist/components/Payroll/index.d.ts +6 -0
  250. package/dist/components/Payroll/index.js +32 -26
  251. package/dist/components/Payroll/index.js.map +1 -1
  252. package/dist/components/Payroll/payrollTypes.d.ts +21 -0
  253. package/dist/components/Payroll/payrollTypes.js +27 -0
  254. package/dist/components/Payroll/payrollTypes.js.map +1 -0
  255. package/dist/components/Payroll/usePreparedPayrollData.js +5 -7
  256. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  257. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +8 -0
  258. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +13 -0
  259. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -0
  260. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +10 -0
  261. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +18 -0
  262. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +3 -0
  263. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts +1 -0
  264. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +9 -0
  265. package/dist/components/UNSTABLE_Hooks/form/types.d.ts +15 -0
  266. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -0
  267. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +15 -0
  268. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -0
  269. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +4 -0
  270. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +9 -0
  271. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
  272. package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +5 -0
  273. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +3 -0
  274. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +16 -0
  275. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +7 -0
  276. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -0
  277. package/dist/components/UNSTABLE_Hooks/index.d.ts +5 -0
  278. package/dist/components/UNSTABLE_Hooks/types.d.ts +46 -0
  279. package/dist/contexts/ApiProvider/ApiProvider.js +11 -11
  280. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  281. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +43 -47
  282. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  283. package/dist/contexts/ObservabilityProvider/index.d.ts +1 -1
  284. package/dist/contexts/ObservabilityProvider/sanitization.d.ts +0 -14
  285. package/dist/contexts/ObservabilityProvider/sanitization.js +51 -51
  286. package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
  287. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +0 -3
  288. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -1
  289. package/dist/i18n/I18n.js +11 -11
  290. package/dist/i18n/I18n.js.map +1 -1
  291. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js +18 -0
  292. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js.map +1 -0
  293. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js +12 -0
  294. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js.map +1 -0
  295. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js +20 -0
  296. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js.map +1 -0
  297. package/dist/i18n/en/Payroll.Dismissal.json.js +22 -0
  298. package/dist/i18n/en/Payroll.Dismissal.json.js.map +1 -0
  299. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +15 -11
  300. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  301. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +1 -1
  302. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -18
  303. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  304. package/dist/i18n/en/Payroll.PayrollList.json.js +20 -18
  305. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  306. package/dist/i18n/en/Payroll.Transition.json.js +8 -0
  307. package/dist/i18n/en/Payroll.Transition.json.js.map +1 -0
  308. package/dist/i18n/en/Payroll.TransitionCreation.json.js +26 -0
  309. package/dist/i18n/en/Payroll.TransitionCreation.json.js.map +1 -0
  310. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +18 -0
  311. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js.map +1 -0
  312. package/dist/i18n/en/common.json.d.ts +2 -1
  313. package/dist/i18n/en/common.json.js +9 -9
  314. package/dist/index.d.ts +3 -2
  315. package/dist/index.js +14 -13
  316. package/dist/shared/constants.d.ts +32 -0
  317. package/dist/shared/constants.js +83 -65
  318. package/dist/shared/constants.js.map +1 -1
  319. package/dist/style.css +1 -1
  320. package/dist/types/i18next.d.ts +163 -1
  321. package/dist/types/observability.d.ts +31 -65
  322. package/dist/types/sdkError.d.ts +91 -0
  323. package/dist/types/sdkError.js +95 -0
  324. package/dist/types/sdkError.js.map +1 -0
  325. package/dist/types/sdkError.test.d.ts +1 -0
  326. package/docs/reference/endpoint-inventory.json +120 -14
  327. package/package.json +13 -13
  328. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +0 -6
  329. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +0 -70
  330. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +0 -1
  331. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +0 -7
  332. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +0 -6
  333. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +0 -1
  334. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +0 -9
  335. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +0 -40
  336. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +0 -1
  337. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +0 -5
  338. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +0 -2
  339. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +0 -12
  340. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +0 -1
  341. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +0 -2
  342. package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +0 -5
  343. package/dist/contexts/ObservabilityProvider/observabilityUtils.js +0 -45
  344. package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +0 -1
@@ -718,6 +718,55 @@
718
718
  "employeeUuid"
719
719
  ]
720
720
  },
721
+ "Employee.TerminationFlow": {
722
+ "endpoints": [
723
+ {
724
+ "method": "GET",
725
+ "path": "/v1/employees/:employeeId"
726
+ },
727
+ {
728
+ "method": "GET",
729
+ "path": "/v1/employees/:employeeId/terminations"
730
+ },
731
+ {
732
+ "method": "POST",
733
+ "path": "/v1/employees/:employeeId/terminations"
734
+ },
735
+ {
736
+ "method": "PUT",
737
+ "path": "/v1/terminations/:employeeId"
738
+ },
739
+ {
740
+ "method": "POST",
741
+ "path": "/v1/companies/:companyId/payrolls"
742
+ },
743
+ {
744
+ "method": "GET",
745
+ "path": "/v1/companies/:companyId/pay_periods/unprocessed_termination_pay_periods"
746
+ },
747
+ {
748
+ "method": "GET",
749
+ "path": "/v1/companies/:companyId/payrolls"
750
+ },
751
+ {
752
+ "method": "DELETE",
753
+ "path": "/v1/employees/:employeeId/terminations"
754
+ },
755
+ {
756
+ "method": "GET",
757
+ "path": "/v1/companies/:companyId/employees"
758
+ },
759
+ {
760
+ "method": "PUT",
761
+ "path": "/v1/companies/:companyId/payrolls/:payrollId/prepare"
762
+ }
763
+ ],
764
+ "variables": [
765
+ "companyId",
766
+ "employeeId",
767
+ "payrollId"
768
+ ]
769
+ },
721
770
  "InformationRequests": {
722
771
  "endpoints": [
723
772
  {
@@ -759,6 +808,26 @@
759
808
  "wireInRequestUuid"
760
809
  ]
761
810
  },
811
+ "Payroll.DismissalFlow": {
812
+ "endpoints": [
813
+ {
814
+ "method": "GET",
815
+ "path": "/v1/companies/:companyId/payrolls/:payrollId"
816
+ },
817
+ {
818
+ "method": "GET",
819
+ "path": "/v1/companies/:companyId/pay_periods/unprocessed_termination_pay_periods"
820
+ },
821
+ {
822
+ "method": "POST",
823
+ "path": "/v1/companies/:companyId/payrolls"
824
+ }
825
+ ],
826
+ "variables": [
827
+ "companyId",
828
+ "payrollId"
829
+ ]
830
+ },
762
831
  "Payroll.OffCycleFlow": {
763
832
  "endpoints": [
764
833
  {
@@ -811,10 +880,6 @@
811
880
  "method": "GET",
812
881
  "path": "/v1/companies/:companyId/payrolls/:payrollId"
813
882
  },
814
- {
815
- "method": "PUT",
816
- "path": "/v1/companies/:companyId/payrolls/:payrollId/calculate"
817
- },
818
883
  {
819
884
  "method": "PUT",
820
885
  "path": "/v1/companies/:companyId/payrolls/:payrollId"
@@ -827,6 +892,10 @@
827
892
  "method": "GET",
828
893
  "path": "/v1/companies/:companyUuid/payrolls/blockers"
829
894
  },
895
+ {
896
+ "method": "PUT",
897
+ "path": "/v1/companies/:companyId/payrolls/:payrollId/calculate"
898
+ },
830
899
  {
831
900
  "method": "GET",
832
901
  "path": "/v1/companies/:companyId/employees"
@@ -1003,7 +1072,7 @@
1003
1072
  "recoveryCaseUuid"
1004
1073
  ]
1005
1074
  },
1006
- "Payroll.UNSTABLE_PayrollHooks": {
1075
+ "Payroll.TransitionFlow": {
1007
1076
  "endpoints": [
1008
1077
  {
1009
1078
  "method": "GET",
@@ -1014,6 +1083,41 @@
1014
1083
  "companyId",
1015
1084
  "payrollId"
1016
1085
  ]
1086
+ },
1087
+ "Payroll.TransitionCreation": {
1088
+ "endpoints": [
1089
+ {
1090
+ "method": "POST",
1091
+ "path": "/v1/companies/:companyId/payrolls"
1092
+ },
1093
+ {
1094
+ "method": "GET",
1095
+ "path": "/v1/companies/:companyId/pay_schedules"
1096
+ }
1097
+ ],
1098
+ "variables": [
1099
+ "companyId"
1100
+ ]
1101
+ },
1102
+ "Payroll.TransitionPayrollAlert": {
1103
+ "endpoints": [
1104
+ {
1105
+ "method": "GET",
1106
+ "path": "/v1/companies/:companyId/pay_periods"
1107
+ },
1108
+ {
1109
+ "method": "GET",
1110
+ "path": "/v1/companies/:companyId/pay_schedules"
1111
+ },
1112
+ {
1113
+ "method": "POST",
1114
+ "path": "/v1/companies/:companyUuid/payrolls/skip"
1115
+ }
1116
+ ],
1117
+ "variables": [
1118
+ "companyId",
1119
+ "companyUuid"
1120
+ ]
1017
1121
  }
1018
1122
  },
1019
1123
  "flows": {
@@ -1608,12 +1712,14 @@
1608
1712
  "Payroll.PayrollFlow": {
1609
1713
  "blocks": [
1610
1714
  "Payroll.ConfirmWireDetails",
1715
+ "Payroll.OffCycleFlow",
1611
1716
  "Payroll.PayrollBlocker",
1612
1717
  "Payroll.PayrollConfiguration",
1613
1718
  "Payroll.PayrollEditEmployee",
1614
1719
  "Payroll.PayrollLanding",
1615
1720
  "Payroll.PayrollOverview",
1616
- "Payroll.PayrollReceipts"
1721
+ "Payroll.PayrollReceipts",
1722
+ "Payroll.TransitionFlow"
1617
1723
  ],
1618
1724
  "endpoints": [
1619
1725
  {
@@ -1634,23 +1740,19 @@
1634
1740
  },
1635
1741
  {
1636
1742
  "method": "GET",
1637
- "path": "/v1/companies/:companyUuid/payrolls/blockers"
1743
+ "path": "/v1/companies/:companyId/payrolls/:payrollId"
1638
1744
  },
1639
1745
  {
1640
1746
  "method": "GET",
1641
- "path": "/v1/companies/:companyUuid/recovery_cases"
1747
+ "path": "/v1/companies/:companyUuid/payrolls/blockers"
1642
1748
  },
1643
1749
  {
1644
1750
  "method": "GET",
1645
- "path": "/v1/companies/:companyUuid/information_requests"
1751
+ "path": "/v1/companies/:companyUuid/recovery_cases"
1646
1752
  },
1647
1753
  {
1648
1754
  "method": "GET",
1649
- "path": "/v1/companies/:companyId/payrolls/:payrollId"
1650
- },
1651
- {
1652
- "method": "PUT",
1653
- "path": "/v1/companies/:companyId/payrolls/:payrollId/calculate"
1755
+ "path": "/v1/companies/:companyUuid/information_requests"
1654
1756
  },
1655
1757
  {
1656
1758
  "method": "PUT",
@@ -1660,6 +1762,10 @@
1660
1762
  "method": "POST",
1661
1763
  "path": "/v1/payrolls/:payrollUuid/gross_up"
1662
1764
  },
1765
+ {
1766
+ "method": "PUT",
1767
+ "path": "/v1/companies/:companyId/payrolls/:payrollId/calculate"
1768
+ },
1663
1769
  {
1664
1770
  "method": "GET",
1665
1771
  "path": "/v1/companies/:companyId/employees"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gusto/embedded-react-sdk",
3
- "version": "0.36.0",
3
+ "version": "0.37.0-rc.1",
4
4
  "homepage": "https://github.com/Gusto/embedded-react-sdk",
5
5
  "bugs": {
6
6
  "url": "https://github.com/Gusto/embedded-react-sdk/issues"
@@ -81,11 +81,11 @@
81
81
  "@commitlint/config-conventional": "^20.5.0",
82
82
  "@eslint/js": "^9.39.2",
83
83
  "@playwright/test": "^1.58.2",
84
- "@storybook/addon-a11y": "^10.2.19",
85
- "@storybook/addon-docs": "^10.2.19",
86
- "@storybook/addon-onboarding": "^10.2.19",
87
- "@storybook/react-vite": "^10.2.19",
88
- "@storybook/test-runner": "^0.24.2",
84
+ "@storybook/addon-a11y": "^10.3.1",
85
+ "@storybook/addon-docs": "^10.3.1",
86
+ "@storybook/addon-onboarding": "^10.3.1",
87
+ "@storybook/react-vite": "^10.3.1",
88
+ "@storybook/test-runner": "^0.24.3",
89
89
  "@testing-library/jest-dom": "^6.9.1",
90
90
  "@testing-library/react": "^16.3.2",
91
91
  "@testing-library/user-event": "^14.6.1",
@@ -104,7 +104,7 @@
104
104
  "eslint-plugin-react": "^7.37.5",
105
105
  "eslint-plugin-react-hooks": "^6.1.1",
106
106
  "eslint-plugin-react-refresh": "^0.4.24",
107
- "eslint-plugin-storybook": "^10.2.19",
107
+ "eslint-plugin-storybook": "^10.3.1",
108
108
  "globals": "^17.4.0",
109
109
  "husky": "^9.1.7",
110
110
  "jest-axe": "^9.0.0",
@@ -112,7 +112,7 @@
112
112
  "jsdom": "^26.1.0",
113
113
  "jsdom-testing-mocks": "^1.16.0",
114
114
  "lint-staged": "^16.4.0",
115
- "msw": "^2.12.12",
115
+ "msw": "^2.12.14",
116
116
  "npm-run-all": "^4.1.5",
117
117
  "pixelmatch": "^7.1.0",
118
118
  "pngjs": "^7.0.0",
@@ -120,7 +120,7 @@
120
120
  "react-dnd": "^16.0.1",
121
121
  "react-dnd-html5-backend": "^16.0.1",
122
122
  "sass-embedded": "^1.98.0",
123
- "storybook": "^10.2.19",
123
+ "storybook": "^10.3.1",
124
124
  "stylelint-config-standard": "^40.0.0",
125
125
  "ts-morph": "^27.0.2",
126
126
  "tsx": "^4.21.0",
@@ -130,7 +130,7 @@
130
130
  "vite-plugin-circular-dependency": "^0.5.0",
131
131
  "vite-plugin-dts": "^4.5.3",
132
132
  "vite-plugin-externalize-deps": "^0.10.0",
133
- "vite-plugin-stylelint": "^6.0.4",
133
+ "vite-plugin-stylelint": "^6.1.0",
134
134
  "vite-plugin-svgr": "^4.3.0",
135
135
  "vitest": "^4.1.0"
136
136
  },
@@ -141,7 +141,7 @@
141
141
  "typescript": "^5.8.3"
142
142
  },
143
143
  "dependencies": {
144
- "@gusto/embedded-api": "^0.12.4",
144
+ "@gusto/embedded-api": "0.12.4",
145
145
  "@hookform/error-message": "^2.0.1",
146
146
  "@hookform/resolvers": "^5.2.2",
147
147
  "@internationalized/date": "^3.12.0",
@@ -149,12 +149,12 @@
149
149
  "classnames": "^2.5.1",
150
150
  "deepmerge": "^4.3.1",
151
151
  "dompurify": "^3.3.3",
152
- "i18next": "^25.8.18",
152
+ "i18next": "^25.10.4",
153
153
  "react-aria": "^3.44.0",
154
154
  "react-aria-components": "1.13.0",
155
155
  "react-error-boundary": "^6.1.1",
156
156
  "react-hook-form": "^7.71.2",
157
- "react-i18next": "^16.5.8",
157
+ "react-i18next": "^16.6.1",
158
158
  "react-robot": "^1.2.0",
159
159
  "robot3": "^1.2.0",
160
160
  "zod": "^4.3.6"
@@ -1,6 +0,0 @@
1
- interface PayrollConfigurationProps {
2
- companyId: string;
3
- payrollId: string;
4
- }
5
- declare function ComposedPayrollConfiguration({ companyId, payrollId }: PayrollConfigurationProps): import("react/jsx-runtime").JSX.Element;
6
- export { ComposedPayrollConfiguration as PayrollConfiguration };
@@ -1,70 +0,0 @@
1
- import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
- import { PayrollConfigurationProvider as c } from "./PayrollConfigurationProvider.js";
3
- import { usePayrollConfiguration as s } from "./usePayrollConfiguration.js";
4
- import { useDateFormatter as h } from "../../../../hooks/useDateFormatter.js";
5
- import m from "../../../../hooks/useNumberFormatter.js";
6
- import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function u() {
8
- const { payrollData: l } = s(), a = h(), n = m("currency"), { Heading: i, Text: t } = y(), e = l.payrollShow, d = a.formatWithTime(e?.payrollDeadline);
9
- return /* @__PURE__ */ o("div", { children: [
10
- /* @__PURE__ */ r(i, { as: "h1", children: "Payroll Configuration (Experimental)" }),
11
- e && /* @__PURE__ */ o("div", { children: [
12
- /* @__PURE__ */ r(i, { as: "h2", children: "Payroll Details" }),
13
- /* @__PURE__ */ o(t, { children: [
14
- /* @__PURE__ */ r("strong", { children: "Check Date:" }),
15
- " ",
16
- a.formatShortWithWeekday(e.checkDate)
17
- ] }),
18
- /* @__PURE__ */ o(t, { children: [
19
- /* @__PURE__ */ r("strong", { children: "Pay Period:" }),
20
- " ",
21
- a.formatPayPeriodRange(
22
- e.payPeriod?.startDate,
23
- e.payPeriod?.endDate
24
- )
25
- ] }),
26
- /* @__PURE__ */ o(t, { children: [
27
- /* @__PURE__ */ r("strong", { children: "Payroll Deadline:" }),
28
- " ",
29
- d.date,
30
- " at ",
31
- d.time
32
- ] }),
33
- /* @__PURE__ */ o(t, { children: [
34
- /* @__PURE__ */ r("strong", { children: "Calculated At:" }),
35
- " ",
36
- e.calculatedAt ? a.formatShortWithWeekday(e.calculatedAt) : "Not yet calculated"
37
- ] }),
38
- /* @__PURE__ */ o(t, { children: [
39
- /* @__PURE__ */ r("strong", { children: "Off Cycle:" }),
40
- " ",
41
- e.offCycle ? "Yes" : "No"
42
- ] }),
43
- e.totals && /* @__PURE__ */ o("div", { children: [
44
- /* @__PURE__ */ r(i, { as: "h3", children: "Totals" }),
45
- /* @__PURE__ */ o(t, { children: [
46
- /* @__PURE__ */ r("strong", { children: "Net Pay Debit:" }),
47
- " ",
48
- n(Number(e.totals.netPayDebit ?? 0))
49
- ] }),
50
- /* @__PURE__ */ o(t, { children: [
51
- /* @__PURE__ */ r("strong", { children: "Employee Taxes:" }),
52
- " ",
53
- n(Number(e.totals.employeeTaxes ?? 0))
54
- ] }),
55
- /* @__PURE__ */ o(t, { children: [
56
- /* @__PURE__ */ r("strong", { children: "Employer Taxes:" }),
57
- " ",
58
- n(Number(e.totals.employerTaxes ?? 0))
59
- ] })
60
- ] })
61
- ] })
62
- ] });
63
- }
64
- function x({ companyId: l, payrollId: a }) {
65
- return /* @__PURE__ */ r(c, { companyId: l, payrollId: a, children: /* @__PURE__ */ r(u, {}) });
66
- }
67
- export {
68
- x as PayrollConfiguration
69
- };
70
- //# sourceMappingURL=PayrollConfiguration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayrollConfiguration.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.tsx"],"sourcesContent":["import { PayrollConfigurationProvider } from './PayrollConfigurationProvider'\nimport { usePayrollConfiguration } from './usePayrollConfiguration'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface PayrollConfigurationProps {\n companyId: string\n payrollId: string\n}\n\nfunction PayrollConfiguration() {\n const { payrollData } = usePayrollConfiguration()\n const dateFormatter = useDateFormatter()\n const formatCurrency = useNumberFormatter('currency')\n const { Heading, Text } = useComponentContext()\n\n const payroll = payrollData.payrollShow\n\n const payrollDeadline = dateFormatter.formatWithTime(payroll?.payrollDeadline)\n\n return (\n <div>\n <Heading as=\"h1\">Payroll Configuration (Experimental)</Heading>\n {payroll && (\n <div>\n <Heading as=\"h2\">Payroll Details</Heading>\n <Text>\n <strong>Check Date:</strong> {dateFormatter.formatShortWithWeekday(payroll.checkDate)}\n </Text>\n <Text>\n <strong>Pay Period:</strong>{' '}\n {dateFormatter.formatPayPeriodRange(\n payroll.payPeriod?.startDate,\n payroll.payPeriod?.endDate,\n )}\n </Text>\n <Text>\n <strong>Payroll Deadline:</strong> {payrollDeadline.date} at {payrollDeadline.time}\n </Text>\n <Text>\n <strong>Calculated At:</strong>{' '}\n {payroll.calculatedAt\n ? dateFormatter.formatShortWithWeekday(payroll.calculatedAt)\n : 'Not yet calculated'}\n </Text>\n <Text>\n <strong>Off Cycle:</strong> {payroll.offCycle ? 'Yes' : 'No'}\n </Text>\n {payroll.totals && (\n <div>\n <Heading as=\"h3\">Totals</Heading>\n <Text>\n <strong>Net Pay Debit:</strong>{' '}\n {formatCurrency(Number(payroll.totals.netPayDebit ?? 0))}\n </Text>\n <Text>\n <strong>Employee Taxes:</strong>{' '}\n {formatCurrency(Number(payroll.totals.employeeTaxes ?? 0))}\n </Text>\n <Text>\n <strong>Employer Taxes:</strong>{' '}\n {formatCurrency(Number(payroll.totals.employerTaxes ?? 0))}\n </Text>\n </div>\n )}\n </div>\n )}\n </div>\n )\n}\n\nfunction ComposedPayrollConfiguration({ companyId, payrollId }: PayrollConfigurationProps) {\n return (\n <PayrollConfigurationProvider companyId={companyId} payrollId={payrollId}>\n <PayrollConfiguration />\n </PayrollConfigurationProvider>\n )\n}\n\nexport { ComposedPayrollConfiguration as PayrollConfiguration }\n"],"names":["PayrollConfiguration","payrollData","usePayrollConfiguration","dateFormatter","useDateFormatter","formatCurrency","useNumberFormatter","Heading","Text","useComponentContext","payroll","payrollDeadline","jsx","jsxs","ComposedPayrollConfiguration","companyId","payrollId","PayrollConfigurationProvider"],"mappings":";;;;;;AAWA,SAASA,IAAuB;AAC9B,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAClBC,IAAgBC,EAAA,GAChBC,IAAiBC,EAAmB,UAAU,GAC9C,EAAE,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA,GAEpBC,IAAUT,EAAY,aAEtBU,IAAkBR,EAAc,eAAeO,GAAS,eAAe;AAE7E,2BACG,OAAA,EACC,UAAA;AAAA,IAAA,gBAAAE,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,wCAAoC;AAAA,IACpDG,uBACE,OAAA,EACC,UAAA;AAAA,MAAA,gBAAAE,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,mBAAe;AAAA,wBAC/BC,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,cAAA,CAAW;AAAA,QAAS;AAAA,QAAET,EAAc,uBAAuBO,EAAQ,SAAS;AAAA,MAAA,GACtF;AAAA,wBACCF,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,cAAA,CAAW;AAAA,QAAU;AAAA,QAC5BT,EAAc;AAAA,UACbO,EAAQ,WAAW;AAAA,UACnBA,EAAQ,WAAW;AAAA,QAAA;AAAA,MACrB,GACF;AAAA,wBACCF,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,oBAAA,CAAiB;AAAA,QAAS;AAAA,QAAED,EAAgB;AAAA,QAAK;AAAA,QAAKA,EAAgB;AAAA,MAAA,GAChF;AAAA,wBACCH,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,iBAAA,CAAc;AAAA,QAAU;AAAA,QAC/BF,EAAQ,eACLP,EAAc,uBAAuBO,EAAQ,YAAY,IACzD;AAAA,MAAA,GACN;AAAA,wBACCF,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAI,EAAC,YAAO,UAAA,aAAA,CAAU;AAAA,QAAS;AAAA,QAAEF,EAAQ,WAAW,QAAQ;AAAA,MAAA,GAC1D;AAAA,MACCA,EAAQ,UACP,gBAAAG,EAAC,OAAA,EACC,UAAA;AAAA,QAAA,gBAAAD,EAACL,GAAA,EAAQ,IAAG,MAAK,UAAA,UAAM;AAAA,0BACtBC,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAI,EAAC,YAAO,UAAA,iBAAA,CAAc;AAAA,UAAU;AAAA,UAC/BP,EAAe,OAAOK,EAAQ,OAAO,eAAe,CAAC,CAAC;AAAA,QAAA,GACzD;AAAA,0BACCF,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAI,EAAC,YAAO,UAAA,kBAAA,CAAe;AAAA,UAAU;AAAA,UAChCP,EAAe,OAAOK,EAAQ,OAAO,iBAAiB,CAAC,CAAC;AAAA,QAAA,GAC3D;AAAA,0BACCF,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAI,EAAC,YAAO,UAAA,kBAAA,CAAe;AAAA,UAAU;AAAA,UAChCP,EAAe,OAAOK,EAAQ,OAAO,iBAAiB,CAAC,CAAC;AAAA,QAAA,EAAA,CAC3D;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;AAEA,SAASI,EAA6B,EAAE,WAAAC,GAAW,WAAAC,KAAwC;AACzF,2BACGC,GAAA,EAA6B,WAAAF,GAAsB,WAAAC,GAClD,UAAA,gBAAAJ,EAACZ,KAAqB,GACxB;AAEJ;"}
@@ -1,7 +0,0 @@
1
- import { PayrollShow } from '@gusto/embedded-api/models/components/payroll';
2
- export interface PayrollConfigurationContextValue {
3
- payrollData: {
4
- payrollShow?: PayrollShow | null;
5
- };
6
- }
7
- export declare const PayrollConfigurationContext: import('react').Context<PayrollConfigurationContextValue | undefined>;
@@ -1,6 +0,0 @@
1
- import { createContext as o } from "react";
2
- const r = o(void 0);
3
- export {
4
- r as PayrollConfigurationContext
5
- };
6
- //# sourceMappingURL=PayrollConfigurationContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayrollConfigurationContext.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { PayrollShow } from '@gusto/embedded-api/models/components/payroll'\n\nexport interface PayrollConfigurationContextValue {\n payrollData: {\n payrollShow?: PayrollShow | null\n }\n}\n\nexport const PayrollConfigurationContext = createContext<\n PayrollConfigurationContextValue | undefined\n>(undefined)\n"],"names":["PayrollConfigurationContext","createContext"],"mappings":";AASO,MAAMA,IAA8BC,EAEzC,MAAS;"}
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { BaseBoundariesProps } from '../../../Base/Base';
3
- export interface PayrollConfigurationProviderProps extends BaseBoundariesProps {
4
- companyId: string;
5
- payrollId: string;
6
- children: ReactNode;
7
- }
8
- declare function ComposedPayrollConfigurationProvider({ companyId, payrollId, children, FallbackComponent, LoaderComponent, onErrorBoundaryError, }: PayrollConfigurationProviderProps): import("react/jsx-runtime").JSX.Element;
9
- export { ComposedPayrollConfigurationProvider as PayrollConfigurationProvider };
@@ -1,40 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { usePayrollsGetSuspense as l } from "@gusto/embedded-api/react-query/payrollsGet";
3
- import { PayrollConfigurationContext as u } from "./PayrollConfigurationContext.js";
4
- import { BaseBoundaries as s } from "../../../Base/Base.js";
5
- function d({
6
- companyId: o,
7
- payrollId: r,
8
- children: t
9
- }) {
10
- const { data: e } = l({
11
- companyId: o,
12
- payrollId: r,
13
- include: ["taxes", "benefits", "deductions"]
14
- }), n = {
15
- payrollData: e
16
- };
17
- return /* @__PURE__ */ i(u.Provider, { value: n, children: t });
18
- }
19
- function p({
20
- companyId: o,
21
- payrollId: r,
22
- children: t,
23
- FallbackComponent: e,
24
- LoaderComponent: n,
25
- onErrorBoundaryError: a
26
- }) {
27
- return /* @__PURE__ */ i(
28
- s,
29
- {
30
- FallbackComponent: e,
31
- LoaderComponent: n,
32
- onErrorBoundaryError: a,
33
- children: /* @__PURE__ */ i(d, { companyId: o, payrollId: r, children: t })
34
- }
35
- );
36
- }
37
- export {
38
- p as PayrollConfigurationProvider
39
- };
40
- //# sourceMappingURL=PayrollConfigurationProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayrollConfigurationProvider.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport {\n PayrollConfigurationContext,\n type PayrollConfigurationContextValue,\n} from './PayrollConfigurationContext'\nimport { BaseBoundaries, type BaseBoundariesProps } from '@/components/Base/Base'\n\nexport interface PayrollConfigurationProviderProps extends BaseBoundariesProps {\n companyId: string\n payrollId: string\n children: ReactNode\n}\n\nfunction PayrollConfigurationProvider({\n companyId,\n payrollId,\n children,\n}: PayrollConfigurationProviderProps) {\n const { data: payrollData } = usePayrollsGetSuspense({\n companyId,\n payrollId,\n include: ['taxes', 'benefits', 'deductions'],\n })\n\n const contextValue: PayrollConfigurationContextValue = {\n payrollData,\n }\n\n return (\n <PayrollConfigurationContext.Provider value={contextValue}>\n {children}\n </PayrollConfigurationContext.Provider>\n )\n}\n\nfunction ComposedPayrollConfigurationProvider({\n companyId,\n payrollId,\n children,\n FallbackComponent,\n LoaderComponent,\n onErrorBoundaryError,\n}: PayrollConfigurationProviderProps) {\n return (\n <BaseBoundaries\n FallbackComponent={FallbackComponent}\n LoaderComponent={LoaderComponent}\n onErrorBoundaryError={onErrorBoundaryError}\n >\n <PayrollConfigurationProvider companyId={companyId} payrollId={payrollId}>\n {children}\n </PayrollConfigurationProvider>\n </BaseBoundaries>\n )\n}\n\nexport { ComposedPayrollConfigurationProvider as PayrollConfigurationProvider }\n"],"names":["PayrollConfigurationProvider","companyId","payrollId","children","payrollData","usePayrollsGetSuspense","contextValue","PayrollConfigurationContext","ComposedPayrollConfigurationProvider","FallbackComponent","LoaderComponent","onErrorBoundaryError","jsx","BaseBoundaries"],"mappings":";;;;AAcA,SAASA,EAA6B;AAAA,EACpC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAAsC;AACpC,QAAM,EAAE,MAAMC,EAAA,IAAgBC,EAAuB;AAAA,IACnD,WAAAJ;AAAA,IACA,WAAAC;AAAA,IACA,SAAS,CAAC,SAAS,YAAY,YAAY;AAAA,EAAA,CAC5C,GAEKI,IAAiD;AAAA,IACrD,aAAAF;AAAA,EAAA;AAGF,2BACGG,EAA4B,UAA5B,EAAqC,OAAOD,GAC1C,UAAAH,GACH;AAEJ;AAEA,SAASK,EAAqC;AAAA,EAC5C,WAAAP;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,mBAAAM;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AACF,GAAsC;AACpC,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,mBAAAJ;AAAA,MACA,iBAAAC;AAAA,MACA,sBAAAC;AAAA,MAEA,UAAA,gBAAAC,EAACZ,GAAA,EAA6B,WAAAC,GAAsB,WAAAC,GACjD,UAAAC,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,5 +0,0 @@
1
- import "./types/i18next.d.ts"
2
- export { PayrollConfiguration } from './PayrollConfiguration';
3
- export { PayrollConfigurationProvider } from './PayrollConfigurationProvider';
4
- export { usePayrollConfiguration } from './usePayrollConfiguration';
5
- export type { PayrollConfigurationContextValue } from './PayrollConfigurationContext';
@@ -1,2 +0,0 @@
1
- import { PayrollConfigurationContextValue } from './PayrollConfigurationContext';
2
- export declare function usePayrollConfiguration(): PayrollConfigurationContextValue;
@@ -1,12 +0,0 @@
1
- import { useContext as r } from "react";
2
- import { PayrollConfigurationContext as t } from "./PayrollConfigurationContext.js";
3
- function e() {
4
- const o = r(t);
5
- if (o === void 0)
6
- throw new Error("usePayrollConfiguration must be used within a PayrollConfigurationProvider");
7
- return o;
8
- }
9
- export {
10
- e as usePayrollConfiguration
11
- };
12
- //# sourceMappingURL=usePayrollConfiguration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePayrollConfiguration.js","sources":["../../../../../src/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.ts"],"sourcesContent":["import { useContext } from 'react'\nimport {\n PayrollConfigurationContext,\n type PayrollConfigurationContextValue,\n} from './PayrollConfigurationContext'\n\nexport function usePayrollConfiguration(): PayrollConfigurationContextValue {\n const context = useContext(PayrollConfigurationContext)\n if (context === undefined) {\n throw new Error('usePayrollConfiguration must be used within a PayrollConfigurationProvider')\n }\n return context\n}\n"],"names":["usePayrollConfiguration","context","useContext","PayrollConfigurationContext"],"mappings":";;AAMO,SAASA,IAA4D;AAC1E,QAAMC,IAAUC,EAAWC,CAA2B;AACtD,MAAIF,MAAY;AACd,UAAM,IAAI,MAAM,4EAA4E;AAE9F,SAAOA;AACT;"}
@@ -1,2 +0,0 @@
1
- import "./types/i18next.d.ts"
2
- export { PayrollConfiguration, PayrollConfigurationProvider, usePayrollConfiguration, type PayrollConfigurationContextValue, } from './PayrollConfiguration';
@@ -1,5 +0,0 @@
1
- import { ObservabilityError, ObservabilityErrorType } from '../../types/observability';
2
- /**
3
- * Converts SDK errors into structured ObservabilityError objects
4
- */
5
- export declare function createObservabilityError(error: unknown, type?: ObservabilityErrorType): ObservabilityError | null;
@@ -1,45 +0,0 @@
1
- import { APIError as r } from "@gusto/embedded-api/models/errors/apierror";
2
- import { GustoEmbeddedError as s } from "@gusto/embedded-api/models/errors/gustoembeddederror";
3
- import { SDKValidationError as e } from "@gusto/embedded-api/models/errors/sdkvalidationerror";
4
- function u(t, n) {
5
- const o = Date.now(), i = t instanceof Error ? t.message : "Unknown error", a = t instanceof Error ? t.stack : void 0;
6
- return t instanceof e ? {
7
- type: n || "validation_error",
8
- message: i,
9
- stack: a,
10
- context: {
11
- validationSchema: t.pretty()
12
- },
13
- originalError: t,
14
- timestamp: o
15
- } : t instanceof r ? {
16
- type: n || "api_error",
17
- message: i,
18
- stack: a,
19
- context: {
20
- statusCode: t.httpMeta.response.status
21
- },
22
- originalError: t,
23
- timestamp: o
24
- } : t instanceof s ? {
25
- type: n || "api_error",
26
- message: i,
27
- stack: a,
28
- context: {
29
- statusCode: t.httpMeta.response.status
30
- },
31
- originalError: t,
32
- timestamp: o
33
- } : n ? {
34
- type: n,
35
- message: i,
36
- stack: a,
37
- context: {},
38
- originalError: t,
39
- timestamp: o
40
- } : null;
41
- }
42
- export {
43
- u as createObservabilityError
44
- };
45
- //# sourceMappingURL=observabilityUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observabilityUtils.js","sources":["../../../src/contexts/ObservabilityProvider/observabilityUtils.ts"],"sourcesContent":["import { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { GustoEmbeddedError } from '@gusto/embedded-api/models/errors/gustoembeddederror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport type { ObservabilityError, ObservabilityErrorType } from '@/types/observability'\n\n/**\n * Converts SDK errors into structured ObservabilityError objects\n */\nexport function createObservabilityError(\n error: unknown,\n type?: ObservabilityErrorType,\n): ObservabilityError | null {\n const timestamp = Date.now()\n const message = error instanceof Error ? error.message : 'Unknown error'\n const stack = error instanceof Error ? error.stack : undefined\n\n // Auto-detect error type based on instance if not provided\n if (error instanceof SDKValidationError) {\n return {\n type: type || 'validation_error',\n message,\n stack,\n context: {\n validationSchema: error.pretty(),\n },\n originalError: error,\n timestamp,\n }\n }\n\n if (error instanceof APIError) {\n return {\n type: type || 'api_error',\n message,\n stack,\n context: {\n statusCode: error.httpMeta.response.status,\n },\n originalError: error,\n timestamp,\n }\n }\n\n if (error instanceof GustoEmbeddedError) {\n return {\n type: type || 'api_error',\n message,\n stack,\n context: {\n statusCode: error.httpMeta.response.status,\n },\n originalError: error,\n timestamp,\n }\n }\n\n // For unknown errors, only create ObservabilityError if type is explicitly provided\n if (type) {\n return {\n type,\n message,\n stack,\n context: {},\n originalError: error,\n timestamp,\n }\n }\n\n return null\n}\n"],"names":["createObservabilityError","error","type","timestamp","message","stack","SDKValidationError","APIError","GustoEmbeddedError"],"mappings":";;;AAQO,SAASA,EACdC,GACAC,GAC2B;AAC3B,QAAMC,IAAY,KAAK,IAAA,GACjBC,IAAUH,aAAiB,QAAQA,EAAM,UAAU,iBACnDI,IAAQJ,aAAiB,QAAQA,EAAM,QAAQ;AAGrD,SAAIA,aAAiBK,IACZ;AAAA,IACL,MAAMJ,KAAQ;AAAA,IACd,SAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAS;AAAA,MACP,kBAAkBJ,EAAM,OAAA;AAAA,IAAO;AAAA,IAEjC,eAAeA;AAAA,IACf,WAAAE;AAAA,EAAA,IAIAF,aAAiBM,IACZ;AAAA,IACL,MAAML,KAAQ;AAAA,IACd,SAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAS;AAAA,MACP,YAAYJ,EAAM,SAAS,SAAS;AAAA,IAAA;AAAA,IAEtC,eAAeA;AAAA,IACf,WAAAE;AAAA,EAAA,IAIAF,aAAiBO,IACZ;AAAA,IACL,MAAMN,KAAQ;AAAA,IACd,SAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAS;AAAA,MACP,YAAYJ,EAAM,SAAS,SAAS;AAAA,IAAA;AAAA,IAEtC,eAAeA;AAAA,IACf,WAAAE;AAAA,EAAA,IAKAD,IACK;AAAA,IACL,MAAAA;AAAA,IACA,SAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAS,CAAA;AAAA,IACT,eAAeJ;AAAA,IACf,WAAAE;AAAA,EAAA,IAIG;AACT;"}