@gusto/embedded-react-sdk 0.13.1 → 0.13.2

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 (520) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/index.js +8 -0
  5. package/dist/_virtual/index.js.map +1 -0
  6. package/dist/assets/icons/close.svg.js +10 -0
  7. package/dist/assets/icons/close.svg.js.map +1 -0
  8. package/dist/components/Base/Base.js +2 -3
  9. package/dist/components/Base/Base.js.map +1 -1
  10. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  11. package/dist/components/Common/DataView/DataCards/DataCards.js +29 -24
  12. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  13. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  14. package/dist/components/Common/DataView/DataTable/DataTable.js +67 -49
  15. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  16. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  17. package/dist/components/Common/DataView/DataView.js +19 -18
  18. package/dist/components/Common/DataView/DataView.js.map +1 -1
  19. package/dist/components/Common/DataView/useDataView.d.ts +4 -1
  20. package/dist/components/Common/DataView/useDataView.js +15 -13
  21. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  22. package/dist/components/Common/ReorderableList/DropZone.js +5 -5
  23. package/dist/components/Common/ReorderableList/ReorderableItem.js +8 -8
  24. package/dist/components/Common/ReorderableList/ReorderableList.js +5 -5
  25. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  26. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  27. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  28. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  29. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  30. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  31. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  32. package/dist/components/Common/UI/Alert/Alert.js +28 -21
  33. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  34. package/dist/components/Common/UI/Alert/Alert.module.scss.js +7 -3
  35. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  36. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +10 -0
  37. package/dist/components/Common/UI/Alert/AlertTypes.js +7 -0
  38. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -0
  39. package/dist/components/Common/UI/Badge/Badge.js +10 -10
  40. package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
  41. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  42. package/dist/components/Common/UI/Badge/BadgeTypes.js +7 -0
  43. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -0
  44. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  45. package/dist/components/Common/UI/Button/Button.js +30 -27
  46. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  47. package/dist/components/Common/UI/Button/ButtonIcon.js +6 -6
  48. package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
  49. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +17 -0
  50. package/dist/components/Common/UI/Button/ButtonTypes.js +14 -0
  51. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -0
  52. package/dist/components/Common/UI/Checkbox/Checkbox.d.ts +1 -1
  53. package/dist/components/Common/UI/Checkbox/Checkbox.js +51 -49
  54. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  55. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +7 -0
  56. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js +8 -0
  57. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -0
  58. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  59. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +72 -69
  60. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  61. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +9 -0
  62. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js +10 -0
  63. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -0
  64. package/dist/components/Common/UI/Input/Input.d.ts +1 -1
  65. package/dist/components/Common/UI/Input/Input.js +38 -27
  66. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  67. package/dist/components/Common/UI/Input/InputTypes.d.ts +7 -0
  68. package/dist/components/Common/UI/Input/InputTypes.js +7 -0
  69. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -0
  70. package/dist/components/Common/UI/Menu/Menu.d.ts +1 -1
  71. package/dist/components/Common/UI/Menu/Menu.js +32 -30
  72. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  73. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +6 -0
  74. package/dist/components/Common/UI/Menu/MenuTypes.js +7 -0
  75. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -0
  76. package/dist/components/Common/UI/Radio/Radio.d.ts +1 -1
  77. package/dist/components/Common/UI/Radio/Radio.js +50 -48
  78. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  79. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +7 -0
  80. package/dist/components/Common/UI/Radio/RadioTypes.js +8 -0
  81. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -0
  82. package/dist/components/Common/UI/RadioGroup/RadioGroup.d.ts +1 -1
  83. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +61 -58
  84. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  85. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +9 -0
  86. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js +10 -0
  87. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -0
  88. package/dist/components/Common/UI/Switch/Switch.d.ts +1 -1
  89. package/dist/components/Common/UI/Switch/Switch.js +48 -46
  90. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  91. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +7 -0
  92. package/dist/components/Common/UI/Switch/SwitchTypes.js +8 -0
  93. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -0
  94. package/dist/components/Common/UI/Table/Table.d.ts +1 -1
  95. package/dist/components/Common/UI/Table/Table.js +10 -7
  96. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  97. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  98. package/dist/components/Common/UI/Table/TableTypes.d.ts +4 -0
  99. package/dist/components/Common/UI/Text/Text.d.ts +1 -1
  100. package/dist/components/Common/UI/Text/Text.js +22 -25
  101. package/dist/components/Common/UI/Text/Text.js.map +1 -1
  102. package/dist/components/Common/UI/Text/TextTypes.d.ts +7 -0
  103. package/dist/components/Common/UI/Text/TextTypes.js +8 -0
  104. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -0
  105. package/dist/components/Common/UI/TextInput/TextInput.d.ts +1 -1
  106. package/dist/components/Common/UI/TextInput/TextInput.js +53 -51
  107. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  108. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +9 -0
  109. package/dist/components/Common/UI/TextInput/TextInputTypes.js +9 -0
  110. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -0
  111. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  112. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  113. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  114. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  115. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  116. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  117. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
  118. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
  119. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  120. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  121. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  122. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  123. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
  124. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  125. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  126. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  127. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
  128. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  129. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  130. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  131. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  132. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  133. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
  134. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  135. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  136. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  137. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  138. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  139. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  140. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  141. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  142. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  143. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +6 -7
  144. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  145. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
  146. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  147. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  148. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  149. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -6
  150. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  151. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  152. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  153. package/dist/components/Company/FederalTaxes/FederalTaxes.js +6 -7
  154. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  155. package/dist/components/Company/FederalTaxes/Form.js +3 -5
  156. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  157. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -12
  158. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  159. package/dist/components/Company/Industry/Actions.js +5 -7
  160. package/dist/components/Company/Industry/Actions.js.map +1 -1
  161. package/dist/components/Company/Industry/Context.js +6 -9
  162. package/dist/components/Company/Industry/Context.js.map +1 -1
  163. package/dist/components/Company/Industry/Edit.js +10 -12
  164. package/dist/components/Company/Industry/Edit.js.map +1 -1
  165. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  166. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  167. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  168. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  169. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  170. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
  171. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  172. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  173. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  174. package/dist/components/Company/Locations/LocationsList/List.js +2 -4
  175. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  176. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -9
  177. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  178. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
  179. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  180. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  181. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  182. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  183. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  184. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  185. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  186. package/dist/components/Company/OnboardingOverview/context.js +3 -6
  187. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  188. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  189. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  190. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
  191. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  192. package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
  193. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
  194. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  195. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  196. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  197. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -8
  198. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  199. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  200. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  201. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
  202. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  203. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  204. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  205. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  206. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  207. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
  208. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  209. package/dist/components/Contractor/Address/Address.js +4 -5
  210. package/dist/components/Contractor/Address/Address.js.map +1 -1
  211. package/dist/components/Contractor/Address/Form.js +1 -1
  212. package/dist/components/Contractor/Address/useAddress.js +5 -8
  213. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  214. package/dist/components/Contractor/ContractorList/index.js +24 -25
  215. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  216. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  217. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  218. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
  219. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  220. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  221. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  222. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  223. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  224. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  225. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -4
  226. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  227. package/dist/components/Contractor/Submit/Submit.js +3 -4
  228. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  229. package/dist/components/Employee/Compensation/Actions.js +5 -6
  230. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  231. package/dist/components/Employee/Compensation/Edit.js +14 -15
  232. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  233. package/dist/components/Employee/Compensation/List.js +23 -25
  234. package/dist/components/Employee/Compensation/List.js.map +1 -1
  235. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +10 -11
  236. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  237. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -8
  238. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  239. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +6 -0
  240. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +10 -11
  241. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  242. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  243. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  244. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -7
  245. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  246. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  247. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  248. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -6
  249. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  250. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  251. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  252. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -6
  253. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  254. package/dist/components/Employee/EmployeeList/Actions.js +4 -6
  255. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  256. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  257. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  258. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  259. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  260. package/dist/components/Employee/EmployeeList/List.js +14 -15
  261. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  262. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -6
  263. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  264. package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
  265. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  266. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -13
  267. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  268. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -6
  269. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  270. package/dist/components/Employee/Landing/Landing.js +12 -13
  271. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  272. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  273. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  274. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  275. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
  276. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  277. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
  278. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  279. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  280. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  281. package/dist/components/Employee/PaymentMethod/Split.js +10 -11
  282. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  283. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -8
  284. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  285. package/dist/components/Employee/Profile/Actions.js +7 -9
  286. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  287. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  288. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  289. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  290. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  291. package/dist/components/Employee/Profile/useProfile.js +3 -6
  292. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  293. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  294. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  295. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -6
  296. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  297. package/dist/components/Employee/Taxes/Actions.js +8 -10
  298. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  299. package/dist/components/Employee/Taxes/FederalForm.js +12 -14
  300. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  301. package/dist/components/Employee/Taxes/useTaxes.js +3 -6
  302. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  303. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +3 -1
  304. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +55 -60
  305. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  306. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  307. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +82 -88
  308. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  309. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +30 -27
  310. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  311. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +15 -15
  312. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +18 -0
  313. package/dist/components/Payroll/PayrollList/PayrollList.js +24 -18
  314. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  315. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +5 -1
  316. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +66 -32
  317. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  318. package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
  319. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -2
  320. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +50 -26
  321. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  322. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +7 -1
  323. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +269 -55
  324. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  325. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +8 -2
  326. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +78 -22
  327. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
  328. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +11 -9
  329. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -1
  330. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +68 -0
  331. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +53 -0
  332. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -0
  333. package/dist/contexts/GustoProvider/GustoProvider.js +17 -12
  334. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  335. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -10
  336. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  337. package/dist/helpers/applyMissingDefaults.d.ts +5 -0
  338. package/dist/helpers/applyMissingDefaults.js +10 -0
  339. package/dist/helpers/applyMissingDefaults.js.map +1 -0
  340. package/dist/helpers/formattedStrings.js +11 -12
  341. package/dist/helpers/formattedStrings.js.map +1 -1
  342. package/dist/i18n/I18n.js +1 -1
  343. package/dist/i18n/I18n.js.map +1 -1
  344. package/dist/i18n/en/Employee.Deductions.json.js +68 -60
  345. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  346. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +13 -13
  347. package/dist/i18n/en/Payroll.PayrollList.json.js +12 -10
  348. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  349. package/dist/i18n/en/Payroll.PayrollOverview.json.js +20 -12
  350. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  351. package/dist/i18n/en/Payroll.RunPayroll.json.js +8 -0
  352. package/dist/i18n/en/Payroll.RunPayroll.json.js.map +1 -0
  353. package/dist/i18n/en/payroll.payrollhistory.json.js +20 -0
  354. package/dist/i18n/en/payroll.payrollhistory.json.js.map +1 -0
  355. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +40 -0
  356. package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js.map +1 -0
  357. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +18 -0
  358. package/dist/node_modules/@react-dnd/asap/dist/RawTask.js.map +1 -0
  359. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +17 -0
  360. package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js.map +1 -0
  361. package/dist/node_modules/@react-dnd/asap/dist/asap.js +10 -0
  362. package/dist/node_modules/@react-dnd/asap/dist/asap.js.map +1 -0
  363. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +63 -0
  364. package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map +1 -0
  365. package/dist/node_modules/@react-dnd/invariant/dist/index.js +23 -0
  366. package/dist/node_modules/@react-dnd/invariant/dist/index.js.map +1 -0
  367. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +26 -0
  368. package/dist/node_modules/@react-dnd/shallowequal/dist/index.js.map +1 -0
  369. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +71 -0
  370. package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js.map +1 -0
  371. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +55 -0
  372. package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js.map +1 -0
  373. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +19 -0
  374. package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js.map +1 -0
  375. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +43 -0
  376. package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js.map +1 -0
  377. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +18 -0
  378. package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js.map +1 -0
  379. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +14 -0
  380. package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js.map +1 -0
  381. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +13 -0
  382. package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js.map +1 -0
  383. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +10 -0
  384. package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js.map +1 -0
  385. package/dist/node_modules/dnd-core/dist/actions/registry.js +44 -0
  386. package/dist/node_modules/dnd-core/dist/actions/registry.js.map +1 -0
  387. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +42 -0
  388. package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js.map +1 -0
  389. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +116 -0
  390. package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js.map +1 -0
  391. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +97 -0
  392. package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js.map +1 -0
  393. package/dist/node_modules/dnd-core/dist/contracts.js +22 -0
  394. package/dist/node_modules/dnd-core/dist/contracts.js.map +1 -0
  395. package/dist/node_modules/dnd-core/dist/createDragDropManager.js +20 -0
  396. package/dist/node_modules/dnd-core/dist/createDragDropManager.js.map +1 -0
  397. package/dist/node_modules/dnd-core/dist/interfaces.js +8 -0
  398. package/dist/node_modules/dnd-core/dist/interfaces.js.map +1 -0
  399. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +31 -0
  400. package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js.map +1 -0
  401. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +51 -0
  402. package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js.map +1 -0
  403. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +79 -0
  404. package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js.map +1 -0
  405. package/dist/node_modules/dnd-core/dist/reducers/index.js +43 -0
  406. package/dist/node_modules/dnd-core/dist/reducers/index.js.map +1 -0
  407. package/dist/node_modules/dnd-core/dist/reducers/refCount.js +17 -0
  408. package/dist/node_modules/dnd-core/dist/reducers/refCount.js.map +1 -0
  409. package/dist/node_modules/dnd-core/dist/reducers/stateId.js +7 -0
  410. package/dist/node_modules/dnd-core/dist/reducers/stateId.js.map +1 -0
  411. package/dist/node_modules/dnd-core/dist/utils/coords.js +27 -0
  412. package/dist/node_modules/dnd-core/dist/utils/coords.js.map +1 -0
  413. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +13 -0
  414. package/dist/node_modules/dnd-core/dist/utils/dirtiness.js.map +1 -0
  415. package/dist/node_modules/dnd-core/dist/utils/equality.js +18 -0
  416. package/dist/node_modules/dnd-core/dist/utils/equality.js.map +1 -0
  417. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +8 -0
  418. package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js.map +1 -0
  419. package/dist/node_modules/dnd-core/dist/utils/js_utils.js +37 -0
  420. package/dist/node_modules/dnd-core/dist/utils/js_utils.js.map +1 -0
  421. package/dist/node_modules/dnd-core/dist/utils/matchesType.js +9 -0
  422. package/dist/node_modules/dnd-core/dist/utils/matchesType.js.map +1 -0
  423. package/dist/node_modules/fast-deep-equal/index.js +32 -0
  424. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  425. package/dist/node_modules/react-dnd/dist/core/DndContext.js +8 -0
  426. package/dist/node_modules/react-dnd/dist/core/DndContext.js.map +1 -0
  427. package/dist/node_modules/react-dnd/dist/core/DndProvider.js +67 -0
  428. package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -0
  429. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +12 -0
  430. package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js.map +1 -0
  431. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +23 -0
  432. package/dist/node_modules/react-dnd/dist/hooks/useCollector.js.map +1 -0
  433. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +26 -0
  434. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js.map +1 -0
  435. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +22 -0
  436. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js.map +1 -0
  437. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +21 -0
  438. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js.map +1 -0
  439. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +20 -0
  440. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js.map +1 -0
  441. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +23 -0
  442. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js.map +1 -0
  443. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +16 -0
  444. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js.map +1 -0
  445. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +14 -0
  446. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js.map +1 -0
  447. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +24 -0
  448. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js.map +1 -0
  449. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +11 -0
  450. package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js.map +1 -0
  451. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +22 -0
  452. package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js.map +1 -0
  453. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +13 -0
  454. package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js.map +1 -0
  455. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +14 -0
  456. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js.map +1 -0
  457. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +17 -0
  458. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js.map +1 -0
  459. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +19 -0
  460. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js.map +1 -0
  461. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +19 -0
  462. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js.map +1 -0
  463. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +16 -0
  464. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js.map +1 -0
  465. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +24 -0
  466. package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js.map +1 -0
  467. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +6 -0
  468. package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  469. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +21 -0
  470. package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js.map +1 -0
  471. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +11 -0
  472. package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js.map +1 -0
  473. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +89 -0
  474. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js.map +1 -0
  475. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +60 -0
  476. package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js.map +1 -0
  477. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +88 -0
  478. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js.map +1 -0
  479. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +58 -0
  480. package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js.map +1 -0
  481. package/dist/node_modules/react-dnd/dist/internals/isRef.js +10 -0
  482. package/dist/node_modules/react-dnd/dist/internals/isRef.js.map +1 -0
  483. package/dist/node_modules/react-dnd/dist/internals/registration.js +19 -0
  484. package/dist/node_modules/react-dnd/dist/internals/registration.js.map +1 -0
  485. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +47 -0
  486. package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js.map +1 -0
  487. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +11 -0
  488. package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js.map +1 -0
  489. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +23 -0
  490. package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js.map +1 -0
  491. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +275 -0
  492. package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js.map +1 -0
  493. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +60 -0
  494. package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js.map +1 -0
  495. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +44 -0
  496. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js.map +1 -0
  497. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +11 -0
  498. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js.map +1 -0
  499. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +25 -0
  500. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js.map +1 -0
  501. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +49 -0
  502. package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js.map +1 -0
  503. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +8 -0
  504. package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js.map +1 -0
  505. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +71 -0
  506. package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js.map +1 -0
  507. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +23 -0
  508. package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js.map +1 -0
  509. package/dist/node_modules/react-dnd-html5-backend/dist/index.js +8 -0
  510. package/dist/node_modules/react-dnd-html5-backend/dist/index.js.map +1 -0
  511. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +23 -0
  512. package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js.map +1 -0
  513. package/dist/node_modules/redux/es/redux.js +159 -0
  514. package/dist/node_modules/redux/es/redux.js.map +1 -0
  515. package/dist/shared/constants.d.ts +9 -0
  516. package/dist/shared/constants.js +22 -16
  517. package/dist/shared/constants.js.map +1 -1
  518. package/dist/style.css +1 -1
  519. package/dist/types/i18next.d.ts +90 -13
  520. package/package.json +8 -7
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionsForm.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsForm/DeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEffect, useMemo } from 'react'\nimport { z } from 'zod'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useGarnishmentsCreateMutation } from '@gusto/embedded-api/react-query/garnishmentsCreate'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport {\n CheckboxField,\n NumberInputField,\n RadioGroupField,\n TextInputField,\n} from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0).transform(String),\n description: z.string().min(1),\n courtOrdered: z.boolean(),\n times: z.number().nullable(),\n recurring: z.string().transform(val => val === 'true'),\n annualMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n payPeriodMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.string().transform(val => val === 'true'),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ninterface DeductionsFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n deductionId?: string | null\n}\n\nexport function DeductionsForm(props: DeductionsFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, employeeId, deductionId, dictionary }: DeductionsFormProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n // Fetch all garnishments to find the specific one by ID\n const { data } = useGarnishmentsListSuspense({ employeeId })\n const deduction = deductionId\n ? (data.garnishmentList?.find(g => g.uuid === deductionId) ?? null)\n : null\n\n const { mutateAsync: createDeduction, isPending: isPendingCreate } =\n useGarnishmentsCreateMutation()\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n\n const defaultValues: DeductionInputs = useMemo(() => {\n return {\n amount: deduction?.amount ? Number(deduction.amount) : 0,\n description: deduction?.description ?? '',\n times: deduction?.times ?? null,\n recurring: deduction?.recurring?.toString() ?? 'true',\n annualMaximum: deduction?.annualMaximum ? Number(deduction.annualMaximum) : null,\n payPeriodMaximum: deduction?.payPeriodMaximum ? Number(deduction.payPeriodMaximum) : null,\n deductAsPercentage: deduction?.deductAsPercentage?.toString() ?? 'true',\n active: true,\n courtOrdered: deduction?.courtOrdered ?? false,\n } as DeductionInputs\n }, [deduction])\n\n const formMethods = useForm<DeductionInputs, unknown, DeductionPayload>({\n resolver: zodResolver(DeductionSchema),\n defaultValues,\n })\n\n const { reset: resetForm, control } = formMethods\n\n useEffect(() => {\n resetForm(defaultValues)\n }, [deduction, defaultValues, resetForm])\n\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n\n const isPending = isPendingCreate || isPendingUpdate\n\n const onSubmit: SubmitHandler<DeductionPayload> = async data => {\n await baseSubmitHandler(data, async payload => {\n if (!deduction) {\n const { garnishment: createDeductionResponse } = await createDeduction({\n request: {\n employeeId: employeeId,\n requestBody: { ...payload, times: payload.recurring ? null : 1 },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CREATED, createDeductionResponse)\n } else {\n const { garnishment: updateDeductionResponse } = await updateDeduction({\n request: {\n garnishmentId: deduction.uuid,\n requestBody: {\n ...payload,\n version: deduction.version as string,\n times: payload.recurring ? null : 1,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_UPDATED, updateDeductionResponse)\n }\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CANCEL)\n }\n\n const title = !deduction ? t('addDeductionTitle') : t('editDeductionTitle')\n\n return (\n <section className={className}>\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n <TextInputField name=\"description\" label={t('descriptionLabel')} isRequired />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabel')}\n isRequired\n options={[\n { value: 'true', label: t('deductionTypePercentageOption') },\n { value: 'false', label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <NumberInputField\n name=\"amount\"\n label={t('deductionAmountLabel')}\n isRequired\n min={0}\n />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n isRequired\n options={[\n { value: 'true', label: t('frequencyRecurringOption') },\n { value: 'false', label: t('frequencyOneTimeOption') },\n ]}\n />\n {watchedRecurring === 'true' && (\n <>\n <NumberInputField name=\"annualMaximum\" label={t('annualMaxLabel')} min={0} />\n <NumberInputField name=\"payPeriodMaximum\" label=\"Pay period maximum\" min={0} />\n </>\n )}\n <CheckboxField name=\"courtOrdered\" label={t('courtOrderedLabel')} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {!deduction ? t('addDeductionCta') : t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </Form>\n </FormProvider>\n </section>\n )\n}\n"],"names":["DeductionSchema","z","val","DeductionsForm","props","jsx","BaseComponent","Root","className","children","employeeId","deductionId","dictionary","onEvent","baseSubmitHandler","useBase","t","useTranslation","Components","useComponentContext","useComponentDictionary","useI18n","data","useGarnishmentsListSuspense","deduction","g","createDeduction","isPendingCreate","useGarnishmentsCreateMutation","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","defaultValues","useMemo","formMethods","useForm","zodResolver","resetForm","control","useEffect","watchedRecurring","useWatch","isPending","onSubmit","payload","updateDeductionResponse","componentEvents","createDeductionResponse","handleCancel","title","FormProvider","Form","Flex","jsxs","Fragment","TextInputField","RadioGroupField","NumberInputField","CheckboxField","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAMA,KAAkBC,EAAE,OAAO;AAAA,EACtC,QAAQA,EAAE,QAAA;AAAA,EACV,QAAQA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU,MAAM;AAAA,EAC1C,aAAaA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC7B,cAAcA,EAAE,QAAA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ACV,SAAS;AAAA,UACP,EAAE,OAAO,QAAQ,OAAOA,EAAE,0BAA0B,EAAA;AAAA,UACpD,EAAE,OAAO,SAAS,OAAOA,EAAE,wBAAwB,EAAA;AAAA,QAAE;AAAA,MACvD;AAAA,IAAA;AAAA,IAEDwB,MAAqB,UACpB,gBAAAa,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAjD,EAACoD,GAAA,EAAiB,MAAK,iBAAgB,OAAOzC,EAAE,gBAAgB,GAAG,KAAK,GAAG;AAAA,wBAC1EyC,GAAA,EAAiB,MAAK,oBAAmB,OAAM,sBAAqB,KAAK,EAAA,CAAG;AAAA,IAAA,GAC/E;AAAA,sBAEDC,GAAA,EAAc,MAAK,gBAAe,OAAO1C,EAAE,mBAAmB,GAAG;AAAA,sBACjE2C,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAtD,EAACa,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAAS8B,GAC7C,UAAAhC,EAAE,WAAW,EAAA,CAChB;AAAA,MACA,gBAAAX,EAACa,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWwB,GACzC,UAAoC1B,EAAnCQ,IAAqC,gBAAvB,iBAAoC,EAAA,CACtD;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CAEJ,GACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"DeductionsForm.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsForm/DeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEffect, useMemo } from 'react'\nimport { z } from 'zod'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useGarnishmentsCreateMutation } from '@gusto/embedded-api/react-query/garnishmentsCreate'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport {\n CheckboxField,\n NumberInputField,\n RadioGroupField,\n TextInputField,\n} from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport const DeductionSchema = z.object({\n active: z.boolean(),\n amount: z.number().min(0).transform(String),\n description: z.string().min(1),\n courtOrdered: z.boolean(),\n times: z.number().nullable(),\n recurring: z.string().transform(val => val === 'true'),\n annualMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n payPeriodMaximum: z\n .number()\n .min(0)\n .transform(val => (val > 0 ? val.toString() : null))\n .nullable(),\n deductAsPercentage: z.string().transform(val => val === 'true'),\n})\n\nexport type DeductionInputs = z.input<typeof DeductionSchema>\nexport type DeductionPayload = z.output<typeof DeductionSchema>\n\ninterface DeductionsFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n deductionId?: string | null\n}\n\nexport function DeductionsForm(props: DeductionsFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, employeeId, deductionId, dictionary }: DeductionsFormProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n // Fetch all garnishments to find the specific one by ID\n const { data } = useGarnishmentsListSuspense({ employeeId })\n const deduction = deductionId\n ? (data.garnishmentList?.find(g => g.uuid === deductionId) ?? null)\n : null\n\n const { mutateAsync: createDeduction, isPending: isPendingCreate } =\n useGarnishmentsCreateMutation()\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n\n const defaultValues: DeductionInputs = useMemo(() => {\n return {\n amount: deduction?.amount ? Number(deduction.amount) : 0,\n description: deduction?.description ?? '',\n times: deduction?.times ?? null,\n recurring: deduction?.recurring?.toString() ?? 'true',\n annualMaximum: deduction?.annualMaximum ? Number(deduction.annualMaximum) : null,\n payPeriodMaximum: deduction?.payPeriodMaximum ? Number(deduction.payPeriodMaximum) : null,\n deductAsPercentage: deduction?.deductAsPercentage?.toString() ?? 'true',\n active: true,\n courtOrdered: deduction?.courtOrdered ?? false,\n } as DeductionInputs\n }, [deduction])\n\n const formMethods = useForm<DeductionInputs, unknown, DeductionPayload>({\n resolver: zodResolver(DeductionSchema),\n defaultValues,\n })\n\n const { reset: resetForm, control } = formMethods\n\n useEffect(() => {\n resetForm(defaultValues)\n }, [deduction, defaultValues, resetForm])\n\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n\n const isPending = isPendingCreate || isPendingUpdate\n\n const onSubmit: SubmitHandler<DeductionPayload> = async data => {\n await baseSubmitHandler(data, async payload => {\n if (!deduction) {\n const { garnishment: createDeductionResponse } = await createDeduction({\n request: {\n employeeId: employeeId,\n requestBody: { ...payload, times: payload.recurring ? null : 1 },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CREATED, createDeductionResponse)\n } else {\n const { garnishment: updateDeductionResponse } = await updateDeduction({\n request: {\n garnishmentId: deduction.uuid,\n requestBody: {\n ...payload,\n version: deduction.version as string,\n times: payload.recurring ? null : 1,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_UPDATED, updateDeductionResponse)\n }\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_CANCEL)\n }\n\n const title = !deduction ? t('addDeductionTitle') : t('editDeductionTitle')\n\n return (\n <section className={className}>\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n <TextInputField name=\"description\" label={t('descriptionLabel')} isRequired />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabel')}\n isRequired\n options={[\n { value: 'true', label: t('deductionTypePercentageOption') },\n { value: 'false', label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <NumberInputField\n name=\"amount\"\n label={t('deductionAmountLabel')}\n isRequired\n min={0}\n />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n isRequired\n options={[\n { value: 'true', label: t('frequencyRecurringOption') },\n { value: 'false', label: t('frequencyOneTimeOption') },\n ]}\n />\n {watchedRecurring === 'true' && (\n <>\n <NumberInputField name=\"annualMaximum\" label={t('annualMaxLabel')} min={0} />\n <NumberInputField name=\"payPeriodMaximum\" label=\"Pay period maximum\" min={0} />\n </>\n )}\n <CheckboxField name=\"courtOrdered\" label={t('courtOrderedLabel')} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {!deduction ? t('addDeductionCta') : t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </Form>\n </FormProvider>\n </section>\n )\n}\n"],"names":["DeductionSchema","z","val","DeductionsForm","props","jsx","BaseComponent","Root","className","children","employeeId","deductionId","dictionary","onEvent","baseSubmitHandler","useBase","t","useTranslation","Components","useComponentContext","useComponentDictionary","useI18n","data","useGarnishmentsListSuspense","deduction","g","createDeduction","isPendingCreate","useGarnishmentsCreateMutation","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","defaultValues","useMemo","formMethods","useForm","zodResolver","resetForm","control","useEffect","watchedRecurring","useWatch","isPending","onSubmit","payload","updateDeductionResponse","componentEvents","createDeductionResponse","handleCancel","title","FormProvider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ent as _ } from "../../../Base/Base.js";
6
6
  import { useBase as k } from "../../../Base/useBase.js";
