@gusto/embedded-react-sdk 0.13.3 → 0.14.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 (360) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/assets/icons/hamburger.svg.js +5 -5
  3. package/dist/assets/icons/hamburger.svg.js.map +1 -1
  4. package/dist/assets/icons/receipt-check.svg.js +10 -0
  5. package/dist/assets/icons/receipt-check.svg.js.map +1 -0
  6. package/dist/assets/icons/spinner_large.svg.js +10 -0
  7. package/dist/assets/icons/spinner_large.svg.js.map +1 -0
  8. package/dist/components/Common/DataView/DataTable/DataTable.js +29 -28
  9. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
  11. package/dist/components/Common/DocumentViewer/DocumentViewer.js +9 -9
  12. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  13. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
  14. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  15. package/dist/components/Common/Flex/Flex.js +16 -12
  16. package/dist/components/Common/Flex/Flex.js.map +1 -1
  17. package/dist/components/Common/Loading/Loading.d.ts +5 -1
  18. package/dist/components/Common/Loading/Loading.js +9 -9
  19. package/dist/components/Common/Loading/Loading.js.map +1 -1
  20. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  22. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  23. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  24. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.d.ts +3 -0
  25. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.js +25 -0
  26. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.js.map +1 -0
  27. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.module.scss.js +10 -0
  28. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.module.scss.js.map +1 -0
  29. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +18 -0
  30. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js +8 -0
  31. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -0
  32. package/dist/components/Common/UI/LoadingSpinner/index.d.ts +4 -0
  33. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +33 -31
  34. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  35. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +4 -0
  36. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  37. package/dist/components/Common/UI/Table/Table.js +22 -13
  38. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  39. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  40. package/dist/components/Common/UI/Table/TableTypes.d.ts +5 -0
  41. package/dist/components/Common/UI/Table/TableTypes.js +2 -1
  42. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  43. package/dist/components/Common/UI/Text/Text.module.scss.js +15 -14
  44. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  45. package/dist/components/Common/UI/Text/TextTypes.d.ts +2 -2
  46. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
  48. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
  50. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  52. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
  54. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  58. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
  64. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  68. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  69. package/dist/components/Company/BankAccount/BankAccount.js +25 -21
  70. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  71. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  72. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
  73. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  75. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
  77. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  78. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
  79. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  80. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  81. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  83. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  84. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +34 -35
  85. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  86. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  87. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  88. package/dist/components/Company/DocumentSigner/DocumentSigner.js +0 -1
  89. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  90. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -7
  91. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  92. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  93. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  94. package/dist/components/Company/FederalTaxes/Actions.js +6 -5
  95. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  96. package/dist/components/Company/FederalTaxes/FederalTaxes.js +12 -13
  97. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  98. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  99. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  100. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
  101. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  102. package/dist/components/Company/Industry/Actions.js +3 -2
  103. package/dist/components/Company/Industry/Actions.js.map +1 -1
  104. package/dist/components/Company/Industry/Context.js +7 -6
  105. package/dist/components/Company/Industry/Context.js.map +1 -1
  106. package/dist/components/Company/Industry/Edit.js +5 -4
  107. package/dist/components/Company/Industry/Edit.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  109. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  111. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  112. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -11
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  114. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  115. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  116. package/dist/components/Company/Locations/Locations.js +21 -17
  117. package/dist/components/Company/Locations/Locations.js.map +1 -1
  118. package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
  119. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  120. package/dist/components/Company/Locations/LocationsList/List.js +16 -16
  121. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  122. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
  123. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  124. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  125. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  126. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -17
  127. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  128. package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
  129. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  130. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
  131. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  132. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  133. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  134. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  135. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  136. package/dist/components/Company/PaySchedule/PaySchedule.js +33 -34
  137. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  138. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
  139. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  140. package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
  141. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  142. package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
  143. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  144. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  145. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  146. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  147. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  148. package/dist/components/Company/StateTaxes/StateTaxes.js +20 -16
  149. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  150. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  151. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  152. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  153. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  154. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  155. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  156. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  157. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  158. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  159. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  160. package/dist/components/Contractor/Address/Address.js +4 -5
  161. package/dist/components/Contractor/Address/Address.js.map +1 -1
  162. package/dist/components/Contractor/Address/Form.js +3 -4
  163. package/dist/components/Contractor/Address/Form.js.map +1 -1
  164. package/dist/components/Contractor/Address/useAddress.js +6 -5
  165. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  166. package/dist/components/Contractor/ContractorList/index.js +17 -17
  167. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -21
  168. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  169. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
  170. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  171. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  172. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  173. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  174. package/dist/components/Contractor/Submit/Submit.js +1 -1
  175. package/dist/components/Employee/Compensation/Actions.js +1 -1
  176. package/dist/components/Employee/Compensation/Edit.js +12 -12
  177. package/dist/components/Employee/Compensation/List.js +23 -22
  178. package/dist/components/Employee/Compensation/List.js.map +1 -1
  179. package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
  180. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  181. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +55 -0
  182. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
  183. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  184. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  185. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  186. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +42 -0
  187. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +133 -0
  188. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  189. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  190. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  191. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  192. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +7 -0
  193. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +98 -0
  194. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +1 -0
  195. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  196. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
  197. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
  198. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  199. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
  200. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  201. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  202. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  204. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  205. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +19 -15
  206. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  207. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
  208. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  209. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  210. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  211. package/dist/components/Employee/EmployeeList/Actions.js +3 -2
  212. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  213. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  214. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  215. package/dist/components/Employee/EmployeeList/Head.js +6 -5
  216. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  217. package/dist/components/Employee/EmployeeList/List.js +12 -12
  218. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  219. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  220. package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
  221. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  222. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  223. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  224. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  225. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  226. package/dist/components/Employee/Landing/Landing.js +8 -8
  227. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +24 -20
  228. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  229. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  230. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  231. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  232. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  233. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
  234. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  235. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  236. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  237. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  238. package/dist/components/Employee/Profile/Actions.js +7 -6
  239. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  240. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  241. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  242. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
  243. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  244. package/dist/components/Employee/Profile/Profile.d.ts +1 -0
  245. package/dist/components/Employee/Profile/Profile.js +22 -22
  246. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  247. package/dist/components/Employee/Profile/useProfile.js +4 -3
  248. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  249. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +17 -13
  250. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  251. package/dist/components/Employee/StateTaxes/Actions.js +8 -7
  252. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  253. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  254. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  255. package/dist/components/Employee/Taxes/Actions.js +9 -8
  256. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  257. package/dist/components/Employee/Taxes/FederalForm.js +13 -12
  258. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  259. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  260. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  261. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.d.ts +14 -0
  262. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js +54 -0
  263. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js.map +1 -0
  264. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerList.d.ts +19 -0
  265. package/dist/components/Payroll/PayrollBlocker/index.d.ts +3 -0
  266. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +27 -0
  267. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +39 -0
  268. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -0
  269. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +78 -60
  270. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  271. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +4 -2
  272. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +157 -123
  273. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  274. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +8 -0
  275. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -0
  276. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +39 -36
  277. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  278. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +65 -66
  279. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  280. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  281. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  282. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -0
  283. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +26 -0
  284. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -0
  285. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +25 -0
  286. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +59 -0
  287. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -0
  288. package/dist/components/Payroll/PayrollFlow/index.d.ts +3 -0
  289. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -0
  290. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +116 -0
  291. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -0
  292. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  293. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  294. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
  295. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +28 -36
  296. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  297. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +15 -0
  298. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +62 -0
  299. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -0
  300. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +5 -0
  301. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +93 -0
  302. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -0
  303. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +7 -6
  304. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  305. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +4 -1
  306. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -58
  307. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  308. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -1
  309. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +315 -268
  310. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  311. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +8 -0
  312. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +35 -0
  313. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -0
  314. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
  315. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +224 -0
  316. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -0
  317. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +28 -0
  318. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -0
  319. package/dist/components/Payroll/index.d.ts +3 -1
  320. package/dist/components/Payroll/index.js +8 -6
  321. package/dist/components/Payroll/index.js.map +1 -1
  322. package/dist/components/Payroll/usePreparedPayrollData.js +40 -24
  323. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  324. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
  325. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  326. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  327. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -23
  328. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  329. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  330. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  331. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  332. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  333. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +3 -1
  334. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
  335. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
  336. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  337. package/dist/contexts/ThemeProvider/theme.js +2 -1
  338. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  339. package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
  340. package/dist/i18n/I18n.js +1 -1
  341. package/dist/i18n/I18n.js.map +1 -1
  342. package/dist/i18n/en/Employee.Deductions.json.js +126 -66
  343. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  344. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +11 -11
  345. package/dist/i18n/en/Payroll.PayrollOverview.json.js +48 -42
  346. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  347. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +14 -12
  348. package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
  349. package/dist/i18n/en/PayrollBlocker.json.js +24 -0
  350. package/dist/i18n/en/PayrollBlocker.json.js.map +1 -0
  351. package/dist/shared/constants.d.ts +13 -5
  352. package/dist/shared/constants.js +37 -33
  353. package/dist/shared/constants.js.map +1 -1
  354. package/dist/style.css +1 -1
  355. package/dist/types/i18next.d.ts +185 -5
  356. package/package.json +21 -21
  357. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +0 -117
  358. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +0 -1
  359. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +0 -22
  360. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -2,13 +2,14 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
