@gusto/embedded-react-sdk 0.10.7-rc.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/Base/Base.js +19 -18
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +20 -19
  5. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  6. package/dist/components/Common/ReorderableList/ReorderableItem.js +1 -1
  7. package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
  9. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormActions.js +12 -10
  11. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js +8 -6
  13. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  14. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  15. package/dist/components/Common/UI/Button/Button.js +4 -4
  16. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  17. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +1 -1
  18. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +0 -5
  19. package/dist/components/Company/AssignSignatory/AssignSignatory.js +40 -42
  20. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
  22. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +0 -4
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +51 -53
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +0 -4
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +40 -42
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  37. package/dist/components/Company/AssignSignatory/TitleSelect.js +8 -7
  38. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/index.d.ts +0 -1
  40. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  41. package/dist/components/Company/BankAccount/BankAccount.d.ts +0 -5
  42. package/dist/components/Company/BankAccount/BankAccount.js +17 -23
  43. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  44. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  45. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +0 -5
  47. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +28 -31
  48. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
  50. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
  53. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +0 -5
  55. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +25 -28
  56. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  57. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
  58. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +0 -5
  60. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +33 -36
  61. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
  63. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  64. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
  65. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  66. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +0 -6
  67. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +38 -41
  68. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  70. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +0 -4
  71. package/dist/components/Company/DocumentSigner/DocumentSigner.js +23 -26
  72. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  73. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -6
  74. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +41 -44
  75. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  76. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  77. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  78. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  79. package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -6
  80. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  81. package/dist/components/Company/FederalTaxes/Form.js +5 -3
  82. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  83. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  84. package/dist/components/Company/Industry/Actions.js +7 -5
  85. package/dist/components/Company/Industry/Actions.js.map +1 -1
  86. package/dist/components/Company/Industry/Context.js +1 -1
  87. package/dist/components/Company/Industry/Edit.js +12 -10
  88. package/dist/components/Company/Industry/Edit.js.map +1 -1
  89. package/dist/components/Company/Industry/Industry.d.ts +0 -5
  90. package/dist/components/Company/Industry/Industry.js +23 -29
  91. package/dist/components/Company/Industry/Industry.js.map +1 -1
  92. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
  93. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  95. package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +0 -5
  96. package/dist/components/Company/Locations/LocationForm/LocationForm.js +43 -45
  97. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  99. package/dist/components/Company/Locations/Locations.d.ts +0 -4
  100. package/dist/components/Company/Locations/Locations.js +14 -18
  101. package/dist/components/Company/Locations/Locations.js.map +1 -1
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/List.js +4 -2
  105. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +0 -5
  107. package/dist/components/Company/Locations/LocationsList/LocationsList.js +33 -35
  108. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  109. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  110. package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
  111. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  112. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
  113. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
  115. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  116. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  117. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +1 -7
  118. package/dist/components/Company/PaySchedule/PaySchedule.js +68 -71
  119. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/_parts/Actions.js +12 -10
  121. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  122. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  123. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -6
  124. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  125. package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
  126. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  127. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +0 -4
  129. package/dist/components/Company/StateTaxes/StateTaxes.js +16 -20
  130. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +0 -5
  134. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +44 -47
  135. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  136. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  137. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
  138. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  139. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
  140. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  141. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +0 -5
  142. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +26 -29
  143. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  145. package/dist/components/Contractor/Address/Address.d.ts +0 -5
  146. package/dist/components/Contractor/Address/Address.js +36 -38
  147. package/dist/components/Contractor/Address/Address.js.map +1 -1
  148. package/dist/components/Contractor/Address/Form.js +1 -1
  149. package/dist/components/Contractor/Address/useAddress.js +1 -1
  150. package/dist/components/Contractor/NewHireReport/NewHireReport.js +17 -16
  151. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  152. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +7 -5
  153. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  154. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  155. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  156. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  157. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  158. package/dist/components/Contractor/Profile/ContractorProfile.d.ts +11 -0
  159. package/dist/components/Contractor/Profile/ContractorProfile.js +24 -0
  160. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -0
  161. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +5 -0
  162. package/dist/components/Contractor/Profile/ContractorProfileForm.js +140 -0
  163. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -0
  164. package/dist/components/Contractor/Profile/index.d.ts +3 -0
  165. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +254 -0
  166. package/dist/components/Contractor/Profile/useContractorProfile.js +223 -0
  167. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -0
  168. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +6 -0
  169. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +27 -0
  170. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +1 -0
  171. package/dist/components/Contractor/Submit/SubmitDone.d.ts +5 -0
  172. package/dist/components/Contractor/Submit/SubmitDone.js +18 -0
  173. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -0
  174. package/dist/components/Contractor/Submit/index.d.ts +6 -0
  175. package/dist/components/Contractor/Submit/index.js +20 -0
  176. package/dist/components/Contractor/Submit/index.js.map +1 -0
  177. package/dist/components/Contractor/Submit/index.module.scss.js +8 -0
  178. package/dist/components/Contractor/Submit/index.module.scss.js.map +1 -0
  179. package/dist/components/Contractor/index.d.ts +2 -0
  180. package/dist/components/Contractor/index.js +10 -6
  181. package/dist/components/Contractor/index.js.map +1 -1
  182. package/dist/components/Employee/Compensation/Actions.js +6 -5
  183. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  184. package/dist/components/Employee/Compensation/Compensation.d.ts +0 -6
  185. package/dist/components/Employee/Compensation/Compensation.js +97 -102
  186. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  187. package/dist/components/Employee/Compensation/Edit.js +15 -14
  188. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  189. package/dist/components/Employee/Compensation/List.js +25 -23
  190. package/dist/components/Employee/Compensation/List.js.map +1 -1
  191. package/dist/components/Employee/Deductions/Actions.js +12 -10
  192. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  193. package/dist/components/Employee/Deductions/DeductionForm.js +12 -10
  194. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  195. package/dist/components/Employee/Deductions/DeductionsList.js +7 -5
  196. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  197. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +12 -10
  198. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  199. package/dist/components/Employee/Deductions/useDeductions.js +1 -1
  200. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  201. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  202. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.d.ts +0 -5
  203. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +26 -28
  204. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  205. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  206. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  207. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  208. package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +1 -7
  209. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +16 -20
  210. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  211. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -7
  212. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +41 -44
  213. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  214. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  215. package/dist/components/Employee/EmployeeList/Actions.js +6 -4
  216. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  217. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +0 -5
  218. package/dist/components/Employee/EmployeeList/EmployeeList.js +57 -59
  219. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  220. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  221. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  222. package/dist/components/Employee/EmployeeList/List.js +15 -14
  223. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  224. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  225. package/dist/components/Employee/Landing/Landing.js +13 -12
  226. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  227. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  228. package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
  229. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  230. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -3
  231. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  232. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -8
  233. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  234. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +3 -2
  235. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  236. package/dist/components/Employee/PaymentMethod/Split.js +11 -10
  237. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  238. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  239. package/dist/components/Employee/Profile/Actions.js +9 -7
  240. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  241. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +3 -3
  242. package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -9
  243. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  244. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  245. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  246. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  247. package/dist/components/Employee/Profile/Profile.d.ts +0 -8
  248. package/dist/components/Employee/Profile/Profile.js +131 -138
  249. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  250. package/dist/components/Employee/Profile/useProfile.js +1 -1
  251. package/dist/components/Employee/Taxes/Actions.js +10 -8
  252. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  253. package/dist/components/Employee/Taxes/FederalForm.js +12 -10
  254. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  255. package/dist/components/Employee/Taxes/Taxes.d.ts +0 -6
  256. package/dist/components/Employee/Taxes/Taxes.js +76 -81
  257. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  258. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  259. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +4 -2
  260. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  261. package/dist/i18n/I18n.js +1 -1
  262. package/dist/i18n/I18n.js.map +1 -1
  263. package/dist/i18n/en/Contractor.ContractorSubmit.json.js +22 -0
  264. package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +1 -0
  265. package/dist/i18n/en/Contractor.Profile.json.js +73 -0
  266. package/dist/i18n/en/Contractor.Profile.json.js.map +1 -0
  267. package/dist/shared/constants.d.ts +14 -0
  268. package/dist/shared/constants.js +33 -26
  269. package/dist/shared/constants.js.map +1 -1
  270. package/dist/style.css +1 -1
  271. package/dist/types/i18next.d.ts +77 -1
  272. package/package.json +2 -2
