@gusto/embedded-react-sdk 0.30.0 → 0.31.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 (318) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +2 -1
  3. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +48 -36
  4. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
  5. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
  6. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  7. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
  9. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  10. package/dist/components/Common/UI/ComboBox/ComboBox.d.ts +1 -1
  11. package/dist/components/Common/UI/ComboBox/ComboBox.js +73 -66
  12. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  13. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +5 -0
  14. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  15. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  16. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -17
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -6
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  29. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  30. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +6 -5
  31. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  32. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  33. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  34. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -5
  35. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  36. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  37. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  38. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  39. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
  40. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  41. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  42. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  43. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  44. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  45. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  46. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  47. package/dist/components/Company/Industry/Context.js +7 -6
  48. package/dist/components/Company/Industry/Context.js.map +1 -1
  49. package/dist/components/Company/Industry/Industry.js +1 -1
  50. package/dist/components/Company/Industry/Industry.js.map +1 -1
  51. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  52. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  53. package/dist/components/Company/Locations/LocationForm/LocationForm.js +14 -14
  54. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  55. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  56. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  57. package/dist/components/Company/Locations/LocationsList/LocationsList.js +31 -31
  58. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  59. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  60. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  61. package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
  62. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  63. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
  64. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  65. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
  66. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  67. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  68. package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
  69. package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
  70. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  71. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
  72. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  73. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  74. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  75. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  76. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  77. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  78. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  79. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  80. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  81. package/dist/components/Contractor/Address/Address.js +2 -2
  82. package/dist/components/Contractor/Address/Form.js +7 -8
  83. package/dist/components/Contractor/Address/Form.js.map +1 -1
  84. package/dist/components/Contractor/Address/useAddress.js +6 -5
  85. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  86. package/dist/components/Contractor/ContractorList/index.js +17 -17
  87. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  88. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  89. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -99
  90. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  91. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +3 -1
  92. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +35 -31
  93. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  94. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +22 -23
  95. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  96. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +8 -7
  97. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  98. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +51 -48
  99. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  100. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +58 -66
  101. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  102. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +7 -6
  103. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  104. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
  105. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  106. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
  107. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  108. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  109. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  110. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  111. package/dist/components/Contractor/Submit/Submit.js +1 -1
  112. package/dist/components/Contractor/index.d.ts +5 -0
  113. package/dist/components/Contractor/index.js +21 -11
  114. package/dist/components/Contractor/index.js.map +1 -1
  115. package/dist/components/Employee/Compensation/Edit.js +14 -14
  116. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +11 -10
  117. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  118. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +12 -11
  119. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  120. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +12 -11
  121. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  122. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  123. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
  124. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  125. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -7
  126. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  127. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +24 -24
  128. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  129. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  130. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  131. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.d.ts +0 -1
  132. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  133. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  134. package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +2 -1
  135. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +42 -21
  136. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  137. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +5 -0
  138. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +65 -0
  139. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
  140. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +10 -0
  141. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +120 -0
  142. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
  143. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +43 -0
  144. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +51 -0
  145. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
  146. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
  147. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.d.ts +4 -0
  148. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js +199 -0
  149. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
  150. package/dist/components/Employee/{EmploymentEligibility → DocumentSigner/EmploymentEligibility}/index.d.ts +0 -1
  151. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +107 -0
  152. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +284 -0
  153. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
  154. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.module.scss.js +10 -0
  155. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.module.scss.js.map +1 -0
  156. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  157. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  158. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  159. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.d.ts +6 -0
  160. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js +33 -14
  161. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  162. package/dist/components/Employee/DocumentSigner/stateMachine.d.ts +1 -0
  163. package/dist/components/Employee/DocumentSigner/stateMachine.js +41 -23
  164. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
  165. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.d.ts +10 -0
  166. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js +55 -0
  167. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
  168. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +18 -0
  169. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +116 -0
  170. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
  171. package/dist/components/Employee/EmployeeDocuments/index.d.ts +2 -0
  172. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  173. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  174. package/dist/components/Employee/EmployeeList/Head.js +3 -2
  175. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  176. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  177. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  178. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  179. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  180. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  181. package/dist/components/Employee/Landing/Landing.js +31 -26
  182. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  183. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +2 -1
  184. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +23 -21
  185. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  186. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  187. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  188. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
  189. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +68 -49
  190. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  191. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  192. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  193. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  194. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  195. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  196. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  197. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  198. package/dist/components/Employee/Profile/HomeAddress.js +9 -10
  199. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  200. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -11
  201. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  202. package/dist/components/Employee/Profile/Profile.js +11 -11
  203. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  204. package/dist/components/Employee/Profile/useProfile.js +4 -3
  205. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  206. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +3 -0
  207. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +43 -30
  208. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  209. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +1 -1
  210. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +23 -17
  211. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  212. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +36 -46
  213. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
  214. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  215. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  216. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  217. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  218. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  219. package/dist/components/Employee/index.d.ts +3 -0
  220. package/dist/components/Employee/index.js +20 -16
  221. package/dist/components/Employee/index.js.map +1 -1
  222. package/dist/components/Flow/Flow.js +3 -2
  223. package/dist/components/Flow/Flow.js.map +1 -1
  224. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +63 -52
  225. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  226. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
  227. package/dist/components/InformationRequests/InformationRequests.js +1 -1
  228. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  229. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +2 -0
  230. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +29 -0
  231. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -0
  232. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +13 -0
  233. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +45 -0
  234. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -0
  235. package/dist/components/Payroll/OffCycle/index.d.ts +3 -0
  236. package/dist/components/Payroll/OffCycle/offCycleStateMachine.d.ts +6 -0
  237. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +58 -0
  238. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -0
  239. package/dist/components/Payroll/OffCycle/offCycleStateMachine.test.d.ts +1 -0
  240. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +2 -0
  241. package/dist/components/Payroll/{PayPeriodDateForm/PayPeriodDateFormTypes.d.ts → OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts} +5 -19
  242. package/dist/components/Payroll/OffCyclePayPeriodDateForm/index.d.ts +2 -0
  243. package/dist/components/Payroll/{PayPeriodDateForm/usePayPeriodDateValidation.d.ts → OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts} +1 -1
  244. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +2 -1
  245. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  246. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
  247. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  248. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  249. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +51 -49
  250. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  251. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -1
  252. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +93 -90
  253. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  254. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -0
  255. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +26 -25
  256. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  257. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +38 -39
  258. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  259. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +18 -17
  260. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  261. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  262. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  263. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +3 -2
  264. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  265. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +23 -21
  266. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  267. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
  268. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  269. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  270. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  271. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
  272. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
  273. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
  274. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  275. package/dist/components/Payroll/helpers.d.ts +5 -0
  276. package/dist/components/Payroll/helpers.js +41 -40
  277. package/dist/components/Payroll/helpers.js.map +1 -1
  278. package/dist/components/Payroll/index.d.ts +3 -2
  279. package/dist/components/Payroll/index.js +16 -16
  280. package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
  281. package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
  282. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  283. package/dist/contexts/ApiProvider/ApiProvider.js +6 -6
  284. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  285. package/dist/i18n/I18n.js +5 -5
  286. package/dist/i18n/I18n.js.map +1 -1
  287. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +1 -1
  288. package/dist/i18n/en/Employee.EmployeeDocuments.json.js +12 -0
  289. package/dist/i18n/en/Employee.EmployeeDocuments.json.js.map +1 -0
  290. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +15 -19
  291. package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -1
  292. package/dist/i18n/en/Employee.I9SignatureForm.json.js +78 -0
  293. package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -0
  294. package/dist/i18n/en/Payroll.OffCycle.json.js +8 -0
  295. package/dist/i18n/en/Payroll.OffCycle.json.js.map +1 -0
  296. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +18 -0
  297. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js.map +1 -0
  298. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
  299. package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
  300. package/dist/shared/constants.d.ts +9 -0
  301. package/dist/shared/constants.js +60 -53
  302. package/dist/shared/constants.js.map +1 -1
  303. package/dist/style.css +1 -1
  304. package/dist/types/i18next.d.ts +110 -41
  305. package/package.json +14 -14
  306. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +0 -3
  307. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -37
  308. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +0 -2
  309. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +0 -35
  310. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +0 -1
  311. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +0 -2
  312. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +0 -65
  313. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +0 -1
  314. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +0 -18
  315. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +0 -1
  316. package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +0 -3
  317. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +0 -32
  318. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +0 -1