3
  import { useEmployeeList as m } from "./useEmployeeList.js";
4
4
  import "classnames";
5
+ import "../../../shared/constants.js";
5
6
  import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function C() {
8
+ function d() {
8
9
  const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
9
10
  return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
10
11
  }
11
12
  export {
12
- C as Actions
13
+ d as Actions
13
14
  };
14
15
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAA,GAC5BC,IAAaC,EAAA;AAEnB,SAAIH,EAAU,WAAW,IAChB,OAIP,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAA,GAC5BC,IAAaC,EAAA;AAEnB,SAAIH,EAAU,WAAW,IAChB,OAIP,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
@@ -9,9 +9,10 @@ import { Actions as k } from "./Actions.js";
9
9
  import { BaseComponent as q } from "../../Base/Base.js";
10
10
  import { useBase as j } from "../../Base/useBase.js";
11
11
  import { Flex as H } from "../../Common/Flex/Flex.js";
12
+ import "classnames";
13
+ import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
12
14
  import { Loading as V } from "../../Common/Loading/Loading.js";
13
15
  import { useI18n as z, useComponentDictionary as J } from "../../../i18n/I18n.js";
14
- import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
15
16
  import { Head as K } from "./Head.js";
16
17
  import { List as Q } from "./List.js";
17
18
  import { useFlow as X } from "../../Flow/useFlow.js";
@@ -105,12 +106,12 @@ function $({ companyId: n, className: m, children: l, dictionary: h }) {
105
106
  }
106
107
  ) });
