@gusto/embedded-react-sdk 0.31.1-rc.1 → 0.32.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 +40 -0
  2. package/dist/components/Base/Base.js +46 -45
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Base/useBase.d.ts +2 -3
  5. package/dist/components/Base/useBase.js.map +1 -1
  6. package/dist/components/Base/useBaseSubmit.js +32 -19
  7. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -10
  9. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -2
  11. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -6
  13. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
  15. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +4 -3
  17. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
  31. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  33. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  34. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  35. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  36. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -5
  37. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  38. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  39. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  40. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +3 -2
  41. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  42. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -6
  43. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  44. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -5
  45. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  46. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  47. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  48. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  49. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  50. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  51. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  52. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +4 -3
  53. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  54. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  55. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  56. package/dist/components/Company/FederalTaxes/Actions.js +7 -6
  57. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  58. package/dist/components/Company/FederalTaxes/FederalTaxes.js +4 -3
  59. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  60. package/dist/components/Company/FederalTaxes/Form.js +5 -3
  61. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  62. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +7 -6
  63. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  64. package/dist/components/Company/Industry/Actions.js +8 -7
  65. package/dist/components/Company/Industry/Actions.js.map +1 -1
  66. package/dist/components/Company/Industry/Context.js +8 -7
  67. package/dist/components/Company/Industry/Context.js.map +1 -1
  68. package/dist/components/Company/Industry/Edit.js +3 -2
  69. package/dist/components/Company/Industry/Edit.js.map +1 -1
  70. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  71. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  72. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  73. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -3
  74. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  76. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationsList/Actions.js +3 -2
  78. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  79. package/dist/components/Company/Locations/LocationsList/List.js +7 -6
  80. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationsList/LocationsList.js +4 -3
  82. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  84. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  85. package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
  86. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  87. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -5
  88. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  89. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +8 -7
  90. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  91. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  92. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  93. package/dist/components/Company/PaySchedule/PaySchedule.js +25 -22
  94. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  95. package/dist/components/Company/PaySchedule/_parts/Actions.js +3 -2
  96. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  97. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  98. package/dist/components/Company/PaySchedule/_parts/Head.js +13 -11
  99. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  100. package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
  101. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -6
  103. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  104. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  105. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  106. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  107. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  108. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  109. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  110. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  111. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  112. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  113. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  114. package/dist/components/Contractor/Address/Address.js +4 -3
  115. package/dist/components/Contractor/Address/Address.js.map +1 -1
  116. package/dist/components/Contractor/Address/Form.js +1 -1
  117. package/dist/components/Contractor/Address/useAddress.js +7 -6
  118. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  119. package/dist/components/Contractor/ContractorList/index.js +32 -31
  120. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  121. package/dist/components/Contractor/NewHireReport/NewHireReport.js +14 -13
  122. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  123. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +12 -11
  124. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  125. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  126. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  127. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +4 -3
  128. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  129. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -108
  130. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  131. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +4 -2
  132. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  133. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +84 -0
  134. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +23 -0
  135. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -0
  136. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +3 -31
  137. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +63 -69
  138. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  139. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
  140. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +29 -29
  141. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  142. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
  143. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +32 -29
  144. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  145. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +4 -2
  146. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  147. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +8 -6
  148. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  149. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +4 -2
  150. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  151. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +28 -27
  152. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  153. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  154. package/dist/components/Contractor/Profile/useContractorProfile.js +4 -3
  155. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  156. package/dist/components/Contractor/Submit/Submit.js +21 -20
  157. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  158. package/dist/components/Employee/Compensation/Actions.js +13 -12
  159. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  160. package/dist/components/Employee/Compensation/Edit.js +17 -16
  161. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  162. package/dist/components/Employee/Compensation/List.js +23 -22
  163. package/dist/components/Employee/Compensation/List.js.map +1 -1
  164. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +12 -11
  165. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  166. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +13 -12
  167. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  168. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +13 -12
  169. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  170. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +8 -7
  171. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  172. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +9 -8
  173. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  174. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +24 -22
  175. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  176. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  177. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  178. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.d.ts +1 -0
  179. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  180. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  181. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +26 -24
  182. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  183. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +32 -31
  184. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  185. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
  186. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  187. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  188. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  189. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +4 -2
  190. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  191. package/dist/components/Employee/EmployeeList/Actions.js +7 -6
  192. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  193. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  194. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  195. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  196. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  197. package/dist/components/Employee/EmployeeList/List.js +3 -2
  198. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  199. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -4
  200. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  201. package/dist/components/Employee/FederalTaxes/Actions.js +6 -5
  202. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  203. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  204. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  205. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +16 -15
  206. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  207. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -4
  208. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  209. package/dist/components/Employee/Landing/Landing.js +15 -14
  210. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  211. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  212. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  213. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  214. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
  215. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  216. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
  217. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  218. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
  219. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  220. package/dist/components/Employee/PaymentMethod/Split.js +11 -10
  221. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  222. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +7 -6
  223. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  224. package/dist/components/Employee/Profile/Actions.js +6 -5
  225. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  226. package/dist/components/Employee/Profile/AdminPersonalDetails.js +6 -5
  227. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  228. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  229. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  230. package/dist/components/Employee/Profile/useProfile.js +5 -4
  231. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  232. package/dist/components/Employee/StateTaxes/Actions.js +6 -5
  233. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  234. package/dist/components/Employee/StateTaxes/StateTaxes.js +29 -29
  235. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  236. package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -4
  237. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  238. package/dist/components/Employee/Taxes/Actions.js +7 -6
  239. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  240. package/dist/components/Employee/Taxes/FederalForm.js +14 -13
  241. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  242. package/dist/components/Employee/Taxes/Taxes.js +19 -19
  243. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  244. package/dist/components/Employee/Taxes/useTaxes.js +5 -4
  245. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  246. package/dist/components/Flow/Flow.js +9 -7
  247. package/dist/components/Flow/Flow.js.map +1 -1
  248. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +17 -16
  249. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  250. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +15 -14
  251. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  252. package/dist/components/InformationRequests/InformationRequests.js +4 -3
  253. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  254. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -9
  255. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  256. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +54 -45
  257. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  258. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +39 -17
  259. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  260. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +1 -0
  261. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
  262. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +27 -33
  263. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  264. package/dist/components/Payroll/OffCycleDeductionsSetting/types.d.ts +1 -2
  265. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +4 -3
  266. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  267. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +4 -3
  268. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  269. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +27 -25
  270. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  271. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  272. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +1 -0
  273. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +7 -8
  274. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  275. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -36
  276. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +21 -19
  277. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  278. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +17 -15
  279. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  280. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +19 -17
  281. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  282. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -67
  283. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  284. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  285. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +38 -36
  286. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  287. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
  288. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +20 -20
  289. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  290. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  291. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  292. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +4 -3
  293. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  294. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +12 -11
  295. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  296. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -2
  297. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  298. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  299. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  300. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  301. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  302. package/dist/helpers/apiErrorToList.js +14 -8
  303. package/dist/helpers/apiErrorToList.js.map +1 -1
  304. package/dist/helpers/formattedStrings.d.ts +1 -0
  305. package/dist/helpers/formattedStrings.js +21 -20
  306. package/dist/helpers/formattedStrings.js.map +1 -1
  307. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +12 -12
  308. package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
  309. package/dist/types/i18next.d.ts +4 -0
  310. package/docs/reference/endpoint-inventory.json +1706 -0
  311. package/package.json +13 -9
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\n\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers, isFetching),\n isFetching,\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n handleCancelSelfOnboarding,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","itemsPerPage","getPaginationProps","usePagination","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","handleNew","handleSkip","handleEdit","onboardingStatus","EmployeeListProvider","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,E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.tsx"],"sourcesContent":["import { useEmployeesList } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex, Loading } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const { data, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\n\n const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers, isFetching),\n isFetching,\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n handleCancelSelfOnboarding,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","itemsPerPage","getPaginationProps","usePagination","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","handleNew","handleSkip","handleEdit","onboardingStatus","EmployeeListProvider","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,aAAAC,GAAa,cAAAC,G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1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as n } from "react-i18next";
3
3
  import { Flex as r } from "../../Common/Flex/Flex.js";