@@ -0,0 +1,107 @@
1
+ import { z } from 'zod';
2
+ import { BaseComponentInterface, CommonComponentInterface } from '../../../Base/Base';
3
+ declare const preparerSchema: z.ZodObject<{
4
+ firstName: z.ZodString;
5
+ lastName: z.ZodString;
6
+ street1: z.ZodString;
7
+ street2: z.ZodOptional<z.ZodString>;
8
+ city: z.ZodString;
9
+ state: z.ZodString;
10
+ zip: z.ZodString;
11
+ signature: z.ZodString;
12
+ agree: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ firstName: string;
15
+ lastName: string;
16
+ street1: string;
17
+ city: string;
18
+ state: string;
19
+ zip: string;
20
+ signature: string;
21
+ agree: boolean;
22
+ street2?: string | undefined;
23
+ }, {
24
+ firstName: string;
25
+ lastName: string;
26
+ street1: string;
27
+ city: string;
28
+ state: string;
29
+ zip: string;
30
+ signature: string;
31
+ agree: boolean;
32
+ street2?: string | undefined;
33
+ }>;
34
+ export type PreparerInputs = z.infer<typeof preparerSchema>;
35
+ declare const i9SignatureFormSchema: z.ZodObject<{
36
+ signature: z.ZodString;
37
+ agree: z.ZodLiteral<true>;
38
+ usedPreparer: z.ZodEnum<["yes", "no"]>;
39
+ preparers: z.ZodArray<z.ZodObject<{
40
+ firstName: z.ZodString;
41
+ lastName: z.ZodString;
42
+ street1: z.ZodString;
43
+ street2: z.ZodOptional<z.ZodString>;
44
+ city: z.ZodString;
45
+ state: z.ZodString;
46
+ zip: z.ZodString;
47
+ signature: z.ZodString;
48
+ agree: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ firstName: string;
51
+ lastName: string;
52
+ street1: string;
53
+ city: string;
54
+ state: string;
55
+ zip: string;
56
+ signature: string;
57
+ agree: boolean;
58
+ street2?: string | undefined;
59
+ }, {
60
+ firstName: string;
61
+ lastName: string;
62
+ street1: string;
63
+ city: string;
64
+ state: string;
65
+ zip: string;
66
+ signature: string;
67
+ agree: boolean;
68
+ street2?: string | undefined;
69
+ }>, "many">;
70
+ }, "strip", z.ZodTypeAny, {
71
+ signature: string;
72
+ agree: true;
73
+ usedPreparer: "yes" | "no";
74
+ preparers: {
75
+ firstName: string;
76
+ lastName: string;
77
+ street1: string;
78
+ city: string;
79
+ state: string;
80
+ zip: string;
81
+ signature: string;
82
+ agree: boolean;
83
+ street2?: string | undefined;
84
+ }[];
85
+ }, {
86
+ signature: string;
87
+ agree: true;
88
+ usedPreparer: "yes" | "no";
89
+ preparers: {
90
+ firstName: string;
91
+ lastName: string;
92
+ street1: string;
93
+ city: string;
94
+ state: string;
95
+ zip: string;
96
+ signature: string;
97
+ agree: boolean;
98
+ street2?: string | undefined;
99
+ }[];
100
+ }>;
101
+ export type I9SignatureFormInputs = z.infer<typeof i9SignatureFormSchema>;
102
+ interface I9SignatureFormProps extends CommonComponentInterface {
103
+ employeeId: string;
104
+ formId: string;
105
+ }
106
+ export declare function I9SignatureForm(props: I9SignatureFormProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
107
+ export {};
@@ -0,0 +1,284 @@
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
+ import { z as l } from "zod";
3
+ import { useForm as q, FormProvider as I, useFormContext as w, useFieldArray as D } from "react-hook-form";
4
+ import { zodResolver as B } from "@hookform/resolvers/zod";
5
+ import { useTranslation as y, Trans as x } from "react-i18next";
6
+ import { useEmployeeFormsGetPdfSuspense as k } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
7
+ import { useEmployeeFormsSignMutation as T } from "@gusto/embedded-api/react-query/employeeFormsSign";
8
+ import { useEmployeeFormsGetSuspense as z } from "@gusto/embedded-api/react-query/employeeFormsGet";
9
+ import L from "./I9SignatureForm.module.scss.js";
10
+ import { BaseComponent as _ } from "../../../Base/Base.js";
11
+ import { useBase as j } from "../../../Base/useBase.js";
12
+ import { useI18n as G } from "../../../../i18n/I18n.js";
13
+ import { componentEvents as C, STATES_ABBR as H } from "../../../../shared/constants.js";
14
+ import { Flex as b } from "../../../Common/Flex/Flex.js";
15
+ import "classnames";
16
+ import { RadioGroupField as O } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
17
+ import { TextInputField as p } from "../../../Common/Fields/TextInputField/TextInputField.js";
18
+ import { ActionsLayout as V } from "../../../Common/ActionsLayout/ActionsLayout.js";
19
+ import { useComponentContext as E } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
20
+ import "react";
21
+ import { Form as Z } from "../../../Common/Form/Form.js";
22
+ import { CheckboxField as R } from "../../../Common/Fields/CheckboxField/CheckboxField.js";
23
+ import { SelectField as U } from "../../../Common/Fields/SelectField/SelectField.js";
24
+ import { DocumentViewer as Y } from "../../../Common/DocumentViewer/DocumentViewer.js";
25
+ const K = 4, Q = l.object({
26
+ firstName: l.string().min(1),
27
+ lastName: l.string().min(1),
28
+ street1: l.string().min(1),
29
+ street2: l.string().optional(),
30
+ city: l.string().min(1),
31
+ state: l.string().min(1),
32
+ zip: l.string().min(1),
33
+ signature: l.string().min(1),
34
+ agree: l.boolean().refine((n) => n)
35
+ }), X = l.object({
36
+ signature: l.string().min(1),
37
+ agree: l.literal(!0),
38
+ usedPreparer: l.enum(["yes", "no"]),
39
+ preparers: l.array(Q)
40
+ });
41
+ function $e(n) {
42
+ return /* @__PURE__ */ e(_, { ...n, children: /* @__PURE__ */ e(J, { ...n }) });
43
+ }
44
+ function J({ employeeId: n, formId: i, className: s }) {
45
+ G("Employee.I9SignatureForm");
46
+ const { t } = y("Employee.I9SignatureForm"), { onEvent: o, baseSubmitHandler: r } = j(), m = E(), { data: g } = z({ employeeId: n, formId: i }), a = g.form, {
47
+ data: { formPdf: d }
48
+ } = k({ employeeId: n, formId: a.uuid }), h = d?.documentUrl, { mutateAsync: f, isPending: c } = T(), F = q({
49
+ resolver: B(X),
50
+ defaultValues: {
51
+ signature: "",
52
+ usedPreparer: "no",
53
+ preparers: []
54
+ }
55
+ }), $ = () => {
56
+ o(C.CANCEL);
57
+ }, N = async (v) => {
58
+ await r(v, async (S) => {
59
+ const A = re(S), { form: M } = await f({
60
+ request: {
61
+ employeeId: n,
62
+ formId: a.uuid,
63
+ requestBody: {
64
+ signatureText: S.signature,
65
+ agree: S.agree,
66
+ ...A
67
+ }
68
+ }
69
+ });
70
+ o(C.EMPLOYEE_SIGN_FORM, M);
71
+ });
72
+ };
73
+ return /* @__PURE__ */ e("section", { className: s, children: /* @__PURE__ */ e(I, { ...F, children: /* @__PURE__ */ e(Z, { onSubmit: F.handleSubmit(N), children: /* @__PURE__ */ u(b, { flexDirection: "column", gap: 20, children: [
74
+ /* @__PURE__ */ u("section", { children: [
75
+ /* @__PURE__ */ e(m.Heading, { as: "h2", children: t("title") }),
76
+ /* @__PURE__ */ e(m.Text, { children: /* @__PURE__ */ e(
77
+ x,
78
+ {
79
+ i18nKey: "description",
80
+ t,
81
+ components: {
82
+ viewFormLink: h ? /* @__PURE__ */ e(
83
+ m.Link,
84
+ {
85
+ href: h,
86
+ target: "_blank",
87
+ rel: "noopener noreferrer",
88
+ download: `${a.title || "form"}.pdf`
89
+ }
90
+ ) : /* @__PURE__ */ e("span", {})
91
+ }
92
+ }
93
+ ) })
94
+ ] }),
95
+ /* @__PURE__ */ e(
96
+ Y,
97
+ {
98
+ url: h,
99
+ title: a.title,
100
+ downloadInstructions: t("downloadInstructions"),
101
+ viewDocumentLabel: t("viewDocumentCta")
102
+ }
103
+ ),
104
+ /* @__PURE__ */ u(b, { flexDirection: "column", gap: 12, children: [
105
+ /* @__PURE__ */ e(
106
+ p,
107
+ {
108
+ name: "signature",
109
+ label: t("signatureLabel"),
110
+ description: t("signatureDescription"),
111
+ errorMessage: t("signatureError"),
112
+ isRequired: !0
113
+ }
114
+ ),
115
+ /* @__PURE__ */ e(
116
+ R,
117
+ {
118
+ name: "agree",
119
+ isRequired: !0,
120
+ label: t("confirmationLabel"),
121
+ errorMessage: t("confirmationError")
122
+ }
123
+ )
124
+ ] }),
125
+ /* @__PURE__ */ e(W, {}),
126
+ /* @__PURE__ */ u(V, { children: [
127
+ /* @__PURE__ */ e(m.Button, { variant: "secondary", type: "button", onClick: $, children: t("cancelCta") }),
128
+ /* @__PURE__ */ e(m.Button, { type: "submit", isLoading: c, children: t("signCta") })
129
+ ] })
130
+ ] }) }) }) });
131
+ }
132
+ const P = {
133
+ firstName: "",
134
+ lastName: "",
135
+ street1: "",
136
+ street2: "",
137
+ city: "",
138
+ state: "",
139
+ zip: "",
140
+ signature: "",
141
+ agree: !1
142
+ };
143
+ function W() {
144
+ const { t: n } = y("Employee.I9SignatureForm"), i = E(), { watch: s, control: t } = w(), { fields: o, append: r, remove: m } = D({ control: t, name: "preparers" }), g = s("usedPreparer"), a = o.length < K, d = (f) => {
145
+ f === "yes" && o.length === 0 && r(P), f === "no" && o.length > 0 && m();
146
+ }, h = () => {
147
+ a && r(P);
148
+ };
149
+ return /* @__PURE__ */ u(b, { flexDirection: "column", gap: 20, children: [
150
+ /* @__PURE__ */ e(
151
+ O,
152
+ {
153
+ name: "usedPreparer",
154
+ label: n("preparerQuestion"),
155
+ isRequired: !0,
156
+ options: [
157
+ { label: n("preparerNo"), value: "no" },
158
+ { label: n("preparerYes"), value: "yes" }
159
+ ],
160
+ onChange: d
161
+ }
162
+ ),
163
+ g === "yes" && o.map((f, c) => /* @__PURE__ */ u(b, { flexDirection: "column", gap: 0, children: [
164
+ /* @__PURE__ */ e("div", { className: L.preparerAlert, children: /* @__PURE__ */ e(i.Alert, { label: n("preparerNote"), status: "info", disableScrollIntoView: !0 }) }),
165
+ /* @__PURE__ */ e(
166
+ ee,
167
+ {
168
+ index: c,
169
+ onRemove: () => {
170
+ m(c);
171
+ },
172
+ showRemoveButton: c !== 0 && c === o.length - 1,
173
+ showAddButton: a && c === o.length - 1,
174
+ onAdd: h
175
+ }
176
+ )
177
+ ] }, f.id))
178
+ ] });
179
+ }
180
+ function ee({
181
+ index: n,
182
+ onRemove: i,
183
+ showRemoveButton: s,
184
+ showAddButton: t,
185
+ onAdd: o
186
+ }) {
187
+ const { t: r } = y("Employee.I9SignatureForm"), m = E(), g = H.map((d) => ({ label: d, value: d })), a = `preparers.${n}`;
188
+ return /* @__PURE__ */ u(b, { flexDirection: "column", gap: 12, children: [
189
+ /* @__PURE__ */ e(m.Heading, { as: "h3", children: r("preparerSectionTitle") }),
190
+ /* @__PURE__ */ e(
191
+ p,
192
+ {
193
+ name: `${a}.firstName`,
194
+ label: r("preparerFirstNameLabel"),
195
+ errorMessage: r("preparerFirstNameError"),
196
+ isRequired: !0
197
+ }
198
+ ),
199
+ /* @__PURE__ */ e(
200
+ p,
201
+ {
202
+ name: `${a}.lastName`,
203
+ label: r("preparerLastNameLabel"),
204
+ errorMessage: r("preparerLastNameError"),
205
+ isRequired: !0
206
+ }
207
+ ),
208
+ /* @__PURE__ */ e(
209
+ p,
210
+ {
211
+ name: `${a}.street1`,
212
+ label: r("preparerStreet1Label"),
213
+ errorMessage: r("preparerStreet1Error"),
214
+ isRequired: !0
215
+ }
216
+ ),
217
+ /* @__PURE__ */ e(p, { name: `${a}.street2`, label: r("preparerStreet2Label") }),
218
+ /* @__PURE__ */ e(
219
+ p,
220
+ {
221
+ name: `${a}.city`,
222
+ label: r("preparerCityLabel"),
223
+ errorMessage: r("preparerCityError"),
224
+ isRequired: !0
225
+ }
226
+ ),
227
+ /* @__PURE__ */ e(
228
+ U,
229
+ {
230
+ name: `${a}.state`,
231
+ label: r("preparerStateLabel"),
232
+ errorMessage: r("preparerStateError"),
233
+ isRequired: !0,
234
+ options: g,
235
+ placeholder: "Select a state..."
236
+ }
237
+ ),
238
+ /* @__PURE__ */ e(
239
+ p,
240
+ {
241
+ name: `${a}.zip`,
242
+ label: r("preparerZipLabel"),
243
+ errorMessage: r("preparerZipError"),
244
+ isRequired: !0
245
+ }
246
+ ),
247
+ /* @__PURE__ */ e(
248
+ p,
249
+ {
250
+ name: `${a}.signature`,
251
+ label: r("preparerSignatureLabel"),
252
+ description: r("preparerSignatureDescription"),
253
+ errorMessage: r("preparerSignatureError"),
254
+ isRequired: !0
255
+ }
256
+ ),
257
+ /* @__PURE__ */ e(
258
+ R,
259
+ {
260
+ name: `${a}.agree`,
261
+ isRequired: !0,
262
+ label: r("preparerConfirmationLabel"),
263
+ errorMessage: r("preparerConfirmationError")
264
+ }
265
+ ),
266
+ (t || s) && /* @__PURE__ */ u("div", { className: L.preparerActions, children: [
267
+ t && /* @__PURE__ */ e(m.Button, { type: "button", variant: "secondary", onClick: o, children: r("addPreparerCta") }),
268
+ s && /* @__PURE__ */ e(m.Button, { type: "button", variant: "error", onClick: i, children: r("removePreparerCta") })
269
+ ] })
270
+ ] });
271
+ }
272
+ function re(n) {
273
+ if (n.usedPreparer !== "yes" || n.preparers.length === 0)
274
+ return { preparer: !1 };
275
+ const i = { preparer: !0 };
276
+ return n.preparers.forEach((s, t) => {
277
+ const o = t === 0 ? "preparer" : `preparer${t + 1}`;
278
+ t > 0 && (i[`preparer${t + 1}`] = !0), i[`${o}FirstName`] = s.firstName, i[`${o}LastName`] = s.lastName, i[`${o}Street1`] = s.street1, s.street2 && (i[`${o}Street2`] = s.street2), i[`${o}City`] = s.city, i[`${o}State`] = s.state, i[`${o}Zip`] = s.zip, i[`${o}Agree`] = "true";
279
+ }), i;
280
+ }
281
+ export {
282
+ $e as I9SignatureForm
283
+ };
284
+ //# sourceMappingURL=I9SignatureForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I9SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useFieldArray, useForm, useFormContext } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTranslation, Trans } from 'react-i18next'\nimport { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport styles from './I9SignatureForm.module.scss'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, STATES_ABBR } from '@/shared/constants'\nimport {\n ActionsLayout,\n CheckboxField,\n Flex,\n RadioGroupField,\n SelectField,\n TextInputField,\n} from '@/components/Common'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst MAX_PREPARERS = 4\n\nconst preparerSchema = z.object({\n firstName: z.string().min(1),\n lastName: z.string().min(1),\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n signature: z.string().min(1),\n agree: z.boolean().refine(val => val),\n})\n\nexport type PreparerInputs = z.infer<typeof preparerSchema>\n\nconst i9SignatureFormSchema = z.object({\n signature: z.string().min(1),\n agree: z.literal(true),\n usedPreparer: z.enum(['yes', 'no']),\n preparers: z.array(preparerSchema),\n})\n\nexport type I9SignatureFormInputs = z.infer<typeof i9SignatureFormSchema>\n\ninterface I9SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function I9SignatureForm(props: I9SignatureFormProps & BaseComponentInterface) {\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, baseSubmitHandler } = useBase()\n const Components = useComponentContext()\n\n const { data: formData } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = formData.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf?.documentUrl\n\n const { mutateAsync: signForm, isPending } = useEmployeeFormsSignMutation()\n\n const methods = useForm<I9SignatureFormInputs>({\n resolver: zodResolver(i9SignatureFormSchema),\n defaultValues: {\n signature: '',\n usedPreparer: 'no',\n preparers: [],\n },\n })\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: I9SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const preparerPayload = buildPreparerPayload(payload)\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.agree,\n ...preparerPayload,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(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 <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 <TextInputField\n name=\"signature\"\n label={t('signatureLabel')}\n description={t('signatureDescription')}\n errorMessage={t('signatureError')}\n isRequired\n />\n <CheckboxField\n name=\"agree\"\n isRequired\n label={t('confirmationLabel')}\n errorMessage={t('confirmationError')}\n />\n </Flex>\n\n <PreparerSection />\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 </FormProvider>\n </section>\n )\n}\n\nconst emptyPreparer = {\n firstName: '',\n lastName: '',\n street1: '',\n street2: '',\n city: '',\n state: '',\n zip: '',\n signature: '',\n agree: false,\n}\n\nfunction PreparerSection() {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const Components = useComponentContext()\n const { watch, control } = useFormContext<I9SignatureFormInputs>()\n const { fields, append, remove } = useFieldArray({ control, name: 'preparers' })\n\n const usedPreparer = watch('usedPreparer')\n const canAddPreparer = fields.length < MAX_PREPARERS\n\n const handlePreparerChange = (value: string) => {\n if (value === 'yes' && fields.length === 0) {\n append(emptyPreparer)\n }\n if (value === 'no' && fields.length > 0) {\n remove()\n }\n }\n\n const handleAddPreparer = () => {\n if (canAddPreparer) {\n append(emptyPreparer)\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <RadioGroupField\n name=\"usedPreparer\"\n label={t('preparerQuestion')}\n isRequired\n options={[\n { label: t('preparerNo'), value: 'no' },\n { label: t('preparerYes'), value: 'yes' },\n ]}\n onChange={handlePreparerChange}\n />\n\n {usedPreparer === 'yes' &&\n fields.map((field, index) => (\n <Flex flexDirection=\"column\" gap={0} key={field.id}>\n <div className={styles.preparerAlert}>\n <Components.Alert label={t('preparerNote')} status=\"info\" disableScrollIntoView />\n </div>\n <PreparerFields\n index={index}\n onRemove={() => {\n remove(index)\n }}\n showRemoveButton={index !== 0 && index === fields.length - 1}\n showAddButton={canAddPreparer && index === fields.length - 1}\n onAdd={handleAddPreparer}\n />\n </Flex>\n ))}\n </Flex>\n )\n}\n\ninterface PreparerFieldsProps {\n index: number\n onRemove: () => void\n showRemoveButton: boolean\n showAddButton: boolean\n onAdd: () => void\n}\n\nfunction PreparerFields({\n index,\n onRemove,\n showRemoveButton,\n showAddButton,\n onAdd,\n}: PreparerFieldsProps) {\n const { t } = useTranslation('Employee.I9SignatureForm')\n const Components = useComponentContext()\n\n const stateOptions = STATES_ABBR.map(abbr => ({ label: abbr, value: abbr }))\n const fieldId = `preparers.${index}`\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <Components.Heading as=\"h3\">{t('preparerSectionTitle')}</Components.Heading>\n\n <TextInputField\n name={`${fieldId}.firstName`}\n label={t('preparerFirstNameLabel')}\n errorMessage={t('preparerFirstNameError')}\n isRequired\n />\n <TextInputField\n name={`${fieldId}.lastName`}\n label={t('preparerLastNameLabel')}\n errorMessage={t('preparerLastNameError')}\n isRequired\n />\n <TextInputField\n name={`${fieldId}.street1`}\n label={t('preparerStreet1Label')}\n errorMessage={t('preparerStreet1Error')}\n isRequired\n />\n <TextInputField name={`${fieldId}.street2`} label={t('preparerStreet2Label')} />\n <TextInputField\n name={`${fieldId}.city`}\n label={t('preparerCityLabel')}\n errorMessage={t('preparerCityError')}\n isRequired\n />\n <SelectField\n name={`${fieldId}.state`}\n label={t('preparerStateLabel')}\n errorMessage={t('preparerStateError')}\n isRequired\n options={stateOptions}\n placeholder=\"Select a state...\"\n />\n <TextInputField\n name={`${fieldId}.zip`}\n label={t('preparerZipLabel')}\n errorMessage={t('preparerZipError')}\n isRequired\n />\n <TextInputField\n name={`${fieldId}.signature`}\n label={t('preparerSignatureLabel')}\n description={t('preparerSignatureDescription')}\n errorMessage={t('preparerSignatureError')}\n isRequired\n />\n <CheckboxField\n name={`${fieldId}.agree`}\n isRequired\n label={t('preparerConfirmationLabel')}\n errorMessage={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\nfunction buildPreparerPayload(payload: I9SignatureFormInputs) {\n if (payload.usedPreparer !== 'yes' || payload.preparers.length === 0) {\n return { preparer: false }\n }\n\n const result: Record<string, unknown> = { preparer: true }\n\n payload.preparers.forEach((preparer, index) => {\n const prefix = index === 0 ? 'preparer' : `preparer${index + 1}`\n if (index > 0) {\n result[`preparer${index + 1}`] = true\n }\n result[`${prefix}FirstName`] = preparer.firstName\n result[`${prefix}LastName`] = preparer.lastName\n result[`${prefix}Street1`] = preparer.street1\n if (preparer.street2) result[`${prefix}Street2`] = preparer.street2\n result[`${prefix}City`] = preparer.city\n result[`${prefix}State`] = preparer.state\n result[`${prefix}Zip`] = preparer.zip\n result[`${prefix}Agree`] = 'true'\n })\n\n return result\n}\n"],"names":["MAX_PREPARERS","preparerSchema","z","val","i9SignatureFormSchema","I9SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","useI18n","useTranslation","onEvent","baseSubmitHandler","useBase","Components","useComponentContext","formData","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isPending","useEmployeeFormsSignMutation","methods","useForm","zodResolver","handleBack","componentEvents","handleSubmit","data","payload","preparerPayload","buildPreparerPayload","signFormResult","FormProvider","Form","jsxs","Flex","Trans","DocumentViewer","TextInputField","CheckboxField","PreparerSection","ActionsLayout","emptyPreparer","t","watch","control","useFormContext","fields","append","remove","useFieldArray","usedPreparer","canAddPreparer","handlePreparerChange","value","handleAddPreparer","RadioGroupField","field","index","styles","PreparerFields","onRemove","showRemoveButton","showAddButton","onAdd","stateOptions","STATES_ABBR","abbr","fieldId","SelectField","result","preparer","prefix"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAMA,IAAgB,GAEhBC,IAAiBC,EAAE,OAAO;AAAA,EAC9B,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,SAAS,IAAI,CAAC;AAAA,EACrB,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,OAAOA,EAAE,QAAA,EAAU,OAAO,OAAOC,CAAG;AACtC,CAAC,GAIKC,IAAwBF,EAAE,OAAO;AAAA,EACrC,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,OAAOA,EAAE,QAAQ,EAAI;AAAA,EACrB,cAAcA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC;AAAA,EAClC,WAAWA,EAAE,MAAMD,CAAc;AACnC,CAAC;AASM,SAASI,GAAgBC,GAAsD;AACpF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG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AIA,IAAQ,MACVY,EAAO,WAAWZ,IAAQ,CAAC,EAAE,IAAI,KAEnCY,EAAO,GAAGE,CAAM,WAAW,IAAID,EAAS,WACxCD,EAAO,GAAGE,CAAM,UAAU,IAAID,EAAS,UACvCD,EAAO,GAAGE,CAAM,SAAS,IAAID,EAAS,SAClCA,EAAS,YAASD,EAAO,GAAGE,CAAM,SAAS,IAAID,EAAS,UAC5DD,EAAO,GAAGE,CAAM,MAAM,IAAID,EAAS,MACnCD,EAAO,GAAGE,CAAM,OAAO,IAAID,EAAS,OACpCD,EAAO,GAAGE,CAAM,KAAK,IAAID,EAAS,KAClCD,EAAO,GAAGE,CAAM,OAAO,IAAI;AAAA,EAC7B,CAAC,GAEMF;AACT;"}
@@ -0,0 +1,10 @@
1
+ const r = "_preparerActions_82mcc_1", e = "_preparerAlert_82mcc_11", p = {
2
+ preparerActions: r,
3
+ preparerAlert: e
4
+ };
5
+ export {
6
+ p as default,
7
+ r as preparerActions,
8
+ e as preparerAlert
9
+ };
10
+ //# sourceMappingURL=I9SignatureForm.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I9SignatureForm.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -12,8 +12,8 @@ import { useBase as C } from "../../../Base/useBase.js";
12
12
  import { useI18n as G } from "../../../../i18n/I18n.js";
13
13
  import { componentEvents as i } from "../../../../shared/constants.js";
14
14
  import { Flex as M } from "../../../Common/Flex/Flex.js";
15
- import "react-i18next";
16
15
  import "classnames";
16
+ import "react-i18next";
17
17
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
18
18
  import "react";
19
19
  import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
@@ -9,12 +9,13 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = o("SignatureFormContext");
16
+ const [d, s] = o("SignatureFormContext");
16
17
  export {
17
- d as SignatureFormProvider,
18
- c as useSignatureForm
18
+ s as SignatureFormProvider,
19
+ d as useSignatureForm
19
20
  };
20
21
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -5,12 +5,18 @@ export type EventPayloads = {
5
5
  [componentEvents.EMPLOYEE_SIGN_FORM]: Form;
6
6
  [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: {
7
7
  uuid: string;
8
+ name?: string;
8
9
  };
10
+ [componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE]: unknown;
9
11
  [componentEvents.CANCEL]: undefined;
10
12
  };
11
13
  export interface DocumentSignerContextInterface extends FlowContextInterface {
12
14
  employeeId: string;
13
15
  formId?: string;
16
+ withEmployeeI9?: boolean;
17
+ isI9Form?: boolean;
14
18
  }
15
19
  export declare function DocumentListContextual(): import("react/jsx-runtime").JSX.Element;
16
20
  export declare function SignatureFormContextual(): import("react/jsx-runtime").JSX.Element;
21
+ export declare function EmploymentEligibilityContextual(): import("react/jsx-runtime").JSX.Element;
22
+ export declare function I9SignatureFormContextual(): import("react/jsx-runtime").JSX.Element;
@@ -1,25 +1,44 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { DocumentList as u } from "./DocumentList/DocumentList.js";
3
- import { SignatureForm as i } from "./SignatureForm/SignatureForm.js";
4
- import { useFlow as m } from "../../Flow/useFlow.js";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { DocumentList as i } from "./DocumentList/DocumentList.js";
3
+ import { SignatureForm as u } from "./SignatureForm/SignatureForm.js";
4
+ import { I9SignatureForm as l } from "./I9SignatureForm/I9SignatureForm.js";
5
+ import { useFlow as r } from "../../Flow/useFlow.js";
5
6
  import { ensureRequired as t } from "../../../helpers/ensureRequired.js";
6
- function c() {
7
- const { employeeId: o, onEvent: e } = m();
8
- return /* @__PURE__ */ r(u, { employeeId: t(o), onEvent: e });
7
+ import { EmploymentEligibility as p } from "./EmploymentEligibility/EmploymentEligibility.js";
8
+ function E() {
9
+ const { employeeId: o, onEvent: e } = r();
10
+ return /* @__PURE__ */ n(i, { employeeId: t(o), onEvent: e });
9
11
  }
10
- function I() {
11
- const { employeeId: o, formId: e, onEvent: n } = m();
12
- return /* @__PURE__ */ r(
13
- i,
12
+ function g() {
13
+ const { employeeId: o, formId: e, onEvent: m } = r();
14
+ return /* @__PURE__ */ n(
15
+ u,
14
16
  {
15
17
  employeeId: t(o),
16
18
  formId: t(e),
17
- onEvent: n
19
+ onEvent: m
20
+ }
21
+ );
22
+ }
23
+ function x() {
24
+ const { employeeId: o, onEvent: e } = r();
25
+ return /* @__PURE__ */ n(p, { employeeId: t(o), onEvent: e });
26
+ }
27
+ function F() {
28
+ const { employeeId: o, formId: e, onEvent: m } = r();
29
+ return /* @__PURE__ */ n(
30
+ l,
31
+ {
32
+ employeeId: t(o),
33
+ formId: t(e),
34
+ onEvent: m
18
35
  }
19
36
  );
20
37
  }
21
38
  export {
22
- c as DocumentListContextual,
23
- I as SignatureFormContextual
39
+ E as DocumentListContextual,
40
+ x as EmploymentEligibilityContextual,
41
+ F as I9SignatureFormContextual,
42
+ g as SignatureFormContextual
24
43
  };
25
44
  //# sourceMappingURL=documentSignerStateMachine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentSignerStateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/documentSignerStateMachine.tsx"],"sourcesContent":["import { type Form } from '@gusto/embedded-api/models/components/form'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_SIGN_FORM]: Form\n [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: { uuid: string }\n [componentEvents.CANCEL]: undefined\n}\n\nexport interface DocumentSignerContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n}\n\nexport function DocumentListContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <DocumentList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["DocumentListContextual","employeeId","onEvent","useFlow","DocumentList","ensureRequired","SignatureFormContextual","formId","jsx","SignatureForm"],"mappings":";;;;;AAkBO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQC,GAAA,EAAa,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AACjF;AAEO,SAASI,IAA0B;AACxC,QAAM,EAAE,YAAAL,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYJ,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"documentSignerStateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/documentSignerStateMachine.tsx"],"sourcesContent":["import { type Form } from '@gusto/embedded-api/models/components/form'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { EmploymentEligibility } from './EmploymentEligibility'\nimport { I9SignatureForm } from './I9SignatureForm/I9SignatureForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_SIGN_FORM]: Form\n [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: { uuid: string; name?: string }\n [componentEvents.EMPLOYEE_EMPLOYMENT_ELIGIBILITY_DONE]: unknown\n [componentEvents.CANCEL]: undefined\n}\n\nexport interface DocumentSignerContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n withEmployeeI9?: boolean\n isI9Form?: boolean\n}\n\nexport function DocumentListContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <DocumentList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n\nexport function EmploymentEligibilityContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <EmploymentEligibility employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function I9SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <I9SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["DocumentListContextual","employeeId","onEvent","useFlow","DocumentList","ensureRequired","SignatureFormContextual","formId","jsx","SignatureForm","EmploymentEligibilityContextual","EmploymentEligibility","I9SignatureFormContextual","I9SignatureForm"],"mappings":";;;;;;;AAuBO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQC,GAAA,EAAa,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AACjF;AAEO,SAASI,IAA0B;AACxC,QAAM,EAAE,YAAAL,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYJ,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASQ,IAAkC;AAChD,QAAM,EAAE,YAAAT,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQQ,GAAA,EAAsB,YAAYN,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AAC1F;AAEO,SAASU,IAA4B;AAC1C,QAAM,EAAE,YAAAX,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,YAAYR,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,4 +1,5 @@
1
1
  export declare const documentSignerMachine: {
2
+ employmentEligibility: import('robot3').MachineState<any>;
2
3
  index: import('robot3').MachineState<any>;
3
4
  signatureForm: import('robot3').MachineState<any>;
4
5
  done: import('robot3').MachineState<any>;