107
108
  }
108
- const Oe = () => {
109
+ const De = () => {
109
110
  const { companyId: n, onEvent: m } = X();
110
111
  return /* @__PURE__ */ o(Z, { companyId: n, onEvent: m });
111
112
  };
112
113
  export {
113
114
  Z as EmployeeList,
114
- Oe as EmployeeListContextual
115
+ De as EmployeeListContextual
115
116
  };
116
117
  //# sourceMappingURL=EmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { 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'\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, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\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 totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\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 handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n isFetching,\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","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","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,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,MAAAG,GAAM,aAAAC,GAAa,YAAAC,EAAA,IAAeC;AAAA,IACxC;AAAA,MACE,WAAAjB;AAAA,MACA,MAAMS;AAAA,MACN,KAAKG;AAAA,IAA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BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAArD,GAAW,SAAAM,EAAA,IAAYgD,EAAA;AAC/B,SAAO,gBAAAzD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
1
+ {"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { 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'\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, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\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 totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\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 handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n isFetching,\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","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","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,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,MAAAG,GAAM,aAAAC,GAAa,YAAAC,EAAA,IAAeC;AAAA,IACxC;AAAA,MACE,WAAAjB;AAAA,MACA,MAAMS;AAAA,MACN,KAAKG;AAAA,IAAA;AAAA,IAEP,EAAE,iBAAiBM,EAAA;AAAA,EAAiB,GAGhC,EAAE,aAAaC,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA;AAEF,MAAIP,MAAgB,cAAc,CAACD;AACjC,6BAAQS,GAAA,EAAQ;AAElB,QAAM,EAAE,UAAAC,GAAU,eAAeC,EAAA,IAAiBX,GAC5CY,IAAYD,GAEZE,IAAa,OAAOH,EAAS,SAAS,QAAQ,I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@@
1
- import { jsx as e } from "react/jsx-runtime";
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
4
  import "classnames";
5
+ import "../../../shared/constants.js";
5
6
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
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") }) });
7
+ const f = () => {
8
+ const { t: e } = n("Employee.EmployeeList"), o = m();
9
+ return /* @__PURE__ */ t(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ t(o.Heading, { as: "h2", children: e("title") }) });
9
10
  };
10
11
  export {
11
- c as Head
12
+ f as Head
12
13
  };
13
14
  //# 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,14 +4,14 @@ import { useState as k } from "react";
4
4
  import w from "./List.module.scss.js";
5
5
  import { useEmployeeList as B } from "./useEmployeeList.js";
6
6
  import "classnames";
7
- import { EmptyData as M } from "../../Common/EmptyData/EmptyData.js";
7
+ import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as M } from "../../../shared/constants.js";
8
+ import { EmptyData as y } from "../../Common/EmptyData/EmptyData.js";
8
9
  import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
9
- import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { HamburgerMenu as G } from "../../Common/HamburgerMenu/HamburgerMenu.js";
11
- import { EmployeeOnboardingStatusBadge as R } from "../../Common/OnboardingStatusBadge/index.js";
10
+ import { useComponentContext as G } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { HamburgerMenu as R } from "../../Common/HamburgerMenu/HamburgerMenu.js";
12
+ import { EmployeeOnboardingStatusBadge as F } from "../../Common/OnboardingStatusBadge/index.js";
12
13
  import s from "../../../assets/icons/pencil.svg.js";
13
- import F from "../../../assets/icons/trashcan.svg.js";
14
- import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as x } from "../../../shared/constants.js";
14
+ import x from "../../../assets/icons/trashcan.svg.js";
15
15
  import { firstLastName as V } from "../../../helpers/formattedStrings.js";
