@gusto/embedded-react-sdk 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/Base/Base.js +4 -4
  3. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +2 -0
  4. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +52 -0
  5. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -0
  6. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +44 -0
  7. package/dist/components/Common/FlowBreadcrumbs/index.d.ts +3 -0
  8. package/dist/components/Common/SignatureForm/SignatureForm.js +11 -14
  9. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormActions.js +7 -9
  11. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js +12 -15
  13. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  14. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  15. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +38 -0
  16. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -0
  17. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +16 -0
  18. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js.map +1 -0
  19. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +27 -0
  20. package/dist/components/Common/UI/Breadcrumbs/index.d.ts +3 -0
  21. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  22. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
  23. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  24. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -5
  25. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -4
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -9
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +15 -16
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -5
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -4
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +10 -12
  37. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -5
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -5
  43. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -7
  45. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -10
  47. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  48. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -11
  49. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -5
  51. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -10
  53. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -10
  55. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -7
  57. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  58. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -4
  59. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  60. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -11
  61. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  62. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -5
  63. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  64. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +8 -10
  65. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  66. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -5
  67. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  68. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  69. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  70. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -5
  71. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  72. package/dist/components/Company/FederalTaxes/Form.js +6 -7
  73. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  74. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -10
  75. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  76. package/dist/components/Company/Industry/Actions.js +7 -9
  77. package/dist/components/Company/Industry/Actions.js.map +1 -1
  78. package/dist/components/Company/Industry/Context.js +7 -8
  79. package/dist/components/Company/Industry/Context.js.map +1 -1
  80. package/dist/components/Company/Industry/Edit.js +4 -7
  81. package/dist/components/Company/Industry/Edit.js.map +1 -1
  82. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -10
  83. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  84. package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
  85. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  86. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -12
  87. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  88. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -5
  89. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  90. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  91. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  92. package/dist/components/Company/Locations/LocationsList/List.js +15 -16
  93. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -4
  95. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -5
  97. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  98. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +10 -10
  99. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  100. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +16 -10
  101. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  102. package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
  103. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  104. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -11
  105. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  106. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -9
  107. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  108. package/dist/components/Company/OnboardingOverview/context.js +4 -5
  109. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  110. package/dist/components/Company/PaySchedule/PaySchedule.js +4 -5
  111. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  112. package/dist/components/Company/PaySchedule/_parts/Actions.js +9 -11
  113. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  114. package/dist/components/Company/PaySchedule/_parts/Edit.js +17 -17
  115. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  116. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -11
  117. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/_parts/List.js +17 -18
  119. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -7
  121. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  122. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -4
  123. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -5
  125. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  126. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -4
  127. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -4
  129. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  130. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -5
  131. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  132. package/dist/components/Contractor/Address/Address.js +5 -7
  133. package/dist/components/Contractor/Address/Address.js.map +1 -1
  134. package/dist/components/Contractor/Address/Form.js +7 -9
  135. package/dist/components/Contractor/Address/Form.js.map +1 -1
  136. package/dist/components/Contractor/Address/useAddress.js +6 -7
  137. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  138. package/dist/components/Contractor/ContractorList/index.js +15 -15
  139. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +37 -37
  140. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  141. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -13
  142. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  143. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -4
  144. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  145. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  146. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -4
  147. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  148. package/dist/components/Contractor/Submit/Submit.js +20 -21
  149. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  150. package/dist/components/Employee/Compensation/Actions.js +12 -13
  151. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  152. package/dist/components/Employee/Compensation/Edit.js +14 -14
  153. package/dist/components/Employee/Compensation/List.js +22 -23
  154. package/dist/components/Employee/Compensation/List.js.map +1 -1
  155. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -11
  156. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  157. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +32 -33
  158. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  159. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  160. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +11 -11
  161. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +22 -23
  162. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  163. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  164. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  165. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +3 -5
  166. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  167. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -5
  168. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  169. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -5
  170. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  171. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +3 -5
  172. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  173. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -5
  174. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  175. package/dist/components/Employee/EmployeeList/Actions.js +6 -8
  176. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  177. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -6
  178. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  179. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  180. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  181. package/dist/components/Employee/EmployeeList/List.js +14 -14
  182. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -5
  183. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  184. package/dist/components/Employee/FederalTaxes/Actions.js +7 -9
  185. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  186. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -13
  187. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  188. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -5
  189. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  190. package/dist/components/Employee/Landing/Landing.js +10 -11
  191. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  192. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  193. package/dist/components/Employee/PaymentMethod/Actions.js +6 -8
  194. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  195. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +3 -5
  196. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  197. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +11 -12
  198. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  199. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -4
  200. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  201. package/dist/components/Employee/PaymentMethod/Split.js +7 -7
  202. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -7
  203. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  204. package/dist/components/Employee/Profile/Actions.js +7 -9
  205. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  206. package/dist/components/Employee/Profile/AdminPersonalDetails.js +6 -7
  207. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  208. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  209. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  210. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +23 -25
  211. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  212. package/dist/components/Employee/Profile/useProfile.js +4 -5
  213. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  214. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  215. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  216. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -5
  217. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  218. package/dist/components/Employee/Taxes/Actions.js +8 -10
  219. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  220. package/dist/components/Employee/Taxes/FederalForm.js +12 -14
  221. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  222. package/dist/components/Employee/Taxes/useTaxes.js +4 -5
  223. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  224. package/dist/components/Flow/Flow.js +44 -24
  225. package/dist/components/Flow/Flow.js.map +1 -1
  226. package/dist/components/Flow/useFlow.d.ts +10 -1
  227. package/dist/components/Flow/useFlow.js.map +1 -1
  228. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +1 -1
  229. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +16 -16
  230. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +1 -1
  231. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +20 -22
  232. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  233. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +17 -19
  234. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  235. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +38 -34
  236. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  237. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +14 -14
  238. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  239. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +39 -40
  240. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  241. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
  242. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +8 -9
  243. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  244. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
  245. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +20 -19
  246. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  247. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -3
  248. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +65 -45
  249. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  250. package/dist/components/Payroll/PayrollFlow/index.d.ts +1 -1
  251. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  252. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +233 -96
  253. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  254. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +12 -13
  255. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  256. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +8 -9
  257. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  258. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +14 -15
  259. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  260. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -2
  261. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +41 -45
  262. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  263. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -2
  264. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +94 -96
  265. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  266. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +1 -2
  267. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +12 -26
  268. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  269. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -2
  270. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -45
  271. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  272. package/dist/components/Payroll/usePreparedPayrollData.js +3 -4
  273. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  274. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +41 -39
  275. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  276. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  277. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  278. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  279. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -4
  280. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  281. package/dist/helpers/breadcrumbHelpers.d.ts +33 -0
  282. package/dist/helpers/breadcrumbHelpers.js +46 -0
  283. package/dist/helpers/breadcrumbHelpers.js.map +1 -0
  284. package/dist/helpers/breadcrumbHelpers.test.d.ts +1 -0
  285. package/dist/i18n/I18n.d.ts +1 -1
  286. package/dist/i18n/I18n.js +32 -23
  287. package/dist/i18n/I18n.js.map +1 -1
  288. package/dist/i18n/en/Company.PaySchedule.json.js +2 -2
  289. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +28 -0
  290. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -0
  291. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +28 -24
  292. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  293. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +28 -26
  294. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  295. package/dist/i18n/en/Payroll.PayrollFlow.json.js +8 -0
  296. package/dist/i18n/en/Payroll.PayrollFlow.json.js.map +1 -0
  297. package/dist/i18n/en/Payroll.PayrollLanding.json.js +2 -2
  298. package/dist/i18n/en/Payroll.PayrollOverview.json.js +60 -56
  299. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  300. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -12
  301. package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
  302. package/dist/shared/constants.d.ts +3 -0
  303. package/dist/shared/constants.js +11 -9
  304. package/dist/shared/constants.js.map +1 -1
  305. package/dist/style.css +1 -1
  306. package/dist/types/i18next.d.ts +156 -149
  307. package/package.json +8 -8
  308. package/dist/i18n/en/Payroll.RunPayroll.json.js +0 -8
  309. package/dist/i18n/en/Payroll.RunPayroll.json.js.map +0 -1
  310. package/dist/i18n/en/PayrollBlocker.json.js +0 -24
  311. package/dist/i18n/en/PayrollBlocker.json.js.map +0 -1
