@gusto/embedded-react-sdk 0.12.1 → 0.13.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 (367) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/dist/_virtual/dynamic-import-helper.js +1 -8
  3. package/dist/_virtual/dynamic-import-helper.js.map +1 -1
  4. package/dist/assets/icons/spinner_small.svg.js +10 -0
  5. package/dist/assets/icons/spinner_small.svg.js.map +1 -0
  6. package/dist/components/Base/Base.js +38 -36
  7. package/dist/components/Base/Base.js.map +1 -1
  8. package/dist/components/Base/useBase.d.ts +2 -0
  9. package/dist/components/Base/useBase.js.map +1 -1
  10. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  11. package/dist/components/Common/DataView/DataView.js +20 -19
  12. package/dist/components/Common/DataView/DataView.js.map +1 -1
  13. package/dist/components/Common/DataView/useDataView.d.ts +3 -1
  14. package/dist/components/Common/DataView/useDataView.js +13 -11
  15. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  16. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
  17. package/dist/components/Common/InlineSpinner/InlineSpinner.d.ts +6 -0
  18. package/dist/components/Common/InlineSpinner/InlineSpinner.js +25 -0
  19. package/dist/components/Common/InlineSpinner/InlineSpinner.js.map +1 -0
  20. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +10 -0
  21. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js.map +1 -0
  22. package/dist/components/Common/InlineSpinner/index.d.ts +2 -0
  23. package/dist/components/Common/PaginationControl/PaginationControl.js +31 -28
  24. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  25. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -0
  26. package/dist/components/Common/ReorderableList/DropZone.js +1 -1
  27. package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
  28. package/dist/components/Common/ReorderableList/ReorderableItem.js +1 -1
  29. package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
  30. package/dist/components/Common/SignatureForm/SignatureForm.js +8 -5
  31. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  32. package/dist/components/Common/SignatureForm/SignatureFormActions.js +13 -10
  33. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  34. package/dist/components/Common/SignatureForm/SignatureFormFields.js +13 -10
  35. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  36. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +1 -1
  37. package/dist/components/Common/UI/DatePicker/DatePicker.js +1 -1
  38. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  39. package/dist/components/Common/hooks/useNumberFormatter.js +1 -1
  40. package/dist/components/Common/index.d.ts +1 -0
  41. package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
  42. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  43. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
  44. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +8 -7
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
  50. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +2 -2
  52. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -8
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
  55. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +10 -9
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  58. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +11 -10
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -8
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  62. package/dist/components/Company/AssignSignatory/TitleSelect.js +8 -7
  63. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  64. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -10
  65. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  66. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  67. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  68. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  69. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +2 -2
  70. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
  71. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  72. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -8
  73. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
  75. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  77. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
  78. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  79. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +2 -2
  80. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
  81. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
  83. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  84. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +14 -12
  85. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  86. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -8
  87. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  88. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  89. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -9
  90. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  91. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -8
  92. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  93. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  94. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  95. package/dist/components/Company/FederalTaxes/FederalTaxes.js +20 -18
  96. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  97. package/dist/components/Company/FederalTaxes/Form.js +6 -4
  98. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  99. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -13
  100. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  101. package/dist/components/Company/Industry/Actions.js +7 -5
  102. package/dist/components/Company/Industry/Actions.js.map +1 -1
  103. package/dist/components/Company/Industry/Context.js +8 -11
  104. package/dist/components/Company/Industry/Context.js.map +1 -1
  105. package/dist/components/Company/Industry/Edit.js +12 -10
  106. package/dist/components/Company/Industry/Edit.js.map +1 -1
  107. package/dist/components/Company/Industry/Industry.js +2 -2
  108. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
  109. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
  111. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  112. package/dist/components/Company/Locations/LocationForm/LocationForm.js +16 -14
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  114. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -8
  115. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  116. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  117. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  118. package/dist/components/Company/Locations/LocationsList/List.js +4 -2
  119. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  120. package/dist/components/Company/Locations/LocationsList/LocationsList.js +15 -13
  121. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  122. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -8
  123. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  124. package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
  125. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  126. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
  127. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  128. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +5 -3
  129. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  130. package/dist/components/Company/OnboardingOverview/context.js +5 -8
  131. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  132. package/dist/components/Company/PaySchedule/PaySchedule.js +40 -38
  133. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  134. package/dist/components/Company/PaySchedule/_parts/Actions.js +12 -10
  135. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  136. package/dist/components/Company/PaySchedule/_parts/Edit.js +17 -16
  137. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  138. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -6
  139. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  140. package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
  141. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  142. package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -11
  143. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
  145. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +3 -3
  147. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -8
  148. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  149. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
  150. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  151. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
  152. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  153. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
  154. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -8
  155. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  156. package/dist/components/Contractor/Address/Address.js +10 -8
  157. package/dist/components/Contractor/Address/Address.js.map +1 -1
  158. package/dist/components/Contractor/Address/Form.js +4 -3
  159. package/dist/components/Contractor/Address/Form.js.map +1 -1
  160. package/dist/components/Contractor/Address/useAddress.js +7 -10
  161. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  162. package/dist/components/Contractor/ContractorList/index.js +26 -25
  163. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  164. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  165. package/dist/components/Contractor/NewHireReport/NewHireReport.js +58 -55
  166. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  167. package/dist/components/Contractor/NewHireReport/types.d.ts +1 -0
  168. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +19 -12
  169. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  170. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +6 -5
  171. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  172. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +7 -5
  173. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  174. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +4 -4
  175. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +87 -85
  176. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  177. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  178. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  179. package/dist/components/Contractor/Profile/ContractorProfile.js +1 -1
  180. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  181. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +19 -19
  182. package/dist/components/Contractor/Profile/useContractorProfile.js +37 -41
  183. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  184. package/dist/components/Contractor/Submit/Submit.js +28 -27
  185. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  186. package/dist/components/Employee/Compensation/Actions.js +6 -5
  187. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  188. package/dist/components/Employee/Compensation/Compensation.js +10 -10
  189. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  190. package/dist/components/Employee/Compensation/Edit.js +15 -14
  191. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  192. package/dist/components/Employee/Compensation/List.js +25 -23
  193. package/dist/components/Employee/Compensation/List.js.map +1 -1
  194. package/dist/components/Employee/Compensation/useCompensation.js +1 -1
  195. package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
  196. package/dist/components/Employee/Deductions/Deductions.js +1 -1
  197. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  198. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +15 -14
  199. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  200. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +10 -9
  201. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  202. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +12 -11
  203. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  204. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  205. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  206. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +12 -10
  207. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  208. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  209. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  210. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -8
  211. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  212. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +16 -14
  213. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  214. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -8
  215. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  216. package/dist/components/Employee/EmployeeList/Actions.js +6 -4
  217. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  218. package/dist/components/Employee/EmployeeList/EmployeeList.js +76 -62
  219. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  220. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  221. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  222. package/dist/components/Employee/EmployeeList/List.js +30 -27
  223. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  224. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +1 -0
  225. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -8
  226. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  227. package/dist/components/Employee/FederalTaxes/Actions.d.ts +1 -0
  228. package/dist/components/Employee/FederalTaxes/Actions.js +15 -0
  229. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -0
  230. package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +29 -0
  231. package/dist/components/Employee/FederalTaxes/FederalForm.js +110 -0
  232. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -0
  233. package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +6 -0
  234. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +72 -0
  235. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -0
  236. package/dist/components/Employee/FederalTaxes/Head.d.ts +1 -0
  237. package/dist/components/Employee/FederalTaxes/Head.js +24 -0
  238. package/dist/components/Employee/FederalTaxes/Head.js.map +1 -0
  239. package/dist/components/Employee/FederalTaxes/index.d.ts +2 -0
  240. package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +5 -0
  241. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +17 -0
  242. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -0
  243. package/dist/components/Employee/Landing/Landing.js +15 -14
  244. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  245. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +1 -19
  246. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  247. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +22 -0
  248. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +18 -0
  249. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
  250. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +2 -1
  251. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +72 -63
  252. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  253. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +9 -9
  254. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  255. package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
  256. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  257. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +2 -2
  258. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -5
  259. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  260. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -8
  261. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  262. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +8 -8
  263. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  264. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +3 -2
  265. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  266. package/dist/components/Employee/PaymentMethod/Split.js +12 -11
  267. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  268. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +8 -8
  269. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +11 -14
  270. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  271. package/dist/components/Employee/Profile/Actions.js +9 -7
  272. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  273. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +2 -2
  274. package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -9
  275. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  276. package/dist/components/Employee/Profile/HomeAddress.js +6 -5
  277. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  278. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  279. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +22 -21
  280. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  281. package/dist/components/Employee/Profile/Profile.js +15 -13
  282. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  283. package/dist/components/Employee/Profile/useProfile.js +5 -8
  284. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  285. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +2 -1
  286. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +37 -24
  287. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  288. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts +2 -1
  289. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +31 -19
  290. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
  291. package/dist/components/Employee/StateTaxes/Actions.d.ts +1 -0
  292. package/dist/components/Employee/StateTaxes/Actions.js +15 -0
  293. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -0
  294. package/dist/components/Employee/StateTaxes/StateForm.d.ts +10 -0
  295. package/dist/components/Employee/StateTaxes/StateForm.js +34 -0
  296. package/dist/components/Employee/StateTaxes/StateForm.js.map +1 -0
  297. package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +7 -0
  298. package/dist/components/Employee/StateTaxes/StateTaxes.js +90 -0
  299. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -0
  300. package/dist/components/Employee/StateTaxes/index.d.ts +2 -0
  301. package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +8 -0
  302. package/dist/components/Employee/StateTaxes/useStateTaxes.js +17 -0
  303. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -0
  304. package/dist/components/Employee/Taxes/Actions.js +10 -8
  305. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  306. package/dist/components/Employee/Taxes/FederalForm.js +14 -12
  307. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  308. package/dist/components/Employee/Taxes/Taxes.d.ts +5 -0
  309. package/dist/components/Employee/Taxes/Taxes.js +73 -85
  310. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  311. package/dist/components/Employee/Taxes/useTaxes.js +5 -8
  312. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  313. package/dist/components/Employee/index.d.ts +3 -1
  314. package/dist/components/Employee/index.js +16 -12
  315. package/dist/components/Employee/index.js.map +1 -1
  316. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +4 -2
  317. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +75 -34
  318. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  319. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +10 -5
  320. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +118 -50
  321. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  322. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +14 -11
  323. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  324. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +1 -1
  325. package/dist/components/Payroll/PayrollList/PayrollList.js +24 -11
  326. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  327. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +8 -6
  328. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +36 -25
  329. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  330. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +1 -1
  331. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +12 -9
  332. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  333. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +2 -1
  334. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +4 -4
  335. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  336. package/dist/components/Payroll/helpers.d.ts +20 -0
  337. package/dist/components/Payroll/helpers.js +208 -0
  338. package/dist/components/Payroll/helpers.js.map +1 -0
  339. package/dist/components/Payroll/helpers.test.d.ts +1 -0
  340. package/dist/contexts/ApiProvider/ApiProvider.js +4 -4
  341. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -5
  342. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  343. package/dist/contexts/ThemeProvider/ThemeProvider.js +7 -7
  344. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  345. package/dist/helpers/formattedStrings.d.ts +9 -0
  346. package/dist/helpers/formattedStrings.js +55 -16
  347. package/dist/helpers/formattedStrings.js.map +1 -1
  348. package/dist/i18n/I18n.js +11 -11
  349. package/dist/i18n/I18n.js.map +1 -1
  350. package/dist/i18n/en/Employee.FederalTaxes.json.js +46 -0
  351. package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -0
  352. package/dist/i18n/en/Employee.StateTaxes.json.js +6 -10
  353. package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
  354. package/dist/i18n/en/Employee.Taxes.json.js +7 -7
  355. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +30 -0
  356. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -0
  357. package/dist/i18n/en/Payroll.PayrollList.json.js +14 -0
  358. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -0
  359. package/dist/i18n/en/common.json.d.ts +8 -0
  360. package/dist/i18n/en/common.json.js +15 -13
  361. package/dist/i18n/en/common.json.js.map +1 -1
  362. package/dist/shared/constants.d.ts +4 -2
  363. package/dist/shared/constants.js +10 -9
  364. package/dist/shared/constants.js.map +1 -1
  365. package/dist/style.css +1 -1
  366. package/dist/types/i18next.d.ts +71 -4
  367. package/package.json +29 -30