4
+ import "classnames";
5
+ import "../../../shared/constants.js";
4
6
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
5
7
  import "react";
6
- const c = () => {
7
- const { t } = n("Employee.EmployeeList"), o = m();
8
- return /* @__PURE__ */ e(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ e(o.Heading, { as: "h2", children: t("title") }) });
8
+ const d = () => {
9
+ const { t: e } = n("Employee.EmployeeList"), o = m();
10
+ return /* @__PURE__ */ t(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ t(o.Heading, { as: "h2", children: e("title") }) });
9
11
  };
10
12
  export {
11
- c as Head
13
+ d as Head
12
14
  };
13
15
  //# sourceMappingURL=Head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,OAAO,GAAE,GAC1C;AAEJ;"}
1
+ {"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,OAAO,GAAE,GAC1C;AAEJ;"}
@@ -4,6 +4,7 @@ import { useState as B } from "react";
4
4
  import M from "./List.module.scss.js";
5
5
  import { useEmployeeList as y } from "./useEmployeeList.js";
6
6
  import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as G } from "../../../shared/constants.js";
7
+ import "classnames";
7
8
  import { EmptyData as R } from "../../Common/EmptyData/EmptyData.js";
8
9
  import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
9
10
  import { HamburgerMenu as F } from "../../Common/HamburgerMenu/HamburgerMenu.js";
@@ -14,7 +15,7 @@ import j from "../../../assets/icons/trashcan.svg.js";
14
15
  import { firstLastName as W } from "../../../helpers/formattedStrings.js";
15
16
  import { useDataView as Y } from "../../Common/DataView/useDataView.js";
16
17
  import { DataView as H } from "../../Common/DataView/DataView.js";
17
- const st = () => {
18
+ const dt = () => {
18
19
  const {
19
20
  handleDelete: g,
20
21
  employees: d,
@@ -119,6 +120,6 @@ const st = () => {
119
120
  ] });
120
121
  };
121
122
  export {
122
- st as List
123
+ dt as List
123
124
  };