@@ -9,9 +9,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
9
9
  import "@tanstack/react-query";
10
10
  import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
+ import "classnames";
12
13
  import "dompurify";
13
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
16
  const D = r.object({
17
17
  active: r.boolean(),
@@ -1,13 +1,15 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
- import { useDocumentList as s } from "./useDocumentList.js";
4
- import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
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";
5
7
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
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") }) });
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") }) });
9
11
  }
10
12
  export {
11
- d as Actions
13
+ h as Actions
12
14
  };
13
15
  //# 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","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,EAAkB,IAAIC,EAAgB,GACxDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAEH,EAAA,aAAa,EAClB,CAAA,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","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAkB,IAAIC,EAAgB,GACxDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -3,9 +3,4 @@ interface DocumentListProps extends CommonComponentInterface {
3
3
  employeeId: string;
4
4
  }
5
5
  export declare function DocumentList(props: DocumentListProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
6
- export declare namespace DocumentList {
7
- var Head: typeof import("./Head").Head;
8
- var List: typeof import("./List").List;
9
- var Actions: typeof import("./Actions").Actions;
10
- }
11
6
  export {};
@@ -1,46 +1,44 @@
1
- import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
- import { useEmployeeFormsListSuspense as L } from "@gusto/embedded-api/react-query/employeeFormsList";
3
- import { Head as u } from "./Head.js";
4
- import { List as c } from "./List.js";
5
- import { Actions as l } from "./Actions.js";
1
+ import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
+ import { useEmployeeFormsListSuspense as f } from "@gusto/embedded-api/react-query/employeeFormsList";
3
+ import { Head as d } from "./Head.js";
4
+ import { List as E } from "./List.js";
5
+ import { Actions as a } from "./Actions.js";
6
6
  import { DocumentListProvider as h } from "./useDocumentList.js";
7
7
  import { BaseComponent as F } from "../../../Base/Base.js";
8
- import { useBase as S } from "../../../Base/useBase.js";
9
- import { useI18n as g } from "../../../../i18n/I18n.js";
10
- import { componentEvents as s } from "../../../../shared/constants.js";
11
- import { Flex as O } from "../../../Common/Flex/Flex.js";
12
- function n(e) {
13
- return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(_, { ...e }) });
8
+ import { useBase as L } from "../../../Base/useBase.js";
9
+ import { useI18n as S } from "../../../../i18n/I18n.js";
10
+ import { componentEvents as m } from "../../../../shared/constants.js";
11
+ import { Flex as g } from "../../../Common/Flex/Flex.js";
12
+ import "classnames";
13
+ function B(e) {
14
+ return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
14
15
  }