16
16
  import { useDataView as j } from "../../Common/DataView/useDataView.js";
17
17
  import { DataView as W } from "../../Common/DataView/DataView.js";
@@ -32,7 +32,7 @@ const ot = () => {
32
32
  totalPages: _,
33
33
  handleSkip: D,
34
34
  isFetching: I
35
- } = B(), r = y(), { t: a } = T("Employee.EmployeeList"), [P, u] = k(/* @__PURE__ */ new Set()), { ...v } = j({
35
+ } = B(), r = G(), { t: a } = T("Employee.EmployeeList"), [P, u] = k(/* @__PURE__ */ new Set()), { ...v } = j({
36
36
  data: d,
37
37
  columns: [
38
38
  {
@@ -47,7 +47,7 @@ const ot = () => {
47
47
  key: "status",
48
48
  title: a("statusLabel"),
49
49
  render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ e(
50
- R,
50
+ F,
51
51
  {
52
52
  onboarded: t,
53
53
  onboardingStatus: n
@@ -63,7 +63,7 @@ const ot = () => {
63
63
  p(t.uuid, t.onboardingStatus ?? void 0);
64
64
  },
65
65
  icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
66
- }), x.has(t.onboarding_status ?? "") && n.push({
66
+ }), M.has(t.onboarding_status ?? "") && n.push({
67
67
  label: a("cancelSelfOnboardingCta"),
68
68
  onClick: async () => {
69
69
  await b(t.uuid);
@@ -85,9 +85,9 @@ const ot = () => {
85
85
  });
86
86
  });
87
87
  },
88
- icon: /* @__PURE__ */ e(F, { "aria-hidden": !0 })
88
+ icon: /* @__PURE__ */ e(x, { "aria-hidden": !0 })
89
89
  }), /* @__PURE__ */ e(
90
- G,
90
+ R,
91
91
  {
92
92
  items: n,
93
93
  triggerLabel: a("hamburgerTitle"),
@@ -105,7 +105,7 @@ const ot = () => {
105
105
  currentPage: O,
106
106
  totalPages: _
107
107
  },
108
- emptyState: () => /* @__PURE__ */ e(M, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
108
+ emptyState: () => /* @__PURE__ */ e(y, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
109
109
  /* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: D, children: a("skipCta") }),
110
110
  /* @__PURE__ */ e(r.Button, { variant: "primary", onClick: l, children: a("addEmployeeCTA") })
111
111
  ] }) })
@@ -12,10 +12,11 @@ import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../contexts/LocaleProvider/useLocale.js";
14
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [d, u] = o("EmployeeListContext");
17
+ const [u, a] = o("EmployeeListContext");
17
18
  export {
18
- u as EmployeeListProvider,
19
- d as useEmployeeList
19
+ a as EmployeeListProvider,
20
+ u as useEmployeeList
20
21
  };
21
22
  //# 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'\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: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAuBA,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'\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: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -2,13 +2,14 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
3
  import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
4
  import "classnames";
5
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function l() {
8
- const { t } = r("Employee.FederalTaxes"), { isPending: n } = i(), e = m();
9
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
5
+ import "../../../shared/constants.js";
6
+ import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
7
+ import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ 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") }) });
10
11
  }
11
12
  export {
12
- l as Actions
13
+ x as Actions
13
14
  };
14
15
  //# 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;"}
@@ -1,12 +1,13 @@
1
1
  import { jsxs as l, Fragment as a, jsx as r } from "react/jsx-runtime";
2
- import { useTranslation as s, Trans as u } from "react-i18next";
2
+ import { useTranslation as s, Trans as m } from "react-i18next";
3
3
  import { z as i } from "zod";
4
4
  import "classnames";
5
- import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
- import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
7
- import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
5
+ import "../../../shared/constants.js";
6
+ import { RadioGroupField as u } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
7
  import { NumberInputField as t } from "../../Common/Fields/NumberInputField/NumberInputField.js";
9
- const R = i.object({
8
+ import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { SelectField as f } from "../../Common/Fields/SelectField/SelectField.js";
10
+ const q = i.object({
10
11
  filingStatus: i.string().min(1),
11
12
  twoJobs: i.string().min(1),
12
13
  dependentsAmount: i.number().transform(String),
@@ -15,7 +16,7 @@ const R = i.object({
15
16
  extraWithholding: i.number().transform(String),
16
17
  w4DataType: i.enum(["pre_2020_w4", "rev_2020_w4"])
17
18
  });
18
- function q() {
19
+ function v() {
19
20
  const { t: e } = s("Employee.FederalTaxes"), o = d(), n = [
20
21
  { value: "Single", label: e("filingStatusSingle") },
21
22
  { value: "Married", label: e("filingStatusMarried") },
@@ -24,7 +25,7 @@ function q() {
24
25
  ];
25
26
  return /* @__PURE__ */ l(a, { children: [
26
27
  /* @__PURE__ */ r(
27
- m,
28
+ f,
28
29
  {
29
30
  name: "filingStatus",
30
31
  label: e("federalFilingStatus1c"),
@@ -36,14 +37,14 @@ function q() {
36
37
  }
37
38
  ),
38
39
  /* @__PURE__ */ r(
39
- f,
40
+ u,
40
41
  {
41
42
  name: "twoJobs",
42
43
  isRequired: !0,
43
44
  label: e("multipleJobs2c"),
44
45
  errorMessage: e("validations.federalTwoJobs"),
45
46
  description: /* @__PURE__ */ r(
46
- u,
47
+ m,
47
48
  {
48
49
  i18nKey: "includesSpouseExplanation",
49
50
  t: e,
@@ -103,7 +104,7 @@ function q() {
103
104
  ] });
104
105
  }
105
106
  export {
106
- q as FederalForm,
107
- R as FederalFormSchema
107
+ v as FederalForm,
108
+ q as FederalFormSchema
108
109
  };
109
110
  //# 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 { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;;AAKO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,EACvC,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,YAAYA,EAAE,KAAK,CAAC,eAAe,aAAa,CAAC;AACnD,CAAC;AAKM,SAASC,IAAc;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GAEbC,IAAyB;AAAA,IAC7B,EAAE,OAAO,UAAU,OAAOJ,EAAE,oBAAoB,EAAA;AAAA,IAChD,EAAE,OAAO,WAAW,OAAOA,EAAE,qBAAqB,EAAA;AAAA,IAClD,EAAE,OAAO,qBAAqB,OAAOA,EAAE,6BAA6B,EAAA;AAAA,IACpE,EAAE,OAAO,2BAA2B,OAAOA,EAAE,mCAAmC,EAAA;AAAA,EAAE;AAGpF,SACE,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR,EAAE,uBAAuB;AAAA,QAChC,aAAaA,EAAE,iCAAiC;AAAA,QAChD,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAASI;AAAA,QACT,YAAU;AAAA,QACV,cAAcJ,EAAE,iCAAiC;AAAA,MAAA;A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ACP,KAAK;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 { z } from 'zod'\nimport { SelectField, RadioGroupField, NumberInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const FederalFormSchema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n w4DataType: z.enum(['pre_2020_w4', 'rev_2020_w4']),\n})\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.FederalTaxes')\n const Components = useComponentContext()\n\n const filingStatusCategories = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFillingStatusPlaceholder')}\n description={t('selectWithholdingDescription')}\n options={filingStatusCategories}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n irs_link: <Components.Link />,\n }}\n />\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["FederalFormSchema","z","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusCategories","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;;;AAKO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,EACvC,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,YAAYA,EAAE,KAAK,CAAC,eAAe,aAAa,CAAC;AACnD,CAAC;AAKM,SAASC,IAAc;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GAEbC,IAAyB;AAAA,IAC7B,EAAE,OAAO,UAAU,OAAOJ,EAAE,oBAAoB,EAAA;AAAA,IAChD,EAAE,OAAO,WAAW,OAAOA,EAAE,qBAAqB,EAAA;AAAA,IAClD,EAAE,OAAO,qBAAqB,OAAOA,EAAE,6BAA6B,EAAA;AAAA,IACpE,EAAE,OAAO,2BAA2B,OAAOA,EAAE,mCAAmC,EAAA;AAAA,EAAE;AAGpF,SACE,gBAAAK,EAAAC,GAAA,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,QACV,OAAOX,EAAE,YAAY;AAAA,QACrB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,kBAAkB;AAAA,QAC3B,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
@@ -12,10 +12,11 @@ import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../contexts/LocaleProvider/useLocale.js";
14
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [c, u] = o("FederalTaxesContext");
17
+ const [u, f] = o("FederalTaxesContext");
17
18
  export {
18
- u as FederalTaxesProvider,
19
- c as useFederalTaxes
19
+ f as FederalTaxesProvider,
20
+ u as useFederalTaxes
20
21
  };
21
22
  //# 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;"}
@@ -7,15 +7,15 @@ import { BaseComponent as x } from "../../Base/Base.js";
7
7
  import { useBase as y } from "../../Base/useBase.js";
8
8
  import { Flex as r } from "../../Common/Flex/Flex.js";
9
9
  import "classnames";
10
- import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
11
- import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import { useI18n as D, useComponentDictionary as I } from "../../../i18n/I18n.js";
13
- import { componentEvents as S } from "../../../shared/constants.js";
10
+ import { componentEvents as E } from "../../../shared/constants.js";
11
+ import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
12
+ import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import { useI18n as I, useComponentDictionary as S } from "../../../i18n/I18n.js";
14
14
  function H(t) {
15
- return D("Employee.Landing"), I("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
15
+ return I("Employee.Landing"), S("Employee.Landing", t.dictionary), /* @__PURE__ */ e(x, { ...t, children: /* @__PURE__ */ e(L, { ...t, children: t.children }) });
16
16
  }
17
17
  const L = ({ employeeId: t, companyId: c, className: m }) => {
18
- const { onEvent: l } = y(), o = C(), {
18
+ const { onEvent: l } = y(), o = D(), {
19
19
  data: { employee: a }
20
20
  } = h({ employeeId: t }), p = a.firstName, {
21
21
  data: { company: d }
@@ -34,12 +34,12 @@ const L = ({ employeeId: t, companyId: c, className: m }) => {
34
34
  ] })
35
35
  ] }),
36
36
  /* @__PURE__ */ i(r, { flexDirection: "column", alignItems: "center", gap: 8, children: [
37
- /* @__PURE__ */ e(E, { justifyContent: "center", children: /* @__PURE__ */ e(
37
+ /* @__PURE__ */ e(C, { justifyContent: "center", children: /* @__PURE__ */ e(
38
38
  o.Button,
39
39
  {
40
40
  variant: "secondary",
41
41
  onClick: () => {
42
- l(S.EMPLOYEE_SELF_ONBOARDING_START);
42
+ l(E.EMPLOYEE_SELF_ONBOARDING_START);
43
43
  },
44
44
  children: n("getStartedCta")
45
45
  }
@@ -1,29 +1,33 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { createMachine as p } from "robot3";
3
- import { EmployeeListContextual as a } from "../EmployeeList/EmployeeList.js";
4
- import { employeeOnboardingMachine as c } from "./onboardingStateMachine.js";
5
- import { Flow as l } from "../../Flow/Flow.js";
6
- const g = ({
3
+ import { useMemo as c } from "react";
4
+ import { EmployeeListContextual as s } from "../EmployeeList/EmployeeList.js";
5
+ import { employeeOnboardingMachine as a } from "./onboardingStateMachine.js";
6
+ import { Flow as f } from "../../Flow/Flow.js";
7
+ const w = ({
7
8
  companyId: o,
8
9
  onEvent: e,
9
- defaultValues: r,
10
- isSelfOnboardingEnabled: m = !0
10
+ defaultValues: m,
11
+ isSelfOnboardingEnabled: r = !0
11
12
  }) => {
12
- const n = p(
13
- "index",
14
- c,
15
- (t) => ({
16
- ...t,
17
- component: a,
18
- companyId: o,
19
- isAdmin: !0,
20
- defaultValues: r,
21
- isSelfOnboardingEnabled: m
22
- })
13
+ const t = c(
14
+ () => p(
15
+ "index",
16
+ a,
17
+ (i) => ({
18
+ ...i,
19
+ component: s,
20
+ companyId: o,
21
+ isAdmin: !0,
22
+ defaultValues: m,
23
+ isSelfOnboardingEnabled: r
24
+ })
25
+ ),
26
+ [o, m, r]
23
27
  );
24
- return /* @__PURE__ */ i(l, { machine: n, onEvent: e });
28
+ return /* @__PURE__ */ n(f, { machine: t, onEvent: e });
25
29
  };
26
30
  export {
27
- g as OnboardingFlow
31
+ w as OnboardingFlow
28
32
  };
29
33
  //# sourceMappingURL=OnboardingFlow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingFlow.js","sources":["../../../../src/components/Employee/OnboardingFlow/OnboardingFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { EmployeeListContextual } from '../EmployeeList/EmployeeList'\nimport { employeeOnboardingMachine } from './onboardingStateMachine'\nimport type {\n OnboardingDefaultValues,\n OnboardingContextInterface,\n} from './OnboardingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface OnboardingFlowProps extends BaseComponentInterface {\n companyId: string\n defaultValues?: RequireAtLeastOne<OnboardingDefaultValues>\n isSelfOnboardingEnabled?: boolean\n}\n\nexport const OnboardingFlow = ({\n companyId,\n onEvent,\n defaultValues,\n isSelfOnboardingEnabled = true,\n}: OnboardingFlowProps) => {\n const manageEmployees = createMachine(\n 'index',\n employeeOnboardingMachine,\n (initialContext: OnboardingContextInterface) => ({\n ...initialContext,\n component: EmployeeListContextual,\n companyId,\n isAdmin: true,\n defaultValues,\n isSelfOnboardingEnabled,\n }),\n )\n return <Flow machine={manageEmployees} onEvent={onEvent} />\n}\n"],"names":["OnboardingFlow","companyId","onEvent","defaultValues","isSelfOnboardingEnabled","manageEmployees","createMachine","employeeOnboardingMachine","initialContext","EmployeeListContextual","jsx","Flow"],"mappings":";;;;;AAiBO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,yBAAAC,IAA0B;AAC5B,MAA2B;AACzB,QAAMC,IAAkBC;AAAA,IACtB;AAAA,IACAC;AAAA,IACA,CAACC,OAAgD;AAAA,MAC/C,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAR;AAAA,MACA,SAAS;AAAA,MACT,eAAAE;AAAA,MACA,yBAAAC;AAAA,IAAA;AAAA,EACF;AAEF,SAAO,gBAAAM,EAACC,GAAA,EAAK,SAASN,GAAiB,SAAAH,EAAA,CAAkB;AAC3D;"}
1
+ {"version":3,"file":"OnboardingFlow.js","sources":["../../../../src/components/Employee/OnboardingFlow/OnboardingFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { EmployeeListContextual } from '../EmployeeList/EmployeeList'\nimport { employeeOnboardingMachine } from './onboardingStateMachine'\nimport type {\n OnboardingDefaultValues,\n OnboardingContextInterface,\n} from './OnboardingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface OnboardingFlowProps extends BaseComponentInterface {\n companyId: string\n defaultValues?: RequireAtLeastOne<OnboardingDefaultValues>\n isSelfOnboardingEnabled?: boolean\n}\n\nexport const OnboardingFlow = ({\n companyId,\n onEvent,\n defaultValues,\n isSelfOnboardingEnabled = true,\n}: OnboardingFlowProps) => {\n const manageEmployees = useMemo(\n () =>\n createMachine(\n 'index',\n employeeOnboardingMachine,\n (initialContext: OnboardingContextInterface) => ({\n ...initialContext,\n component: EmployeeListContextual,\n companyId,\n isAdmin: true,\n defaultValues,\n isSelfOnboardingEnabled,\n }),\n ),\n [companyId, defaultValues, isSelfOnboardingEnabled],\n )\n return <Flow machine={manageEmployees} onEvent={onEvent} />\n}\n"],"names":["OnboardingFlow","companyId","onEvent","defaultValues","isSelfOnboardingEnabled","manageEmployees","useMemo","createMachine","employeeOnboardingMachine","initialContext","EmployeeListContextual","jsx","Flow"],"mappings":";;;;;;AAkBO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,yBAAAC,IAA0B;AAC5B,MAA2B;AACzB,QAAMC,IAAkBC;AAAA,IACtB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAgD;AAAA,QAC/C,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAT;AAAA,QACA,SAAS;AAAA,QACT,eAAAE;AAAA,QACA,yBAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACH,GAAWE,GAAeC,CAAuB;AAAA,EAAA;AAEpD,SAAO,gBAAAO,EAACC,GAAA,EAAK,SAASP,GAAiB,SAAAH,EAAA,CAAkB;AAC3D;"}
@@ -9,10 +9,10 @@ import r from "./OnboardingSummary.module.scss.js";
9
9
  import { BaseComponent as P } from "../../Base/Base.js";
10
10
  import { useBase as R } from "../../Base/useBase.js";
11
11
  import { Flex as d } from "../../Common/Flex/Flex.js";
12
- import { ActionsLayout as E } from "../../Common/ActionsLayout/ActionsLayout.js";
12
+ import { componentEvents as E, EmployeeOnboardingStatus as N } from "../../../shared/constants.js";
13
+ import { ActionsLayout as O } from "../../Common/ActionsLayout/ActionsLayout.js";
13
14
  import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
15
  import { useI18n as _, useComponentDictionary as w } from "../../../i18n/I18n.js";
15
- import { componentEvents as N, EmployeeOnboardingStatus as O } from "../../../shared/constants.js";
16
16
  import F from "../../../assets/icons/success_check.svg.js";
17
17
  import G from "../../../assets/icons/unchecked_circular.svg.js";
18
18
  import { useFlow as M } from "../../Flow/useFlow.js";
@@ -22,7 +22,7 @@ function j(n) {
22
22
  const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
23
23
  const { onEvent: a } = R(), { t } = b("Employee.OnboardingSummary"), o = T(), {
24
24
  data: { employee: x }
25
- } = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h === O.ONBOARDING_COMPLETED || !I && h === O.SELF_ONBOARDING_PENDING_INVITE, D = S(() => y.sanitize(u), [u]), v = S(() => y.sanitize(p), [p]);
25
+ } = B({ employeeId: n }), { firstName: u, lastName: p } = x, { data: C } = L({ employeeId: n }), { onboardingStatus: h, onboardingSteps: l } = C.employeeOnboardingStatus, I = l?.length && l.findIndex((i) => i.required && !i.completed) > -1, f = h === N.ONBOARDING_COMPLETED || !I && h === N.SELF_ONBOARDING_PENDING_INVITE, D = S(() => y.sanitize(u), [u]), v = S(() => y.sanitize(p), [p]);
26
26
  return /* @__PURE__ */ e("section", { className: c, children: /* @__PURE__ */ s(d, { flexDirection: "column", gap: 32, children: [
27
27
  /* @__PURE__ */ e(d, { alignItems: "center", flexDirection: "column", gap: 8, children: m ? f ? /* @__PURE__ */ s(g, { children: [
28
28
  /* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedAdminSubtitle", {
@@ -47,23 +47,23 @@ const k = ({ employeeId: n, className: c, isAdmin: m = !1 }) => {
47
47
  ] }) : /* @__PURE__ */ s(g, { children: [
48
48
  /* @__PURE__ */ e(o.Heading, { as: "h2", textAlign: "center", children: t("onboardedSelfSubtitle") }),
49
49
  /* @__PURE__ */ e(o.Text, { className: r.description, children: t("onboardedSelfDescription") }),
50
- /* @__PURE__ */ e(E, { justifyContent: f ? "center" : "start", children: /* @__PURE__ */ e(
50
+ /* @__PURE__ */ e(O, { justifyContent: f ? "center" : "start", children: /* @__PURE__ */ e(
51
51
  o.Button,
52
52
  {
53
53
  variant: "secondary",
54
54
  onClick: () => {
55
- a(N.EMPLOYEE_ONBOARDING_DONE);
55
+ a(E.EMPLOYEE_ONBOARDING_DONE);
56
56
  },
57
57
  children: t("doneCta")
58
58
  }
59
59
  ) })
60
60
  ] }) }),
61
- m && /* @__PURE__ */ e(E, { justifyContent: "center", children: /* @__PURE__ */ e(
61
+ m && /* @__PURE__ */ e(O, { justifyContent: "center", children: /* @__PURE__ */ e(
62
62
  o.Button,
63
63
  {
64
64
  variant: "secondary",
65
65
  onClick: () => {
66
- a(N.EMPLOYEES_LIST);
66
+ a(E.EMPLOYEES_LIST);
67
67
  },
68
68
  children: t("doneCta")
69
69
  }
@@ -2,18 +2,19 @@ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import { useTranslation as m } from "react-i18next";
3
3
  import { usePaymentMethod as l } from "./usePaymentMethod.js";
4
4
  import "classnames";
5
+ import "../../../shared/constants.js";
5
6
  import { ActionsLayout as p } from "../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const f = () => {
8
- const { handleAdd: a, handleCancel: i, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = l(), { t: n } = m("Employee.PaymentMethod"), o = u();
8
+ const P = () => {
9
+ const { handleAdd: i, handleCancel: a, isPending: r, bankAccounts: s, handleSplit: c, mode: t } = l(), { t: n } = m("Employee.PaymentMethod"), o = u();
9
10
  return /* @__PURE__ */ d(p, { children: [
10
- (t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: i, children: n("cancelAddCta") }),
11
+ (t === "ADD" || t === "SPLIT") && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: a, children: n("cancelAddCta") }),
11
12
  t === "LIST" && s.length > 1 && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: c, children: n("splitCta") }),
12
- t === "LIST" && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: a, children: n("addAnotherCta") }),
13
+ t === "LIST" && /* @__PURE__ */ e(o.Button, { variant: "secondary", type: "button", onClick: i, children: n("addAnotherCta") }),
13
14
  /* @__PURE__ */ e(o.Button, { type: "submit", isLoading: r, children: n(t === "ADD" || t === "SPLIT" ? "saveCta" : "submitCta") })
14
15
  ] });
15
16
  };
16
17
  export {
17
- f as Actions
18
+ P as Actions
18
19
  };
19
20
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,EAAA,IAASC,EAAA,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACG,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACR,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAEF,gBAAAK,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EAAA,CACjE;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/PaymentMethod/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaymentMethod } from './usePaymentMethod'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { handleAdd, handleCancel, isPending, bankAccounts, handleSplit, mode } = usePaymentMethod()\n const { t } = useTranslation('Employee.PaymentMethod')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'SPLIT') && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleCancel}>\n {t('cancelAddCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && bankAccounts.length > 1 && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleSplit}>\n {t('splitCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleAdd}>\n {t('addAnotherCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t(mode === 'ADD' || mode === 'SPLIT' ? 'saveCta' : 'submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleAdd","handleCancel","isPending","bankAccounts","handleSplit","mode","usePaymentMethod","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,WAAAC,GAAW,cAAAC,GAAc,aAAAC,GAAa,MAAAC,EAAA,IAASC,EAAA,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACG,UAAA;AAAA,KAAAN,MAAS,SAASA,MAAS,YAC3B,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASR,GAC3D,UAAAM,EAAE,cAAc,GACnB;AAAA,IAEDF,MAAS,UAAUF,EAAa,SAAS,uBACvCM,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASL,GAC3D,UAAAG,EAAE,UAAU,GACf;AAAA,IAEDF,MAAS,UACR,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAAST,GAC3D,UAAAO,EAAE,eAAe,GACpB;AAAA,IAEF,gBAAAK,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAK,EAAEF,MAAS,SAASA,MAAS,UAAU,YAAY,WAAW,EAAA,CACjE;AAAA,EAAA,GACF;AAEJ;"}