7
7
  import { Flex as w } from "../../../Common/Flex/Flex.js";
8
- import "classnames";
9
- import { componentEvents as a } from "../../../../shared/constants.js";
10
8
  import { ActionsLayout as I } from "../../../Common/ActionsLayout/ActionsLayout.js";
11
9
  import u from "../../../Common/hooks/useNumberFormatter.js";
12
10
  import M from "../../../../assets/icons/pencil.svg.js";
13
11
  import U from "../../../../assets/icons/trashcan.svg.js";
14
12
  import { HamburgerMenu as B } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
15
13
  import { useComponentDictionary as S, useI18n as Y } from "../../../../i18n/I18n.js";
14
+ import { componentEvents as a } from "../../../../shared/constants.js";
16
15
  import { useComponentContext as q } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
17
16
  import { useDataView as F } from "../../../Common/DataView/useDataView.js";
18
17
  import { DataView as H } from "../../../Common/DataView/DataView.js";
19
18
  function se(r) {
20
19
  return /* @__PURE__ */ n(_, { ...r, children: /* @__PURE__ */ n(V, { ...r, children: r.children }) });
21
20
  }
22
- function V({ className: r, children: s, employeeId: d, dictionary: l }) {
23
- const { onEvent: i, baseSubmitHandler: p } = k(), { t } = O("Employee.Deductions"), m = q(), E = u("currency"), f = u("percent");
21
+ function V({ className: r, children: m, employeeId: d, dictionary: l }) {
22
+ const { onEvent: i, baseSubmitHandler: p } = k(), { t } = O("Employee.Deductions"), s = q(), E = u("currency"), f = u("percent");
24
23
  S("Employee.Deductions", l), Y("Employee.Deductions");
25
24
  const { data: D } = x({ employeeId: d }), h = D.garnishmentList.filter((e) => e.active), { mutateAsync: C, isPending: g } = N(), y = async (e) => {
26
25
  await p(e, async (o) => {
@@ -84,12 +83,12 @@ function V({ className: r, children: s, employeeId: d, dictionary: l }) {
84
83
  }
85
84
  )
86
85
  });
87
- return /* @__PURE__ */ n("section", { className: r, children: /* @__PURE__ */ n(w, { flexDirection: "column", gap: 32, children: s || /* @__PURE__ */ c(A, { children: [
88
- /* @__PURE__ */ n(m.Heading, { as: "h2", children: t("pageTitle") }),
86
+ return /* @__PURE__ */ n("section", { className: r, children: /* @__PURE__ */ n(w, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ c(A, { children: [
87
+ /* @__PURE__ */ n(s.Heading, { as: "h2", children: t("pageTitle") }),
89
88
  /* @__PURE__ */ n(H, { label: t("deductionsTableLabel"), ...L }),
90
89
  /* @__PURE__ */ c(I, { children: [
91
- /* @__PURE__ */ n(m.Button, { variant: "secondary", onClick: T, children: t("addDeductionCta") }),
92
- /* @__PURE__ */ n(m.Button, { onClick: b, children: t("continueCta") })
90
+ /* @__PURE__ */ n(s.Button, { variant: "secondary", onClick: T, children: t("addDeductionCta") }),
91
+ /* @__PURE__ */ n(s.Button, { onClick: b, children: t("continueCta") })
93
92
  ] })
94
93
  ] }) }) });
95
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionsList.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsList/DeductionsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { type Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { useDataView, DataView } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface DeductionsListProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n}\n\nexport function DeductionsList(props: DeductionsListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, employeeId, dictionary }: DeductionsListProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const { data } = useGarnishmentsListSuspense({ employeeId })\n const deductions = data.garnishmentList!\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n\n const handleDelete = async (deduction: Garnishment) => {\n await baseSubmitHandler(deduction, async payload => {\n const { garnishment } = await updateDeduction({\n request: {\n garnishmentId: payload.uuid,\n requestBody: {\n ...payload,\n totalAmount: payload.totalAmount ?? undefined,\n active: false,\n version: payload.version as string,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED, garnishment)\n })\n }\n\n const handleEdit = (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n }\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD)\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n { key: 'description', title: t('nameColumn') },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPendingUpdate}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: async () => {\n await handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n {t('addDeductionCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </section>\n )\n}\n"],"names":["DeductionsList","props","jsx","BaseComponent","Root","className","children","employeeId","dictionary","onEvent","baseSubmitHandler","useBase","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","useComponentDictionary","useI18n","data","useGarnishmentsListSuspense","activeDeductions","deduction","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","handleDelete","payload","garnishment","componentEvents","handleEdit","handleAdd","handleContinue","dataViewProps","useDataView","formattedAmount","HamburgerMenu","PencilSvg","TrashCanSvg","Flex","jsxs","Fragment","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAeC,GAAqD;AAClF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,YAAAC,GAAY,YAAAC,KA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ACC,UAAA;AAAA,MAAA,gBAAA1C,EAACW,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASmB,GAC7C,UAAA,EAAE,iBAAiB,EAAA,CACtB;AAAA,MACA,gBAAA9B,EAACW,EAAW,QAAX,EAAkB,SAASoB,GAAiB,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,EAAA,CAChE;AAAA,EAAA,EAAA,CACF,GAEJ,GACF;AAEJ;"}
1
+ {"version":3,"file":"DeductionsList.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsList/DeductionsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { type Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { useDataView, DataView } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface DeductionsListProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n}\n\nexport function DeductionsList(props: DeductionsListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, employeeId, dictionary }: DeductionsListProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const { data } = useGarnishmentsListSuspense({ employeeId })\n const deductions = data.garnishmentList!\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n\n const handleDelete = async (deduction: Garnishment) => {\n await baseSubmitHandler(deduction, async payload => {\n const { garnishment } = await updateDeduction({\n request: {\n garnishmentId: payload.uuid,\n requestBody: {\n ...payload,\n totalAmount: payload.totalAmount ?? undefined,\n active: false,\n version: payload.version as string,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED, garnishment)\n })\n }\n\n const handleEdit = (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n }\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD)\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n { key: 'description', title: t('nameColumn') },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPendingUpdate}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: async () => {\n await handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n {t('addDeductionCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </section>\n )\n}\n"],"names":["DeductionsList","props","jsx","BaseComponent","Root","className","children","employeeId","dictionary","onEvent","baseSubmitHandler","useBase","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","useComponentDictionary","useI18n","data","useGarnishmentsListSuspense","activeDeductions","deduction","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","handleDelete","payload","garnishment","componentEvents","handleEdit","handleAdd","handleContinue","dataViewProps","useDataView","formattedAmount","HamburgerMenu","PencilSvg","TrashCanSvg","Flex","jsxs","Fragment","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAeC,GAAqD;AAClF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,YAAAC,GAAY,YAAAC,KAAmC;AAClF,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS;AAElD,EAAAE,EAAuB,uBAAuBV,CAAU,GACxDW,EAAQ,qBAAqB;AAE7B,QAAM,EAAE,MAAAC,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J;"}
@@ -0,0 +1,6 @@
1
+ import { BaseComponentInterface, CommonComponentInterface } from '../../../Base';
2
+ interface EmptyStateProps extends CommonComponentInterface<'Employee.Deductions'> {
3
+ employeeId: string;
4
+ }
5
+ export declare function EmptyState(props: EmptyStateProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -6,19 +6,18 @@ import { zodResolver as h } from "@hookform/resolvers/zod";
6
6
  import { BaseComponent as C } from "../../../Base/Base.js";
7
7
  import { useBase as b } from "../../../Base/useBase.js";
8
8
  import { Form as N } from "../../../Common/Form/Form.js";
9
- import "classnames";
9
+ import { ActionsLayout as v } from "../../../Common/ActionsLayout/ActionsLayout.js";
10
+ import { useComponentDictionary as F, useI18n as I } from "../../../../i18n/I18n.js";
10
11
  import { componentEvents as s } from "../../../../shared/constants.js";
11
- import { RadioGroupField as v } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
12
- import { ActionsLayout as F } from "../../../Common/ActionsLayout/ActionsLayout.js";
13
- import { useComponentDictionary as I, useI18n as Y } from "../../../../i18n/I18n.js";
14
- import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import { useComponentContext as Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import { RadioGroupField as y } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
15
14
  const L = m.object({ includeDeductions: m.enum(["Yes", "No"]) });
16
- function G(n) {
15
+ function A(n) {
17
16
  return /* @__PURE__ */ e(C, { ...n, children: /* @__PURE__ */ e(_, { ...n, children: n.children }) });
18
17
  }
19
18
  function _({ className: n, children: t, dictionary: u }) {
20
- const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r = y();
21
- I("Employee.Deductions", u), Y("Employee.Deductions");
19
+ const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r = Y();
20
+ F("Employee.Deductions", u), I("Employee.Deductions");
22
21
  const c = f({
23
22
  resolver: h(L),
24
23
  defaultValues: { includeDeductions: "No" }
@@ -28,7 +27,7 @@ function _({ className: n, children: t, dictionary: u }) {
28
27
  return /* @__PURE__ */ e("section", { className: n, children: /* @__PURE__ */ e(E, { ...c, children: /* @__PURE__ */ e(N, { onSubmit: c.handleSubmit(d), children: t || /* @__PURE__ */ p(a, { children: [
29
28
  /* @__PURE__ */ e(r.Heading, { as: "h2", children: o("pageTitle") }),
30
29
  /* @__PURE__ */ e(
31
- v,
30
+ y,
32
31
  {
33
32
  name: "includeDeductions",
34
33
  isRequired: !0,
@@ -40,10 +39,10 @@ function _({ className: n, children: t, dictionary: u }) {
40
39
  ]
41
40
  }
42
41
  ),
43
- /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
42
+ /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
44
43
  ] }) }) }) });
45
44
  }
46
45
  export {
47
- G as IncludeDeductionsForm
46
+ A as IncludeDeductionsForm
48
47
  };
49
48
  //# sourceMappingURL=IncludeDeductionsForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IncludeDeductionsForm.js","sources":["../../../../../src/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { RadioGroupField } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nconst IncludeDeductionsSchema = z.object({ includeDeductions: z.enum(['Yes', 'No']) })\nexport type IncludeDeductionsPayload = z.output<typeof IncludeDeductionsSchema>\n\ninterface IncludeDeductionsFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n}\n\nexport function IncludeDeductionsForm(props: IncludeDeductionsFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, dictionary }: IncludeDeductionsFormProps) {\n const { onEvent } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const formMethods = useForm<IncludeDeductionsPayload>({\n resolver: zodResolver(IncludeDeductionsSchema),\n defaultValues: { includeDeductions: 'No' },\n })\n\n const onSubmit: SubmitHandler<IncludeDeductionsPayload> = data => {\n if (data.includeDeductions === 'Yes') {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES)\n } else {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO)\n }\n }\n\n return (\n <section className={className}>\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <RadioGroupField\n name=\"includeDeductions\"\n isRequired\n label={t('includeDeductionsFormLabel')}\n description={t('includeDeductionsDescription')}\n options={[\n { value: 'Yes', label: t('includeDeductionsYes') },\n { value: 'No', label: t('includeDeductionsNo') },\n ]}\n />\n <ActionsLayout>\n <Components.Button type=\"submit\">{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </>\n )}\n </Form>\n </FormProvider>\n </section>\n )\n}\n"],"names":["IncludeDeductionsSchema","z","IncludeDeductionsForm","props","jsx","BaseComponent","Root","className","children","dictionary","onEvent","useBase","t","useTranslation","Components","useComponentContext","useComponentDictionary","useI18n","formMethods","useForm","zodResolver","onSubmit","data","componentEvents","FormProvider","Form","jsxs","Fragment","RadioGroupField","Actions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AS;AAAA,UACP,EAAE,OAAO,OAAO,OAAOA,EAAE,sBAAsB,EAAA;AAAA,UAC/C,EAAE,OAAO,MAAM,OAAOA,EAAE,qBAAqB,EAAA;AAAA,QAAE;AAAA,MACjD;AAAA,IAAA;AAAA,IAEF,gBAAAR,EAACyB,GAAA,EACC,UAAA,gBAAAzB,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAF,EAAE,aAAa,EAAA,CAAE,EAAA,CACrD;AAAA,EAAA,GACF,EAAA,CAEJ,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"IncludeDeductionsForm.js","sources":["../../../../../src/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { FormProvider, useForm, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { RadioGroupField } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nconst IncludeDeductionsSchema = z.object({ includeDeductions: z.enum(['Yes', 'No']) })\nexport type IncludeDeductionsPayload = z.output<typeof IncludeDeductionsSchema>\n\ninterface IncludeDeductionsFormProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n}\n\nexport function IncludeDeductionsForm(props: IncludeDeductionsFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, dictionary }: IncludeDeductionsFormProps) {\n const { onEvent } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const formMethods = useForm<IncludeDeductionsPayload>({\n resolver: zodResolver(IncludeDeductionsSchema),\n defaultValues: { includeDeductions: 'No' },\n })\n\n const onSubmit: SubmitHandler<IncludeDeductionsPayload> = data => {\n if (data.includeDeductions === 'Yes') {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES)\n } else {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO)\n }\n }\n\n return (\n <section className={className}>\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <RadioGroupField\n name=\"includeDeductions\"\n isRequired\n label={t('includeDeductionsFormLabel')}\n description={t('includeDeductionsDescription')}\n options={[\n { value: 'Yes', label: t('includeDeductionsYes') },\n { value: 'No', label: t('includeDeductionsNo') },\n ]}\n />\n <ActionsLayout>\n <Components.Button type=\"submit\">{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </>\n )}\n </Form>\n </FormProvider>\n </section>\n )\n}\n"],"names":["IncludeDeductionsSchema","z","IncludeDeductionsForm","props","jsx","BaseComponent","Root","className","children","dictionary","onEvent","useBase","t","useTranslation","Components","useComponentContext","useComponentDictionary","useI18n","formMethods","useForm","zodResolver","onSubmit","data","componentEvents","FormProvider","Form","jsxs","Fragment","RadioGroupField","ActionsLayout"],"mappings":";;;;;;;;;;;;;AAkBA,MAAMA,IAA0BC,EAAE,OAAO,EAAE,mBAAmBA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,GAAG;AAO9E,SAASC,EAAsBC,GAA4D;AAChG,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GA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J;"}
@@ -1,15 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
- import { useDocumentList as m } from "./useDocumentList.js";
4
- import "classnames";
5
- import "../../../../shared/constants.js";
6
- import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
3
+ import { useDocumentList as s } from "./useDocumentList.js";
4
+ import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function h() {
9
- const { t } = r("Employee.DocumentSigner"), { handleContinue: n, hasSignedAllForms: i } = m(), e = c();
10
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { onClick: n, isLoading: !1, isDisabled: !i, children: t("continueCta") }) });
6
+ function d() {
7
+ const { t: n } = r("Employee.DocumentSigner"), { handleContinue: t, hasSignedAllForms: e } = s(), i = c();
8
+ return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(i.Button, { onClick: t, isLoading: !1, isDisabled: !e, children: n("continueCta") }) });
11
9
  }
12
10
  export {
13
- h as Actions
11
+ d as Actions
14
12
  };
15
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAAH,EAAE,aAAa,GAClB,GACF;AAEJ;"}
@@ -1,4 +1,4 @@
1
- import { jsx as o, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
2
  import { useEmployeeFormsListSuspense as f } from "@gusto/embedded-api/react-query/employeeFormsList";
3
3
  import { Head as d } from "./Head.js";
4
4
  import { List as E } from "./List.js";
@@ -9,19 +9,18 @@ import { useBase as L } from "../../../Base/useBase.js";
9
9
  import { useI18n as S } from "../../../../i18n/I18n.js";
10
10
  import { componentEvents as m } from "../../../../shared/constants.js";
11
11
  import { Flex as g } from "../../../Common/Flex/Flex.js";
12
- import "classnames";
13
- function B(e) {
12
+ function A(e) {
14
13
  return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
15
14
  }
16
15
  function O({ employeeId: e, className: s, children: n }) {
17
16
  S("Employee.DocumentSigner");
18
- const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
17
+ const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, l = i.every((r) => !r.requiresSigning);
19
18
  return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
20
19
  h,
21
20
  {
22
21
  value: {
23
22
  employeeForms: i,
24
- hasSignedAllForms: p,
23
+ hasSignedAllForms: l,
25
24
  handleContinue: () => {
26
25
  t(m.EMPLOYEE_FORMS_DONE);
27
26
  },
@@ -30,7 +29,7 @@ function O({ employeeId: e, className: s, children: n }) {
30
29
  },
31
30
  documentListError: c
32
31
  },
33
- children: n || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
32
+ children: n || /* @__PURE__ */ p(g, { flexDirection: "column", children: [
34
33
  /* @__PURE__ */ o(d, {}),
35
34
  /* @__PURE__ */ o(E, {}),
36
35
  /* @__PURE__ */ o(a, {})
@@ -39,6 +38,6 @@ function O({ employeeId: e, className: s, children: n }) {
39
38
  ) });
40
39
  }
41
40
  export {
42
- B as DocumentList
41
+ A as DocumentList
43
42
  };
44
43
  //# sourceMappingURL=DocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAU3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
1
+ {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAU3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
@@ -2,10 +2,8 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as m } from "react-i18next";
3
3
  import { useDocumentList as s } from "./useDocumentList.js";
4
4
  import { Flex as l } from "../../../Common/Flex/Flex.js";
5
- import "classnames";
6
- import "../../../../shared/constants.js";
7
5
  import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
8
- function f() {
6
+ function L() {
9
7
  const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
10
8
  return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
11
9
  u,
@@ -34,6 +32,6 @@ function f() {
34
32
  ) }) });
35
33
  }
36
34
  export {
37
- f as List
35
+ L as List
38
36
  };
39
37
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
@@ -8,15 +8,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
13
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
17
- const [f, v] = t("DocumentListContext");
14
+ const [L, d] = t("DocumentListContext");
18
15
  export {
19
- v as DocumentListProvider,
20
- f as useDocumentList
16
+ d as DocumentListProvider,
17
+ L as useDocumentList
21
18
  };
22
19
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -12,14 +12,13 @@ import { useBase as C } from "../../../Base/useBase.js";
12
12
  import { useI18n as G } from "../../../../i18n/I18n.js";
13
13
  import { componentEvents as i } from "../../../../shared/constants.js";
14
14
  import { Flex as M } from "../../../Common/Flex/Flex.js";
15
- import "classnames";
16
15
  import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
17
- function W(r) {
16
+ function V(r) {
18
17
  return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
19
18
  }
20
- function j({ employeeId: r, formId: s, className: u, children: t }) {
19
+ function j({ employeeId: r, formId: s, className: u, children: e }) {
21
20
  G("Employee.DocumentSigner");
22
- const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
21
+ const { onEvent: t, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
23
22
  data: { formPdf: f }
24
23
  } = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
25
24
  return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
@@ -28,7 +27,7 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
28
27
  value: {
29
28
  pdfUrl: d,
30
29
  handleBack: () => {
31
- e(i.CANCEL);
30
+ t(i.CANCEL);
32
31
  },
33
32
  form: n,
34
33
  isPending: l
@@ -46,10 +45,10 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
46
45
  }
47
46
  }
48
47
  });
49
- e(i.EMPLOYEE_SIGN_FORM, S);
48
+ t(i.EMPLOYEE_SIGN_FORM, S);
50
49
  }
51
50
  });
52
- }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ F(E, { children: [
51
+ }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: e || /* @__PURE__ */ F(E, { children: [
53
52
  /* @__PURE__ */ o(v, {}),
54
53
  /* @__PURE__ */ o(B, {}),
55
54
  /* @__PURE__ */ o(b, {}),
@@ -59,6 +58,6 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
59
58
  ) });
60
59
  }
61
60
  export {
62
- W as SignatureForm
61
+ V as SignatureForm
63
62
  };
64
63
  //# sourceMappingURL=SignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAChF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAAA;AAwBhE,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAlB,EAACsB,GAAA,EAAoB,UA5BN,OAAOX,MAA8B;AACxD,cAAMF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAA,IAAmB,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACD,YAAAf,EAAQa,EAAgB,oBAAoBG,CAAc;AAAA,UAC5D;AAAA,QACF,CAAC;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAc;AAAA,0BACdC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAChF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAAA;AAwBhE,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAlB,EAACsB,GAAA,EAAoB,UA5BN,OAAOX,MAA8B;AACxD,cAAMF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAA,IAAmB,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACD,YAAAf,EAAQa,EAAgB,oBAAoBG,CAAc;AAAA,UAC5D;AAAA,QACF,CAAC;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAc;AAAA,0BACdC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -8,15 +8,12 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
13
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
17
- const [s, f] = o("SignatureFormContext");
14
+ const [S, c] = o("SignatureFormContext");
18
15
  export {
19
- f as SignatureFormProvider,
20
- s as useSignatureForm
16
+ c as SignatureFormProvider,
17
+ S as useSignatureForm
21
18
  };
22
19
  //# sourceMappingURL=useSignatureForm.js.map
@@ -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;"}
@@ -1,15 +1,13 @@
1
1
  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
- import "classnames";
5
- import "../../../shared/constants.js";
6
4
  import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function d() {
9
- const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
5
+ import { useComponentContext as l } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ function y() {
7
+ const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = l();
10
8
  return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
11
9
  }
12
10
  export {
13
- d as Actions
11
+ y as Actions
14
12
  };
15
13
  //# 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,10 +9,9 @@ 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";
14
12
  import { Loading as V } from "../../Common/Loading/Loading.js";
15
13
  import { useI18n as z, useComponentDictionary as J } from "../../../i18n/I18n.js";
14
+ import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
16
15
  import { Head as K } from "./Head.js";
17
16
  import { List as Q } from "./List.js";
18
17
  import { useFlow as X } from "../../Flow/useFlow.js";
@@ -106,12 +105,12 @@ function $({ companyId: n, className: m, children: l, dictionary: h }) {
106
105
  }
107
106
  ) });
108
107
  }
109
- const De = () => {
108
+ const Oe = () => {
110
109
  const { companyId: n, onEvent: m } = X();
111
110
  return /* @__PURE__ */ o(Z, { companyId: n, onEvent: m });
112
111
  };
113
112
  export {
114
113
  Z as EmployeeList,
115
- De as EmployeeListContextual
114
+ Oe as EmployeeListContextual
116
115
  };
117
116
  //# sourceMappingURL=EmployeeList.js.map