@@ -1,28 +1,26 @@
1
1
  import { jsxs as l, Fragment as d, jsx as a } from "react/jsx-runtime";
2
2
  import { z as t } from "zod";
3
3
  import { useFormContext as c } from "react-hook-form";
4
- import { useTranslation as s } from "react-i18next";
4
+ import { useTranslation as o } from "react-i18next";
5
5
  import { Grid as b } from "../../Common/Grid/Grid.js";
6
6
  import "classnames";
7
- import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
8
- import { DatePickerField as p } from "../../Common/Fields/DatePickerField/DatePickerField.js";
9
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import "react";
11
7
  import { removeNonDigits as S, addressInline as g } from "../../../helpers/formattedStrings.js";
12
8
  import { usePlaceholderSSN as h, normalizeSSN as N } from "../../../helpers/ssn.js";
13
9
  import { SSN_REGEX as D, nameValidation as m } from "../../../helpers/validations.js";
10
+ import { TextInputField as s } from "../../Common/Fields/TextInputField/TextInputField.js";
14
11
  import { SelectField as I } from "../../Common/Fields/SelectField/SelectField.js";
12
+ import { DatePickerField as u } from "../../Common/Fields/DatePickerField/DatePickerField.js";
15
13
  const v = t.object({
16
14
  firstName: m,
17
15
  middleInitial: t.string().optional(),
18
16
  lastName: m
19
17
  });