15
- function _({ employeeId: e, className: p, children: t }) {
16
- g("Employee.DocumentSigner");
17
- const { onEvent: i } = S(), { data: d, error: f } = L({ employeeId: e }), m = d.formList, E = m.every((r) => !r.requiresSigning);
18
- return /* @__PURE__ */ o("section", { className: p, children: /* @__PURE__ */ o(
16
+ function O({ employeeId: e, className: s, children: n }) {
17
+ S("Employee.DocumentSigner");
18
+ const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
19
+ return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
19
20
  h,
20
21
  {
21
22
  value: {
22
- employeeForms: m,
23
- hasSignedAllForms: E,
23
+ employeeForms: i,
24
+ hasSignedAllForms: p,
24
25
  handleContinue: () => {
25
- i(s.EMPLOYEE_FORMS_DONE);
26
+ t(m.EMPLOYEE_FORMS_DONE);
26
27
  },
27
28
  handleRequestFormToSign: (r) => {
28
- i(s.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
29
+ t(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
29
30
  },
30
- documentListError: f
31
+ documentListError: c
31
32
  },
32
- children: t || /* @__PURE__ */ a(O, { flexDirection: "column", children: [
33
- /* @__PURE__ */ o(u, {}),
34
- /* @__PURE__ */ o(c, {}),
35
- /* @__PURE__ */ o(l, {})
33
+ children: n || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
34
+ /* @__PURE__ */ o(d, {}),
35
+ /* @__PURE__ */ o(E, {}),
36
+ /* @__PURE__ */ o(a, {})
36
37
  ] })
37
38
  }
38
39
  ) });
39
40
  }
40
- n.Head = u;
41
- n.List = c;
42
- n.Actions = l;
43
41
  export {
44
- n as DocumentList
42
+ B as DocumentList
45
43
  };
46
44
  //# 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\nDocumentList.Head = Head\nDocumentList.List = List\nDocumentList.Actions = Actions\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;AAE5E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AAC3B,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB,EAAE,MAAAC,GAAM,OAAOC,MAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAgBE,MAAA,CAACA,EAAa,eAAe;AAWzF,SAAA,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,MACF;AAAA,MAEC,UACCL,KAEC,gBAAAY,EAAAC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAEAvB,EAAa,OAAOqB;AACpBrB,EAAa,OAAOsB;AACpBtB,EAAa,UAAUuB;"}
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;AAE5E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AAC3B,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB,EAAE,MAAAC,GAAM,OAAOC,MAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAgBE,MAAA,CAACA,EAAa,eAAe;AAWzF,SAAA,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,MACF;AAAA,MAEC,UACCL,KAEC,gBAAAY,EAAAC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
@@ -2,8 +2,10 @@ 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";
5
7
  import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
6
- function L() {
8
+ function f() {
7
9
  const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
8
10
  return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
9
11
  u,
@@ -32,6 +34,6 @@ function L() {
32
34
  ) }) });
33
35
  }