@@ -0,0 +1,110 @@
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";
3
+ import { z as i } from "zod";
4
+ import "classnames";
5
+ import "../../../shared/constants.js";
6
+ import { RadioGroupField as u } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
7
+ import { NumberInputField as t } from "../../Common/Fields/NumberInputField/NumberInputField.js";
8
+ import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { SelectField as f } from "../../Common/Fields/SelectField/SelectField.js";
10
+ const q = i.object({
11
+ filingStatus: i.string().min(1),
12
+ twoJobs: i.string().min(1),
13
+ dependentsAmount: i.number().transform(String),
14
+ otherIncome: i.number().transform(String),
15
+ deductions: i.number().transform(String),
16
+ extraWithholding: i.number().transform(String),
17
+ w4DataType: i.enum(["pre_2020_w4", "rev_2020_w4"])
18
+ });
19
+ function v() {
20
+ const { t: e } = s("Employee.FederalTaxes"), o = d(), n = [
21
+ { value: "Single", label: e("filingStatusSingle") },
22
+ { value: "Married", label: e("filingStatusMarried") },
23
+ { value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
24
+ { value: "Exempt from withholding", label: e("filingStatusExemptFromWithholding") }
25
+ ];
26
+ return /* @__PURE__ */ l(a, { children: [
27
+ /* @__PURE__ */ r(
28
+ f,
29
+ {
30
+ name: "filingStatus",
31
+ label: e("federalFilingStatus1c"),
32
+ placeholder: e("federalFillingStatusPlaceholder"),
33
+ description: e("selectWithholdingDescription"),
34
+ options: n,
35
+ isRequired: !0,
36
+ errorMessage: e("validations.federalFilingStatus")
37
+ }
38
+ ),
39
+ /* @__PURE__ */ r(
40
+ u,
41
+ {
42
+ name: "twoJobs",
43
+ isRequired: !0,
44
+ label: e("multipleJobs2c"),
45
+ errorMessage: e("validations.federalTwoJobs"),
46
+ description: /* @__PURE__ */ r(
47
+ m,
48
+ {
49
+ i18nKey: "includesSpouseExplanation",
50
+ t: e,
51
+ components: {
52
+ irs_link: /* @__PURE__ */ r(o.Link, {})
53
+ }
54
+ }
55
+ ),
56
+ options: [
57
+ { value: "true", label: e("twoJobYesLabel") },
58
+ { value: "false", label: e("twoJobNoLabel") }
59
+ ]
60
+ }
61
+ ),
62
+ /* @__PURE__ */ r(
63
+ t,
64
+ {
65
+ name: "dependentsAmount",
66
+ isRequired: !0,
67
+ label: e("dependentsTotalIfApplicable"),
68
+ errorMessage: e("fieldIsRequired")
69
+ }
70
+ ),
71
+ /* @__PURE__ */ r(
72
+ t,
73
+ {
74
+ name: "otherIncome",
75
+ isRequired: !0,
76
+ label: e("otherIncome"),
77
+ format: "currency",
78
+ min: 0,
79
+ errorMessage: e("fieldIsRequired")
80
+ }
81
+ ),
82
+ /* @__PURE__ */ r(
83
+ t,
84
+ {
85
+ name: "deductions",
86
+ isRequired: !0,
87
+ label: e("deductions"),
88
+ format: "currency",
89
+ min: 0,
90
+ errorMessage: e("fieldIsRequired")
91
+ }
92
+ ),
93
+ /* @__PURE__ */ r(
94
+ t,
95
+ {
96
+ name: "extraWithholding",
97
+ isRequired: !0,
98
+ label: e("extraWithholding"),
99
+ format: "currency",
100
+ min: 0,
101
+ errorMessage: e("fieldIsRequired")
102
+ }
103
+ )
104
+ ] });
105
+ }
106
+ export {
107
+ v as FederalForm,
108
+ q as FederalFormSchema
109
+ };
110
+ //# sourceMappingURL=FederalForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField } 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.FederalTaxes')\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 description={t('selectWithholdingDescription')}\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 <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\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,uBAAuB,GAC9CC,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,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAASI;AAAA,QACT,YAAU;AAAA,QACV,cAAcJ,EAAE,iCAAiC;AAAA,MAAA;AAAA,I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AK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
@@ -0,0 +1,6 @@
1
+ import { BaseComponentInterface, CommonComponentInterface } from '../../Base';
2
+ interface FederalTaxesProps extends CommonComponentInterface<'Employee.FederalTaxes'> {
3
+ employeeId: string;
4
+ }
5
+ export declare function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,72 @@
1
+ import { jsx as o, jsxs as b, Fragment as S } from "react/jsx-runtime";
2
+ import { zodResolver as v } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@hookform/resolvers/zod/dist/zod.mjs";
3
+ import { useForm as A, FormProvider as g } from "react-hook-form";
4
+ import { useEffect as D } from "react";
5
+ import { useEmployeeTaxSetupGetFederalTaxesSuspense as w } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeTaxSetupGetFederalTaxes.js";
6
+ import { useEmployeeTaxSetupUpdateFederalTaxesMutation as _ } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeeTaxSetupUpdateFederalTaxes.js";
7
+ import { FederalFormSchema as N, FederalForm as P } from "./FederalForm.js";
8
+ import { Head as I } from "./Head.js";
9
+ import { Actions as R } from "./Actions.js";
10
+ import { FederalTaxesProvider as J } from "./useFederalTaxes.js";
11
+ import { BaseComponent as L } from "../../Base/Base.js";
12
+ import { useBase as M } from "../../Base/useBase.js";
13
+ import { useI18n as U, useComponentDictionary as B } from "../../../i18n/I18n.js";
14
+ import { componentEvents as u } from "../../../shared/constants.js";
15
+ import { Form as W } from "../../Common/Form/Form.js";
16
+ function te(t) {
17
+ return /* @__PURE__ */ o(L, { ...t, children: /* @__PURE__ */ o(k, { ...t }) });
18
+ }
19
+ const k = (t) => {
20
+ const { employeeId: m, className: c, children: a, dictionary: p } = t, { onEvent: i, fieldErrors: r, baseSubmitHandler: f } = M();
21
+ U("Employee.FederalTaxes"), B("Employee.FederalTaxes", p);
22
+ const { data: E } = w({
23
+ employeeUuid: m
24
+ }), e = E.employeeFederalTax, { mutateAsync: h, isPending: y } = _(), F = {
25
+ filingStatus: e.filingStatus ?? void 0,
26
+ twoJobs: e.twoJobs ? "true" : "false",
27
+ deductions: e.deductions ? Number(e.deductions) : 0,
28
+ dependentsAmount: e.dependentsAmount ? Number(e.dependentsAmount) : 0,
29
+ otherIncome: e.otherIncome ? Number(e.otherIncome) : 0,
30
+ extraWithholding: e.extraWithholding ? Number(e.extraWithholding) : 0,
31
+ w4DataType: e.w4DataType
32
+ }, d = A({
33
+ resolver: v(N),
34
+ defaultValues: F
35
+ }), { handleSubmit: x, setError: l } = d;
36
+ return D(() => {
37
+ r && r.length > 0 && r.forEach((n) => {
38
+ const s = n.key.replace(".value", "");
39
+ l(s, { type: "custom", message: n.message });
40
+ });
41
+ }, [r, l]), /* @__PURE__ */ o("section", { className: c, children: /* @__PURE__ */ o(
42
+ J,
43
+ {
44
+ value: {
45
+ isPending: y
46
+ },
47
+ children: /* @__PURE__ */ o(g, { ...d, children: /* @__PURE__ */ o(W, { onSubmit: x(async (n) => {
48
+ await f(n, async (s) => {
49
+ const T = await h({
50
+ request: {
51
+ employeeUuid: m,
52
+ requestBody: {
53
+ ...s,
54
+ twoJobs: s.twoJobs === "true",
55
+ version: e.version
56
+ }
57
+ }
58
+ });
59
+ i(u.EMPLOYEE_FEDERAL_TAXES_UPDATED, T), i(u.EMPLOYEE_FEDERAL_TAXES_DONE);
60
+ });
61
+ }), children: a || /* @__PURE__ */ b(S, { children: [
62
+ /* @__PURE__ */ o(I, {}),
63
+ /* @__PURE__ */ o(P, {}),
64
+ /* @__PURE__ */ o(R, {})
65
+ ] }) }) })
66
+ }
67
+ ) });
68
+ };
69
+ export {
70
+ te as FederalTaxes
71
+ };
72
+ //# sourceMappingURL=FederalTaxes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { zodResolver } from '@hookform/resolvers/zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { useEffect } from 'react'\nimport { useEmployeeTaxSetupGetFederalTaxesSuspense } from '@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes'\nimport { useEmployeeTaxSetupUpdateFederalTaxesMutation } from '@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes'\nimport { FederalForm } from './FederalForm'\nimport { FederalFormSchema, type FederalFormInputs, type FederalFormPayload } from './FederalForm'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { FederalTaxesProvider } from './useFederalTaxes'\nimport {\n useBase,\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Employee.FederalTaxes'> {\n employeeId: string\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent<'Employee.FederalTaxes'> {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = (props: FederalTaxesProps) => {\n const { employeeId, className, children, dictionary } = props\n const { onEvent, fieldErrors, baseSubmitHandler } = useBase()\n useI18n('Employee.FederalTaxes')\n useComponentDictionary('Employee.FederalTaxes', dictionary)\n\n const { data: fedData } = useEmployeeTaxSetupGetFederalTaxesSuspense({\n employeeUuid: employeeId,\n })\n const employeeFederalTax = fedData.employeeFederalTax!\n\n const { mutateAsync: updateFederalTaxes, isPending } =\n useEmployeeTaxSetupUpdateFederalTaxesMutation()\n\n const defaultValues = {\n filingStatus: employeeFederalTax.filingStatus ?? undefined,\n twoJobs: employeeFederalTax.twoJobs ? ('true' as const) : ('false' as const),\n deductions: employeeFederalTax.deductions ? Number(employeeFederalTax.deductions) : 0,\n dependentsAmount: employeeFederalTax.dependentsAmount\n ? Number(employeeFederalTax.dependentsAmount)\n : 0,\n otherIncome: employeeFederalTax.otherIncome ? Number(employeeFederalTax.otherIncome) : 0,\n extraWithholding: employeeFederalTax.extraWithholding\n ? Number(employeeFederalTax.extraWithholding)\n : 0,\n w4DataType: employeeFederalTax.w4DataType,\n }\n\n const formMethods = useForm<FederalFormInputs, unknown, FederalFormPayload>({\n resolver: zodResolver(FederalFormSchema),\n defaultValues,\n })\n const { handleSubmit, setError: _setError } = formMethods\n\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(msgObject => {\n const key = msgObject.key.replace('.value', '')\n _setError(key as keyof FederalFormInputs, { type: 'custom', message: msgObject.message })\n })\n }\n }, [fieldErrors, _setError])\n\n const onSubmit: SubmitHandler<FederalFormPayload> = async data => {\n await baseSubmitHandler(data, async payload => {\n const federalTaxesResponse = await updateFederalTaxes({\n request: {\n employeeUuid: employeeId,\n requestBody: {\n ...payload,\n twoJobs: payload.twoJobs === 'true',\n version: employeeFederalTax.version,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_UPDATED, federalTaxesResponse)\n onEvent(componentEvents.EMPLOYEE_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n }}\n >\n <FormProvider {...formMethods}>\n <Form onSubmit={handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <FederalForm />\n <Actions />\n </>\n )}\n </Form>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","employeeId","className","children","dictionary","onEvent","fieldErrors","baseSubmitHandler","useBase","useI18n","useComponentDictionary","fedData","useEmployeeTaxSetupGetFederalTaxesSuspense","employeeFederalTax","updateFederalTaxes","isPending","useEmployeeTaxSetupUpdateFederalTaxesMutation","defaultValues","formMethods","useForm","zodResolver","FederalFormSchema","handleSubmit","_setError","useEffect","msgObject","key","FederalTaxesProvider","FormProvider","Form","data","payload","federalTaxesResponse","componentEvents","jsxs","Fragment","Head","FederalForm","Actions"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAASA,GAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAwC,GAAGF,GAC1C,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAACH,MAA6B;AACzC,QAAM,EAAE,YAAAI,GAAY,WAAAC,GAAW,UAAAC,GAAU,YAAAC,MAAeP,GAClD,EAAE,SAAAQ,GAAS,aAAAC,GAAa,mBAAAC,EAAA,IAAsBC,EAAA;AACpD,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBN,CAAU;AAE1D,QAAM,EAAE,MAAMO,EAAA,IAAYC,EAA2C;AAAA,IACnE,cAAcX;AAAA,EAAA,CACf,GACKY,IAAqBF,EAAQ,oBAE7B,EAAE,aAAaG,GAAoB,WAAAC,EAAA,IACvCC,EAAA,GAEIC,IAAgB;AAAA,IACpB,cAAcJ,EAAmB,gBAAgB;AAAA,IACjD,SAASA,EAAmB,UAAW,SAAoB;AAAA,IAC3D,YAAYA,EAAmB,aAAa,OAAOA,EAAmB,UAAU,IAAI;AAAA,IACpF,kBAAkBA,EAAmB,mBACjC,OAAOA,EAAmB,gBAAgB,IAC1C;AAAA,IACJ,aAAaA,EAAmB,cAAc,OAAOA,EAAmB,WAAW,IAAI;AAAA,IACvF,kBAAkBA,EAAmB,mBACjC,OAAOA,EAAmB,gBAAgB,IAC1C;AAAA,IACJ,YAAYA,EAAmB;AAAA,EAAA,GAG3BK,IAAcC,EAAwD;AAAA,IAC1E,UAAUC,EAAYC,CAAiB;AAAA,IACvC,eAAAJ;AAAA,EAAA,CACD,GACK,EAAE,cAAAK,GAAc,UAAUC,EAAA,IA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jsxs as o, Fragment as t, jsx as e } from "react/jsx-runtime";
2
+ import { useTranslation as s, Trans as a } from "react-i18next";
3
+ import { useComponentContext as i } from "../../../contexts/ComponentAdapter/useComponentContext.js";
4
+ function p() {
5
+ const { t: r } = s("Employee.FederalTaxes"), n = i();
6
+ return /* @__PURE__ */ o(t, { children: [
7
+ /* @__PURE__ */ e(n.Heading, { as: "h1", children: r("federalTaxesTitle") }),
8
+ /* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
9
+ a,
10
+ {
11
+ i18nKey: "irs_calculator",
12
+ t: r,
13
+ components: {
14
+ irs_calculator: /* @__PURE__ */ e(n.Link, {}),
15
+ help_center: /* @__PURE__ */ e(n.Link, {})
16
+ }
17
+ }
18
+ ) })
19
+ ] });
20
+ }
21
+ export {
22
+ p as Head
23
+ };
24
+ //# sourceMappingURL=Head.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/FederalTaxes/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n return (\n <>\n <Components.Heading as=\"h1\">{t('federalTaxesTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey={'irs_calculator'}\n t={t}\n components={{\n irs_calculator: <Components.Link />,\n help_center: <Components.Link />,\n }}\n />\n </Components.Text>\n </>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsxs","Fragment","jsx","Trans"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACJ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,mBAAmB,GAAE;AAAA,IACpD,gBAAAM,EAACJ,EAAW,MAAX,EACC,UAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT,GAAAP;AAAA,QACA,YAAY;AAAA,UACV,gBAAgB,gBAAAM,EAACJ,EAAW,MAAX,CAAA,CAAgB;AAAA,UACjC,aAAa,gBAAAI,EAACJ,EAAW,MAAX,CAAA,CAAgB;AAAA,QAAA;AAAA,MAChC;AAAA,IAAA,EACF,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ import "./types/i18next.d.ts"
2
+ export { FederalTaxes } from './FederalTaxes';
@@ -0,0 +1,5 @@
1
+ type FederalTaxesContextType = {
2
+ isPending: boolean;
3
+ };
4
+ declare const useFederalTaxes: () => FederalTaxesContextType, FederalTaxesProvider: import('react').Provider<FederalTaxesContextType | null>;
5
+ export { useFederalTaxes, FederalTaxesProvider };
@@ -0,0 +1,17 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "react-error-boundary";
4
+ import "react-i18next";
5
+ import "../../Base/useBase.js";
6
+ import "../../../shared/constants.js";
7
+ import "classnames";
8
+ import "dompurify";
9
+ import "../../../contexts/LocaleProvider/useLocale.js";
10
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
12
+ const [l, C] = o("FederalTaxesContext");
13
+ export {
14
+ C as FederalTaxesProvider,
15
+ l as useFederalTaxes
16
+ };
17
+ //# sourceMappingURL=useFederalTaxes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -1,25 +1,26 @@
1
1
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import { useTranslation as u } from "react-i18next";
3
- import { useEmployeesGetSuspense as h } from "@gusto/embedded-api/react-query/employeesGet";
4
- import { useCompaniesGetSuspense as g } from "@gusto/embedded-api/react-query/companiesGet";
3
+ import { useEmployeesGetSuspense as h } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/employeesGet.js";
4
+ import { useCompaniesGetSuspense as g } from "/home/runner/work/embedded-react-sdk/embedded-react-sdk/node_modules/@gusto/embedded-api/esm/react-query/companiesGet.js";
5
5
  import s from "./Landing.module.scss.js";
