@gusto/embedded-react-sdk 0.52.1 → 0.53.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 (471) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/components/Base/Base.d.ts +2 -2
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +1 -2
  5. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +42 -43
  6. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  7. package/dist/components/Common/Fields/PercentageField/PercentageField.js +44 -42
  8. package/dist/components/Common/Fields/PercentageField/PercentageField.js.map +1 -1
  9. package/dist/components/Common/UI/Box/Box.js +6 -6
  10. package/dist/components/Common/UI/Box/Box.js.map +1 -1
  11. package/dist/components/Common/UI/Box/Box.module.scss.js +8 -8
  12. package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -1
  13. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  14. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +16 -14
  15. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js.map +1 -1
  16. package/dist/components/Common/UI/Dialog/Dialog.js +29 -28
  17. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
  18. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  19. package/dist/components/Common/UI/FormBox/FormBox.d.ts +1 -1
  20. package/dist/components/Common/UI/FormBox/FormBox.js +9 -8
  21. package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -1
  22. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +8 -6
  23. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -1
  24. package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +5 -1
  25. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  26. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -10
  27. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  29. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +18 -21
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -12
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  37. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/Head.js +8 -9
  39. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
  43. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +20 -21
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  46. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  47. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  48. package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -12
  49. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  50. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  51. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  53. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  55. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +2 -3
  57. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  59. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  60. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  61. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  63. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  64. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  65. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  66. package/dist/components/Company/BankAccount/stateMachine.d.ts +0 -1
  67. package/dist/components/Company/BankAccount/stateMachine.js +33 -35
  68. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  70. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -14
  72. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  73. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  74. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  76. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/stateMachine.d.ts +0 -1
  78. package/dist/components/Company/DocumentSigner/stateMachine.js +27 -29
  79. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  80. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  81. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  82. package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -10
  83. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  84. package/dist/components/Company/FederalTaxes/Form.js +4 -4
  85. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  86. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  87. package/dist/components/Company/Industry/Actions.js +5 -6
  88. package/dist/components/Company/Industry/Actions.js.map +1 -1
  89. package/dist/components/Company/Industry/Context.js +6 -7
  90. package/dist/components/Company/Industry/Context.js.map +1 -1
  91. package/dist/components/Company/Industry/Edit.js +10 -12
  92. package/dist/components/Company/Industry/Edit.js.map +1 -1
  93. package/dist/components/Company/Industry/IndustrySelect.js +6 -8
  94. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  95. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  96. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationForm/Form.js +4 -6
  98. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js +11 -14
  100. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  102. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  103. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  104. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  105. package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -12
  106. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  107. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  108. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  109. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  110. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  111. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -10
  112. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  113. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -5
  114. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  115. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  116. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  117. package/dist/components/Company/PaySchedule/PayScheduleForm.js +47 -51
  118. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  119. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +0 -1
  120. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +26 -28
  121. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
  122. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +2 -1
  123. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
  125. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +29 -16
  126. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  128. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -1
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +21 -32
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -75
  133. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  134. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  135. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  136. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  137. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  138. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +62 -47
  139. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +1 -0
  141. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +26 -23
  142. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  143. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -0
  144. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  145. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.d.ts +12 -0
  147. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.js +36 -0
  148. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.js.map +1 -0
  149. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.d.ts +10 -0
  150. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +110 -0
  151. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -0
  152. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.d.ts +18 -0
  153. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +55 -0
  154. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -0
  155. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.d.ts +47 -0
  156. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.js +108 -0
  157. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.js.map +1 -0
  158. package/dist/components/Company/StateTaxes/TaxRateManagement/context.d.ts +25 -0
  159. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +22 -0
  160. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -0
  161. package/dist/components/Company/StateTaxes/TaxRateManagement/index.d.ts +1 -0
  162. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.d.ts +29 -0
  163. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +34 -0
  164. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -0
  165. package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +17 -0
  166. package/dist/components/Company/StateTaxes/shared/RequirementFields.js +24 -0
  167. package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -0
  168. package/dist/components/Company/StateTaxes/{StateTaxesForm → shared}/applicableIf.d.ts +1 -1
  169. package/dist/components/Company/StateTaxes/shared/applicableIf.js.map +1 -0
  170. package/dist/components/Company/StateTaxes/shared/applicableIf.test.d.ts +1 -0
  171. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.d.ts +19 -0
  172. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.js +38 -0
  173. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.js.map +1 -0
  174. package/dist/components/Company/StateTaxes/shared/requirementValue.d.ts +2 -0
  175. package/dist/components/Company/StateTaxes/shared/requirementValue.js +7 -0
  176. package/dist/components/Company/StateTaxes/shared/requirementValue.js.map +1 -0
  177. package/dist/components/Company/StateTaxes/shared/rhfKey.d.ts +23 -0
  178. package/dist/components/Company/StateTaxes/shared/rhfKey.js +13 -0
  179. package/dist/components/Company/StateTaxes/shared/rhfKey.js.map +1 -0
  180. package/dist/components/Company/StateTaxes/shared/rhfKey.test.d.ts +1 -0
  181. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +1 -1
  182. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +40 -20
  183. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  184. package/dist/components/Company/exports/companyOnboarding.d.ts +1 -0
  185. package/dist/components/Company/exports/companyOnboarding.js +12 -10
  186. package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
  187. package/dist/components/Contractor/Address/Address.js +83 -76
  188. package/dist/components/Contractor/Address/Address.js.map +1 -1
  189. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.d.ts +39 -0
  190. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +90 -0
  191. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -0
  192. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +22 -0
  193. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +247 -0
  194. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -0
  195. package/dist/components/Contractor/ContractorList/{index.d.ts → onboarding/ContractorList.d.ts} +3 -3
  196. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js +51 -0
  197. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js.map +1 -0
  198. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.d.ts +16 -0
  199. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js +113 -0
  200. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js.map +1 -0
  201. package/dist/components/Contractor/ContractorList/shared/index.d.ts +1 -0
  202. package/dist/components/Contractor/ContractorList/shared/useContractorList.d.ts +87 -0
  203. package/dist/components/Contractor/ContractorList/shared/useContractorList.js +110 -0
  204. package/dist/components/Contractor/ContractorList/shared/useContractorList.js.map +1 -0
  205. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.d.ts +0 -1
  206. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js +18 -20
  207. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js.map +1 -1
  208. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +2 -3
  209. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
  210. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +170 -123
  211. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
  212. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.module.scss.js +12 -0
  213. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.module.scss.js.map +1 -0
  214. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js +40 -39
  215. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js.map +1 -1
  216. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js +91 -88
  217. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -1
  218. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +0 -33
  219. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js +77 -86
  220. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -1
  221. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  222. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  223. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +9 -10
  224. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
  225. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  226. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  227. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +162 -251
  228. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  229. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +2 -1
  230. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +2 -2
  231. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -1
  232. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +45 -44
  233. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  234. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +2 -3
  235. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  236. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -3
  237. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  238. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +32 -0
  239. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +107 -0
  240. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -0
  241. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.test.d.ts +1 -0
  242. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +6 -7
  243. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -1
  244. package/dist/components/Contractor/Profile/ContractorProfile.js +63 -57
  245. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  246. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +18 -19
  247. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -1
  248. package/dist/components/Contractor/Submit/Submit.js +118 -102
  249. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  250. package/dist/components/Contractor/exports/contractorManagement.d.ts +1 -0
  251. package/dist/components/Contractor/exports/contractorManagement.js +12 -10
  252. package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
  253. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +1 -1
  254. package/dist/components/Contractor/exports/contractorOnboarding.js +1 -1
  255. package/dist/components/Contractor/shared/useContractorHasSignedW9.d.ts +8 -0
  256. package/dist/components/Contractor/shared/useContractorHasSignedW9.js +10 -0
  257. package/dist/components/Contractor/shared/useContractorHasSignedW9.js.map +1 -0
  258. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +32 -33
  259. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  260. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +2 -3
  261. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  262. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +6 -7
  263. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  264. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js +14 -15
  265. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
  266. package/dist/components/Employee/Documents/management/DocumentManager.js +6 -7
  267. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  268. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +6 -7
  269. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
  270. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +4 -5
  271. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
  272. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +10 -13
  273. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  274. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +5 -6
  275. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
  276. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.module.scss.js +8 -0
  277. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.module.scss.js.map +1 -0
  278. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  279. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  280. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -21
  281. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  282. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +6 -6
  283. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +5 -4
  284. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
  285. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -4
  286. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  287. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -7
  288. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  289. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js +11 -12
  290. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  291. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js +15 -16
  292. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js.map +1 -1
  293. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +6 -7
  294. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  295. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +11 -12
  296. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  297. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  298. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js +7 -8
  299. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
  300. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +4 -4
  301. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +29 -23
  302. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
  303. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +26 -20
  304. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  305. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +133 -99
  306. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -1
  307. package/dist/components/Employee/PaymentMethod/onboarding/ListView.module.scss.js +8 -0
  308. package/dist/components/Employee/PaymentMethod/onboarding/ListView.module.scss.js.map +1 -0
  309. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
  310. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +19 -20
  311. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
  312. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js +92 -86
  313. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
  314. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +65 -64
  315. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
  316. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +7 -8
  317. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
  318. package/dist/components/Employee/Profile/management/ProfileEditForm.js +7 -7
  319. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +6 -6
  320. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +6 -6
  321. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.d.ts +1 -0
  322. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -1
  323. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.d.ts +1 -0
  324. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -1
  325. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js +11 -12
  326. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  327. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +9 -10
  328. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
  329. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +6 -7
  330. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
  331. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +44 -45
  332. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  333. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +23 -22
  334. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  335. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +27 -27
  336. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  337. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -10
  338. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  339. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -3
  340. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  341. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js +16 -17
  342. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
  343. package/dist/components/Flow/Flow.js +1 -1
  344. package/dist/components/Flow/FlowHeader.js +3 -4
  345. package/dist/components/Flow/FlowHeader.js.map +1 -1
  346. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +8 -9
  347. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  348. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +7 -8
  349. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  350. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +37 -37
  351. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  352. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -9
  353. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  354. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +7 -8
  355. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  356. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -12
  357. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  358. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
  359. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  360. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -8
  361. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  362. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +3 -3
  363. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +54 -50
  364. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  365. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +80 -69
  366. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  367. package/dist/components/Payroll/PayrollList/PayrollList.js +20 -18
  368. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  369. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +138 -136
  370. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  371. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +10 -12
  372. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  373. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +4 -4
  374. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
  375. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  376. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
  377. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  378. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -2
  379. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  380. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
  381. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  382. package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
  383. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  384. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -3
  385. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  386. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +4 -4
  387. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +4 -4
  388. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +34 -36
  389. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  390. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +4 -4
  391. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +24 -25
  392. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  393. package/dist/components/index.d.ts +40 -0
  394. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -0
  395. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +29 -28
  396. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  397. package/dist/contexts/LocaleProvider/useLocale.d.ts +1 -9
  398. package/dist/contexts/LocaleProvider/useLocale.js +5 -15
  399. package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
  400. package/dist/contexts/NonceProvider/index.d.ts +1 -0
  401. package/dist/contexts/NonceProvider/useNonce.d.ts +37 -0
  402. package/dist/contexts/NonceProvider/useNonce.js +7 -0
  403. package/dist/contexts/NonceProvider/useNonce.js.map +1 -0
  404. package/dist/contexts/ThemeProvider/ThemeProvider.js +25 -24
  405. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  406. package/dist/contexts/index.d.ts +1 -0
  407. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +12 -7
  408. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +25 -21
  409. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -1
  410. package/dist/i18n/I18n.js +1 -0
  411. package/dist/i18n/I18n.js.map +1 -1
  412. package/dist/i18n/en/Company.StateTaxes.json.js +6 -4
  413. package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
  414. package/dist/i18n/en/Contractor.Address.json.js +22 -20
  415. package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
  416. package/dist/i18n/en/Contractor.ContractorList.json.js +14 -12
  417. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  418. package/dist/i18n/en/Contractor.ManagementContractorList.json.js +60 -0
  419. package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -0
  420. package/dist/i18n/en/Contractor.Profile.json.js +13 -11
  421. package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
  422. package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
  423. package/dist/i18n/en/Employee.Management.PaymentMethodBankForm.json.js +18 -16
  424. package/dist/i18n/en/Employee.Management.PaymentMethodBankForm.json.js.map +1 -1
  425. package/dist/i18n/en/Employee.Management.PaymentMethodSplitForm.json.js +2 -2
  426. package/dist/i18n/en/Employee.PaymentMethod.json.js +74 -72
  427. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  428. package/dist/i18n/en/Employee.SplitPaymentsFormBody.json.js +2 -2
  429. package/dist/i18n/en/Payroll.PayrollHistory.json.js +8 -8
  430. package/dist/i18n/en/Payroll.PayrollList.json.js +23 -23
  431. package/dist/i18n/types.d.ts +215 -17
  432. package/dist/index.d.ts +6 -3
  433. package/dist/index.js +15 -13
  434. package/dist/index.js.map +1 -1
  435. package/dist/models/external.d.ts +4 -0
  436. package/dist/partner-hook-utils/form/SDKFormProvider.js +39 -24
  437. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  438. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +12 -15
  439. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  440. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +16 -19
  441. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  442. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +13 -16
  443. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  444. package/dist/partner-hook-utils/form/fields/SelectHookField.js +12 -15
  445. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  446. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +18 -21
  447. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  448. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +9 -12
  449. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  450. package/dist/partner-hook-utils/form/preprocessors.d.ts +2 -2
  451. package/dist/partner-hook-utils/form/preprocessors.js +8 -7
  452. package/dist/partner-hook-utils/form/preprocessors.js.map +1 -1
  453. package/dist/partner-hook-utils/form/preprocessors.test.d.ts +1 -0
  454. package/dist/shared/constants.d.ts +12 -0
  455. package/dist/shared/constants.js +23 -17
  456. package/dist/shared/constants.js.map +1 -1
  457. package/dist/style.css +1 -1
  458. package/dist/types/Helpers.d.ts +1 -1
  459. package/docs/guides/endpoint-inventory.json +61 -27
  460. package/package.json +19 -17
  461. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +0 -1
  462. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +0 -4
  463. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +0 -5
  464. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +0 -1
  465. package/dist/components/Contractor/ContractorList/index.js +0 -150
  466. package/dist/components/Contractor/ContractorList/index.js.map +0 -1
  467. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +0 -18
  468. package/dist/components/Contractor/ContractorList/useContractorList.js +0 -15
  469. package/dist/components/Contractor/ContractorList/useContractorList.js.map +0 -1
  470. /package/dist/components/Company/StateTaxes/{StateTaxesForm/applicableIf.test.d.ts → TaxRateManagement/toHistoryRows.test.d.ts} +0 -0
  471. /package/dist/components/Company/StateTaxes/{StateTaxesForm → shared}/applicableIf.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/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\n/** @internal */\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":";;;;;;AAMO,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