20
- function z() {
21
- const { t: e } = s("Employee.Profile");
18
+ function C() {
19
+ const { t: e } = o("Employee.Profile");
22
20
  return /* @__PURE__ */ l(d, { children: [
23
21
  /* @__PURE__ */ l(b, { gap: { base: 20, small: 8 }, gridTemplateColumns: { base: "1fr", small: ["1fr", 200] }, children: [
24
22
  /* @__PURE__ */ a(
25
- o,
23
+ s,
26
24
  {
27
25
  name: "firstName",
28
26
  isRequired: !0,
@@ -30,10 +28,10 @@ function z() {
30
28
  errorMessage: e("validations.firstName")
31
29
  }
32
30
  ),
33
- /* @__PURE__ */ a(o, { name: "middleInitial", label: e("middleInitial") })
31
+ /* @__PURE__ */ a(s, { name: "middleInitial", label: e("middleInitial") })
34
32
  ] }),
35
33
  /* @__PURE__ */ a(
36
- o,
34
+ s,
37
35
  {
38
36
  name: "lastName",
39
37
  isRequired: !0,
@@ -48,8 +46,8 @@ const O = t.object({
48
46
  startDate: t.date().transform((e) => e.toISOString().split("T")[0]),
49
47
  email: t.string().email()
50
48
  });
51
- function G({ companyLocations: e }) {
52
- const { t: r } = s("Employee.Profile"), {
49
+ function L({ companyLocations: e }) {
50
+ const { t: r } = o("Employee.Profile"), {
53
51
  formState: { errors: n }
54
52
  } = c();
55
53
  return /* @__PURE__ */ l(d, { children: [
@@ -69,7 +67,7 @@ function G({ companyLocations: e }) {
69
67
  }
70
68
  ),
71
69
  /* @__PURE__ */ a(
72
- p,
70
+ u,
73
71
  {
74
72
  name: "startDate",
75
73
  label: r("startDateLabel"),
@@ -79,7 +77,7 @@ function G({ companyLocations: e }) {
79
77
  }
80
78
  ),
81
79
  /* @__PURE__ */ a(
82
- o,
80
+ s,
83
81
  {
84
82
  name: "email",
85
83
  label: r("email"),
@@ -95,16 +93,16 @@ const R = t.object({
95
93
  ssn: t.string().transform((e) => S(e)).refine((e) => D.test(e)),
96
94
  enableSsn: t.boolean()
97
95
  });
98
- function V({ employee: e, onChange: r }) {
99
- const { setValue: n } = c(), { t: i } = s("Employee.Profile"), u = h(e?.hasSsn);
96
+ function z({ employee: e, onChange: r }) {
97
+ const { setValue: n } = c(), { t: i } = o("Employee.Profile"), p = h(e?.hasSsn);
100
98
  return /* @__PURE__ */ a(
101
- o,
99
+ s,
102
100
  {
103
101
  isRequired: !0,
104
102
  name: "ssn",
105
103
  label: i("ssnLabel"),
106
104
  errorMessage: i("validations.ssn", { ns: "common" }),
107
- placeholder: u,
105
+ placeholder: p,
108
106
  transform: N,
109
107
  onChange: (f) => {
110
108
  n("enableSsn", !0), r?.(f);
@@ -115,10 +113,10 @@ function V({ employee: e, onChange: r }) {
115
113
  const y = t.object({
116
114
  dateOfBirth: t.date().transform((e) => e.toISOString().split("T")[0])
117
115
  });
118
- function X() {
119
- const { t: e } = s("Employee.Profile");
116
+ function G() {
117
+ const { t: e } = o("Employee.Profile");
120
118
  return /* @__PURE__ */ a(
121
- p,
119
+ u,
122
120
  {
123
121
  name: "dateOfBirth",
124
122
  label: e("dobLabel"),
@@ -132,13 +130,13 @@ v.merge(O).merge(R).merge(y).extend({
132
130
  enableSsn: t.boolean()
133
131
  });
134
132
  export {
135
- G as AdminInputs,
133
+ L as AdminInputs,
136
134
  O as AdminInputsSchema,
137
- X as DateOfBirthInput,
135
+ G as DateOfBirthInput,
138
136
  y as DateOfBirthSchema,
139
- z as NameInputs,
137
+ C as NameInputs,
140
138
  v as NameInputsSchema,
141
- V as SocialSecurityNumberInput,
139
+ z as SocialSecurityNumberInput,
142
140
  R as SocialSecurityNumberSchema
143
141
  };
144
142
  //# sourceMappingURL=PersonalDetailsInputs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersonalDetailsInputs.js","sources":["../../../../src/components/Employee/Profile/PersonalDetailsInputs.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type Employee } from '@gusto/embedded-api/models/components/employee'\nimport { SelectField, TextInputField, Grid, DatePickerField } from '@/components/Common'\nimport { addressInline, removeNonDigits } from '@/helpers/formattedStrings'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { nameValidation, SSN_REGEX } from '@/helpers/validations'\n\nexport const NameInputsSchema = z.object({\n firstName: nameValidation,\n middleInitial: z.string().optional(),\n lastName: nameValidation,\n})\n\nexport function NameInputs() {\n const { t } = useTranslation('Employee.Profile')\n\n return (\n <>\n <Grid gap={{ base: 20, small: 8 }} gridTemplateColumns={{ base: '1fr', small: ['1fr', 200] }}>\n <TextInputField\n name=\"firstName\"\n isRequired\n label={t('firstName')}\n errorMessage={t('validations.firstName')}\n />\n <TextInputField name=\"middleInitial\" label={t('middleInitial')} />\n </Grid>\n <TextInputField\n name=\"lastName\"\n isRequired\n label={t('lastName')}\n errorMessage={t('validations.lastName')}\n />\n </>\n )\n}\n\nexport const AdminInputsSchema = z.object({\n workAddress: z.string().min(1),\n startDate: z.date().transform(date => date.toISOString().split('T')[0]),\n email: z.string().email(),\n})\n\ntype AdminInputsSchemaType = z.infer<typeof AdminInputsSchema>\n\ninterface AdminInputsProps {\n companyLocations: Location[]\n}\n\nexport function AdminInputs({ companyLocations }: AdminInputsProps) {\n const { t } = useTranslation('Employee.Profile')\n const {\n formState: { errors },\n } = useFormContext<AdminInputsSchemaType>()\n\n return (\n <>\n <SelectField\n name=\"workAddress\"\n options={companyLocations.map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))}\n label={t('workAddress')}\n description={t('workAddressDescription')}\n placeholder={t('workAddressPlaceholder')}\n errorMessage={t('validations.location', { ns: 'common' })}\n isRequired\n />\n <DatePickerField\n name=\"startDate\"\n label={t('startDateLabel')}\n description={t('startDateDescription')}\n isRequired\n errorMessage={\n errors.startDate?.type === 'custom'\n ? t('validations.startDateOutOfRange')\n : t('validations.startDate')\n }\n />\n <TextInputField\n name=\"email\"\n label={t('email')}\n description={t('emailDescription')}\n errorMessage={t('validations.email')}\n isRequired\n type=\"email\"\n />\n </>\n )\n}\n\nexport const SocialSecurityNumberSchema = z.object({\n ssn: z\n .string()\n .transform(input => removeNonDigits(input))\n .refine(input => SSN_REGEX.test(input)),\n enableSsn: z.boolean(),\n})\n\ntype SocialSecurityNumberSchemaType = z.infer<typeof SocialSecurityNumberSchema>\n\ninterface SocialSecurityNumberInputProps {\n employee?: Employee\n onChange?: (updatedValue: string) => void\n}\n\nexport function SocialSecurityNumberInput({ employee, onChange }: SocialSecurityNumberInputProps) {\n const { setValue } = useFormContext<SocialSecurityNumberSchemaType>()\n const { t } = useTranslation('Employee.Profile')\n const placeholderSSN = usePlaceholderSSN(employee?.hasSsn)\n return (\n <TextInputField\n isRequired\n name=\"ssn\"\n label={t('ssnLabel')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n placeholder={placeholderSSN}\n transform={normalizeSSN}\n onChange={updatedValue => {\n setValue('enableSsn', true)\n onChange?.(updatedValue)\n }}\n />\n )\n}\n\nexport const DateOfBirthSchema = z.object({\n dateOfBirth: z.date().transform(date => date.toISOString().split('T')[0]),\n})\n\nexport function DateOfBirthInput() {\n const { t } = useTranslation('Employee.Profile')\n return (\n <DatePickerField\n name=\"dateOfBirth\"\n label={t('dobLabel')}\n isRequired\n errorMessage={t('validations.dob', { ns: 'common' })}\n />\n )\n}\n\n// All possible inputs for PersonalDetails forms\nconst PersonalDetailsTotalSchema = NameInputsSchema.merge(AdminInputsSchema)\n .merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n selfOnboarding: z.boolean(),\n enableSsn: z.boolean(),\n })\n\ntype NullableDatesMapper<Source> = {\n [Property in keyof Source]: Source[Property] extends Date\n ? Source[Property] | null\n : Source[Property]\n}\n\nexport type PersonalDetailsPayload = z.infer<typeof PersonalDetailsTotalSchema>\n\n//Typescript magic to mark date fields as nullable for correct defaultvalues\nexport type PersonalDetailsInputs = NullableDatesMapper<z.input<typeof PersonalDetailsTotalSchema>>\n"],"names":["NameInputsSchema","z","nameValidation","NameInputs","t","useTranslation","jsxs","Fragment","Grid","jsx","TextInputField","AdminInputsSchema","date","AdminInputs","companyLocations","errors","useFormContext","SelectField","location","addressInline","DatePickerField","SocialSecurityNumberSchema","input","removeNonDigits","SSN_REGEX","SocialSecurityNumberInput","employee","onChange","setValue","placeholderSSN","usePlaceholderSSN","normalizeSSN","updatedValue","DateOfBirthSchema","DateOfBirthInput"],"mappings":";;;;;;;;;;;;;;AAUO,MAAMA,IAAmBC,EAAE,OAAO;AAAA,EACvC,WAAWC;AAAA,EACX,eAAeD,EAAE,OAAA,EAAS,SAAA;AAAA,EAC1B,UAAUC;AACZ,CAAC;AAEM,SAASC,IAAa;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAACE,KAAK,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA,GAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,GAAG,KACvF,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAON,EAAE,WAAW;AAAA,UACpB,cAAcA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAExCM,GAAA,EAAe,MAAK,iBAAgB,OAAON,EAAE,eAAe,EAAA,CAAG;AAAA,IAAA,GAClE;AAAA,IACA,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON,EAAE,UAAU;AAAA,QACnB,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AA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AMW,CAAiB,EACxE,MAAMU,CAA0B,EAChC,MAAMY,CAAiB,EACvB,OAAO;AAAA,EACN,gBAAgBhC,EAAE,QAAA;AAAA,EAClB,WAAWA,EAAE,QAAA;AACf,CAAC;"}
1
+ {"version":3,"file":"PersonalDetailsInputs.js","sources":["../../../../src/components/Employee/Profile/PersonalDetailsInputs.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type Employee } from '@gusto/embedded-api/models/components/employee'\nimport { SelectField, TextInputField, Grid, DatePickerField } from '@/components/Common'\nimport { addressInline, removeNonDigits } from '@/helpers/formattedStrings'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { nameValidation, SSN_REGEX } from '@/helpers/validations'\n\nexport const NameInputsSchema = z.object({\n firstName: nameValidation,\n middleInitial: z.string().optional(),\n lastName: nameValidation,\n})\n\nexport function NameInputs() {\n const { t } = useTranslation('Employee.Profile')\n\n return (\n <>\n <Grid gap={{ base: 20, small: 8 }} gridTemplateColumns={{ base: '1fr', small: ['1fr', 200] }}>\n <TextInputField\n name=\"firstName\"\n isRequired\n label={t('firstName')}\n errorMessage={t('validations.firstName')}\n />\n <TextInputField name=\"middleInitial\" label={t('middleInitial')} />\n </Grid>\n <TextInputField\n name=\"lastName\"\n isRequired\n label={t('lastName')}\n errorMessage={t('validations.lastName')}\n />\n </>\n )\n}\n\nexport const AdminInputsSchema = z.object({\n workAddress: z.string().min(1),\n startDate: z.date().transform(date => date.toISOString().split('T')[0]),\n email: z.string().email(),\n})\n\ntype AdminInputsSchemaType = z.infer<typeof AdminInputsSchema>\n\ninterface AdminInputsProps {\n companyLocations: Location[]\n}\n\nexport function AdminInputs({ companyLocations }: AdminInputsProps) {\n const { t } = useTranslation('Employee.Profile')\n const {\n formState: { errors },\n } = useFormContext<AdminInputsSchemaType>()\n\n return (\n <>\n <SelectField\n name=\"workAddress\"\n options={companyLocations.map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))}\n label={t('workAddress')}\n description={t('workAddressDescription')}\n placeholder={t('workAddressPlaceholder')}\n errorMessage={t('validations.location', { ns: 'common' })}\n isRequired\n />\n <DatePickerField\n name=\"startDate\"\n label={t('startDateLabel')}\n description={t('startDateDescription')}\n isRequired\n errorMessage={\n errors.startDate?.type === 'custom'\n ? t('validations.startDateOutOfRange')\n : t('validations.startDate')\n }\n />\n <TextInputField\n name=\"email\"\n label={t('email')}\n description={t('emailDescription')}\n errorMessage={t('validations.email')}\n isRequired\n type=\"email\"\n />\n </>\n )\n}\n\nexport const SocialSecurityNumberSchema = z.object({\n ssn: z\n .string()\n .transform(input => removeNonDigits(input))\n .refine(input => SSN_REGEX.test(input)),\n enableSsn: z.boolean(),\n})\n\ntype SocialSecurityNumberSchemaType = z.infer<typeof SocialSecurityNumberSchema>\n\ninterface SocialSecurityNumberInputProps {\n employee?: Employee\n onChange?: (updatedValue: string) => void\n}\n\nexport function SocialSecurityNumberInput({ employee, onChange }: SocialSecurityNumberInputProps) {\n const { setValue } = useFormContext<SocialSecurityNumberSchemaType>()\n const { t } = useTranslation('Employee.Profile')\n const placeholderSSN = usePlaceholderSSN(employee?.hasSsn)\n return (\n <TextInputField\n isRequired\n name=\"ssn\"\n label={t('ssnLabel')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n placeholder={placeholderSSN}\n transform={normalizeSSN}\n onChange={updatedValue => {\n setValue('enableSsn', true)\n onChange?.(updatedValue)\n }}\n />\n )\n}\n\nexport const DateOfBirthSchema = z.object({\n dateOfBirth: z.date().transform(date => date.toISOString().split('T')[0]),\n})\n\nexport function DateOfBirthInput() {\n const { t } = useTranslation('Employee.Profile')\n return (\n <DatePickerField\n name=\"dateOfBirth\"\n label={t('dobLabel')}\n isRequired\n errorMessage={t('validations.dob', { ns: 'common' })}\n />\n )\n}\n\n// All possible inputs for PersonalDetails forms\nconst PersonalDetailsTotalSchema = NameInputsSchema.merge(AdminInputsSchema)\n .merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n selfOnboarding: z.boolean(),\n enableSsn: z.boolean(),\n })\n\ntype NullableDatesMapper<Source> = {\n [Property in keyof Source]: Source[Property] extends Date\n ? Source[Property] | null\n : Source[Property]\n}\n\nexport type PersonalDetailsPayload = z.infer<typeof PersonalDetailsTotalSchema>\n\n//Typescript magic to mark date fields as nullable for correct defaultvalues\nexport type PersonalDetailsInputs = NullableDatesMapper<z.input<typeof PersonalDetailsTotalSchema>>\n"],"names":["NameInputsSchema","z","nameValidation","NameInputs","t","useTranslation","jsxs","Fragment","Grid","jsx","TextInputField","AdminInputsSchema","date","AdminInputs","companyLocations","errors","useFormContext","SelectField","location","addressInline","DatePickerField","SocialSecurityNumberSchema","input","removeNonDigits","SSN_REGEX","SocialSecurityNumberInput","employee","onChange","setValue","placeholderSSN","usePlaceholderSSN","normalizeSSN","updatedValue","DateOfBirthSchema","DateOfBirthInput"],"mappings":";;;;;;;;;;;;AAUO,MAAMA,IAAmBC,EAAE,OAAO;AAAA,EACvC,WAAWC;AAAA,EACX,eAAeD,EAAE,OAAA,EAAS,SAAA;AAAA,EAC1B,UAAUC;AACZ,CAAC;AAEM,SAASC,IAAa;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAACE,KAAK,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA,GAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,GAAG,KACvF,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAON,EAAE,WAAW;AAAA,UACpB,cAAcA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAExCM,GAAA,EAAe,MAAK,iBAAgB,OAA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,EAAe,kBAAkB;AAC/C,SACE,gBAAAI;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAOhB,EAAE,UAAU;AAAA,MACnB,YAAU;AAAA,MACV,cAAcA,EAAE,mBAAmB,EAAE,IAAI,UAAU;AAAA,IAAA;AAAA,EAAA;AAGzD;AAGmCJ,EAAiB,MAAMW,CAAiB,EACxE,MAAMU,CAA0B,EAChC,MAAMY,CAAiB,EACvB,OAAO;AAAA,EACN,gBAAgBhC,EAAE,QAAA;AAAA,EAClB,WAAWA,EAAE,QAAA;AACf,CAAC;"}
@@ -9,14 +9,13 @@ import "@tanstack/react-query";
9
9
  import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
11
  import "classnames";
12
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
12
  import "dompurify";
14
13
  import "../../../contexts/LocaleProvider/useLocale.js";
15
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
17
- const [a, v] = o("ProfileContext");
16
+ const [u, a] = o("ProfileContext");
18
17
  export {
19
- v as ProfileProvider,
20
- a as useProfile
18
+ a as ProfileProvider,
19
+ u as useProfile
21
20
  };
22
21
  //# sourceMappingURL=useProfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
1
+ {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
@@ -1,16 +1,14 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as r } from "react-i18next";
3
- import { useStateTaxes as e } from "./useStateTaxes.js";
2
+ import { useTranslation as i } from "react-i18next";
3
+ import { useStateTaxes as r } from "./useStateTaxes.js";
4
4
  import "classnames";
5
- import "../../../shared/constants.js";
6
- import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- function C() {
10
- const { t: o } = r("Employee.StateTaxes"), { isPending: n } = e(), i = s();
11
- return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(i.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
5
+ import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
+ import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ function d() {
8
+ const { t: o } = i("Employee.StateTaxes"), { isPending: n } = r(), e = m();
9
+ return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(e.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
12
10
  }
13
11
  export {
14
- C as Actions
12
+ d as Actions
15
13
  };
16
14
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/StateTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxes } from './useStateTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.StateTaxes')\n const { isPending } = useStateTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useStateTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/StateTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxes } from './useStateTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.StateTaxes')\n const { isPending } = useStateTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useStateTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
@@ -9,14 +9,13 @@ import "@tanstack/react-query";
9
9
  import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
11
  import "classnames";
12
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
12
  import "dompurify";
14
13
  import "../../../contexts/LocaleProvider/useLocale.js";
15
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
15
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
17
- const [f, v] = t("StateTaxesContext");
16
+ const [u, f] = t("StateTaxesContext");
18
17
  export {
19
- v as StateTaxesProvider,
20
- f as useStateTaxes
18
+ f as StateTaxesProvider,
19
+ u as useStateTaxes
21
20
  };
22
21
  //# sourceMappingURL=useStateTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStateTaxes.js","sources":["../../../../src/components/Employee/StateTaxes/useStateTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useStateTaxes, StateTaxesProvider] =\n createCompoundContext<StateTaxesContextType>('StateTaxesContext')\nexport { useStateTaxes, StateTaxesProvider }\n"],"names":["useStateTaxes","StateTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
1
+ {"version":3,"file":"useStateTaxes.js","sources":["../../../../src/components/Employee/StateTaxes/useStateTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useStateTaxes, StateTaxesProvider] =\n createCompoundContext<StateTaxesContextType>('StateTaxesContext')\nexport { useStateTaxes, StateTaxesProvider }\n"],"names":["useStateTaxes","StateTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
@@ -1,16 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useTranslation as r } from "react-i18next";
3
- import { useTaxes as m } from "./useTaxes.js";
2
+ import { useTranslation as i } from "react-i18next";
3
+ import { useTaxes as r } from "./useTaxes.js";
4
4
  import "classnames";
5
- import "../../../shared/constants.js";
6
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- const C = () => {
10
- const { t } = r("Employee.Taxes"), { isPending: n } = m(), i = e();
11
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
5
+ import { ActionsLayout as e } from "../../Common/ActionsLayout/ActionsLayout.js";
6
+ import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ const d = () => {
8
+ const { t } = i("Employee.Taxes"), { isPending: n } = r(), s = m();
9
+ return /* @__PURE__ */ o(e, { children: /* @__PURE__ */ o(s.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
12
10
  };
13
11
  export {
14
- C as Actions
12
+ d as Actions
15
13
  };
16
14
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Taxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useTaxes } from './useTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Taxes')\n const { isPending } = useTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,gBAAgB,GACvC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Taxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useTaxes } from './useTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Taxes')\n const { isPending } = useTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,gBAAgB,GACvC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
@@ -1,14 +1,12 @@
1
1
  import { jsxs as l, Fragment as a, jsx as r } from "react/jsx-runtime";
2
- import { useTranslation as s, Trans as m } from "react-i18next";
2
+ import { useTranslation as s, Trans as u } from "react-i18next";
3
3
  import { z as t } from "zod";
4
4
  import "classnames";
5
- import "../../../shared/constants.js";
6
- import { RadioGroupField as u } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
5
+ import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import { SelectField as d } from "../../Common/Fields/SelectField/SelectField.js";
7
+ import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
7
8
  import { NumberInputField as i } from "../../Common/Fields/NumberInputField/NumberInputField.js";
8
- import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import "react";
10
- import { SelectField as f } from "../../Common/Fields/SelectField/SelectField.js";
11
- const v = t.object({
9
+ const R = t.object({
12
10
  filingStatus: t.string().min(1),
13
11
  twoJobs: t.string().min(1),
14
12
  dependentsAmount: t.number().transform(String),
@@ -17,8 +15,8 @@ const v = t.object({
17
15
  extraWithholding: t.number().transform(String),
18
16
  w4DataType: t.enum(["pre_2020_w4", "rev_2020_w4"])
19
17
  });
20
- function w() {
21
- const { t: e } = s("Employee.Taxes"), o = d(), n = [
18
+ function q() {
19
+ const { t: e } = s("Employee.Taxes"), o = m(), n = [
22
20
  { value: "Single", label: e("filingStatusSingle") },
23
21
  { value: "Married", label: e("filingStatusMarried") },
24
22
  { value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
@@ -26,7 +24,7 @@ function w() {
26
24
  ];
27
25
  return /* @__PURE__ */ l(a, { children: [
28
26
  /* @__PURE__ */ r(
29
- f,
27
+ d,
30
28
  {
31
29
  name: "filingStatus",
32
30
  label: e("federalFilingStatus1c"),
@@ -37,14 +35,14 @@ function w() {
37
35
  }
38
36
  ),
39
37
  /* @__PURE__ */ r(
40
- u,
38
+ f,
41
39
  {
42
40
  name: "twoJobs",
43
41
  isRequired: !0,
44
42
  label: e("multipleJobs2c"),
45
43
  errorMessage: e("validations.federalTwoJobs"),
46
44
  description: /* @__PURE__ */ r(o.Text, { children: /* @__PURE__ */ r(
47
- m,
45
+ u,
48
46
  {
49
47
  i18nKey: "includesSpouseExplanation",
50
48
  t: e,
@@ -104,7 +102,7 @@ function w() {
104
102
  ] });
105
103
  }
106
104
  export {
107
- w as FederalForm,
108
- v as FederalFormSchema
105
+ q as FederalForm,
106
+ R as FederalFormSchema
109
107
  };
110
108
  //# sourceMappingURL=FederalForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/Taxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { NumberInputField, RadioGroupField, SelectField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.Taxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Components.Text>\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n </Components.Text>\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;;;;AAKO,MA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AAAA,YACT,GAAAV;AAAA,YACA,YAAY;AAAA,cACV,UAAU,gBAAAO,EAACL,EAAW,MAAX,CAAA,CAAgB;AAAA,YAAA;AAAA,UAC7B;AAAA,QAAA,GAEJ;AAAA,QAEF,SAAS;AAAA,UACP,EAAE,OAAO,QAAQ,OAAOF,EAAE,gBAAgB,EAAA;AAAA,UAC1C,EAAE,OAAO,SAAS,OAAOA,EAAE,eAAe,EAAA;AAAA,QAAE;AAAA,MAC9C;AAAA,IAAA;AAAA,IAEF,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,6BAA6B;AAAA,QACtC,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,aAAa;AAAA,QACtB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,YAAY;AAAA,QACrB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,kBAAkB;AAAA,QAC3B,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
1
+ {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/Taxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { NumberInputField, RadioGroupField, SelectField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.Taxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Components.Text>\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n </Components.Text>\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;;AAKO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,EACvC,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,YAAYA,EAAE,KAAK,CAAC,eAAe,aAAa,CAAC;AACnD,CAAC;AAKM,SAASC,IAAc;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gBAAgB,GACvCC,IAAaC,EAAA,GAEbC,IAAyB;AAAA,IAC7B,EAAE,OAAO,UAAU,OAAOJ,EAAE,oBAAoB,EAAA;AAAA,IAChD,EAAE,OAAO,WAAW,OAAOA,EAAE,qBAAqB,EAAA;AAAA,IAClD,EAAE,OAAO,qBAAqB,OAAOA,EAAE,6BAA6B,EAAA;AAAA,IACpE,EAAE,OAAO,2BAA2B,OAAOA,EAAE,mCAAmC,EAAA;AAAA,EAAE;AAGpF,SACE,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR,EAAE,uBAAuB;AAAA,QAChC,aAAaA,EAAE,iCAAiC;AAAA,QAChD,SAASI;AAAA,QACT,YAAU;AAAA,QACV,cAAcJ,EAAE,iCAAiC;AAAA,MAAA;AAAA,IA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,kBAAkB;AAAA,QAC3B,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
@@ -9,14 +9,13 @@ import "@tanstack/react-query";
9
9
  import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
11
  import "classnames";
12
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
12
  import "dompurify";
14
13
  import "../../../contexts/LocaleProvider/useLocale.js";
15
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
17
- const [v, P] = o("TaxesContext");
16
+ const [f, v] = o("TaxesContext");
18
17
  export {
19
- P as TaxesProvider,
20
- v as useTaxes
18
+ v as TaxesProvider,
19
+ f as useTaxes
21
20
  };
22
21
  //# sourceMappingURL=useTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
1
+ {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
@@ -1,39 +1,59 @@
1
- import { jsx as s, Fragment as d, jsxs as f } from "react/jsx-runtime";
2
- import { useMachine as h } from "react-robot";
3
- import { useTranslation as g } from "react-i18next";
4
- import { FlowContext as C } from "./useFlow.js";
5
- import { useComponentContext as v } from "../../contexts/ComponentAdapter/useComponentContext.js";
6
- const b = ({ onEvent: l, machine: a }) => {
7
- const p = v(), { t: m } = g(), [o, i, c] = h(a, {
8
- onEvent: x,
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import { useMachine as B } from "react-robot";
3
+ import { useTranslation as C } from "react-i18next";
4
+ import { FlowBreadcrumbs as v } from "../Common/FlowBreadcrumbs/FlowBreadcrumbs.js";
5
+ import { Flex as l, FlexItem as u } from "../Common/Flex/Flex.js";
6
+ import "classnames";
7
+ import { FlowContext as w } from "./useFlow.js";
8
+ import { useComponentContext as F } from "../../contexts/ComponentAdapter/useComponentContext.js";
9
+ const G = ({ onEvent: d, machine: x }) => {
10
+ const f = F(), { t: b } = C(), [r, g, a] = B(x, {
11
+ onEvent: m,
9
12
  component: null,
10
13
  progressBarCta: null
11
- }), u = o.context.showProgress ?? !1, t = o.context.totalSteps ?? null, e = o.context.currentStep ?? null;
12
- function x(n, r) {
13
- c.child ? c.child.send({ type: n, payload: r }) : i({ type: n, payload: r }), l(n, r);
14
+ }), {
15
+ progressBarType: i = null,
16
+ totalSteps: o = null,
17
+ currentStep: t = null,
18
+ currentBreadcrumbId: n,
19
+ breadcrumbs: h = {}
20
+ } = r.context;
21
+ function m(s, c) {
22
+ a.child ? a.child.send({ type: s, payload: c }) : g({ type: s, payload: c }), d(s, c);
14
23
  }
15
- return /* @__PURE__ */ s(d, { children: /* @__PURE__ */ f(
16
- C.Provider,
24
+ return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
25
+ w.Provider,
17
26
  {
18
27
  value: {
19
- ...o.context
28
+ ...r.context
20
29
  },
21
- children: [
22
- u && e && t && /* @__PURE__ */ s(
23
- p.ProgressBar,
30
+ children: /* @__PURE__ */ p(l, { flexDirection: "column", gap: 32, children: [
31
+ i === "progress" && t && o && /* @__PURE__ */ e(
32
+ f.ProgressBar,
24
33
  {
25
- totalSteps: t,
26
- currentStep: e,
27
- label: m("progressBarLabel", { totalSteps: t, currentStep: e }),
28
- cta: o.context.progressBarCta
34
+ totalSteps: o,
35
+ currentStep: t,
36
+ label: b("progressBarLabel", { totalSteps: o, currentStep: t }),
37
+ cta: r.context.progressBarCta
29
38
  }
30
39
  ),
31
- o.context.component && /* @__PURE__ */ s(o.context.component, {})
32
- ]
40
+ i === "breadcrumbs" && /* @__PURE__ */ p(l, { flexDirection: "row", justifyContent: "space-between", alignItems: "center", children: [
41
+ /* @__PURE__ */ e(u, { flexGrow: 1, children: /* @__PURE__ */ e(
42
+ v,
43
+ {
44
+ breadcrumbs: n ? h[n] ?? [] : [],
45
+ currentBreadcrumbId: n,
46
+ onEvent: m
47
+ }
48
+ ) }),
49
+ /* @__PURE__ */ e(u, { children: r.context.progressBarCta && /* @__PURE__ */ e(r.context.progressBarCta, {}) })
50
+ ] }),
51
+ r.context.component && /* @__PURE__ */ e(r.context.component, {})
52
+ ] })
33
53
  }
34
54
  ) });
35
55
  };
36
56
  export {
37
- b as Flow
57
+ G as Flow
38
58
  };
39
59
  //# sourceMappingURL=Flow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps = {\n machine: Machine<object, FlowContextInterface>\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = ({ onEvent, machine }: FlowProps) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const showProgress = current.context.showProgress ?? false\n const totalSteps = current.context.totalSteps ?? null\n const currentStep = current.context.currentStep ?? null\n\n function handleEvent(type: EventType, data: unknown): void {\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n //@ts-expect-error: not sure why 'type' type is incorrectly derived here\n service.child.send({ type: type, payload: data })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n send({ type: type, payload: data })\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n {showProgress && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {current.context.component && <current.context.component />}\n </FlowContext.Provider>\n </>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","showProgress","totalSteps","currentStep","type","data","jsx","Fragment","jsxs","FlowContext"],"mappings":";;;;;AAcO,MAAMA,IAAO,CAAC,EAAE,SAAAC,GAAS,SAAAC,QAAyB;AACvD,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,CACjB,GAEKC,IAAeL,EAAQ,QAAQ,gBAAgB,IAC/CM,IAAaN,EAAQ,QAAQ,cAAc,MAC3CO,IAAcP,EAAQ,QAAQ,eAAe;AAEnD,WAASI,EAAYI,GAAiBC,GAAqB;AAEzD,IAAIP,EAAQ,QAEVA,EAAQ,MAAM,KAAK,EAAE,MAAAM,GAAY,SAASC,GAAM,IAGhDR,EAAK,EAAE,MAAAO,GAAY,SAASC,EAAA,CAAM,GAGpCf,EAAQc,GAAMC,CAAI;AAAA,EACpB;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGb,EAAQ;AAAA,MAAA;AAAA,MAGZ,UAAA;AAAA,QAAAK,KAAgBE,KAAeD,KAC9B,gBAAAI;AAAA,UAACd,EAAW;AAAA,UAAX;AAAA,YACC,YAAAU;AAAA,YACA,aAAAC;AAAA,YACA,OAAOT,EAAE,oBAAoB,EAAE,YAAAQ,GAAY,aAAAC,GAAa;AAAA,YACxD,KAAKP,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGxBA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE7D;AAEJ;"}
1
+ {"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps = {\n machine: Machine<object, FlowContextInterface>\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = ({ onEvent, machine }: FlowProps) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n //@ts-expect-error: not sure why 'type' type is incorrectly derived here\n service.child.send({ type: type, payload: data })\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n send({ type: type, payload: data })\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":";;;;;;;;AAi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AAA,YAAA;AAAA,cACC,aAAaT,IAAuBC,EAAYD,CAAmB,KAAK,CAAA,IAAM,CAAA;AAAA,cAC9E,qBAAAA;AAAA,cACA,SAASJ;AAAA,YAAA;AAAA,UAAA,GAEb;AAAA,UACA,gBAAAS,EAACG,GAAA,EACE,UAAAhB,EAAQ,QAAQ,oCAAmBA,EAAQ,QAAQ,gBAAhB,CAAA,CAA+B,EAAA,CACrE;AAAA,QAAA,GACF;AAAA,QAEDA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,14 +1,23 @@
1
+ import { CustomTypeOptions } from 'i18next';
1
2
  import { OnEventType } from '../Base/useBase';
2
3
  import { CommonComponentInterface } from '../Base';
4
+ import { BreadcrumbTrail } from '../Common/FlowBreadcrumbs/FlowBreadcrumbsTypes';
3
5
  import { EventType } from '../../shared/constants';
6
+ export interface CtaConfig {
7
+ labelKey: string;
8
+ namespace?: keyof CustomTypeOptions['resources'];
9
+ }
4
10
  export interface FlowContextInterface {
5
11
  component: React.ComponentType<CommonComponentInterface> | null;
6
12
  onEvent: OnEventType<EventType, unknown>;
7
- showProgress?: boolean;
13
+ progressBarType?: 'progress' | 'breadcrumbs' | null;
8
14
  totalSteps?: number;
9
15
  currentStep?: number | null;
10
16
  defaultValues?: Record<string, unknown>;
11
17
  progressBarCta?: React.ComponentType | null;
18
+ breadcrumbs?: BreadcrumbTrail;
19
+ currentBreadcrumbId?: string;
20
+ ctaConfig?: CtaConfig | null;
12
21
  }
13
22
  export declare const FlowContext: import('react').Context<FlowContextInterface | null>;
14
23
  export declare function useFlow<C extends FlowContextInterface>(): C;
@@ -1 +1 @@
1
- {"version":3,"file":"useFlow.js","sources":["../../../src/components/Flow/useFlow.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { OnEventType } from '../Base/useBase'\nimport type { CommonComponentInterface } from '../Base'\nimport type { EventType } from '@/shared/constants'\n\nexport interface FlowContextInterface {\n component: React.ComponentType<CommonComponentInterface> | null\n onEvent: OnEventType<EventType, unknown>\n showProgress?: boolean\n totalSteps?: number\n currentStep?: number | null\n defaultValues?: Record<string, unknown>\n progressBarCta?: React.ComponentType | null\n}\n\nexport const FlowContext = createContext<FlowContextInterface | null>(null)\n\n//TODO: This is hiding the fact that the callsite for useFlow\n// destructures a `companyId` that doesn't seem to exist\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport function useFlow<C extends FlowContextInterface>() {\n // When used outside provider, this is expected to return undefined - consumers must fallback to params\n const values = useContext<C>(FlowContext as unknown as React.Context<C>)\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!values) {\n throw new Error('useFlow used outside provider')\n }\n return values\n}\n"],"names":["FlowContext","createContext","useFlow","values","useContext"],"mappings":";AAeO,MAAMA,IAAcC,EAA2C,IAAI;AAKnE,SAASC,IAA0C;AAExD,QAAMC,IAASC,EAAcJ,CAA0C;AAEvE,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,+BAA+B;AAEjD,SAAOA;AACT;"}
1
+ {"version":3,"file":"useFlow.js","sources":["../../../src/components/Flow/useFlow.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { CustomTypeOptions } from 'i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport type { CommonComponentInterface } from '../Base'\nimport type { BreadcrumbTrail } from '../Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport type { EventType } from '@/shared/constants'\n\nexport interface CtaConfig {\n labelKey: string\n namespace?: keyof CustomTypeOptions['resources']\n}\n\nexport interface FlowContextInterface {\n component: React.ComponentType<CommonComponentInterface> | null\n onEvent: OnEventType<EventType, unknown>\n progressBarType?: 'progress' | 'breadcrumbs' | null\n totalSteps?: number\n currentStep?: number | null\n defaultValues?: Record<string, unknown>\n progressBarCta?: React.ComponentType | null\n breadcrumbs?: BreadcrumbTrail\n currentBreadcrumbId?: string\n ctaConfig?: CtaConfig | null\n}\n\nexport const FlowContext = createContext<FlowContextInterface | null>(null)\n\n//TODO: This is hiding the fact that the callsite for useFlow\n// destructures a `companyId` that doesn't seem to exist\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport function useFlow<C extends FlowContextInterface>() {\n // When used outside provider, this is expected to return undefined - consumers must fallback to params\n const values = useContext<C>(FlowContext as unknown as React.Context<C>)\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!values) {\n throw new Error('useFlow used outside provider')\n }\n return values\n}\n"],"names":["FlowContext","createContext","useFlow","values","useContext"],"mappings":";AAyBO,MAAMA,IAAcC,EAA2C,IAAI;AAKnE,SAASC,IAA0C;AAExD,QAAMC,IAASC,EAAcJ,CAA0C;AAEvE,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,+BAA+B;AAEjD,SAAOA;AACT;"}
@@ -1,5 +1,5 @@
1
1
  import { BaseComponentInterface } from '../../Base/Base';
2
- interface PayrollBlockerProps extends BaseComponentInterface<'PayrollBlocker'> {
2
+ interface PayrollBlockerProps extends BaseComponentInterface<'Payroll.PayrollBlocker'> {
3
3
  companyId: string;
4
4
  }
5
5
  export declare function PayrollBlocker(props: PayrollBlockerProps): import("react/jsx-runtime").JSX.Element;