6
6
  import { BaseComponent as x } from "../../Base/Base.js";
7
7
  import { useBase as y } from "../../Base/useBase.js";
8
8
  import { Flex as r } from "../../Common/Flex/Flex.js";
9
- import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
10
- import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
12
- import { componentEvents as S } from "../../../shared/constants.js";
13
- function F(t) {
14
- return D("Employee.Landing"), I("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
9
+ import "classnames";
10
+ import { componentEvents as E } from "../../../shared/constants.js";
11
+ import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
12
+ import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import { useI18n as I, useComponentDictionary as S } from "../../../i18n/I18n.js";
14
+ function H(t) {
15
+ return I("Employee.Landing"), S("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
15
16
  }
16
- const L = ({ employeeId: t, companyId: c, className: l }) => {
17
- const { onEvent: m } = y(), o = C(), {
17
+ const L = ({ employeeId: t, companyId: c, className: m }) => {
18
+ const { onEvent: l } = y(), o = D(), {
18
19
  data: { employee: a }
19
20
  } = h({ employeeId: t }), p = a.firstName, {
20
21
  data: { company: d }
21
22
  } = g({ companyId: c }), f = d?.name, { t: n } = u("Employee.Landing");
22
- return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 32, children: [
23
+ return /* @__PURE__ */ e("section", { className: m, children: /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 32, children: [
23
24
  /* @__PURE__ */ i(r, { alignItems: "center", flexDirection: "column", gap: 8, children: [
24
25
  /* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: n("landingSubtitle", { firstName: p, companyName: f }) }),
25
26
  /* @__PURE__ */ e(o.Text, { className: s.description, children: n("landingDescription") })
@@ -33,12 +34,12 @@ const L = ({ employeeId: t, companyId: c, className: l }) => {
33
34
  ] })
34
35
  ] }),
35
36
  /* @__PURE__ */ i(r, { flexDirection: "column", alignItems: "center", gap: 8, children: [
36
- /* @__PURE__ */ e(E, { justifyContent: "center", children: /* @__PURE__ */ e(
37
+ /* @__PURE__ */ e(C, { justifyContent: "center", children: /* @__PURE__ */ e(
37
38
  o.Button,
38
39
  {
39
40
  variant: "secondary",
40
41
  onClick: () => {
41
- m(S.EMPLOYEE_SELF_ONBOARDING_START);
42
+ l(E.EMPLOYEE_SELF_ONBOARDING_START);
42
43
  },
43
44
  children: n("getStartedCta")
44
45
  }
@@ -48,6 +49,6 @@ const L = ({ employeeId: t, companyId: c, className: l }) => {
48
49
  ] }) });
49
50
  };
50
51
  export {
51
- F as Landing
52
+ H as Landing
52
53
  };
53
54
  //# sourceMappingURL=Landing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <ul>\n <li>{t('steps.personalInfo')}</li>\n <li>{t('steps.taxInfo')}</li>\n <li>{t('steps.bankInfo')}</li>\n </ul>\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;AAqBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GAC1BC,EAAuB,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AACnE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEb;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAYF,EAAU,WAEtB;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAV,GAAW,GACnCW,IAAcF,GAAS,MAEvB,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAjB,EAAC,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAa,EAACC,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,IACpD,UAAA;AAAA,IAAA,gBAAAD,EAACC,KAAK,YAAW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
1
+ {"version":3,"file":"Landing.js","sources":["../../../../src/components/Employee/Landing/Landing.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useCompaniesGetSuspense } from '@gusto/embedded-api/react-query/companiesGet'\nimport styles from './Landing.module.scss'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { Flex, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface SummaryProps extends CommonComponentInterface<'Employee.Landing'> {\n employeeId: string\n companyId: string\n}\n\nexport function Landing(props: SummaryProps & BaseComponentInterface) {\n useI18n('Employee.Landing')\n useComponentDictionary('Employee.Landing', props.dictionary)\n\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, className }: SummaryProps) => {\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n const firstName = employee!.firstName\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const companyName = company?.name\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('landingSubtitle', { firstName, companyName })}\n </Components.Heading>\n <Components.Text className={styles.description}>\n {t('landingDescription')}\n </Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <ul>\n <li>{t('steps.personalInfo')}</li>\n <li>{t('steps.taxInfo')}</li>\n <li>{t('steps.bankInfo')}</li>\n </ul>\n </Flex>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n </Components.Button>\n </ActionsLayout>\n <Components.Text className={styles.description}>\n {t('getStartedDescription')}\n </Components.Text>\n </Flex>\n </Flex>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","firstName","company","useCompaniesGetSuspense","companyName","t","useTranslation","jsxs","Flex","styles","ActionsLayout","componentEvents"],"mappings":";;;;;;;;;;;;;AAqBO,SAASA,EAAQC,GAA8C;AACpE,SAAAC,EAAQ,kBAAkB,GAC1BC,EAAuB,oBAAoBF,EAAM,UAAU,GAGzD,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,WAAAC,QAA8B;AACnE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEb;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAAwB,EAAE,YAAAR,GAAY,GACpCS,IAAYF,EAAU,WAEtB;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAV,GAAW,GACnCW,IAAcF,GAAS,MAEvB,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAjB,EAAC,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAa,EAACC,GAAA,EAAK,YAAW,UAAS,eAAc,UA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AAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -1,27 +1,9 @@
1
- import { PaymentMethodBankAccount } from '@gusto/embedded-api/models/components/paymentmethodbankaccount';
2
- import { ProfileDefaultValues } from '../Profile';
3
- import { CompensationDefaultValues } from '../Compensation';
1
+ import { OnboardingDefaultValues } from './OnboardingFlowComponents';
4
2
  import { BaseComponentInterface } from '../../Base';
5
- import { EmployeeOnboardingStatus } from '../../../shared/constants';
6
3
  import { RequireAtLeastOne } from '../../../types/Helpers';
7
- import { FlowContextInterface } from '../../Flow/useFlow';
8
- export type OnboardingDefaultValues = RequireAtLeastOne<{
9
- profile?: ProfileDefaultValues;
10
- compensation?: CompensationDefaultValues;
11
- }>;
12
4
  export interface OnboardingFlowProps extends BaseComponentInterface {
13
5
  companyId: string;
14
6
  defaultValues?: RequireAtLeastOne<OnboardingDefaultValues>;
15
7
  isSelfOnboardingEnabled?: boolean;
16
8
  }
17
- export interface OnboardingContextInterface extends FlowContextInterface {
18
- companyId: string;
19
- employeeId?: string;
20
- isAdmin?: boolean;
21
- onboardingStatus?: (typeof EmployeeOnboardingStatus)[keyof typeof EmployeeOnboardingStatus];
22
- startDate?: string;
23
- paymentMethod?: PaymentMethodBankAccount;
24
- defaultValues?: OnboardingDefaultValues;
25
- isSelfOnboardingEnabled?: boolean;
26
- }
27
9
  export declare const OnboardingFlow: ({ companyId, onEvent, defaultValues, isSelfOnboardingEnabled, }: OnboardingFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingFlow.js","sources":["../../../../src/components/Employee/OnboardingFlow/OnboardingFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport type { PaymentMethodBankAccount } from '@gusto/embedded-api/models/components/paymentmethodbankaccount'\nimport type { ProfileDefaultValues } from '../Profile'\nimport type { CompensationDefaultValues } from '../Compensation'\nimport { EmployeeListContextual } from '../EmployeeList/EmployeeList'\nimport { employeeOnboardingMachine } from './onboardingStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport type { EmployeeOnboardingStatus } from '@/shared/constants'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\n\nexport type OnboardingDefaultValues = RequireAtLeastOne<{\n profile?: ProfileDefaultValues\n compensation?: CompensationDefaultValues\n}>\nexport interface OnboardingFlowProps extends BaseComponentInterface {\n companyId: string\n defaultValues?: RequireAtLeastOne<OnboardingDefaultValues>\n isSelfOnboardingEnabled?: boolean\n}\nexport interface OnboardingContextInterface extends FlowContextInterface {\n companyId: string\n employeeId?: string\n isAdmin?: boolean\n onboardingStatus?: (typeof EmployeeOnboardingStatus)[keyof typeof EmployeeOnboardingStatus]\n startDate?: string\n paymentMethod?: PaymentMethodBankAccount\n defaultValues?: OnboardingDefaultValues\n isSelfOnboardingEnabled?: boolean\n}\n\nexport const OnboardingFlow = ({\n companyId,\n onEvent,\n defaultValues,\n isSelfOnboardingEnabled = true,\n}: OnboardingFlowProps) => {\n const manageEmployees = createMachine(\n 'index',\n employeeOnboardingMachine,\n (initialContext: OnboardingContextInterface) => ({\n ...initialContext,\n component: EmployeeListContextual,\n companyId,\n isAdmin: true,\n defaultValues,\n isSelfOnboardingEnabled,\n }),\n )\n return <Flow machine={manageEmployees} onEvent={onEvent} />\n}\n"],"names":["OnboardingFlow","companyId","onEvent","defaultValues","isSelfOnboardingEnabled","manageEmployees","createMachine","employeeOnboardingMachine","initialContext","EmployeeListContextual","jsx","Flow"],"mappings":";;;;;AAgCO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,yBAAAC,IAA0B;AAC5B,MAA2B;AACzB,QAAMC,IAAkBC;AAAA,IACtB;AAAA,IACAC;AAAA,IACA,CAACC,OAAgD;AAAA,MAC/C,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAR;AAAA,MACA,SAAS;AAAA,MACT,eAAAE;AAAA,MACA,yBAAAC;AAAA,IAAA;AAAA,EACF;AAEF,SAAO,gBAAAM,EAACC,GAAA,EAAK,SAASN,GAAiB,SAAAH,EAAA,CAAkB;AAC3D;"}
1
+ {"version":3,"file":"OnboardingFlow.js","sources":["../../../../src/components/Employee/OnboardingFlow/OnboardingFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { EmployeeListContextual } from '../EmployeeList/EmployeeList'\nimport { employeeOnboardingMachine } from './onboardingStateMachine'\nimport type {\n OnboardingDefaultValues,\n OnboardingContextInterface,\n} from './OnboardingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface OnboardingFlowProps extends BaseComponentInterface {\n companyId: string\n defaultValues?: RequireAtLeastOne<OnboardingDefaultValues>\n isSelfOnboardingEnabled?: boolean\n}\n\nexport const OnboardingFlow = ({\n companyId,\n onEvent,\n defaultValues,\n isSelfOnboardingEnabled = true,\n}: OnboardingFlowProps) => {\n const manageEmployees = createMachine(\n 'index',\n employeeOnboardingMachine,\n (initialContext: OnboardingContextInterface) => ({\n ...initialContext,\n component: EmployeeListContextual,\n companyId,\n isAdmin: true,\n defaultValues,\n isSelfOnboardingEnabled,\n }),\n )\n return <Flow machine={manageEmployees} onEvent={onEvent} />\n}\n"],"names":["OnboardingFlow","companyId","onEvent","defaultValues","isSelfOnboardingEnabled","manageEmployees","createMachine","employeeOnboardingMachine","initialContext","EmployeeListContextual","jsx","Flow"],"mappings":";;;;;AAiBO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,yBAAAC,IAA0B;AAC5B,MAA2B;AACzB,QAAMC,IAAkBC;AAAA,IACtB;AAAA,IACAC;AAAA,IACA,CAACC,OAAgD;AAAA,MAC/C,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAR;AAAA,MACA,SAAS;AAAA,MACT,eAAAE;AAAA,MACA,yBAAAC;AAAA,IAAA;AAAA,EACF;AAEF,SAAO,gBAAAM,EAACC,GAAA,EAAK,SAASN,GAAiB,SAAAH,EAAA,CAAkB;AAC3D;"}
@@ -0,0 +1,22 @@
1
+ import { PaymentMethodBankAccount } from '@gusto/embedded-api/models/components/paymentmethodbankaccount';
2
+ import { ProfileDefaultValues } from '../Profile';
3
+ import { CompensationDefaultValues } from '../Compensation';
4
+ import { FlowContextInterface } from '../../Flow/useFlow';
5
+ import { EmployeeOnboardingStatus } from '../../../shared/constants';
6
+ import { RequireAtLeastOne } from '../../../types/Helpers';
7
+ export type OnboardingDefaultValues = RequireAtLeastOne<{
8
+ profile?: ProfileDefaultValues;
9
+ compensation?: CompensationDefaultValues;
10
+ }>;
11
+ export interface OnboardingContextInterface extends FlowContextInterface {
12
+ companyId: string;
13
+ employeeId?: string;
14
+ isAdmin?: boolean;
15
+ onboardingStatus?: (typeof EmployeeOnboardingStatus)[keyof typeof EmployeeOnboardingStatus];
16
+ startDate?: string;
17
+ paymentMethod?: PaymentMethodBankAccount;
18
+ defaultValues?: OnboardingDefaultValues;
19
+ isSelfOnboardingEnabled?: boolean;
20
+ }
21
+ export declare function FederalTaxesContextual(): import("react/jsx-runtime").JSX.Element;
22
+ export declare function StateTaxesContextual(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { FederalTaxes as a } from "../FederalTaxes/FederalTaxes.js";
3
+ import { StateTaxes as i } from "../StateTaxes/StateTaxes.js";
4
+ import { ensureRequired as r } from "../../../helpers/ensureRequired.js";
5
+ import { useFlow as n } from "../../Flow/useFlow.js";
6
+ function x() {
7
+ const { employeeId: e, onEvent: o } = n();
8
+ return /* @__PURE__ */ t(a, { onEvent: o, employeeId: r(e) });
9
+ }
10
+ function f() {
11
+ const { employeeId: e, onEvent: o, isAdmin: m } = n();
12
+ return /* @__PURE__ */ t(i, { onEvent: o, employeeId: r(e), isAdmin: m });
13
+ }
14
+ export {
15
+ x as FederalTaxesContextual,
16
+ f as StateTaxesContextual
17
+ };
18
+ //# sourceMappingURL=OnboardingFlowComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingFlowComponents.js","sources":["../../../../src/components/Employee/OnboardingFlow/OnboardingFlowComponents.tsx"],"sourcesContent":["import type { PaymentMethodBankAccount } from '@gusto/embedded-api/models/components/paymentmethodbankaccount'\nimport { FederalTaxes } from '../FederalTaxes/FederalTaxes'\nimport { StateTaxes } from '../StateTaxes/StateTaxes'\nimport type { ProfileDefaultValues } from '../Profile'\nimport type { CompensationDefaultValues } from '../Compensation'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { EmployeeOnboardingStatus } from '@/shared/constants'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type OnboardingDefaultValues = RequireAtLeastOne<{\n profile?: ProfileDefaultValues\n compensation?: CompensationDefaultValues\n}>\n\nexport interface OnboardingContextInterface extends FlowContextInterface {\n companyId: string\n employeeId?: string\n isAdmin?: boolean\n onboardingStatus?: (typeof EmployeeOnboardingStatus)[keyof typeof EmployeeOnboardingStatus]\n startDate?: string\n paymentMethod?: PaymentMethodBankAccount\n defaultValues?: OnboardingDefaultValues\n isSelfOnboardingEnabled?: boolean\n}\n\nexport function FederalTaxesContextual() {\n const { employeeId, onEvent } = useFlow<OnboardingContextInterface>()\n return <FederalTaxes onEvent={onEvent} employeeId={ensureRequired(employeeId)} />\n}\n\nexport function StateTaxesContextual() {\n const { employeeId, onEvent, isAdmin } = useFlow<OnboardingContextInterface>()\n return <StateTaxes onEvent={onEvent} employeeId={ensureRequired(employeeId)} isAdmin={isAdmin} />\n}\n"],"names":["FederalTaxesContextual","employeeId","onEvent","useFlow","FederalTaxes","ensureRequired","StateTaxesContextual","isAdmin","StateTaxes"],"mappings":";;;;;AA0BO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAChC,2BAAQC,GAAA,EAAa,SAAAF,GAAkB,YAAYG,EAAeJ,CAAU,GAAG;AACjF;AAEO,SAASK,IAAuB;AACrC,QAAM,EAAE,YAAAL,GAAY,SAAAC,GAAS,SAAAK,EAAA,IAAYJ,EAAA;AACzC,2BAAQK,GAAA,EAAW,SAAAN,GAAkB,YAAYG,EAAeJ,CAAU,GAAG,SAAAM,GAAkB;AACjG;"}
@@ -2,7 +2,8 @@ export declare const employeeOnboardingMachine: {
2
2
  index: import('robot3').MachineState<"employee/create" | "employee/update" | "employee/onboarding/done">;
3
3
  employeeProfile: import('robot3').MachineState<"employee/profile/done" | "CANCEL">;
4
4
  compensation: import('robot3').MachineState<"employee/compensations/done" | "CANCEL">;
5
- employeeTaxes: import('robot3').MachineState<"employee/taxes/done" | "CANCEL">;
5
+ federalTaxes: import('robot3').MachineState<"employee/federalTaxes/done" | "CANCEL">;
6
+ stateTaxes: import('robot3').MachineState<"employee/stateTaxes/done" | "CANCEL">;
6
7
  paymentMethod: import('robot3').MachineState<"employee/paymentMethod/done" | "CANCEL">;
7
8
  deductions: import('robot3').MachineState<"employee/deductions/done" | "CANCEL">;
8
9
  summary: import('robot3').MachineState<"company/employees">;