+ {"version":3,"file":"Actions.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/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\n/** @internal */\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":";;;;;AAMO,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 d } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
2
  import { useEmployeeFormsListSuspense as E } from "@gusto/embedded-api/react-query/employeeFormsList";
3
3
  import { Head as a } from "./Head.js";
4
4
  import { List as F } from "./List.js";
@@ -9,31 +9,28 @@ import { useBase as g } from "../../../../../Base/useBase.js";
9
9
  import { useI18n as O } from "../../../../../../i18n/I18n.js";
10
10
  import { componentEvents as i } from "../../../../../../shared/constants.js";
11
11
  import { Flex as _ } from "../../../../../Common/Flex/Flex.js";
12
- import "react-i18next";
13
- import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "react";
15
- function H(e) {
12
+ function N(e) {
16
13
  return /* @__PURE__ */ o(L, { ...e, children: /* @__PURE__ */ o(v, { ...e }) });
17
14
  }
18
15
  function v({ employeeId: e, className: s, children: t }) {
19
16
  O("Employee.DocumentSigner");
20
- const { onEvent: m } = g(), { data: u, error: c } = E({ employeeId: e }), n = u.forms, p = n.every((r) => !r.requiresSigning);
17
+ const { onEvent: m } = g(), { data: u, error: c } = E({ employeeId: e }), r = u.forms, l = r.every((n) => !n.requiresSigning);
21
18
  return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
22
19
  S,
23
20
  {
24
21
  value: {
25
- employeeForms: n,
26
- hasSignedAllForms: p,
22
+ employeeForms: r,
23
+ hasSignedAllForms: l,
27
24
  handleContinue: () => {
28
25
  m(i.EMPLOYEE_FORMS_DONE);
29
26
  },
30
- handleRequestFormToSign: (r) => {
31
- const l = n.find((f) => f.uuid === r.uuid);
32
- m(i.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid, name: l?.name });
27
+ handleRequestFormToSign: (n) => {
28
+ const f = r.find((d) => d.uuid === n.uuid);
29
+ m(i.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: n.uuid, name: f?.name });
33
30
  },
34
31
  documentListError: c
35
32
  },
36
- children: t || /* @__PURE__ */ d(_, { flexDirection: "column", children: [
33
+ children: t || /* @__PURE__ */ p(_, { flexDirection: "column", children: [
37
34
  /* @__PURE__ */ o(a, {}),
38
35
  /* @__PURE__ */ o(F, {}),
39
36
  /* @__PURE__ */ o(h, {})
@@ -42,6 +39,6 @@ function v({ employeeId: e, className: s, children: t }) {
42
39
  ) });
43
40
  }
44
41
  export {
45
- H as DocumentList
42
+ N as DocumentList
46
43
  };
47
44
  //# sourceMappingURL=DocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/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 { BaseComponent, type BaseComponentInterface } 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\n/**\n * Props for {@link DocumentList}.\n *\n * @public\n */\nexport interface DocumentListProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Lists the employee's documents pending signature.\n *\n * @remarks\n * Fetches the employee's forms and renders the list of documents that still\n * require signing along with a continue action once everything is signed.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/forms/view` | Fired when a form's \"Sign\" action is selected | `{ uuid: string; name?: string }` |\n * | `employee/forms/done` | Fired when all required forms have been signed and the parent flow can advance | — |\n *\n * @param props - See {@link DocumentListProps}.\n * @returns The employee document list.\n * @public\n */\nexport function DocumentList(props: DocumentListProps) {\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.forms!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n const fullForm = employeeForms.find(f => f.uuid === data.uuid)\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid, name: fullForm?.name })\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","fullForm","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;;;AAuCO,SAASA,EAAaC,GAA0B;AACrD,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,OAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAW3F,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,yBAhBwB,CAACP,MAAe;AAC9C,gBAAMQ,IAAWL,EAAc,KAAK,OAAK,EAAE,SAASH,EAAK,IAAI;AAC7D,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM,MAAMQ,GAAU,MAAM;AAAA,QAC/F;AAAA,QAcQ,mBAAAP;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAa,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAnB,EAACoB,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/Documents/onboarding/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 { BaseComponent, type BaseComponentInterface } 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\n/**\n * Props for {@link DocumentList}.\n *\n * @public\n */\nexport interface DocumentListProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Lists the employee's documents pending signature.\n *\n * @remarks\n * Fetches the employee's forms and renders the list of documents that still\n * require signing along with a continue action once everything is signed.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/forms/view` | Fired when a form's \"Sign\" action is selected | `{ uuid: string; name?: string }` |\n * | `employee/forms/done` | Fired when all required forms have been signed and the parent flow can advance | — |\n *\n * @param props - See {@link DocumentListProps}.\n * @returns The employee document list.\n * @public\n */\nexport function DocumentList(props: DocumentListProps) {\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.forms!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n const fullForm = employeeForms.find(f => f.uuid === data.uuid)\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid, name: fullForm?.name })\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","fullForm","f","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;AAuCO,SAASA,EAAaC,GAA0B;AACrD,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,OAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAW3F,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,yBAhBwB,CAACP,MAAe;AAC9C,gBAAMQ,IAAWL,EAAc,KAAK,OAAKM,EAAE,SAAST,EAAK,IAAI;AAC7D,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM,MAAMQ,GAAU,MAAM;AAAA,QAC/F;AAAA,QAcQ,mBAAAP;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAApB,EAACqB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  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
- import { Flex as l } from "../../../../../Common/Flex/Flex.js";
5
- import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
6
- import "react";
7
- import { DocumentList as u } from "../../../../../Common/DocumentList/DocumentList.js";
4
+ import l from "./List.module.scss.js";
5
+ import { Flex as u } from "../../../../../Common/Flex/Flex.js";
6
+ import { DocumentList as c } from "../../../../../Common/DocumentList/DocumentList.js";
8
7
  function f() {
9
8
  const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
10
- return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
11
- u,
9
+ return /* @__PURE__ */ o("section", { className: l.root, children: /* @__PURE__ */ o(u, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
10
+ c,
12
11
  {
13
12
  forms: i.map((t) => ({
14
13
  uuid: t.uuid,
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\n/** @internal */\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":";;;;;;;AAKO,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/Documents/onboarding/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport styles from './List.module.scss'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\n/** @internal */\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section className={styles.root}>\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","styles","Flex","SharedDocumentList","form"],"mappings":";;;;;;AAMO,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,WAAWC,EAAO,MACzB,4BAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAF;AAAA,IAACG;AAAAA,IAAA;AAAA,MACC,OAAOT,EAAc,IAAI,CAAAU,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeT;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;"}
@@ -0,0 +1,8 @@
1
+ const o = "_root_gqrwc_1", t = {
2
+ root: o
3
+ };
4
+ export {
5
+ t as default,
6
+ o as root
7
+ };
8
+ //# sourceMappingURL=List.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -13,11 +13,10 @@ import "dompurify";
13
13
  import "../../../../../../contexts/LocaleProvider/useLocale.js";
14
14
  import "../../../../../../shared/constants.js";
15
15
  import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
16
  import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
18
- const [v, P] = t("DocumentListContext");
17
+ const [f, v] = t("DocumentListContext");
19
18
  export {
20
- P as DocumentListProvider,
21
- v as useDocumentList
19
+ v as DocumentListProvider,
20
+ f as useDocumentList
22
21
  };
23
22
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/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/Documents/onboarding/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,51 +1,52 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { GustoEmbeddedError as z } from "@gusto/embedded-api/models/errors/gustoembeddederror";
2
+ import { GustoEmbeddedError as D } from "@gusto/embedded-api/models/errors/gustoembeddederror";
3
3
  import { useI9VerificationGetAuthorization as A } from "@gusto/embedded-api/react-query/i9VerificationGetAuthorization";
4
4
  import { useI9VerificationUpdateMutation as I } from "@gusto/embedded-api/react-query/i9VerificationUpdate";
5
5
  import { EmploymentEligibilityPresentation as _ } from "./EmploymentEligibilityPresentation.js";
6
6
  import { BaseComponent as v } from "../../../../../Base/Base.js";
7
- import { useBase as x } from "../../../../../Base/useBase.js";
8
- import { useComponentDictionary as L, useI18n as S } from "../../../../../../i18n/I18n.js";
9
- import { componentEvents as T } from "../../../../../../shared/constants.js";
10
- function C(o) {
11
- return /* @__PURE__ */ r(v, { ...o, children: /* @__PURE__ */ r(M, { ...o }) });
7
+ import { useBase as T } from "../../../../../Base/useBase.js";
8
+ import { useComponentDictionary as x, useI18n as L } from "../../../../../../i18n/I18n.js";
9
+ import { componentEvents as S } from "../../../../../../shared/constants.js";
10
+ import { normalizeToDate as M } from "../../../../../../helpers/dateFormatting.js";
11
+ function j(o) {
12
+ return /* @__PURE__ */ r(v, { ...o, children: /* @__PURE__ */ r(N, { ...o }) });
12
13
  }
13
- const M = ({ employeeId: o, dictionary: s }) => {
14
- L("Employee.EmploymentEligibility", s), S("Employee.EmploymentEligibility");
15
- const { onEvent: m, baseSubmitHandler: c, LoadingIndicator: p } = x(), { data: d, isLoading: l } = A(
14
+ const N = ({ employeeId: o, dictionary: m }) => {
15
+ x("Employee.EmploymentEligibility", m), L("Employee.EmploymentEligibility");
16
+ const { onEvent: s, baseSubmitHandler: c, LoadingIndicator: p } = T(), { data: d, isLoading: l } = A(
16
17
  { employeeId: o },
17
18
  {
18
19
  retry: !1,
19
- throwOnError: (i) => !(i instanceof z && i.httpMeta.response.status === 404)
20
+ throwOnError: (i) => !(i instanceof D && i.httpMeta.response.status === 404)
20
21
  }
21
22
  ), t = d?.i9Authorization, { mutateAsync: y, isPending: u } = I(), E = async (i) => {
22
23
  await c(i, async (h) => {
23
- const { authorizationStatus: e, documentType: a, documentNumber: n, expirationDate: b, country: g } = h;
24
- if (!e) return;
25
- const D = await y({
24
+ const { authorizationStatus: n, documentType: a, documentNumber: e, expirationDate: b, country: g } = h;
25
+ if (!n) return;
26
+ const z = await y({
26
27
  request: {
27
28
  employeeId: o,
28
29
  i9AuthorizationRequestBody: {
29
- authorizationStatus: e,
30
+ authorizationStatus: n,
30
31
  version: t?.version,
31
- ...e === "permanent_resident" && n && {
32
+ ...n === "permanent_resident" && e && {
32
33
  documentType: "uscis_alien_registration_number",
33
- documentNumber: n
34
+ documentNumber: e
34
35
  },
35
- ...e === "alien" && {
36
- ...n && a && { documentType: a, documentNumber: n },
36
+ ...n === "alien" && {
37
+ ...e && a && { documentType: a, documentNumber: e },
37
38
  expirationDate: b,
38
39
  ...a === "foreign_passport" && { country: g }
39
40
  }
40
41
  }
41
42
  }
42
43
  });
43
- m(T.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, D.i9Authorization);
44
+ s(S.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, z.i9Authorization);
44
45
  });
45
46
  }, f = t ? {
46
47
  authorizationStatus: t.authorizationStatus,
47
48
  documentType: t.documentType ?? void 0,
48
- expirationDate: t.expirationDate ? new Date(t.expirationDate) : void 0,
49
+ expirationDate: M(t.expirationDate) ?? void 0,
49
50
  country: t.country ?? void 0
50
51
  } : {};
51
52
  return !u && l ? /* @__PURE__ */ r(p, {}) : /* @__PURE__ */ r(
@@ -60,6 +61,6 @@ const M = ({ employeeId: o, dictionary: s }) => {
60
61
  );
61
62
  };
62
63
  export {
63
- C as EmploymentEligibility
64
+ j as EmploymentEligibility
64
65
  };
65
66
  //# sourceMappingURL=EmploymentEligibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmploymentEligibility.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.tsx"],"sourcesContent":["import { GustoEmbeddedError } from '@gusto/embedded-api/models/errors/gustoembeddederror'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { useI9VerificationUpdateMutation } from '@gusto/embedded-api/react-query/i9VerificationUpdate'\nimport { EmploymentEligibilityPresentation } from './EmploymentEligibilityPresentation'\nimport type {\n EmploymentEligibilityInputs,\n EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\n/**\n * Props for {@link EmploymentEligibility}.\n *\n * @public\n */\nexport interface EmploymentEligibilityProps extends BaseComponentInterface<'Employee.EmploymentEligibility'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Captures the employee's I-9 employment eligibility (Section 1) before signing.\n *\n * @remarks\n * Collects the employee's authorization status — U.S. citizen, noncitizen\n * national, permanent resident, or alien authorized to work — and any\n * document details required for that status. Updates the employee's I-9\n * authorization record on submit.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/employmentEligibility/done` | Fired after the I-9 authorization is saved | The updated I-9 authorization |\n *\n * @param props - See {@link EmploymentEligibilityProps}.\n * @returns The employment eligibility form.\n * @public\n */\nexport function EmploymentEligibility(props: EmploymentEligibilityProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary }: EmploymentEligibilityProps) => {\n useComponentDictionary('Employee.EmploymentEligibility', dictionary)\n useI18n('Employee.EmploymentEligibility')\n const { onEvent, baseSubmitHandler, LoadingIndicator } = useBase()\n\n const { data: i9AuthData, isLoading } = useI9VerificationGetAuthorization(\n { employeeId },\n {\n retry: false,\n throwOnError: (error: Error) => {\n return !(error instanceof GustoEmbeddedError && error.httpMeta.response.status === 404)\n },\n },\n )\n\n const existingAuth = i9AuthData?.i9Authorization\n\n const { mutateAsync: updateI9Authorization, isPending } = useI9VerificationUpdateMutation()\n\n const handleSubmit = async (data: EmploymentEligibilityPayload) => {\n await baseSubmitHandler(data, async payload => {\n const { authorizationStatus, documentType, documentNumber, expirationDate, country } = payload\n\n if (!authorizationStatus) return\n\n const result = await updateI9Authorization({\n request: {\n employeeId,\n i9AuthorizationRequestBody: {\n authorizationStatus,\n version: existingAuth?.version,\n ...(authorizationStatus === 'permanent_resident' &&\n documentNumber && {\n documentType: 'uscis_alien_registration_number',\n documentNumber,\n }),\n ...(authorizationStatus === 'alien' && {\n ...(documentNumber && documentType && { documentType, documentNumber }),\n expirationDate,\n ...(documentType === 'foreign_passport' && { country }),\n }),\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, result.i9Authorization)\n })\n }\n\n const defaultValues: Partial<EmploymentEligibilityInputs> = existingAuth\n ? {\n authorizationStatus: existingAuth.authorizationStatus,\n documentType: existingAuth.documentType ?? undefined,\n expirationDate: existingAuth.expirationDate\n ? new Date(existingAuth.expirationDate)\n : undefined,\n country: existingAuth.country ?? undefined,\n }\n : {}\n\n if (!isPending && isLoading) return <LoadingIndicator />\n\n return (\n <EmploymentEligibilityPresentation\n key={existingAuth?.uuid}\n onSubmit={handleSubmit}\n defaultValues={defaultValues}\n hasDocumentNumber={existingAuth?.hasDocumentNumber}\n isPending={isPending}\n />\n )\n}\n"],"names":["EmploymentEligibility","props","jsx","BaseComponent","Root","employeeId","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","LoadingIndicator","useBase","i9AuthData","isLoading","useI9VerificationGetAuthorization","error","GustoEmbeddedError","existingAuth","updateI9Authorization","isPending","useI9VerificationUpdateMutation","handleSubmit","data","payload","authorizationStatus","documentType","documentNumber","expirationDate","country","result","componentEvents","defaultValues","EmploymentEligibilityPresentation"],"mappings":";;;;;;;;;AA0CO,SAASA,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAA6C;AACvE,EAAAC,EAAuB,kCAAkCD,CAAU,GACnEE,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,GAAmB,kBAAAC,EAAA,IAAqBC,EAAA,GAEnD,EAAE,MAAMC,GAAY,WAAAC,EAAA,IAAcC;AAAA,IACtC,EAAE,YAAAV,EAAA;AAAA,IACF;AAA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AAAA,MACV,eAAAU;AAAA,MACA,mBAAmBd,GAAc;AAAA,MACjC,WAAAE;AAAA,IAAA;AAAA,IAJKF,GAAc;AAAA,EAAA;AAOzB;"}
1
+ {"version":3,"file":"EmploymentEligibility.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.tsx"],"sourcesContent":["import { GustoEmbeddedError } from '@gusto/embedded-api/models/errors/gustoembeddederror'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { useI9VerificationUpdateMutation } from '@gusto/embedded-api/react-query/i9VerificationUpdate'\nimport { EmploymentEligibilityPresentation } from './EmploymentEligibilityPresentation'\nimport type {\n EmploymentEligibilityInputs,\n EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { normalizeToDate } from '@/helpers/dateFormatting'\n\n/**\n * Props for {@link EmploymentEligibility}.\n *\n * @public\n */\nexport interface EmploymentEligibilityProps extends BaseComponentInterface<'Employee.EmploymentEligibility'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Captures the employee's I-9 employment eligibility (Section 1) before signing.\n *\n * @remarks\n * Collects the employee's authorization status — U.S. citizen, noncitizen\n * national, permanent resident, or alien authorized to work — and any\n * document details required for that status. Updates the employee's I-9\n * authorization record on submit.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/employmentEligibility/done` | Fired after the I-9 authorization is saved | The updated I-9 authorization |\n *\n * @param props - See {@link EmploymentEligibilityProps}.\n * @returns The employment eligibility form.\n * @public\n */\nexport function EmploymentEligibility(props: EmploymentEligibilityProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary }: EmploymentEligibilityProps) => {\n useComponentDictionary('Employee.EmploymentEligibility', dictionary)\n useI18n('Employee.EmploymentEligibility')\n const { onEvent, baseSubmitHandler, LoadingIndicator } = useBase()\n\n const { data: i9AuthData, isLoading } = useI9VerificationGetAuthorization(\n { employeeId },\n {\n retry: false,\n throwOnError: (error: Error) => {\n return !(error instanceof GustoEmbeddedError && error.httpMeta.response.status === 404)\n },\n },\n )\n\n const existingAuth = i9AuthData?.i9Authorization\n\n const { mutateAsync: updateI9Authorization, isPending } = useI9VerificationUpdateMutation()\n\n const handleSubmit = async (data: EmploymentEligibilityPayload) => {\n await baseSubmitHandler(data, async payload => {\n const { authorizationStatus, documentType, documentNumber, expirationDate, country } = payload\n\n if (!authorizationStatus) return\n\n const result = await updateI9Authorization({\n request: {\n employeeId,\n i9AuthorizationRequestBody: {\n authorizationStatus,\n version: existingAuth?.version,\n ...(authorizationStatus === 'permanent_resident' &&\n documentNumber && {\n documentType: 'uscis_alien_registration_number',\n documentNumber,\n }),\n ...(authorizationStatus === 'alien' && {\n ...(documentNumber && documentType && { documentType, documentNumber }),\n expirationDate,\n ...(documentType === 'foreign_passport' && { country }),\n }),\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE, result.i9Authorization)\n })\n }\n\n const defaultValues: Partial<EmploymentEligibilityInputs> = existingAuth\n ? {\n authorizationStatus: existingAuth.authorizationStatus,\n documentType: existingAuth.documentType ?? undefined,\n expirationDate: normalizeToDate(existingAuth.expirationDate) ?? undefined,\n country: existingAuth.country ?? undefined,\n }\n : {}\n\n if (!isPending && isLoading) return <LoadingIndicator />\n\n return (\n <EmploymentEligibilityPresentation\n key={existingAuth?.uuid}\n onSubmit={handleSubmit}\n defaultValues={defaultValues}\n hasDocumentNumber={existingAuth?.hasDocumentNumber}\n isPending={isPending}\n />\n )\n}\n"],"names":["EmploymentEligibility","props","jsx","BaseComponent","Root","employeeId","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","LoadingIndicator","useBase","i9AuthData","isLoading","useI9VerificationGetAuthorization","error","GustoEmbeddedError","existingAuth","updateI9Authorization","isPending","useI9VerificationUpdateMutation","handleSubmit","data","payload","authorizationStatus","documentType","documentNumber","expirationDate","country","result","componentEvents","defaultValues","normalizeToDate","EmploymentEligibilityPresentation"],"mappings":";;;;;;;;;;AA2CO,SAASA,EAAsBC,GAAmC;AACvE,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAA6C;AACvE,EAAAC,EAAuB,kCAAkCD,CAAU,GACnEE,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,GAAmB,kBAAAC,EAAA,IAAqBC,EAAA,GAEnD,EAAE,MAAMC,GAAY,WAAAC,EAAA,IAAcC;AAAA,IACtC,EAAE,YAAAV,EAAA;AAAA,IACF;AAAA,MACE,OAAO;AAAA,MACP,cAAc,CAACW,MACN,EAAEA,aAAiBC,KAAsBD,EAAM,SAAS,SAAS,WAAW;AAAA,IACrF;AAAA,EACF,GAGIE,IAAeL,GAAY,iBAE3B,EAAE,aAAaM,GAAuB,WAAAC,EAAA,IAAcC,EAAA,GAEpDC,IAAe,OAAOC,MAAuC;AACjE,UAAMb,EAAkBa,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,qBAAAC,GAAqB,cAAAC,GAAc,gBAAAC,GAAgB,gBAAAC,GAAgB,SAAAC,MAAYL;AAEvF,UAAI,CAACC,EAAqB;AAE1B,YAAMK,IAAS,MAAMX,EAAsB;AAAA,QACzC,SAAS;AAAA,UACP,YAAAd;AAAA,UACA,4BAA4B;AAAA,YAC1B,qBAAAoB;AAAA,YACA,SAASP,GAAc;AAAA,YACvB,GAAIO,MAAwB,wBAC1BE,KAAkB;AAAA,cAChB,cAAc;AAAA,cACd,gBAAAA;AAAA,YAAA;AAAA,YAEJ,GAAIF,MAAwB,WAAW;AAAA,cACrC,GAAIE,KAAkBD,KAAgB,EAAE,cAAAA,GAAc,gBAAAC,EAAA;AAAA,cACtD,gBAAAC;AAAA,cACA,GAAIF,MAAiB,sBAAsB,EAAE,SAAAG,EAAA;AAAA,YAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF,CACD;AAED,MAAApB,EAAQsB,EAAgB,sCAAsCD,EAAO,eAAe;AAAA,IACtF,CAAC;AAAA,EACH,GAEME,IAAsDd,IACxD;AAAA,IACE,qBAAqBA,EAAa;AAAA,IAClC,cAAcA,EAAa,gBAAgB;AAAA,IAC3C,gBAAgBe,EAAgBf,EAAa,cAAc,KAAK;AAAA,IAChE,SAASA,EAAa,WAAW;AAAA,EAAA,IAEnC,CAAA;AAEJ,SAAI,CAACE,KAAaN,sBAAmBH,GAAA,CAAA,CAAiB,IAGpD,gBAAAT;AAAA,IAACgC;AAAA,IAAA;AAAA,MAEC,UAAUZ;AAAA,MACV,eAAAU;AAAA,MACA,mBAAmBd,GAAc;AAAA,MACjC,WAAAE;AAAA,IAAA;AAAA,IAJKF,GAAc;AAAA,EAAA;AAOzB;"}
@@ -8,9 +8,9 @@ import { generateEmploymentEligibilitySchema as k } from "./EmploymentEligibilit
8
8
  import { COUNTRIES as P } from "./countries.js";
9
9
  import { Flex as b } from "../../../../../Common/Flex/Flex.js";
10
10
  import { ActionsLayout as V } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
11
- import { useComponentContext as B } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import { ComboBoxField as H } from "../../../../../Common/Fields/ComboBoxField/ComboBoxField.js";
13
- import { Form as K } from "../../../../../Common/Form/Form.js";
11
+ import { ComboBoxField as B } from "../../../../../Common/Fields/ComboBoxField/ComboBoxField.js";
12
+ import { Form as H } from "../../../../../Common/Form/Form.js";
13
+ import { useComponentContext as K } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
14
14
  import { useI18n as M } from "../../../../../../i18n/I18n.js";
15
15
  import { SelectField as G } from "../../../../../Common/Fields/SelectField/SelectField.js";
16
16
  import { RadioGroupField as U } from "../../../../../Common/Fields/RadioGroupField/RadioGroupField.js";
@@ -28,7 +28,7 @@ const Q = {
28
28
  isPending: g
29
29
  }) => {
30
30
  M("Employee.EmploymentEligibility");
31
- const { Heading: D, Text: x, Alert: E, Button: z, Link: N } = B(), { t: e } = L("Employee.EmploymentEligibility"), [m, a] = I(!!y), r = $({
31
+ const { Heading: D, Text: x, Alert: E, Button: z, Link: N } = K(), { t: e } = L("Employee.EmploymentEligibility"), [m, a] = I(!!y), r = $({
32
32
  resolver: q(k(m)),
33
33
  defaultValues: f
34
34
  }), { control: l, setValue: u, clearErrors: c } = r, o = d({ control: l, name: "authorizationStatus" }), s = d({ control: l, name: "documentType" }), _ = Object.values(w).map((i) => ({
@@ -45,7 +45,7 @@ const Q = {
45
45
  uscis_alien_registration_number: 9,
46
46
  form_i94: 11
47
47
  };
48
- return /* @__PURE__ */ t(j, { ...r, children: /* @__PURE__ */ t(K, { onSubmit: r.handleSubmit(h), children: /* @__PURE__ */ p(b, { flexDirection: "column", gap: 16, children: [
48
+ return /* @__PURE__ */ t(j, { ...r, children: /* @__PURE__ */ t(H, { onSubmit: r.handleSubmit(h), children: /* @__PURE__ */ p(b, { flexDirection: "column", gap: 16, children: [
49
49
  /* @__PURE__ */ p(b, { flexDirection: "column", gap: 2, children: [
50
50
  /* @__PURE__ */ t(D, { as: "h2", children: e("title") }),
51
51
  /* @__PURE__ */ t(x, { variant: "supporting", children: /* @__PURE__ */ t(
@@ -102,7 +102,7 @@ const Q = {
102
102
  }
103
103
  ),
104
104
  s === "foreign_passport" && o === "alien" && /* @__PURE__ */ t(
105
- H,
105
+ B,
106
106
  {
107
107
  name: "country",
108
108
  label: e("country.label"),
@@ -1,10 +1,11 @@
1
1
  import { z as o } from "zod";
2
2
  import { DocumentType as i, AuthorizationStatus as r } from "@gusto/embedded-api/models/components/i9authorization";
3
- const t = (u) => /^[Aa]?\d{7,9}$/.test(u), m = (u) => /^\d{9} ?[A-Za-z\d]\d$/.test(u), a = (u) => o.object({
3
+ import { formatDateToStringDate as m } from "../../../../../../helpers/dateFormatting.js";
4
+ const t = (u) => /^[Aa]?\d{7,9}$/.test(u), n = (u) => /^\d{9} ?[A-Za-z\d]\d$/.test(u), p = (u) => o.object({
4
5
  authorizationStatus: o.enum(r).optional(),
5
6
  documentType: o.enum(i).optional(),
6
7
  documentNumber: o.string().optional(),
7
- expirationDate: o.date().transform((e) => e.toISOString().split("T")[0]).optional(),
8
+ expirationDate: o.date().transform((e) => m(e) ?? void 0).optional(),
8
9
  country: o.string().optional()
9
10
  }).superRefine((e, s) => {
10
11
  if (!e.authorizationStatus) {
@@ -31,7 +32,7 @@ const t = (u) => /^[Aa]?\d{7,9}$/.test(u), m = (u) => /^\d{9} ?[A-Za-z\d]\d$/.te
31
32
  code: o.ZodIssueCode.custom,
32
33
  message: "Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)",
33
34
  path: ["documentNumber"]
34
- }) : e.documentType === "form_i94" && !m(e.documentNumber) && s.addIssue({
35
+ }) : e.documentType === "form_i94" && !n(e.documentNumber) && s.addIssue({
35
36
  code: o.ZodIssueCode.custom,
36
37
  message: "Enter a valid 11-character Form I-94 admission number",
37
38
  path: ["documentNumber"]
@@ -46,6 +47,6 @@ const t = (u) => /^[Aa]?\d{7,9}$/.test(u), m = (u) => /^\d{9} ?[A-Za-z\d]\d$/.te
46
47
  }));
47
48
  });
48
49
  export {
49
- a as generateEmploymentEligibilitySchema
50
+ p as generateEmploymentEligibilitySchema
50
51
  };
51
52
  //# sourceMappingURL=EmploymentEligibilitySchema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n DocumentType as I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\n/** @internal */\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.enum(AuthorizationStatus).optional(),\n documentType: z.enum(I9AuthorizationDocumentType).optional(),\n documentNumber: z.string().optional(),\n expirationDate: z\n .date()\n .transform(date => date.toISOString().split('T')[0])\n .optional(),\n country: z.string().optional(),\n })\n .superRefine((data, ctx) => {\n if (!data.authorizationStatus) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization status is required',\n path: ['authorizationStatus'],\n })\n return\n }\n if (data.authorizationStatus === 'permanent_resident') {\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (!isValidUscisNumber(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n }\n }\n if (data.authorizationStatus === 'alien') {\n if (!data.documentType) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization document is required',\n path: ['documentType'],\n })\n }\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (\n data.documentType === 'uscis_alien_registration_number' &&\n !isValidUscisNumber(data.documentNumber)\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n } else if (data.documentType === 'form_i94' && !isValidI94Number(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a valid 11-character Form I-94 admission number',\n path: ['documentNumber'],\n })\n }\n if (data.documentType === 'foreign_passport' && !data.country) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Country of issuance is required',\n path: ['country'],\n })\n }\n }\n })\n\n/** @internal */\nexport type EmploymentEligibilityInputs = z.input<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n/** @internal */\nexport type EmploymentEligibilityPayload = z.infer<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n"],"names":["isValidUscisNumber","value","isValidI94Number","generateEmploymentEligibilitySchema","hasDocumentNumber","z","AuthorizationStatus","I9AuthorizationDocumentType","date","data","ctx"],"mappings":";;AAMA,MAAMA,IAAqB,CAACC,MAAkB,iBAAiB,KAAKA,CAAK,GACnEC,IAAmB,CAACD,MAAkB,wBAAwB,KAAKA,CAAK,GAGjEE,IAAsC,CAACC,MAClDC,EACG,OAAO;AAAA,EACN,qBAAqBA,EAAE,KAAKC,CAAmB,EAAE,SAAA;AAAA,EACjD,cAAcD,EAAE,KAAKE,CAA2B,EAAE,SAAA;AAAA,EAClD,gBAAgBF,EAAE,OAAA,EAAS,SAAA;AAAA,EAC3B,gBAAgBA,EACb,KAAA,EACA,UAAU,CAAAG,MAAQA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,CAAC,EAClD,SAAA;AAAA,EACH,SAASH,EAAE,OAAA,EAAS,SAAA;AACtB,CAAC,EACA,YAAY,CAACI,GAAMC,MAAQ;AAC1B,MAAI,CAACD,EAAK,qBAAqB;AAC7B,IAAAC,EAAI,SAAS;AAAA,MACX,MAAML,EAAE,aAAa;AAAA,MACrB,SAAS;AAAA,MACT,MAAM,CAAC,qBAAqB;AAAA,IAAA,CAC7B;AACD;AAAA,EACF;AACA,EAAII,EAAK,wBAAwB,yBAC1BA,EAAK,iBAQET,EAAmBS,EAAK,cAAc,KAChDC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IAZID,KACHM,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IAUHI,EAAK,wBAAwB,YAC1BA,EAAK,gBACRC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,cAAc;AAAA,EAAA,CACtB,GAEEI,EAAK,iBASRA,EAAK,iBAAiB,qCACtB,CAACT,EAAmBS,EAAK,cAAc,IAEvCC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IACQI,EAAK,iBAAiB,cAAc,CAACP,EAAiBO,EAAK,cAAc,KAClFC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IArBID,KACHM,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,GAkBDI,EAAK,iBAAiB,sBAAsB,CAACA,EAAK,WACpDC,EAAI,SAAS;AAAA,IACX,MAAML,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,SAAS;AAAA,EAAA,CACjB;AAGP,CAAC;"}
1
+ {"version":3,"file":"EmploymentEligibilitySchema.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n AuthorizationStatus,\n DocumentType as I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nconst isValidUscisNumber = (value: string) => /^[Aa]?\\d{7,9}$/.test(value)\nconst isValidI94Number = (value: string) => /^\\d{9} ?[A-Za-z\\d]\\d$/.test(value)\n\n/** @internal */\nexport const generateEmploymentEligibilitySchema = (hasDocumentNumber?: boolean | null) =>\n z\n .object({\n authorizationStatus: z.enum(AuthorizationStatus).optional(),\n documentType: z.enum(I9AuthorizationDocumentType).optional(),\n documentNumber: z.string().optional(),\n expirationDate: z\n .date()\n .transform(date => formatDateToStringDate(date) ?? undefined)\n .optional(),\n country: z.string().optional(),\n })\n .superRefine((data, ctx) => {\n if (!data.authorizationStatus) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization status is required',\n path: ['authorizationStatus'],\n })\n return\n }\n if (data.authorizationStatus === 'permanent_resident') {\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (!isValidUscisNumber(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n }\n }\n if (data.authorizationStatus === 'alien') {\n if (!data.documentType) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Authorization document is required',\n path: ['documentType'],\n })\n }\n if (!data.documentNumber) {\n if (!hasDocumentNumber) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Document number is required',\n path: ['documentNumber'],\n })\n }\n } else if (\n data.documentType === 'uscis_alien_registration_number' &&\n !isValidUscisNumber(data.documentNumber)\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a 7-9 digit USCIS number or A-Number (e.g. A123456789)',\n path: ['documentNumber'],\n })\n } else if (data.documentType === 'form_i94' && !isValidI94Number(data.documentNumber)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Enter a valid 11-character Form I-94 admission number',\n path: ['documentNumber'],\n })\n }\n if (data.documentType === 'foreign_passport' && !data.country) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Country of issuance is required',\n path: ['country'],\n })\n }\n }\n })\n\n/** @internal */\nexport type EmploymentEligibilityInputs = z.input<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n/** @internal */\nexport type EmploymentEligibilityPayload = z.infer<\n ReturnType<typeof generateEmploymentEligibilitySchema>\n>\n"],"names":["isValidUscisNumber","value","isValidI94Number","generateEmploymentEligibilitySchema","hasDocumentNumber","z","AuthorizationStatus","I9AuthorizationDocumentType","date","formatDateToStringDate","data","ctx"],"mappings":";;;AAOA,MAAMA,IAAqB,CAACC,MAAkB,iBAAiB,KAAKA,CAAK,GACnEC,IAAmB,CAACD,MAAkB,wBAAwB,KAAKA,CAAK,GAGjEE,IAAsC,CAACC,MAClDC,EACG,OAAO;AAAA,EACN,qBAAqBA,EAAE,KAAKC,CAAmB,EAAE,SAAA;AAAA,EACjD,cAAcD,EAAE,KAAKE,CAA2B,EAAE,SAAA;AAAA,EAClD,gBAAgBF,EAAE,OAAA,EAAS,SAAA;AAAA,EAC3B,gBAAgBA,EACb,KAAA,EACA,UAAU,CAAAG,MAAQC,EAAuBD,CAAI,KAAK,MAAS,EAC3D,SAAA;AAAA,EACH,SAASH,EAAE,OAAA,EAAS,SAAA;AACtB,CAAC,EACA,YAAY,CAACK,GAAMC,MAAQ;AAC1B,MAAI,CAACD,EAAK,qBAAqB;AAC7B,IAAAC,EAAI,SAAS;AAAA,MACX,MAAMN,EAAE,aAAa;AAAA,MACrB,SAAS;AAAA,MACT,MAAM,CAAC,qBAAqB;AAAA,IAAA,CAC7B;AACD;AAAA,EACF;AACA,EAAIK,EAAK,wBAAwB,yBAC1BA,EAAK,iBAQEV,EAAmBU,EAAK,cAAc,KAChDC,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IAZID,KACHO,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IAUHK,EAAK,wBAAwB,YAC1BA,EAAK,gBACRC,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,cAAc;AAAA,EAAA,CACtB,GAEEK,EAAK,iBASRA,EAAK,iBAAiB,qCACtB,CAACV,EAAmBU,EAAK,cAAc,IAEvCC,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IACQK,EAAK,iBAAiB,cAAc,CAACR,EAAiBQ,EAAK,cAAc,KAClFC,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,IArBID,KACHO,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,gBAAgB;AAAA,EAAA,CACxB,GAkBDK,EAAK,iBAAiB,sBAAsB,CAACA,EAAK,WACpDC,EAAI,SAAS;AAAA,IACX,MAAMN,EAAE,aAAa;AAAA,IACrB,SAAS;AAAA,IACT,MAAM,CAAC,SAAS;AAAA,EAAA,CACjB;AAGP,CAAC;"}
@@ -9,12 +9,11 @@ import { useI18n as z } from "../../../../../../i18n/I18n.js";
9
9
  import { componentEvents as f } from "../../../../../../shared/constants.js";
10
10
  import { Flex as m } from "../../../../../Common/Flex/Flex.js";
11
11
  import { ActionsLayout as k } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
12
- import { useComponentContext as h } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
13
- import "react";
14
12
  import { Form as w } from "../../../../../Common/Form/Form.js";
15
13
  import { SDKFormProvider as B } from "../../../../../../partner-hook-utils/form/SDKFormProvider.js";
14
+ import { useComponentContext as h } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
16
15
  import { DocumentViewer as F } from "../../../../../Common/DocumentViewer/DocumentViewer.js";
17
- function ne(i) {
16
+ function ie(i) {
18
17
  return /* @__PURE__ */ e(x, { ...i, children: /* @__PURE__ */ e(P, { ...i }) });
19
18
  }
20
19
  function P({ employeeId: i, formId: c, className: a }) {
@@ -235,6 +234,6 @@ function H({
235
234
  ] });
236
235
  }
237
236
  export {
238
- ne as I9SignatureForm
237
+ ie as I9SignatureForm
239
238
  };
240
239
  //# sourceMappingURL=I9SignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"I9SignatureForm.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport type { AuthorizationStatus } from '@gusto/embedded-api/models/components/i9authorization'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { useSignEmployeeForm, type PreparerFieldGroup } from '../../../shared/useSignEmployeeForm'\nimport styles from './I9SignatureForm.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { Form } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Props for {@link I9SignatureForm}.\n *\n * @public\n */\nexport interface I9SignatureFormProps extends BaseComponentInterface<'Employee.I9SignatureForm'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The identifier of the I-9 form to sign. */\n formId: string\n}\n\n/**\n * Presents the employee's I-9 form for review and signature.\n *\n * @remarks\n * Renders the I-9 PDF, surfaces the current employment-eligibility status, and\n * collects the employee's signature along with any preparer or translator\n * details. On successful submission the signed form is emitted.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/forms/sign` | Fired after the I-9 is successfully signed | {@link APIModels.Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `cancel` | Fired when the user cancels signing and returns to the document list | — |\n *\n * @param props - See {@link I9SignatureFormProps}.\n * @returns The employee I-9 signature form.\n * @public\n */\nexport function I9SignatureForm(props: I9SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className }: I9SignatureFormProps) {\n useI18n('Employee.I9SignatureForm')\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useSignEmployeeForm({ employeeId, formId })\n\n const { data: i9AuthData } = useI9VerificationGetAuthorization({ employeeId })\n const authorizationStatus = i9AuthData?.i9Authorization?.authorizationStatus\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { form, pdfUrl } = hookResult.data\n const { isPending } = hookResult.status\n const { Fields, preparers } = hookResult.form\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleChangeEligibility = () => {\n onEvent(componentEvents.EMPLOYEE_CHANGE_ELIGIBILITY_STATUS)\n }\n\n const handleSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, result.data)\n }\n }\n\n const preparerFieldGroups = [\n Fields.Preparer1,\n Fields.Preparer2,\n Fields.Preparer3,\n Fields.Preparer4,\n ].filter(Group => Group !== undefined)\n\n return (\n <section className={className}>\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={20}>\n <section>\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey=\"description\"\n t={t}\n components={{\n viewFormLink: pdfUrl ? (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ) : (\n <span />\n ),\n }}\n />\n </Components.Text>\n </section>\n\n {authorizationStatus && (\n <EligibilityStatusAlert\n authorizationStatus={authorizationStatus}\n onChangeStatus={handleChangeEligibility}\n />\n )}\n\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n\n <Flex flexDirection=\"column\" gap={12}>\n <Fields.Signature\n label={t('signatureLabel')}\n description={t('signatureDescription')}\n validationMessages={{ REQUIRED: t('signatureError') }}\n />\n <Fields.ConfirmSignature\n label={t('confirmationLabel')}\n validationMessages={{ REQUIRED: t('confirmationError') }}\n />\n </Flex>\n\n {Fields.UsedPreparer && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.UsedPreparer\n label={t('preparerQuestion')}\n validationMessages={{ REQUIRED: t('preparerQuestionError') }}\n />\n\n {preparerFieldGroups.map((PreparerFields, index) => {\n const isLast = index === preparerFieldGroups.length - 1\n return (\n <Flex flexDirection=\"column\" gap={0} key={index}>\n <div className={styles.preparerAlert}>\n <Components.Alert\n label={t('preparerNote')}\n status=\"info\"\n disableScrollIntoView\n />\n </div>\n <PreparerSection\n PreparerFields={PreparerFields}\n showAddButton={isLast && (preparers?.canAdd ?? false)}\n showRemoveButton={\n isLast &&\n (preparers?.canRemove ?? false) &&\n preparerFieldGroups.length > 1\n }\n onAdd={() => hookResult.actions.addPreparer?.()}\n onRemove={() => hookResult.actions.removePreparer?.()}\n />\n </Flex>\n )\n })}\n </Flex>\n )}\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('signCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n\ninterface EligibilityStatusAlertProps {\n authorizationStatus: AuthorizationStatus\n onChangeStatus: () => void\n}\n\nfunction EligibilityStatusAlert({\n authorizationStatus,\n onChangeStatus,\n}: EligibilityStatusAlertProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const Components = useComponentContext()\n\n const alertLabelKeys = {\n citizen: 'eligibilityAlertLabel_citizen',\n permanent_resident: 'eligibilityAlertLabel_permanent_resident',\n noncitizen: 'eligibilityAlertLabel_noncitizen',\n alien: 'eligibilityAlertLabel_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n const alertDescriptionKeys = {\n citizen: 'eligibilityAlertDescription_citizen',\n permanent_resident: 'eligibilityAlertDescription_permanent_resident',\n noncitizen: 'eligibilityAlertDescription_noncitizen',\n alien: 'eligibilityAlertDescription_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n return (\n <Components.Alert\n status=\"info\"\n label={t(alertLabelKeys[authorizationStatus])}\n disableScrollIntoView\n >\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Text>{t(alertDescriptionKeys[authorizationStatus])}</Components.Text>\n <div>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onChangeStatus}>\n {t('eligibilityAlertChangeStatusCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )\n}\n\ninterface PreparerSectionProps {\n PreparerFields: PreparerFieldGroup\n showRemoveButton: boolean\n showAddButton: boolean\n onAdd: () => void\n onRemove: () => void\n}\n\nfunction PreparerSection({\n PreparerFields,\n showRemoveButton,\n showAddButton,\n onAdd,\n onRemove,\n}: PreparerSectionProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <Components.Heading as=\"h3\">{t('preparerSectionTitle')}</Components.Heading>\n\n <PreparerFields.FirstName\n label={t('preparerFirstNameLabel')}\n validationMessages={{ REQUIRED: t('preparerFirstNameError') }}\n />\n <PreparerFields.LastName\n label={t('preparerLastNameLabel')}\n validationMessages={{ REQUIRED: t('preparerLastNameError') }}\n />\n <PreparerFields.Street1\n label={t('preparerStreet1Label')}\n validationMessages={{ REQUIRED: t('preparerStreet1Error') }}\n />\n <PreparerFields.Street2 label={t('preparerStreet2Label')} />\n <PreparerFields.City\n label={t('preparerCityLabel')}\n validationMessages={{ REQUIRED: t('preparerCityError') }}\n />\n <PreparerFields.State\n label={t('preparerStateLabel')}\n placeholder={t('preparerStatePlaceholder')}\n validationMessages={{ REQUIRED: t('preparerStateError') }}\n getOptionLabel={(abbr: string) => tCommon(`statesHash.${abbr}`, { defaultValue: abbr })}\n />\n <PreparerFields.Zip\n label={t('preparerZipLabel')}\n validationMessages={{ REQUIRED: t('preparerZipError') }}\n />\n <PreparerFields.Signature\n label={t('preparerSignatureLabel')}\n description={t('preparerSignatureDescription')}\n validationMessages={{ REQUIRED: t('preparerSignatureError') }}\n />\n <PreparerFields.ConfirmSignature\n label={t('preparerConfirmationLabel')}\n validationMessages={{ REQUIRED: t('preparerConfirmationError') }}\n />\n\n {(showAddButton || showRemoveButton) && (\n <div className={styles.preparerActions}>\n {showAddButton && (\n <Components.Button type=\"button\" variant=\"secondary\" onClick={onAdd}>\n {t('addPreparerCta')}\n </Components.Button>\n )}\n {showRemoveButton && (\n <Components.Button type=\"button\" variant=\"error\" onClick={onRemove}>\n {t('removePreparerCta')}\n </Components.Button>\n )}\n </div>\n )}\n </Flex>\n )\n}\n"],"names":["I9SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","useI18n","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useSignEmployeeForm","i9AuthData","useI9VerificationGetAuthorization","authorizationStatus","BaseLayout","form","pdfUrl","isPending","Fields","preparers","handleBack","componentEvents","handleChangeEligibility","handleSubmit","result","preparerFieldGroups","Group","SDKFormProvider","Form","jsxs","Flex","Trans","EligibilityStatusAlert","DocumentViewer","PreparerFields","index","isLast","styles","PreparerSection","ActionsLayout","onChangeStatus","t","alertLabelKeys","alertDescriptionKeys","showRemoveButton","showAddButton","onAdd","onRemove","tCommon","abbr"],"mappings":";;;;;;;;;;;;;;;;AA+CO,SAASA,GAAgBC,GAA6B;AAC3D,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,KAAmC;AACrE,EAAAC,EAAQ,0BAA0B;AAClC,QAAM,EAAE,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAaC,EAAA,GAEbC,IAAaC,EAAoB,EAAE,YAAAV,GAAY,QAAAC,GAAQ,GAEvD,EAAE,MAAMU,EAAA,IAAeC,EAAkC,EAAE,YAAAZ,GAAY,GACvEa,IAAsBF,GAAY,iBAAiB;AAEzD,MAAIF,EAAW;AACb,6BAAQK,GAAA,EAAW,WAAS,IAAC,OAAOL,EAAW,cAAc,QAAQ;AAGvE,QAAM,EAAE,MAAAM,GAAM,QAAAC,EAAA,IAAWP,EAAW,MAC9B,EAAE,WAAAQ,MAAcR,EAAW,QAC3B,EAAE,QAAAS,GAAQ,WAAAC,EAAA,IAAcV,EAAW,MAEnCW,IAAa,MAAM;AACvB,IAAAf,EAAQgB,EAAgB,MAAM;AAAA,EAChC,GAEMC,IAA0B,MAAM;AACpC,IAAAjB,EAAQgB,EAAgB,kCAAkC;AAAA,EAC5D,GAEME,IAAe,YAAY;AAC/B,UAAMC,IAA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AkB,MAAK,UAAS,SAAQ,SAAQ,SAASwC,GACvD,UAAAN,EAAE,mBAAmB,EAAA,CACxB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"I9SignatureForm.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport type { AuthorizationStatus } from '@gusto/embedded-api/models/components/i9authorization'\nimport { useI9VerificationGetAuthorization } from '@gusto/embedded-api/react-query/i9VerificationGetAuthorization'\nimport { useSignEmployeeForm, type PreparerFieldGroup } from '../../../shared/useSignEmployeeForm'\nimport styles from './I9SignatureForm.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseLayout } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { Form } from '@/components/Common/Form'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/**\n * Props for {@link I9SignatureForm}.\n *\n * @public\n */\nexport interface I9SignatureFormProps extends BaseComponentInterface<'Employee.I9SignatureForm'> {\n /** The associated employee identifier. */\n employeeId: string\n /** The identifier of the I-9 form to sign. */\n formId: string\n}\n\n/**\n * Presents the employee's I-9 form for review and signature.\n *\n * @remarks\n * Renders the I-9 PDF, surfaces the current employment-eligibility status, and\n * collects the employee's signature along with any preparer or translator\n * details. On successful submission the signed form is emitted.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/forms/sign` | Fired after the I-9 is successfully signed | {@link APIModels.Form} |\n * | `employee/employmentEligibility/change` | Fired when the user requests to change their I-9 eligibility status | — |\n * | `cancel` | Fired when the user cancels signing and returns to the document list | — |\n *\n * @param props - See {@link I9SignatureFormProps}.\n * @returns The employee I-9 signature form.\n * @public\n */\nexport function I9SignatureForm(props: I9SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className }: I9SignatureFormProps) {\n useI18n('Employee.I9SignatureForm')\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { onEvent } = useBase()\n const Components = useComponentContext()\n\n const hookResult = useSignEmployeeForm({ employeeId, formId })\n\n const { data: i9AuthData } = useI9VerificationGetAuthorization({ employeeId })\n const authorizationStatus = i9AuthData?.i9Authorization?.authorizationStatus\n\n if (hookResult.isLoading) {\n return <BaseLayout isLoading error={hookResult.errorHandling.errors} />\n }\n\n const { form, pdfUrl } = hookResult.data\n const { isPending } = hookResult.status\n const { Fields, preparers } = hookResult.form\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleChangeEligibility = () => {\n onEvent(componentEvents.EMPLOYEE_CHANGE_ELIGIBILITY_STATUS)\n }\n\n const handleSubmit = async () => {\n const result = await hookResult.actions.onSubmit()\n if (result) {\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, result.data)\n }\n }\n\n const preparerFieldGroups = [\n Fields.Preparer1,\n Fields.Preparer2,\n Fields.Preparer3,\n Fields.Preparer4,\n ].filter(Group => Group !== undefined)\n\n return (\n <section className={className}>\n <BaseLayout error={hookResult.errorHandling.errors}>\n <SDKFormProvider formHookResult={hookResult}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\" gap={20}>\n <section>\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n <Components.Text>\n <Trans\n i18nKey=\"description\"\n t={t}\n components={{\n viewFormLink: pdfUrl ? (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ) : (\n <span />\n ),\n }}\n />\n </Components.Text>\n </section>\n\n {authorizationStatus && (\n <EligibilityStatusAlert\n authorizationStatus={authorizationStatus}\n onChangeStatus={handleChangeEligibility}\n />\n )}\n\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n\n <Flex flexDirection=\"column\" gap={12}>\n <Fields.Signature\n label={t('signatureLabel')}\n description={t('signatureDescription')}\n validationMessages={{ REQUIRED: t('signatureError') }}\n />\n <Fields.ConfirmSignature\n label={t('confirmationLabel')}\n validationMessages={{ REQUIRED: t('confirmationError') }}\n />\n </Flex>\n\n {Fields.UsedPreparer && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.UsedPreparer\n label={t('preparerQuestion')}\n validationMessages={{ REQUIRED: t('preparerQuestionError') }}\n />\n\n {preparerFieldGroups.map((PreparerFields, index) => {\n const isLast = index === preparerFieldGroups.length - 1\n return (\n <Flex flexDirection=\"column\" gap={0} key={index}>\n <div className={styles.preparerAlert}>\n <Components.Alert\n label={t('preparerNote')}\n status=\"info\"\n disableScrollIntoView\n />\n </div>\n <PreparerSection\n PreparerFields={PreparerFields}\n showAddButton={isLast && (preparers?.canAdd ?? false)}\n showRemoveButton={\n isLast &&\n (preparers?.canRemove ?? false) &&\n preparerFieldGroups.length > 1\n }\n onAdd={() => hookResult.actions.addPreparer?.()}\n onRemove={() => hookResult.actions.removePreparer?.()}\n />\n </Flex>\n )\n })}\n </Flex>\n )}\n\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={handleBack}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('signCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n </section>\n )\n}\n\ninterface EligibilityStatusAlertProps {\n authorizationStatus: AuthorizationStatus\n onChangeStatus: () => void\n}\n\nfunction EligibilityStatusAlert({\n authorizationStatus,\n onChangeStatus,\n}: EligibilityStatusAlertProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const Components = useComponentContext()\n\n const alertLabelKeys = {\n citizen: 'eligibilityAlertLabel_citizen',\n permanent_resident: 'eligibilityAlertLabel_permanent_resident',\n noncitizen: 'eligibilityAlertLabel_noncitizen',\n alien: 'eligibilityAlertLabel_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n const alertDescriptionKeys = {\n citizen: 'eligibilityAlertDescription_citizen',\n permanent_resident: 'eligibilityAlertDescription_permanent_resident',\n noncitizen: 'eligibilityAlertDescription_noncitizen',\n alien: 'eligibilityAlertDescription_alien',\n } as const satisfies Record<AuthorizationStatus, string>\n\n return (\n <Components.Alert\n status=\"info\"\n label={t(alertLabelKeys[authorizationStatus])}\n disableScrollIntoView\n >\n <Flex flexDirection=\"column\" gap={8}>\n <Components.Text>{t(alertDescriptionKeys[authorizationStatus])}</Components.Text>\n <div>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onChangeStatus}>\n {t('eligibilityAlertChangeStatusCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )\n}\n\ninterface PreparerSectionProps {\n PreparerFields: PreparerFieldGroup\n showRemoveButton: boolean\n showAddButton: boolean\n onAdd: () => void\n onRemove: () => void\n}\n\nfunction PreparerSection({\n PreparerFields,\n showRemoveButton,\n showAddButton,\n onAdd,\n onRemove,\n}: PreparerSectionProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const { t: tCommon } = useTranslation('common')\n const Components = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <Components.Heading as=\"h3\">{t('preparerSectionTitle')}</Components.Heading>\n\n <PreparerFields.FirstName\n label={t('preparerFirstNameLabel')}\n validationMessages={{ REQUIRED: t('preparerFirstNameError') }}\n />\n <PreparerFields.LastName\n label={t('preparerLastNameLabel')}\n validationMessages={{ REQUIRED: t('preparerLastNameError') }}\n />\n <PreparerFields.Street1\n label={t('preparerStreet1Label')}\n validationMessages={{ REQUIRED: t('preparerStreet1Error') }}\n />\n <PreparerFields.Street2 label={t('preparerStreet2Label')} />\n <PreparerFields.City\n label={t('preparerCityLabel')}\n validationMessages={{ REQUIRED: t('preparerCityError') }}\n />\n <PreparerFields.State\n label={t('preparerStateLabel')}\n placeholder={t('preparerStatePlaceholder')}\n validationMessages={{ REQUIRED: t('preparerStateError') }}\n getOptionLabel={(abbr: string) => tCommon(`statesHash.${abbr}`, { defaultValue: abbr })}\n />\n <PreparerFields.Zip\n label={t('preparerZipLabel')}\n validationMessages={{ REQUIRED: t('preparerZipError') }}\n />\n <PreparerFields.Signature\n label={t('preparerSignatureLabel')}\n description={t('preparerSignatureDescription')}\n validationMessages={{ REQUIRED: t('preparerSignatureError') }}\n />\n <PreparerFields.ConfirmSignature\n label={t('preparerConfirmationLabel')}\n validationMessages={{ REQUIRED: t('preparerConfirmationError') }}\n />\n\n {(showAddButton || showRemoveButton) && (\n <div className={styles.preparerActions}>\n {showAddButton && (\n <Components.Button type=\"button\" variant=\"secondary\" onClick={onAdd}>\n {t('addPreparerCta')}\n </Components.Button>\n )}\n {showRemoveButton && (\n <Components.Button type=\"button\" variant=\"error\" onClick={onRemove}>\n {t('removePreparerCta')}\n </Components.Button>\n )}\n </div>\n )}\n </Flex>\n )\n}\n"],"names":["I9SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","useI18n","useTranslation","onEvent","useBase","Components","useComponentContext","hookResult","useSignEmployeeForm","i9AuthData","useI9VerificationGetAuthorization","authorizationStatus","BaseLayout","form","pdfUrl","isPending","Fields","preparers","handleBack","componentEvents","handleChangeEligibility","handleSubmit","result","preparerFieldGroups","Group","SDKFormProvider","Form","jsxs","Flex","Trans","EligibilityStatusAlert","DocumentViewer","PreparerFields","index","isLast","styles","PreparerSection","ActionsLayout","onChangeStatus","t","alertLabelKeys","alertDescriptionKeys","showRemoveButton","showAddButton","onAdd","onRemove","tCommon","abbr"],"mappings":";;;;;;;;;;;;;;;AA+CO,SAASA,GAA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,EAAQ,cAAcC,CAAI,IAAI,EAAE,cAAcA,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,IAExF,gBAAApD;AAAA,MAACqC,EAAe;AAAA,MAAf;AAAA,QACC,OAAOO,EAAE,kBAAkB;AAAA,QAC3B,oBAAoB,EAAE,UAAUA,EAAE,kBAAkB,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,IAExD,gBAAA5C;AAAA,MAACqC,EAAe;AAAA,MAAf;AAAA,QACC,OAAOO,EAAE,wBAAwB;AAAA,QACjC,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,oBAAoB,EAAE,UAAUA,EAAE,wBAAwB,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,IAE9D,gBAAA5C;AAAA,MAACqC,EAAe;AAAA,MAAf;AAAA,QACC,OAAOO,EAAE,2BAA2B;AAAA,QACpC,oBAAoB,EAAE,UAAUA,EAAE,2BAA2B,EAAA;AAAA,MAAE;AAAA,IAAA;AAAA,KAG/DI,KAAiBD,MACjB,gBAAAf,EAAC,OAAA,EAAI,WAAWQ,EAAO,iBACpB,UAAA;AAAA,MAAAQ,KACC,gBAAAhD,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,aAAY,SAASuC,GAC3D,UAAAL,EAAE,gBAAgB,EAAA,CACrB;AAAA,MAEDG,KACC,gBAAA/C,EAACU,EAAW,QAAX,EAAkB,MAAK,UAAS,SAAQ,SAAQ,SAASwC,GACvD,UAAAN,EAAE,mBAAmB,EAAA,CACxB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -4,14 +4,13 @@ import { useForm as I, FormProvider as L } from "react-hook-form";
4
4
  import { zodResolver as v } from "@hookform/resolvers/zod";
5
5
  import { z as u } from "zod";
6
6
  import { Flex as o, FlexItem as t } from "../../../../Common/Flex/Flex.js";
7
- import { useComponentContext as E } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- import { Form as w } from "../../../../Common/Form/Form.js";
7
+ import { Form as E } from "../../../../Common/Form/Form.js";
8
+ import { useComponentContext as w } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
10
9
  import { useI18n as C } from "../../../../../i18n/I18n.js";
11
10
  import { CheckboxField as F } from "../../../../Common/Fields/CheckboxField/CheckboxField.js";
12
11
  const g = "gusto-sdk-employee-documents-form", T = u.object({
13
12
  includeI9: u.boolean()
14
- }), A = ({
13
+ }), V = ({
15
14
  isEmployeeSelfOnboarding: a,
16
15
  currentI9Status: h,
17
16
  onSubmit: f,
@@ -19,14 +18,14 @@ const g = "gusto-sdk-employee-documents-form", T = u.object({
19
18
  isPending: O
20
19
  }) => {
21
20
  C("Employee.EmployeeDocuments");
22
- const { t: e } = y("Employee.EmployeeDocuments"), { Alert: d, Heading: l, Text: i, Button: s, Link: m, UnorderedList: D } = E(), c = I({
21
+ const { t: e } = y("Employee.EmployeeDocuments"), { Alert: d, Heading: l, Text: i, Button: s, Link: m, UnorderedList: D } = w(), c = I({
23
22
  resolver: v(T),
24
23
  defaultValues: {
25
24
  includeI9: h
26
25
  }
27
26
  }), x = c.watch("includeI9");
28
27
  return /* @__PURE__ */ n(S, { children: /* @__PURE__ */ r(o, { flexDirection: "column", gap: 16, children: [
29
- a ? /* @__PURE__ */ n(L, { ...c, children: /* @__PURE__ */ n(w, { id: g, onSubmit: c.handleSubmit(f), children: /* @__PURE__ */ r(o, { flexDirection: "column", gap: 16, children: [
28
+ a ? /* @__PURE__ */ n(L, { ...c, children: /* @__PURE__ */ n(E, { id: g, onSubmit: c.handleSubmit(f), children: /* @__PURE__ */ r(o, { flexDirection: "column", gap: 16, children: [
30
29
  /* @__PURE__ */ r(o, { flexDirection: "column", gap: 4, children: [
31
30
  /* @__PURE__ */ n(l, { as: "h2", children: e("selfOnboarding.title") }),
32
31
  /* @__PURE__ */ n(i, { variant: "supporting", children: e("selfOnboarding.description") })
@@ -111,6 +110,6 @@ const g = "gusto-sdk-employee-documents-form", T = u.object({
111
110
  ] }) });
112
111
  };
113
112
  export {
114
- A as EmployeeDocumentsPresentation
113
+ V as EmployeeDocumentsPresentation
115
114
  };
116
115
  //# sourceMappingURL=EmployeeDocumentsPresentation.js.map