34
36
  export {
35
- L as List
37
+ f as List
36
38
  };
37
39
  //# 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,EAAgB,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACG,gBAAAC,EAAA,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAK,EAAA,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAASS,OAAA;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,MAC/B;AAAA,MACA,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MACpC;AAAA,MACA,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,KAErC,EACF,CAAA;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,EAAgB,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACG,gBAAAC,EAAA,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAK,EAAA,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAASS,OAAA;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,MAC/B;AAAA,MACA,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MACpC;AAAA,MACA,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,KAErC,EACF,CAAA;AAEJ;"}
@@ -8,9 +8,9 @@ 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";
11
12
  import "dompurify";
12
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
15
  const [d, a] = t("DocumentListContext");
16
16
  export {
@@ -1,11 +1,5 @@
1
- import { DocumentList } from './DocumentList/DocumentList';
2
- import { SignatureForm } from './SignatureForm/SignatureForm';
3
1
  import { BaseComponentInterface } from '../../Base';
4
2
  export interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {
5
3
  employeeId: string;
6
4
  }
7
- export declare const DocumentSigner: {
8
- ({ employeeId, onEvent, dictionary }: DocumentSignerProps): import("react/jsx-runtime").JSX.Element;
9
- DocumentList: typeof DocumentList;
10
- SignatureForm: typeof SignatureForm;
11
- };
5
+ export declare const DocumentSigner: ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,23 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { createMachine as c } from "robot3";
3
- import { DocumentListContextual as p } from "./documentSignerStateMachine.js";
4
- import { documentSignerMachine as u } from "./stateMachine.js";
5
- import { DocumentList as a } from "./DocumentList/DocumentList.js";
6
- import { SignatureForm as f } from "./SignatureForm/SignatureForm.js";
7
- import { Flow as s } from "../../Flow/Flow.js";
8
- import { useComponentDictionary as g } from "../../../i18n/I18n.js";
9
- const o = ({ employeeId: t, onEvent: m, dictionary: r }) => {
10
- g("Employee.DocumentSigner", r);
11
- const e = c(
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { createMachine as i } from "robot3";
3
+ import { DocumentListContextual as c } from "./documentSignerStateMachine.js";
4
+ import { documentSignerMachine as p } from "./stateMachine.js";
5
+ import { Flow as u } from "../../Flow/Flow.js";
6
+ import { useComponentDictionary as a } from "../../../i18n/I18n.js";
7
+ const d = ({ employeeId: o, onEvent: e, dictionary: n }) => {
8
+ a("Employee.DocumentSigner", n);
9
+ const t = i(
12
10
  "index",
13
- u,
14
- (n) => ({
15
- ...n,
16
- component: p,
17
- employeeId: t
11
+ p,
12
+ (m) => ({
13
+ ...m,
14
+ component: c,
15
+ employeeId: o
18
16
  })
19
17
  );
20
- return /* @__PURE__ */ i(s, { machine: e, onEvent: m });
18
+ return /* @__PURE__ */ r(u, { machine: t, onEvent: e });
21
19
  };
22
- o.DocumentList = a;
23
- o.SignatureForm = f;
24
20
  export {
25
- o as DocumentSigner
21
+ d as DocumentSigner
26
22
  };
27
23
  //# sourceMappingURL=DocumentSigner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport {\n DocumentListContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n}\n\nexport const DocumentSigner = ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const documentSigner = createMachine(\n 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: DocumentListContextual,\n employeeId,\n }),\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n\nDocumentSigner.DocumentList = DocumentList\nDocumentSigner.SignatureForm = SignatureForm\n"],"names":["DocumentSigner","employeeId","onEvent","dictionary","useComponentDictionary","documentSigner","createMachine","documentSignerMachine","initialContext","DocumentListContextual","jsx","Flow","DocumentList","SignatureForm"],"mappings":";;;;;;;;AAgBO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,QAAsC;AAC1F,EAAAC,EAAuB,2BAA2BD,CAAU;AAE5D,QAAME,IAAiBC;AAAA,IACrB;AAAA,IACAC;AAAA,IACA,CAACC,OAAoD;AAAA,MACnD,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,IACF;AAAA,EACF;AACA,SAAQ,gBAAAS,EAAAC,GAAA,EAAK,SAASN,GAAgB,SAAAH,EAAkB,CAAA;AAC1D;AAEAF,EAAe,eAAeY;AAC9BZ,EAAe,gBAAgBa;"}
1
+ {"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport {\n DocumentListContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n}\n\nexport const DocumentSigner = ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const documentSigner = createMachine(\n 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: DocumentListContextual,\n employeeId,\n }),\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","employeeId","onEvent","dictionary","useComponentDictionary","documentSigner","createMachine","documentSignerMachine","initialContext","DocumentListContextual","jsx","Flow"],"mappings":";;;;;;AAcO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,QAAsC;AAC1F,EAAAC,EAAuB,2BAA2BD,CAAU;AAE5D,QAAME,IAAiBC;AAAA,IACrB;AAAA,IACAC;AAAA,IACA,CAACC,OAAoD;AAAA,MACnD,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,IACF;AAAA,EACF;AACA,SAAQ,gBAAAS,EAAAC,GAAA,EAAK,SAASN,GAAgB,SAAAH,EAAkB,CAAA;AAC1D;"}
@@ -1,14 +1,7 @@
1
- import { Form as FormComponent } from './Form';
2
1
  import { BaseComponentInterface, CommonComponentInterface } from '../../../Base/Base';
3
2
  interface SignatureFormProps extends CommonComponentInterface {
4
3
  employeeId: string;
5
4
  formId: string;
6
5
  }
7
6
  export declare function SignatureForm(props: SignatureFormProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
8
- export declare namespace SignatureForm {
9
- var Head: typeof import("./Head").Head;
10
- var Preview: typeof import("./Preview").Preview;
11
- var Form: typeof FormComponent;
12
- var Actions: typeof import("./Actions").Actions;
13
- }
14
7
  export {};
@@ -1,67 +1,64 @@
1
- import { jsx as o, jsxs as x, Fragment as b } from "react/jsx-runtime";
2
- import { useEmployeeFormsGetPdfSuspense as y } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
3
- import { useEmployeeFormsSignMutation as B } from "@gusto/embedded-api/react-query/employeeFormsSign";
4
- import { useEmployeeFormsGetSuspense as w } from "@gusto/embedded-api/react-query/employeeFormsGet";
5
- import { Form as u } from "./Form.js";
6
- import { Head as a } from "./Head.js";
7
- import { Actions as c } from "./Actions.js";
8
- import { Preview as f } from "./Preview.js";
9
- import { SignatureFormProvider as A } from "./useSignatureForm.js";
10
- import { BaseComponent as C } from "../../../Base/Base.js";
11
- import { useBase as G } from "../../../Base/useBase.js";
12
- import { useI18n as H } from "../../../../i18n/I18n.js";
13
- import { componentEvents as s } from "../../../../shared/constants.js";
1
+ import { jsx as o, jsxs as F, Fragment as E } from "react/jsx-runtime";
2
+ import { useEmployeeFormsGetPdfSuspense as h } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
3
+ import { useEmployeeFormsSignMutation as P } from "@gusto/embedded-api/react-query/employeeFormsSign";
4
+ import { useEmployeeFormsGetSuspense as x } from "@gusto/embedded-api/react-query/employeeFormsGet";
5
+ import { Form as b } from "./Form.js";
6
+ import { Head as v } from "./Head.js";
7
+ import { Actions as y } from "./Actions.js";
8
+ import { Preview as B } from "./Preview.js";
9
+ import { SignatureFormProvider as w } from "./useSignatureForm.js";
10
+ import { BaseComponent as A } from "../../../Base/Base.js";
11
+ import { useBase as C } from "../../../Base/useBase.js";
12
+ import { useI18n as G } from "../../../../i18n/I18n.js";
13
+ import { componentEvents as i } from "../../../../shared/constants.js";
14
14
  import { Flex as M } from "../../../Common/Flex/Flex.js";
15
+ import "classnames";
15
16
  import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
16
- function n(r) {
17
- return /* @__PURE__ */ o(C, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
17
+ function W(r) {
18
+ return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
18
19
  }
19
- function j({ employeeId: r, formId: d, className: p, children: t }) {
20
- H("Employee.DocumentSigner");
21
- const { onEvent: m, baseSubmitHandler: l } = G(), { data: g } = w({ employeeId: r, formId: d }), e = g.form, {
22
- data: { formPdf: F }
23
- } = y({ employeeId: r, formId: e.uuid }), S = F.documentUrl, { mutateAsync: E, isPending: h } = B();
24
- return /* @__PURE__ */ o("section", { className: p, children: /* @__PURE__ */ o(
25
- A,
20
+ function j({ employeeId: r, formId: s, className: u, children: t }) {
21
+ G("Employee.DocumentSigner");
22
+ const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
23
+ data: { formPdf: f }
24
+ } = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
25
+ return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
26
+ w,
26
27
  {
27
28
  value: {
28
- pdfUrl: S,
29
+ pdfUrl: d,
29
30
  handleBack: () => {
30
- m(s.CANCEL);
31
+ e(i.CANCEL);
31
32
  },
32
- form: e,
33
- isPending: h
33
+ form: n,
34
+ isPending: l
34
35
  },
35
- children: /* @__PURE__ */ o(R, { onSubmit: async (P) => {
36
- await l(P, async (i) => {
37
- if (e.uuid) {
38
- const { form: v } = await E({
36
+ children: /* @__PURE__ */ o(R, { onSubmit: async (g) => {
37
+ await a(g, async (m) => {
38
+ if (n.uuid) {
39
+ const { form: S } = await p({
39
40
  request: {
40
41
  employeeId: r,
41
- formId: e.uuid,
42
+ formId: n.uuid,
42
43
  requestBody: {
43
- signatureText: i.signature,
44
- agree: i.confirmSignature
44
+ signatureText: m.signature,
45
+ agree: m.confirmSignature
45
46
  }
46
47
  }
47
48
  });
48
- m(s.EMPLOYEE_SIGN_FORM, v);
49
+ e(i.EMPLOYEE_SIGN_FORM, S);
49
50
  }
50
51
  });
51
- }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ x(b, { children: [
52
- /* @__PURE__ */ o(a, {}),
53
- /* @__PURE__ */ o(f, {}),
54
- /* @__PURE__ */ o(u, {}),
55
- /* @__PURE__ */ o(c, {})
52
+ }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ F(E, { children: [
53
+ /* @__PURE__ */ o(v, {}),
54
+ /* @__PURE__ */ o(B, {}),
55
+ /* @__PURE__ */ o(b, {}),
56
+ /* @__PURE__ */ o(y, {})
56
57
  ] }) }) })
57
58
  }
58
59
  ) });
59
60
  }
60
- n.Head = a;
61
- n.Preview = f;
62
- n.Form = u;
63
- n.Actions = c;
64
61
  export {
65
- n as SignatureForm
62
+ W as SignatureForm
66
63
  };
67
64
  //# 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\nSignatureForm.Head = Head\nSignatureForm.Preview = Preview\nSignatureForm.Form = FormComponent\nSignatureForm.Actions = Actions\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;AAE9E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAA6B;AAyB3F,SAAA,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,MACb;AAAA,MAEA,UAAA,gBAAAlB,EAACsB,GAAoB,EAAA,UA5BN,OAAOX,MAA8B;AAClD,cAAAF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAe,IAAI,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;AACO,YAAAf,EAAAa,EAAgB,oBAAoBG,CAAc;AAAA,UAAA;AAAA,QAC5D,CACD;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UACCnB,KAGE,gBAAAoB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAc,EAAA;AAAA,0BACdC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEAjC,EAAc,OAAO8B;AACrB9B,EAAc,UAAU+B;AACxB/B,EAAc,OAAOgC;AACrBhC,EAAc,UAAUiC;"}
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;AAE9E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAA6B;AAyB3F,SAAA,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,MACb;AAAA,MAEA,UAAA,gBAAAlB,EAACsB,GAAoB,EAAA,UA5BN,OAAOX,MAA8B;AAClD,cAAAF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAe,IAAI,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;AACO,YAAAf,EAAAa,EAAgB,oBAAoBG,CAAc;AAAA,UAAA;AAAA,QAC5D,CACD;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UACCnB,KAGE,gBAAAoB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAc,EAAA;AAAA,0BACdC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -8,9 +8,9 @@ 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";
11
12
  import "dompurify";
12
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
15
  const [c, d] = o("SignatureFormContext");
16
16
  export {
@@ -1,13 +1,15 @@
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";
4
6
  import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
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();
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();
8
10
  return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
9
11
  }
10
12
  export {
11
- y as Actions
13
+ d as Actions
12
14
  };
13
15
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAgB,GAC5CC,IAAaC,EAAoB;AAEnC,SAAAH,EAAU,WAAW,IAChB,OAIN,gBAAAI,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAE,EAAA,aAAa,EAClB,CAAA,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,EAAU,IAAIC,EAAgB,GAC5CC,IAAaC,EAAoB;AAEnC,SAAAH,EAAU,WAAW,IAChB,OAIN,gBAAAI,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -3,11 +3,6 @@ interface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeL
3
3
  companyId: string;
4
4
  }
5
5
  export declare function EmployeeList(props: EmployeeListProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
6
- export declare namespace EmployeeList {
7
- var Head: () => import("react/jsx-runtime").JSX.Element;
8
- var List: () => import("react/jsx-runtime").JSX.Element;
9
- var Actions: typeof import("./Actions").Actions;
10
- }
11
6
  /**
12
7
  * Wrapper used inside Flows -> exposes flow context for required parameters
13
8
  */