124
125
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/EmployeeList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useState } from 'react'\nimport style from './List.module.scss'\nimport { useEmployeeList } from './useEmployeeList'\nimport { DataView, EmptyData, ActionsLayout, useDataView } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { EmployeeOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const {\n handleDelete,\n employees,\n handleEdit,\n handleReview,\n handleNew,\n handleCancelSelfOnboarding,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n handleSkip,\n isFetching,\n } = useEmployeeList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Employee.EmployeeList')\n const [deleting, setDeleting] = useState<Set<string>>(new Set())\n const { ...dataViewProps } = useDataView({\n data: employees,\n columns: [\n {\n key: 'name',\n title: t('nameLabel'),\n render: employee => {\n return firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n })\n },\n },\n {\n key: 'status',\n title: t('statusLabel'),\n render: ({ onboarded, onboardingStatus }) => (\n <EmployeeOnboardingStatusBadge\n onboarded={onboarded}\n onboardingStatus={onboardingStatus}\n />\n ),\n },\n ],\n itemMenu: employee => {\n const menuItems = []\n\n // Edit item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE ||\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW ||\n employee.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED\n ) {\n menuItems.push({\n label: t('editCta'),\n onClick: () => {\n handleEdit(employee.uuid, employee.onboardingStatus ?? undefined)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Cancel self onboarding item\n /* @ts-expect-error: onboarding_status during runtime can be one of self onboarding statuses */\n if (EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus ?? '')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: async () => {\n await handleCancelSelfOnboarding(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Review item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE\n ) {\n menuItems.push({\n label: t('reviewCta'),\n onClick: () => {\n void handleReview(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Delete item\n if (!employee.onboarded) {\n menuItems.push({\n label: t('deleteCta'),\n onClick: () => {\n setDeleting(prev => new Set(prev).add(employee.uuid))\n void handleDelete(employee.uuid).then(() => {\n setDeleting(prev => {\n const newSet = new Set(prev)\n newSet.delete(employee.uuid)\n return newSet\n })\n })\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return (\n <HamburgerMenu\n items={menuItems}\n triggerLabel={t('hamburgerTitle')}\n isLoading={deleting.has(employee.uuid)}\n />\n )\n },\n isFetching,\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button variant=\"secondary\" onClick={handleSkip}>\n {t('skipCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" onClick={handleNew}>\n {t('addEmployeeCta')}\n </Components.Button>\n </ActionsLayout>\n </EmptyData>\n ),\n })\n return (\n <>\n {employees.length > 0 && (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleNew}>\n {t('addAnotherCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n <div className={style.container}>\n <DataView label={t('employeeListLabel')} {...dataViewProps} />\n </div>\n </>\n )\n}\n"],"names":["List","handleDelete","employees","handleEdit","handleReview","handleNew","handleCancelSelfOnboarding","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","currentPage","totalPages","totalCount","itemsPerPage","handleSkip","isFetching","useEmployeeList","Components","useComponentContext","t","useTranslation","deleting","setDeleting","useState","dataViewProps","useDataView","employee","firstLastName","onboarded","onboardingStatus","jsx","EmployeeOnboardingStatusBadge","menuItems","EmployeeOnboardingStatus","PencilSvg","EmployeeSelfOnboardingStatuses","prev","newSet","TrashCanSvg","HamburgerMenu","EmptyData","jsxs","ActionsLayout","Fragment","style","DataView"],"mappings":";;;;;;;;;;;;;;;;AAcO,MAAMA,KAAO,MAAM;AACxB,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,IACEC,EAAA,GACEC,IAAaC,EAAA,GAEb,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,CAACC,GAAUC,CAAW,IAAIC,EAA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SAASH,GAC7C,UAAAK,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAW,EAACb,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASd,GAC3C,UAAAgB,EAAE,gBAAgB,EAAA,CACrB;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,CAEH;AACD,SACE,gBAAAsB,EAAAE,GAAA,EACG,UAAA;AAAA,IAAA3C,EAAU,SAAS,KAClB,gBAAA8B,EAACY,GAAA,EACC,4BAACzB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASd,GAC7C,UAAAgB,EAAE,eAAe,GACpB,GACF;AAAA,IAEF,gBAAAW,EAAC,OAAA,EAAI,WAAWc,EAAM,WACpB,UAAA,gBAAAd,EAACe,GAAA,EAAS,OAAO1B,EAAE,mBAAmB,GAAI,GAAGK,GAAe,EAAA,CAC9D;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/EmployeeList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useState } from 'react'\nimport style from './List.module.scss'\nimport { useEmployeeList } from './useEmployeeList'\nimport { DataView, EmptyData, ActionsLayout, useDataView } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { EmployeeOnboardingStatusBadge } from '@/components/Common/OnboardingStatusBadge'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses } from '@/shared/constants'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const {\n handleDelete,\n employees,\n handleEdit,\n handleReview,\n handleNew,\n handleCancelSelfOnboarding,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n handleSkip,\n isFetching,\n } = useEmployeeList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Employee.EmployeeList')\n const [deleting, setDeleting] = useState<Set<string>>(new Set())\n const { ...dataViewProps } = useDataView({\n data: employees,\n columns: [\n {\n key: 'name',\n title: t('nameLabel'),\n render: employee => {\n return firstLastName({\n first_name: employee.firstName,\n last_name: employee.lastName,\n })\n },\n },\n {\n key: 'status',\n title: t('statusLabel'),\n render: ({ onboarded, onboardingStatus }) => (\n <EmployeeOnboardingStatusBadge\n onboarded={onboarded}\n onboardingStatus={onboardingStatus}\n />\n ),\n },\n ],\n itemMenu: employee => {\n const menuItems = []\n\n // Edit item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE ||\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW ||\n employee.onboardingStatus === EmployeeOnboardingStatus.ONBOARDING_COMPLETED\n ) {\n menuItems.push({\n label: t('editCta'),\n onClick: () => {\n handleEdit(employee.uuid, employee.onboardingStatus ?? undefined)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Cancel self onboarding item\n /* @ts-expect-error: onboarding_status during runtime can be one of self onboarding statuses */\n if (EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus ?? '')) {\n menuItems.push({\n label: t('cancelSelfOnboardingCta'),\n onClick: async () => {\n await handleCancelSelfOnboarding(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Review item\n if (\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE\n ) {\n menuItems.push({\n label: t('reviewCta'),\n onClick: () => {\n void handleReview(employee.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n })\n }\n\n // Delete item\n if (!employee.onboarded) {\n menuItems.push({\n label: t('deleteCta'),\n onClick: () => {\n setDeleting(prev => new Set(prev).add(employee.uuid))\n void handleDelete(employee.uuid).then(() => {\n setDeleting(prev => {\n const newSet = new Set(prev)\n newSet.delete(employee.uuid)\n return newSet\n })\n })\n },\n icon: <TrashCanSvg aria-hidden />,\n })\n }\n\n return (\n <HamburgerMenu\n items={menuItems}\n triggerLabel={t('hamburgerTitle')}\n isLoading={deleting.has(employee.uuid)}\n />\n )\n },\n isFetching,\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n totalCount,\n itemsPerPage,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <ActionsLayout justifyContent=\"center\">\n <Components.Button variant=\"secondary\" onClick={handleSkip}>\n {t('skipCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" onClick={handleNew}>\n {t('addEmployeeCta')}\n </Components.Button>\n </ActionsLayout>\n </EmptyData>\n ),\n })\n return (\n <>\n {employees.length > 0 && (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleNew}>\n {t('addAnotherCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n <div className={style.container}>\n <DataView label={t('employeeListLabel')} {...dataViewProps} />\n </div>\n </>\n )\n}\n"],"names":["List","handleDelete","employees","handleEdit","handleReview","handleNew","handleCancelSelfOnboarding","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","currentPage","totalPages","totalCount","itemsPerPage","handleSkip","isFetching","useEmployeeList","Components","useComponentContext","t","useTranslation","deleting","setDeleting","useState","dataViewProps","useDataView","employee","firstLastName","onboarded","onboardingStatus","jsx","EmployeeOnboardingStatusBadge","menuItems","EmployeeOnboardingStatus","PencilSvg","EmployeeSelfOnboardingStatuses","prev","newSet","TrashCanSvg","HamburgerMenu","EmptyData","jsxs","ActionsLayout","Fragment","style","DataView"],"mappings":";;;;;;;;;;;;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AAS,IAAI;AAAA,QAAA;AAAA,MAAA;AAAA,IAG3C;AAAA,IACA,YAAAX;AAAA,IACA,YAAY;AAAA,MACV,gBAAAR;AAAA,MACA,iBAAAF;AAAA,MACA,gBAAAG;AAAA,MACA,oBAAAF;AAAA,MACA,0BAAAG;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAiB,EAACU,GAAA,EAAU,OAAOrB,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAsB,EAACC,GAAA,EAAc,gBAAe,UAC5B,UAAA;AAAA,MAAA,gBAAAZ,EAACb,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAK,EAAE,SAAS,EAAA,CACd;AAAA,MACA,gBAAAW,EAACb,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASd,GAC3C,UAAAgB,EAAE,gBAAgB,EAAA,CACrB;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,CAEH;AACD,SACE,gBAAAsB,EAAAE,GAAA,EACG,UAAA;AAAA,IAAA3C,EAAU,SAAS,KAClB,gBAAA8B,EAACY,GAAA,EACC,4BAACzB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASd,GAC7C,UAAAgB,EAAE,eAAe,GACpB,GACF;AAAA,IAEF,gBAAAW,EAAC,OAAA,EAAI,WAAWc,EAAM,WACpB,UAAA,gBAAAd,EAACe,GAAA,EAAS,OAAO1B,EAAE,mBAAmB,GAAI,GAAGK,GAAe,EAAA,CAC9D;AAAA,EAAA,GACF;AAEJ;"}
@@ -2,19 +2,20 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
- import "@gusto/embedded-api/models/errors/apierror";
5
+ import "@gusto/embedded-api/models/errors/gustoembeddederror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
+ import "classnames";
10
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
12
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import "../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [c, d] = o("EmployeeListContext");
16
+ const [d, u] = o("EmployeeListContext");
16
17
  export {
17
- d as EmployeeListProvider,
18
- c as useEmployeeList
18
+ u as EmployeeListProvider,
19
+ d as useEmployeeList
19
20
  };
20
21
  //# sourceMappingURL=useEmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n totalCount: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n totalCount: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA0BA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -1,15 +1,16 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useTranslation as r } from "react-i18next";
2
+ import { useTranslation as e } from "react-i18next";
3
3
  import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
4
  import "../../../shared/constants.js";
5
+ import "classnames";
5
6
  import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
8
  import "react";
8
- function x() {
9
- const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = s();
10
- return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
9
+ function C() {
10
+ const { t } = e("Employee.FederalTaxes"), { isPending: n } = i(), r = s();
11
+ return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(r.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
11
12
  }
12
13
  export {
13
- x as Actions
14
+ C as Actions
14
15
  };
15
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\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","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,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/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const { isPending } = useFederalTaxes()\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","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,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;"}
@@ -3,12 +3,13 @@ import { useTranslation as o, Trans as u } from "react-i18next";
3
3
  import { useFormContext as m } from "react-hook-form";
4
4
  import { z as i } from "zod";
5
5
  import "../../../shared/constants.js";
6
- import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import "classnames";
7
+ import { RadioGroupField as g } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
+ import { TextInputField as f } from "../../Common/Fields/TextInputField/TextInputField.js";
9
+ import { NumberInputField as r } from "../../Common/Fields/NumberInputField/NumberInputField.js";
10
+ import { useComponentContext as c } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
11
  import "react";
8
12
  import { SelectField as s } from "../../Common/Fields/SelectField/SelectField.js";
9
- import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
- import { NumberInputField as r } from "../../Common/Fields/NumberInputField/NumberInputField.js";
11
- import { TextInputField as c } from "../../Common/Fields/TextInputField/TextInputField.js";
12
13
  const p = i.object({
13
14
  w4DataType: i.literal("rev_2020_w4"),
14
15
  filingStatus: i.string().min(1),
@@ -22,13 +23,13 @@ const p = i.object({
22
23
  filingStatus: i.string().min(1),
23
24
  federalWithholdingAllowance: i.number().int(),
24
25
  additionalWithholding: i.string()
25
- }), D = i.discriminatedUnion("w4DataType", [p, h]);
26
- function H() {
26
+ }), H = i.discriminatedUnion("w4DataType", [p, h]);
27
+ function A() {
27
28
  const { watch: e } = m();
28
29
  return e("w4DataType") === "rev_2020_w4" ? /* @__PURE__ */ t(b, {}) : /* @__PURE__ */ t(S, {});
29
30
  }
30
31
  function b() {
31
- const { t: e } = o("Employee.FederalTaxes"), l = g(), d = [
32
+ const { t: e } = o("Employee.FederalTaxes"), l = c(), d = [
32
33
  { value: "Single", label: e("filingStatusSingle") },
33
34
  { value: "Married", label: e("filingStatusMarried") },
34
35
  { value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
@@ -48,7 +49,7 @@ function b() {
48
49
  }
49
50
  ),
50
51
  /* @__PURE__ */ t(
51
- f,
52
+ g,
52
53
  {
53
54
  name: "twoJobs",
54
55
  isRequired: !0,
@@ -149,7 +150,7 @@ function S() {
149
150
  }
150
151
  ),
151
152
  /* @__PURE__ */ t(
152
- c,
153
+ f,
153
154
  {
154
155
  name: "additionalWithholding",
155
156
  label: e("additionalWithholding"),
@@ -160,7 +161,7 @@ function S() {
160
161
  ] });
161
162
  }
162
163
  export {
163
- H as FederalForm,
164
- D as FederalFormSchema
164
+ A as FederalForm,
165
+ H as FederalFormSchema
165
166
  };
166
167
  //# sourceMappingURL=FederalForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useFormContext } from 'react-hook-form'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n w4DataType: z.literal('rev_2020_w4'),\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})\n\nconst Pre2020Schema = z.object({\n w4DataType: z.literal('pre_2020_w4'),\n filingStatus: z.string().min(1),\n federalWithholdingAllowance: z.number().int(),\n additionalWithholding: z.string(),\n})\n\nexport const FederalFormSchema = z.discriminatedUnion('w4DataType', [Rev2020Schema, Pre2020Schema])\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { watch } = useFormContext<FederalFormInputs>()\n const w4DataType = watch('w4DataType')\n\n if (w4DataType === 'rev_2020_w4') {\n return <Rev2020Form />\n }\n\n return <Pre2020Form />\n}\n\nfunction Rev2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\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('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\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 IrsLink: <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 format=\"currency\"\n min={0}\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\nfunction Pre2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n\n const filingStatusOptions = [\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 { value: 'Married, but withhold as Single', label: t('filingStatusMarriedWithholdAsSingle') },\n ]\n\n return (\n <>\n <NumberInputField\n name=\"federalWithholdingAllowance\"\n isRequired\n label={t('federalWithholdingAllowance')}\n min={0}\n maximumFractionDigits={0}\n errorMessage={t('fieldIsRequired')}\n />\n <SelectField\n name=\"filingStatus\"\n label={t('filingStatus')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <TextInputField\n name=\"additionalWithholding\"\n label={t('additionalWithholding')}\n type=\"number\"\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","Pre2020Schema","FederalFormSchema","FederalForm","watch","useFormContext","Rev2020Form","Pre2020Form","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField","TextInputField"],"mappings":";;;;;;;;;;;AAMA,MAAMA,IAAgBC,EAAE,OAAO;AAAA,EAC7B,YAAYA,EAAE,QAAQ,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BAAuB;AAAA,QAChC,MAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
1
+ {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/FederalTaxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useFormContext } from 'react-hook-form'\nimport { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n w4DataType: z.literal('rev_2020_w4'),\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})\n\nconst Pre2020Schema = z.object({\n w4DataType: z.literal('pre_2020_w4'),\n filingStatus: z.string().min(1),\n federalWithholdingAllowance: z.number().int(),\n additionalWithholding: z.string(),\n})\n\nexport const FederalFormSchema = z.discriminatedUnion('w4DataType', [Rev2020Schema, Pre2020Schema])\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { watch } = useFormContext<FederalFormInputs>()\n const w4DataType = watch('w4DataType')\n\n if (w4DataType === 'rev_2020_w4') {\n return <Rev2020Form />\n }\n\n return <Pre2020Form />\n}\n\nfunction Rev2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\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('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\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 IrsLink: <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 format=\"currency\"\n min={0}\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\nfunction Pre2020Form() {\n const { t } = useTranslation('Employee.FederalTaxes')\n\n const filingStatusOptions = [\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 { value: 'Married, but withhold as Single', label: t('filingStatusMarriedWithholdAsSingle') },\n ]\n\n return (\n <>\n <NumberInputField\n name=\"federalWithholdingAllowance\"\n isRequired\n label={t('federalWithholdingAllowance')}\n min={0}\n maximumFractionDigits={0}\n errorMessage={t('fieldIsRequired')}\n />\n <SelectField\n name=\"filingStatus\"\n label={t('filingStatus')}\n placeholder={t('federalFilingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <TextInputField\n name=\"additionalWithholding\"\n label={t('additionalWithholding')}\n type=\"number\"\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","Pre2020Schema","FederalFormSchema","FederalForm","watch","useFormContext","Rev2020Form","Pre2020Form","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField","TextInputField"],"mappings":";;;;;;;;;;;;AAMA,MAAMA,IAAgBC,EAAE,OAAO;AAAA,EAC7B,YAAYA,EAAE,QAAQ,aAAa;AAAA,EACnC,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,OAAA,EAAS,UAAU,MAAM;AAC/C,CAAC,GAEKC,IAAgBD,EAAE,OAAO;AAAA,EAC7B,YAAYA,EAAE,QAAQ,aAAa;AAAA,EACnC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,6BAA6BA,EAAE,OAAA,EAAS,IAAA;AAAA,EACxC,uBAAuBA,EAAE,OAAA;AAC3B,CAAC,GAEYE,IAAoBF,EAAE,mBAAmB,cAAc,CAACD,GAAeE,CAAa,CAAC;AAK3F,SAASE,IAAc;AAC5B,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAA;AAGlB,SAFmBD,EAAM,YAAY,MAElB,kCACTE,GAAA,EAAY,sBAGdC,GAAA,EAAY;AACtB;AAEA,SAASD,IAAc;AACrB,QAAM,EAAE,GAAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GAEbC,IAAsB;AAAA,IAC1B,EAAE,OAAO,UAAU,OAAOJ,EAAE,oBAAo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iB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR,EAAE,cAAc;AAAA,QACvB,aAAaA,EAAE,gCAAgC;AAAA,QAC/C,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAASI;AAAA,QACT,YAAU;AAAA,QACV,cAAcJ,EAAE,iCAAiC;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnD,gBAAAO;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOZ,EAAE,uBAAuB;AAAA,QAChC,MAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as S, Fragment as v } from "react/jsx-runtime";
2
- import { zodResolver as A } from "@hookform/resolvers/zod";
3
- import { useForm as y, FormProvider as D } from "react-hook-form";
2
+ import { zodResolver as y } from "@hookform/resolvers/zod";
3
+ import { useForm as A, FormProvider as D } from "react-hook-form";
4
4
  import { useEffect as _ } from "react";
5
5
  import { useEmployeeTaxSetupGetFederalTaxesSuspense as b } from "@gusto/embedded-api/react-query/employeeTaxSetupGetFederalTaxes";
6
6
  import { useEmployeeTaxSetupUpdateFederalTaxesMutation as W } from "@gusto/embedded-api/react-query/employeeTaxSetupUpdateFederalTaxes";
@@ -11,9 +11,10 @@ import { FederalTaxesProvider as J } from "./useFederalTaxes.js";
11
11
  import { BaseComponent as L } from "../../Base/Base.js";
12
12
  import { useBase as M } from "../../Base/useBase.js";
13
13
  import { useI18n as U, useComponentDictionary as B } from "../../../i18n/I18n.js";
14
+ import { normalizeErrorKeyForForm as q } from "../../../helpers/formattedStrings.js";
14
15
  import { componentEvents as u } from "../../../shared/constants.js";
15
- import { Form as q } from "../../Common/Form/Form.js";
16
- function ne(r) {
16
+ import { Form as z } from "../../Common/Form/Form.js";
17
+ function se(r) {
17
18
  return /* @__PURE__ */ o(L, { ...r, children: /* @__PURE__ */ o(C, { ...r }) });
18
19
  }
19
20
  const C = (r) => {
@@ -21,7 +22,7 @@ const C = (r) => {
21
22
  U("Employee.FederalTaxes"), B("Employee.FederalTaxes", h);
22
23
  const { data: p } = b({
23
24
  employeeUuid: s
24
- }), e = p.employeeFederalTax, { mutateAsync: g, isPending: E } = W(), T = e.w4DataType === "rev_2020_w4" ? {
25
+ }), e = p.employeeFederalTax, { mutateAsync: E, isPending: g } = W(), T = e.w4DataType === "rev_2020_w4" ? {
25
26
  w4DataType: "rev_2020_w4",
26
27
  filingStatus: e.filingStatus ?? "",
27
28
  twoJobs: e.twoJobs ? "true" : "false",
@@ -34,24 +35,24 @@ const C = (r) => {
34
35
  filingStatus: e.filingStatus ?? "",
35
36
  federalWithholdingAllowance: e.federalWithholdingAllowance ?? 0,
36
37
  additionalWithholding: e.additionalWithholding
37
- }, d = y({
38
- resolver: A(I),
38
+ }, d = A({
39
+ resolver: y(I),
39
40
  defaultValues: T
40
41
  }), { handleSubmit: w, setError: l } = d;
41
42
  return _(() => {
42
43
  n && n.length > 0 && n.forEach((i) => {
43
- const t = i.errorKey.replace(".value", "");
44
+ const t = q(i.errorKey);
44
45
  l(t, { type: "custom", message: i.message });
45
46
  });
46
47
  }, [n, l]), /* @__PURE__ */ o("section", { className: c, children: /* @__PURE__ */ o(
47
48
  J,
48
49
  {
49
50
  value: {
50
- isPending: E
51
+ isPending: g
51
52
  },
52
- children: /* @__PURE__ */ o(D, { ...d, children: /* @__PURE__ */ o(q, { onSubmit: w(async (i) => {
53
+ children: /* @__PURE__ */ o(D, { ...d, children: /* @__PURE__ */ o(z, { onSubmit: w(async (i) => {
53
54
  await f(i, async (t) => {
54
- const x = t.w4DataType === "rev_2020_w4" ? {
55
+ const F = t.w4DataType === "rev_2020_w4" ? {
55
56
  filingStatus: t.filingStatus,
56
57
  twoJobs: t.twoJobs === "true",
57
58
  dependentsAmount: t.dependentsAmount,
@@ -66,13 +67,13 @@ const C = (r) => {
66
67
  additionalWithholding: t.additionalWithholding,
67
68
  w4DataType: t.w4DataType,
68
69
  version: e.version
69
- }, F = await g({
70
+ }, x = await E({
70
71
  request: {
71
72
  employeeUuid: s,
72
- requestBody: x
73
+ requestBody: F
73
74
  }
74
75
  });
75
- m(u.EMPLOYEE_FEDERAL_TAXES_UPDATED, F), m(u.EMPLOYEE_FEDERAL_TAXES_DONE);
76
+ m(u.EMPLOYEE_FEDERAL_TAXES_UPDATED, x), m(u.EMPLOYEE_FEDERAL_TAXES_DONE);
76
77
  });
77
78
  }), children: a || /* @__PURE__ */ S(v, { children: [
78
79
  /* @__PURE__ */ o(N, {}),
@@ -83,6 +84,6 @@ const C = (r) => {
83
84
  ) });
84
85
  };
85
86
  export {
86
- ne as FederalTaxes
87
+ se as FederalTaxes
87
88
  };
88
89
  //# sourceMappingURL=FederalTaxes.js.map
@@ -1 +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 isRev2020 = employeeFederalTax.w4DataType === 'rev_2020_w4'\n\n const defaultValues: FederalFormInputs = isRev2020\n ? {\n w4DataType: 'rev_2020_w4',\n filingStatus: employeeFederalTax.filingStatus ?? '',\n twoJobs: employeeFederalTax.twoJobs ? 'true' : 'false',\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 }\n : {\n w4DataType: 'pre_2020_w4',\n filingStatus: employeeFederalTax.filingStatus ?? '',\n federalWithholdingAllowance: employeeFederalTax.federalWithholdingAllowance ?? 0,\n additionalWithholding: employeeFederalTax.additionalWithholding,\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.errorKey.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 requestBody =\n payload.w4DataType === 'rev_2020_w4'\n ? {\n filingStatus: payload.filingStatus,\n twoJobs: payload.twoJobs === 'true',\n dependentsAmount: payload.dependentsAmount,\n otherIncome: payload.otherIncome,\n deductions: payload.deductions,\n extraWithholding: payload.extraWithholding,\n w4DataType: payload.w4DataType,\n version: employeeFederalTax.version,\n }\n : {\n filingStatus: payload.filingStatus,\n federalWithholdingAllowance: payload.federalWithholdingAllowance,\n additionalWithholding: payload.additionalWithholding,\n w4DataType: payload.w4DataType,\n version: employeeFederalTax.version,\n }\n\n const federalTaxesResponse = await updateFederalTaxes({\n request: {\n employeeUuid: employeeId,\n requestBody,\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","requestBody","federalTaxesResponse","componentEvents","jsxs","Fragment","Head","Federal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U6C,GAClC,UAAA/B,KAGC,gBAAAgC,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAtC,EAACuC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAY;AAAA,0BACZC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
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 { normalizeErrorKeyForForm } from '@/helpers/formattedStrings'\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 isRev2020 = employeeFederalTax.w4DataType === 'rev_2020_w4'\n\n const defaultValues: FederalFormInputs = isRev2020\n ? {\n w4DataType: 'rev_2020_w4',\n filingStatus: employeeFederalTax.filingStatus ?? '',\n twoJobs: employeeFederalTax.twoJobs ? 'true' : 'false',\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 }\n : {\n w4DataType: 'pre_2020_w4',\n filingStatus: employeeFederalTax.filingStatus ?? '',\n federalWithholdingAllowance: employeeFederalTax.federalWithholdingAllowance ?? 0,\n additionalWithholding: employeeFederalTax.additionalWithholding,\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 = normalizeErrorKeyForForm(msgObject.errorKey)\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 requestBody =\n payload.w4DataType === 'rev_2020_w4'\n ? {\n filingStatus: payload.filingStatus,\n twoJobs: payload.twoJobs === 'true',\n dependentsAmount: payload.dependentsAmount,\n otherIncome: payload.otherIncome,\n deductions: payload.deductions,\n extraWithholding: payload.extraWithholding,\n w4DataType: payload.w4DataType,\n version: employeeFederalTax.version,\n }\n : {\n filingStatus: payload.filingStatus,\n federalWithholdingAllowance: payload.federalWithholdingAllowance,\n additionalWithholding: payload.additionalWithholding,\n w4DataType: payload.w4DataType,\n version: employeeFederalTax.version,\n }\n\n const federalTaxesResponse = await updateFederalTaxes({\n request: {\n employeeUuid: employeeId,\n requestBody,\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","normalizeErrorKeyForForm","FederalTaxesProvider","FormProvider","Form","data","payload","requestBody","federalTaxesResponse","componentEvents","jsxs","Fragment","Head","FederalForm","Actions"],"mappings":";;;;;;;;;;;;;;;;AA0BO,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,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react";
3
3
  import "react-error-boundary";
4
4
  import "react-i18next";
5
- import "@gusto/embedded-api/models/errors/apierror";
5
+ import "@gusto/embedded-api/models/errors/gustoembeddederror";
6
6
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
7
  import "@tanstack/react-query";
8
8
  import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
+ import "classnames";
10
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
12
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import "../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [T, c] = o("FederalTaxesContext");
16
+ const [c, u] = o("FederalTaxesContext");
16
17
  export {
17
- c as FederalTaxesProvider,
18
- T as useFederalTaxes
18
+ u as FederalTaxesProvider,
19
+ c as useFederalTaxes
19
20
  };
20
21
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +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
+ {"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;"}
@@ -2,34 +2,35 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import { useTranslation as h } from "react-i18next";
3
3
  import { useEmployeesGetSuspense as g } from "@gusto/embedded-api/react-query/employeesGet";
4
4
  import { useCompaniesGetSuspense as y } from "@gusto/embedded-api/react-query/companiesGet";
5
- import m from "dompurify";
5
+ import s from "dompurify";
6
6
  import { useMemo as c } from "react";
7
7
  import { BaseComponent as x } from "../../Base/Base.js";
8
8
  import { useBase as E } from "../../Base/useBase.js";
9
9
  import { Flex as r } from "../../Common/Flex/Flex.js";
10
- import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
11
- import { useComponentContext as L } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import { useI18n as S, useComponentDictionary as D } from "../../../i18n/I18n.js";
13
- import { componentEvents as I } from "../../../shared/constants.js";
10
+ import "classnames";
11
+ import { componentEvents as C } from "../../../shared/constants.js";
12
+ import { ActionsLayout as L } from "../../Common/ActionsLayout/ActionsLayout.js";
13
+ import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
14
15
  import N from "../../../assets/icons/icon-arrow-right.svg.js";
15
- function P(o) {
16
- return S("Employee.Landing"), D("Employee.Landing", o.dictionary), /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
16
+ function w(o) {
17
+ return D("Employee.Landing"), I("Employee.Landing", o.dictionary), /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
17
18
  }
18
19
  const v = ({ employeeId: o, companyId: p, className: l }) => {
19
- const { onEvent: d } = E(), t = L(), {
20
+ const { onEvent: d } = E(), t = S(), {
20
21
  data: { employee: a }
21
- } = g({ employeeId: o }), f = c(() => m.sanitize(a.firstName), [a]), {
22
- data: { company: s }
23
- } = y({ companyId: p }), u = c(() => m.sanitize(s?.name ?? ""), [s]), { t: n } = h("Employee.Landing");
22
+ } = g({ employeeId: o }), f = c(() => s.sanitize(a.firstName), [a]), {
23
+ data: { company: m }
24
+ } = y({ companyId: p }), u = c(() => s.sanitize(m?.name ?? ""), [m]), { t: n } = h("Employee.Landing");
24
25
  return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ e(
25
26
  t.Box,
26
27
  {
27
- footer: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ i(
28
+ footer: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ i(
28
29
  t.Button,
29
30
  {
30
31
  variant: "secondary",
31
32
  onClick: () => {
32
- d(I.EMPLOYEE_SELF_ONBOARDING_START);
33
+ d(C.EMPLOYEE_SELF_ONBOARDING_START);
33
34
  },
34
35
  children: [
35
36
  n("getStartedCta"),
@@ -60,6 +61,6 @@ const v = ({ employeeId: o, companyId: p, className: l }) => {
60
61
  ) });
61
62
  };
62
63
  export {
63
- P as Landing
64
+ w as Landing
64
65
  };
65
66
  //# 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 DOMPurify from 'dompurify'\nimport { useMemo } from 'react'\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'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\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 sanitizedFirstName = useMemo(() => DOMPurify.sanitize(employee!.firstName), [employee])\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const sanitizedCompanyName = useMemo(() => DOMPurify.sanitize(company?.name ?? ''), [company])\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t('landingSubtitle', {\n firstName: sanitizedFirstName,\n companyName: sanitizedCompanyName,\n interpolation: { escapeValue: false },\n })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('landingDescription')}</Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[t('steps.personalInfo'), t('steps.taxInfo'), t('steps.bankInfo')]}\n />\n </Flex>\n </Flex>\n </Components.Box>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","sanitizedFirstName","useMemo","DOMPurify","company","useCompaniesGetSuspense","sanitizedCompanyName","t","useTranslation","ActionsLayout","jsxs","componentEvents","ArrowRightIcon","Flex"],"mappings":";;;;;;;;;;;;;;AAuBO,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,IAAqBC,EAAQ,MAAMC,EAAU,SAASJ,EAAU,SAAS,GAAG,CAACA,CAAQ,CAAC,GAEtF;AAAA,IACJ,MAAM,EAAE,SAAAK,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAZ,GAAW,GACnCa,IAAuBJ,EAAQ,MAAMC,EAAU,SAASC,GAAS,QAAQ,EAAE,GAAG,CAACA,CAAO,CAAC,GAEvF,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACQ,EAAW;AAAA,IAAX;AAAA,MACC,0BACGY,GAAA,EACC,UAAA,gBAAAC;AAAA,QAACb,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQgB,EAAgB,8BAA8B;AAAA,UACxD;AAAA,UAEC,UAAA;AAAA,YAAAJ,EAAE,eAAe;AAAA,YAClB,gBAAAlB,EAACuB,GAAA,EAAe,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,GAEhC;AAAA,MAGF,4BAACC,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,IACpD,UAAA;AAAA,QAAA,gBAAAH,EAACG,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAxB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MACpB,YAAE,mBAAmB;AAAA,YACpB,WAAWI;AAAA,YACX,aAAaK;AAAA,YACb,eAAe,EAAE,aAAa,GAAA;AAAA,UAAM,CACrC,GACH;AAAA,UACA,gBAAAjB,EAACQ,EAAW,MAAX,EAAgB,SAAQ,cAAc,UAAAU,EAAE,oBAAoB,EAAA,CAAE;AAAA,QAAA,GACjE;AAAA,QACA,gBAAAG,EAACG,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAxB,EAACQ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAU,EAAE,eAAe,GAAE;AAAA,UAChD,gBAAAlB;AAAA,YAACQ,EAAW;AAAA,YAAX;AAAA,cACC,OAAO,CAACU,EAAE,oBAAoB,GAAGA,EAAE,eAAe,GAAGA,EAAE,gBAAgB,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1E,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
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 DOMPurify from 'dompurify'\nimport { useMemo } from 'react'\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'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\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 sanitizedFirstName = useMemo(() => DOMPurify.sanitize(employee!.firstName), [employee])\n\n const {\n data: { company },\n } = useCompaniesGetSuspense({ companyId })\n const sanitizedCompanyName = useMemo(() => DOMPurify.sanitize(company?.name ?? ''), [company])\n\n const { t } = useTranslation('Employee.Landing')\n\n return (\n <section className={className}>\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.EMPLOYEE_SELF_ONBOARDING_START)\n }}\n >\n {t('getStartedCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t('landingSubtitle', {\n firstName: sanitizedFirstName,\n companyName: sanitizedCompanyName,\n interpolation: { escapeValue: false },\n })}\n </Components.Heading>\n <Components.Text variant=\"supporting\">{t('landingDescription')}</Components.Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h3\">{t('stepsSubtitle')}</Components.Heading>\n <Components.UnorderedList\n items={[t('steps.personalInfo'), t('steps.taxInfo'), t('steps.bankInfo')]}\n />\n </Flex>\n </Flex>\n </Components.Box>\n </section>\n )\n}\n"],"names":["Landing","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","employeeId","companyId","className","onEvent","useBase","Components","useComponentContext","employee","useEmployeesGetSuspense","sanitizedFirstName","useMemo","DOMPurify","company","useCompaniesGetSuspense","sanitizedCompanyName","t","useTranslation","ActionsLayout","jsxs","componentEvents","ArrowRightIcon","Flex"],"mappings":";;;;;;;;;;;;;;;AAuBO,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,IAAqBC,EAAQ,MAAMC,EAAU,SAASJ,EAAU,SAAS,GAAG,CAACA,CAAQ,CAAC,GAEtF;AAAA,IACJ,MAAM,EAAE,SAAAK,EAAA;AAAA,EAAQ,IACdC,EAAwB,EAAE,WAAAZ,GAAW,GACnCa,IAAuBJ,EAAQ,MAAMC,EAAU,SAASC,GAAS,QAAQ,EAAE,GAAG,CAACA,CAAO,CAAC,GAEvF,EAAE,GAAAG,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACQ,EAAW;AAAA,IAAX;AAAA,MACC,0BACGY,GAAA,EACC,UAAA,gBAAAC;AAAA,QAACb,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