@gusto/embedded-react-sdk 0.55.7 → 0.55.8

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 (336) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/Common/FadeIn/FadeIn.module.scss.js +4 -4
  3. package/dist/components/Common/FieldCaption/FieldCaption.js +22 -18
  4. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
  5. package/dist/components/Common/Flex/Flex.js +17 -15
  6. package/dist/components/Common/Flex/Flex.js.map +1 -1
  7. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  8. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  9. package/dist/components/Common/UI/Heading/Heading.module.scss.js +7 -7
  10. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  14. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  16. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  17. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  18. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  19. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  20. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  21. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +27 -27
  22. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  23. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  24. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  25. package/dist/components/Company/Industry/Context.js +8 -7
  26. package/dist/components/Company/Industry/Context.js.map +1 -1
  27. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  28. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  29. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  30. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  31. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  32. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  33. package/dist/components/Company/PaySchedule/PaySchedule.js +45 -30
  34. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  35. package/dist/components/Company/PaySchedule/PayScheduleComponents.js +12 -11
  36. package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -1
  37. package/dist/components/Company/PaySchedule/PayScheduleForm.js +72 -55
  38. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  39. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +24 -20
  40. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
  41. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +33 -29
  42. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
  43. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +131 -115
  44. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  46. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  48. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  49. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +5 -4
  50. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  51. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +31 -29
  52. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -1
  53. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +110 -109
  54. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
  55. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js +21 -19
  56. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js.map +1 -1
  57. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js +56 -55
  58. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js.map +1 -1
  59. package/dist/components/Contractor/Dashboard/Dashboard.js +34 -33
  60. package/dist/components/Contractor/Dashboard/Dashboard.js.map +1 -1
  61. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +117 -115
  62. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
  63. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +77 -75
  64. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  65. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +44 -43
  66. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  67. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +40 -39
  68. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  69. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +35 -29
  70. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
  71. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +21 -20
  72. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  73. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +41 -40
  74. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  75. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +21 -20
  76. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  77. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +33 -32
  78. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  79. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +80 -78
  80. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  81. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +44 -43
  82. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  83. package/dist/components/Contractor/Submit/Submit.js +113 -105
  84. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  85. package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
  86. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  87. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js +20 -18
  88. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
  89. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +18 -15
  90. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  91. package/dist/components/Employee/Dashboard/Dashboard.js +33 -32
  92. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  93. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +21 -19
  94. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
  95. package/dist/components/Employee/Documents/management/DocumentManager.js +34 -26
  96. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  97. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  98. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  99. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +30 -29
  100. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  101. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +54 -53
  102. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  103. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +29 -28
  104. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  105. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +16 -15
  106. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  107. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +27 -25
  108. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  109. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +89 -80
  110. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  111. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +22 -20
  112. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
  113. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +25 -24
  114. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  115. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +1 -1
  116. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  117. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  118. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +19 -17
  119. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
  120. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +80 -79
  121. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  122. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  123. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  124. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +40 -39
  125. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  126. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +34 -33
  127. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  128. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +43 -41
  129. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
  130. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +22 -21
  131. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  132. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +19 -17
  133. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
  134. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +120 -116
  135. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  136. package/dist/components/Flow/Flow.js +1 -1
  137. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +29 -29
  138. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  139. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +37 -36
  140. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  141. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +37 -36
  142. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  143. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +35 -28
  144. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  145. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +27 -26
  146. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  147. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  148. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  149. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +52 -51
  150. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  151. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +34 -33
  152. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  153. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +23 -21
  154. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  155. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +26 -19
  156. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  157. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +14 -12
  158. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  159. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +112 -109
  160. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  161. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +67 -65
  162. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  163. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +43 -41
  164. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  165. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +225 -223
  166. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  167. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js +78 -75
  168. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js.map +1 -1
  169. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js +27 -27
  170. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js.map +1 -1
  171. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.js +19 -19
  172. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.js.map +1 -1
  173. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +51 -48
  174. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
  175. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +58 -48
  176. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  177. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +58 -57
  178. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  179. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +83 -69
  180. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  181. package/dist/components/Payroll/PayrollList/PayrollList.js +62 -60
  182. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  183. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +119 -117
  184. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  185. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +101 -99
  186. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  187. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +120 -110
  188. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  189. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +20 -14
  190. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  191. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +39 -38
  192. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  193. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js +24 -17
  194. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js.map +1 -1
  195. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js +17 -17
  196. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js.map +1 -1
  197. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js +88 -80
  198. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js.map +1 -1
  199. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js +26 -26
  200. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js.map +1 -1
  201. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +32 -32
  202. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  203. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +50 -48
  204. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  205. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +34 -33
  206. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  207. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
  208. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +28 -24
  209. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  210. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js +255 -228
  211. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js.map +1 -1
  212. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.module.scss.js +8 -4
  213. package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.module.scss.js.map +1 -1
  214. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  215. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  216. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +5 -5
  217. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  218. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +8 -7
  219. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  220. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +51 -50
  221. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  222. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +20 -18
  223. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  224. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +51 -49
  225. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  226. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +20 -20
  227. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  228. package/dist/components/TimeOff/PolicyList/PolicyList.js +50 -49
  229. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  230. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +34 -33
  231. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  232. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +46 -45
  233. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  234. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +152 -143
  235. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  236. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +14 -13
  237. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  238. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +44 -35
  239. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  240. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +88 -71
  241. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  242. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +164 -155
  243. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  244. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +57 -55
  245. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  246. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +25 -24
  247. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  248. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +94 -92
  249. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  250. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +156 -155
  251. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  252. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +21 -19
  253. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  254. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +28 -26
  255. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  256. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  257. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -1
  258. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  259. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  260. package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js +62 -58
  261. package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js.map +1 -1
  262. package/dist/package.json.js +1 -1
  263. package/dist/src/components/Common/FieldCaption/FieldCaption.d.ts +2 -16
  264. package/dist/src/components/Common/FieldCaption/FieldCaptionTypes.d.ts +22 -0
  265. package/dist/src/components/Common/FieldCaption/index.d.ts +1 -0
  266. package/dist/src/components/Common/Flex/Flex.d.ts +3 -1
  267. package/dist/src/components/Company/PaySchedule/PaySchedule.d.ts +10 -2
  268. package/dist/src/components/Company/PaySchedule/PayScheduleComponents.d.ts +1 -0
  269. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +9 -1
  270. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -2
  271. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +21 -5
  272. package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +21 -3
  273. package/dist/src/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +3 -1
  274. package/dist/src/components/Contractor/ContractorList/onboarding/ContractorListView.d.ts +3 -1
  275. package/dist/src/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +3 -1
  276. package/dist/src/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  277. package/dist/src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +3 -1
  278. package/dist/src/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +3 -1
  279. package/dist/src/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +3 -1
  280. package/dist/src/components/Contractor/Submit/SubmitDone.d.ts +3 -1
  281. package/dist/src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -1
  282. package/dist/src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +3 -1
  283. package/dist/src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +3 -1
  284. package/dist/src/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +3 -1
  285. package/dist/src/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +3 -1
  286. package/dist/src/components/Employee/EmployeeList/shared/useEmployeeList.d.ts +4 -0
  287. package/dist/src/components/Employee/HomeAddress/management/HomeAddressView.d.ts +3 -1
  288. package/dist/src/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +3 -1
  289. package/dist/src/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +3 -1
  290. package/dist/src/components/Employee/WorkAddress/management/WorkAddressView.d.ts +3 -1
  291. package/dist/src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +3 -1
  292. package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  293. package/dist/src/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +2 -0
  294. package/dist/src/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +3 -1
  295. package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  296. package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +3 -1
  297. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.d.ts +9 -9
  298. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.d.ts +2 -2
  299. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.d.ts +4 -4
  300. package/dist/src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +3 -1
  301. package/dist/src/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -1
  302. package/dist/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  303. package/dist/src/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
  304. package/dist/src/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +1 -1
  305. package/dist/src/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +2 -0
  306. package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +3 -1
  307. package/dist/src/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.d.ts +1 -1
  308. package/dist/src/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +1 -1
  309. package/dist/src/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +1 -1
  310. package/dist/src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  311. package/dist/src/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +2 -0
  312. package/dist/src/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +2 -0
  313. package/dist/src/components/TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
  314. package/dist/src/components/TimeOff/PolicyList/PolicyListTypes.d.ts +2 -0
  315. package/dist/src/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  316. package/dist/src/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +2 -0
  317. package/dist/src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
  318. package/dist/src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +2 -0
  319. package/dist/src/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  320. package/dist/src/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  321. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +2 -0
  322. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  323. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +2 -0
  324. package/dist/src/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +2 -0
  325. package/dist/src/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  326. package/dist/src/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +3 -0
  327. package/dist/src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  328. package/dist/src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +2 -0
  329. package/dist/src/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  330. package/dist/src/contexts/ComponentAdapter/useComponentContext.d.ts +4 -1
  331. package/dist/src/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +4 -1
  332. package/dist/src/i18n/types.d.ts +28 -2
  333. package/dist/src/index.d.ts +1 -1
  334. package/dist/src/models/external.d.ts +1 -0
  335. package/dist/style.css +1 -1
  336. package/package.json +16 -15
@@ -1,122 +1,123 @@
1
1
  import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import { useState as I } from "react";
3
- import { useTranslation as L, Trans as O } from "react-i18next";
4
- import { useForm as $, useWatch as d, FormProvider as j } from "react-hook-form";
5
- import { zodResolver as q } from "@hookform/resolvers/zod";
6
- import { AuthorizationStatus as w, DocumentType as A } from "@gusto/embedded-api/models/components/i9authorization";
7
- import { generateEmploymentEligibilitySchema as k } from "./EmploymentEligibilitySchema.js";
8
- import { COUNTRIES as P } from "./countries.js";
2
+ import { useState as L } from "react";
3
+ import { useTranslation as O, Trans as $ } from "react-i18next";
4
+ import { useForm as j, useWatch as d, FormProvider as q } from "react-hook-form";
5
+ import { zodResolver as w } from "@hookform/resolvers/zod";
6
+ import { AuthorizationStatus as A, DocumentType as k } from "@gusto/embedded-api/models/components/i9authorization";
7
+ import { generateEmploymentEligibilitySchema as P } from "./EmploymentEligibilitySchema.js";
8
+ import { COUNTRIES as V } from "./countries.js";
9
9
  import { Flex as b } from "../../../../../Common/Flex/Flex.js";
10
- import { ActionsLayout as V } from "../../../../../Common/ActionsLayout/ActionsLayout.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
- import { useI18n as M } from "../../../../../../i18n/I18n.js";
15
- import { SelectField as G } from "../../../../../Common/Fields/SelectField/SelectField.js";
16
- import { RadioGroupField as U } from "../../../../../Common/Fields/RadioGroupField/RadioGroupField.js";
17
- import { TextInputField as W } from "../../../../../Common/Fields/TextInputField/TextInputField.js";
18
- import { DatePickerField as J } from "../../../../../Common/Fields/DatePickerField/DatePickerField.js";
19
- const Q = {
10
+ import { ActionsLayout as B } from "../../../../../Common/ActionsLayout/ActionsLayout.js";
11
+ import { ComboBoxField as H } from "../../../../../Common/Fields/ComboBoxField/ComboBoxField.js";
12
+ import { Form as K } from "../../../../../Common/Form/Form.js";
13
+ import { useComponentContext as M } from "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import { useI18n as G } from "../../../../../../i18n/I18n.js";
15
+ import { SelectField as U } from "../../../../../Common/Fields/SelectField/SelectField.js";
16
+ import { RadioGroupField as W } from "../../../../../Common/Fields/RadioGroupField/RadioGroupField.js";
17
+ import { TextInputField as J } from "../../../../../Common/Fields/TextInputField/TextInputField.js";
18
+ import { DatePickerField as Q } from "../../../../../Common/Fields/DatePickerField/DatePickerField.js";
19
+ const X = {
20
20
  citizen: "statusDescriptions.citizen",
21
21
  permanent_resident: "statusDescriptions.permanent_resident",
22
22
  noncitizen: "statusDescriptions.noncitizen",
23
23
  alien: "statusDescriptions.alien"
24
- }, he = ({
25
- onSubmit: h,
26
- defaultValues: f,
27
- hasDocumentNumber: y,
28
- isPending: g
24
+ }, fe = ({
25
+ className: h,
26
+ onSubmit: f,
27
+ defaultValues: y,
28
+ hasDocumentNumber: g,
29
+ isPending: D
29
30
  }) => {
30
- M("Employee.EmploymentEligibility");
31
- const { Heading: D, Text: x, Alert: E, Button: z, Link: N } = K(), { t: e } = L("Employee.EmploymentEligibility"), [m, a] = I(!!y), r = $({
32
- resolver: q(k(m)),
33
- defaultValues: f
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) => ({
31
+ G("Employee.EmploymentEligibility");
32
+ const { Heading: x, Text: E, Alert: z, Button: N, Link: _ } = M(), { t: e } = O("Employee.EmploymentEligibility"), [m, a] = L(!!g), r = j({
33
+ resolver: w(P(m)),
34
+ defaultValues: y
35
+ }), { control: l, setValue: u, clearErrors: c } = r, o = d({ control: l, name: "authorizationStatus" }), s = d({ control: l, name: "documentType" }), S = Object.values(A).map((i) => ({
35
36
  value: i,
36
37
  label: e(`select.options.${i}`)
37
- })), S = Object.values(A).map((i) => ({
38
+ })), T = Object.values(k).map((i) => ({
38
39
  value: i,
39
40
  label: e(`authorizationDocument.options.${i}`)
40
- })), T = () => {
41
+ })), C = () => {
41
42
  u("documentNumber", ""), c("documentNumber"), a(!1);
42
- }, C = () => {
43
+ }, F = () => {
43
44
  u("documentNumber", ""), c("documentNumber"), a(!1);
44
- }, F = o === "alien", R = o === "permanent_resident" || o === "alien" && !!s, n = o === "permanent_resident" ? "uscis_alien_registration_number" : s, v = {
45
+ }, R = o === "alien", v = o === "permanent_resident" || o === "alien" && !!s, n = o === "permanent_resident" ? "uscis_alien_registration_number" : s, I = {
45
46
  uscis_alien_registration_number: 9,
46
47
  form_i94: 11
47
48
  };
48
- return /* @__PURE__ */ t(j, { ...r, children: /* @__PURE__ */ t(H, { onSubmit: r.handleSubmit(h), children: /* @__PURE__ */ p(b, { flexDirection: "column", gap: 16, children: [
49
+ return /* @__PURE__ */ t(q, { ...r, children: /* @__PURE__ */ t(K, { className: h, onSubmit: r.handleSubmit(f), children: /* @__PURE__ */ p(b, { flexDirection: "column", gap: 16, children: [
49
50
  /* @__PURE__ */ p(b, { flexDirection: "column", gap: 2, children: [
50
- /* @__PURE__ */ t(D, { as: "h2", children: e("title") }),
51
- /* @__PURE__ */ t(x, { variant: "supporting", children: /* @__PURE__ */ t(
52
- O,
51
+ /* @__PURE__ */ t(x, { as: "h2", children: e("title") }),
52
+ /* @__PURE__ */ t(E, { variant: "supporting", children: /* @__PURE__ */ t(
53
+ $,
53
54
  {
54
55
  i18nKey: "subtitle",
55
56
  t: e,
56
57
  components: {
57
- formI9Link: /* @__PURE__ */ t(N, {})
58
+ formI9Link: /* @__PURE__ */ t(_, {})
58
59
  }
59
60
  }
60
61
  ) })
61
62
  ] }),
62
63
  /* @__PURE__ */ t(
63
- G,
64
+ U,
64
65
  {
65
66
  name: "authorizationStatus",
66
67
  label: e("select.label"),
67
68
  description: e("select.description"),
68
69
  placeholder: e("select.placeholder"),
69
- options: _,
70
+ options: S,
70
71
  isRequired: !0,
71
- onChange: T
72
+ onChange: C
72
73
  }
73
74
  ),
74
75
  o && /* @__PURE__ */ t(
75
- E,
76
+ z,
76
77
  {
77
78
  status: "info",
78
- label: e(Q[o]),
79
+ label: e(X[o]),
79
80
  disableScrollIntoView: !0
80
81
  }
81
82
  ),
82
- o === "alien" && /* @__PURE__ */ t(J, { name: "expirationDate", label: e("expirationDate.label") }),
83
- F && /* @__PURE__ */ t(
84
- U,
83
+ o === "alien" && /* @__PURE__ */ t(Q, { name: "expirationDate", label: e("expirationDate.label") }),
84
+ R && /* @__PURE__ */ t(
85
+ W,
85
86
  {
86
87
  name: "documentType",
87
88
  label: e("authorizationDocument.label"),
88
- options: S,
89
+ options: T,
89
90
  isRequired: !0,
90
- onChange: C
91
+ onChange: F
91
92
  }
92
93
  ),
93
- R && n && /* @__PURE__ */ t(
94
- W,
94
+ v && n && /* @__PURE__ */ t(
95
+ J,
95
96
  {
96
97
  name: "documentNumber",
97
98
  label: e(`documentNumber.${n}.label`),
98
99
  description: n !== "foreign_passport" ? e(`documentNumber.${n}.description`) : void 0,
99
100
  placeholder: m ? e(`documentNumber.${n}.placeholder`) : void 0,
100
- maxLength: v[n],
101
+ maxLength: I[n],
101
102
  isRequired: !0
102
103
  }
103
104
  ),
104
105
  s === "foreign_passport" && o === "alien" && /* @__PURE__ */ t(
105
- B,
106
+ H,
106
107
  {
107
108
  name: "country",
108
109
  label: e("country.label"),
109
110
  description: e("country.description"),
110
- options: P,
111
+ options: V,
111
112
  placeholder: e("country.placeholder"),
112
113
  allowsCustomValue: !0,
113
114
  isRequired: !0
114
115
  }
115
116
  ),
116
- /* @__PURE__ */ t(V, { children: /* @__PURE__ */ t(z, { type: "submit", isLoading: g, children: e("submit") }) })
117
+ /* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(N, { type: "submit", isLoading: D, children: e("submit") }) })
117
118
  ] }) }) });
118
119
  };
119
120
  export {
120
- he as EmploymentEligibilityPresentation
121
+ fe as EmploymentEligibilityPresentation
121
122
  };
122
123
  //# sourceMappingURL=EmploymentEligibilityPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmploymentEligibilityPresentation.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n AuthorizationStatus,\n DocumentType as I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\nimport {\n generateEmploymentEligibilitySchema,\n type EmploymentEligibilityInputs,\n type EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport { COUNTRIES } from './countries'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n TextInputField,\n DatePickerField,\n ActionsLayout,\n} from '@/components/Common'\nimport { ComboBoxField } from '@/components/Common/Fields/ComboBoxField/ComboBoxField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\ninterface EmploymentEligibilityPresentationProps {\n onSubmit: SubmitHandler<EmploymentEligibilityPayload>\n defaultValues?: Partial<EmploymentEligibilityInputs>\n hasDocumentNumber?: boolean | null\n isPending?: boolean\n}\n\nconst statusDescriptionKeys = {\n citizen: 'statusDescriptions.citizen',\n permanent_resident: 'statusDescriptions.permanent_resident',\n noncitizen: 'statusDescriptions.noncitizen',\n alien: 'statusDescriptions.alien',\n} as const satisfies Record<AuthorizationStatus, string>\n\n/** @internal */\nexport const EmploymentEligibilityPresentation = ({\n onSubmit,\n defaultValues,\n hasDocumentNumber,\n isPending,\n}: EmploymentEligibilityPresentationProps) => {\n useI18n('Employee.EmploymentEligibility')\n const { Heading, Text, Alert, Button, Link } = useComponentContext()\n const { t } = useTranslation('Employee.EmploymentEligibility')\n\n const [hasExistingDocumentNumber, setHasExistingDocumentNumber] = useState(!!hasDocumentNumber)\n\n const formMethods = useForm<EmploymentEligibilityInputs, unknown, EmploymentEligibilityPayload>({\n resolver: zodResolver(generateEmploymentEligibilitySchema(hasExistingDocumentNumber)),\n defaultValues,\n })\n\n const { control, setValue, clearErrors } = formMethods\n const authorizationStatus = useWatch({ control, name: 'authorizationStatus' })\n const documentType = useWatch({ control, name: 'documentType' })\n\n const statusOptions = Object.values(AuthorizationStatus).map(value => ({\n value,\n label: t(`select.options.${value}`),\n }))\n\n const authorizationDocumentOptions = Object.values(I9AuthorizationDocumentType).map(value => ({\n value,\n label: t(`authorizationDocument.options.${value}`),\n }))\n\n const handleAuthorizationStatusChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const handleDocumentTypeChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const showDocumentTypeRadio = authorizationStatus === 'alien'\n const showDocumentNumberInput =\n authorizationStatus === 'permanent_resident' ||\n (authorizationStatus === 'alien' && !!documentType)\n const activeDocumentType =\n authorizationStatus === 'permanent_resident' ? 'uscis_alien_registration_number' : documentType\n\n const documentNumberMaxLength: Partial<Record<I9AuthorizationDocumentType, number>> = {\n uscis_alien_registration_number: 9,\n form_i94: 11,\n }\n\n return (\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">\n <Trans\n i18nKey={'subtitle'}\n t={t}\n components={{\n formI9Link: <Link />,\n }}\n />\n </Text>\n </Flex>\n\n <SelectField\n name=\"authorizationStatus\"\n label={t('select.label')}\n description={t('select.description')}\n placeholder={t('select.placeholder')}\n options={statusOptions}\n isRequired\n onChange={handleAuthorizationStatusChange}\n />\n\n {authorizationStatus && (\n <Alert\n status=\"info\"\n label={t(statusDescriptionKeys[authorizationStatus])}\n disableScrollIntoView\n />\n )}\n\n {authorizationStatus === 'alien' && (\n <DatePickerField name=\"expirationDate\" label={t('expirationDate.label')} />\n )}\n\n {showDocumentTypeRadio && (\n <RadioGroupField\n name=\"documentType\"\n label={t('authorizationDocument.label')}\n options={authorizationDocumentOptions}\n isRequired\n onChange={handleDocumentTypeChange}\n />\n )}\n\n {showDocumentNumberInput && activeDocumentType && (\n <TextInputField\n name=\"documentNumber\"\n label={t(`documentNumber.${activeDocumentType}.label`)}\n description={\n activeDocumentType !== 'foreign_passport'\n ? t(`documentNumber.${activeDocumentType}.description`)\n : undefined\n }\n placeholder={\n hasExistingDocumentNumber\n ? t(`documentNumber.${activeDocumentType}.placeholder`)\n : undefined\n }\n maxLength={documentNumberMaxLength[activeDocumentType]}\n isRequired\n />\n )}\n\n {documentType === 'foreign_passport' && authorizationStatus === 'alien' && (\n <ComboBoxField\n name=\"country\"\n label={t('country.label')}\n description={t('country.description')}\n options={COUNTRIES}\n placeholder={t('country.placeholder')}\n allowsCustomValue\n isRequired\n />\n )}\n\n <ActionsLayout>\n <Button type=\"submit\" isLoading={isPending}>\n {t('submit')}\n </Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["statusDescriptionKeys","EmploymentEligibilityPresentation","onSubmit","defaultValues","hasDocumentNumber","isPending","useI18n","Heading","Text","Alert","Button","Link","useComponentContext","t","useTranslation","hasExistingDocumentNumber","setHasExistingDocumentNumber","useState","formMethods","useForm","zodResolver","generateEmploymentEligibilitySchema","control","setValue","clearErrors","authorizationStatus","useWatch","documentType","statusOptions","AuthorizationStatus","value","authorizationDocumentOptions","I9AuthorizationDocumentType","handleAuthorizationStatusChange","handleDocumentTypeChange","showDocumentTypeRadio","showDocumentNumberInput","activeDocumentType","documentNumberMaxLength","FormProvider","jsx","Form","jsxs","Flex","Trans","SelectField","DatePickerField","RadioGroupField","TextInputField","ComboBoxField","COUNTRIES","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,IAAwB;AAAA,EAC5B,SAAS;AAAA,EACT,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AACT,GAGaC,KAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,MAA8C;AAC5C,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,EAAA,IAASC,EAAA,GACzC,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GAEvD,CAACC,GAA2BC,CAA4B,IAAIC,EAAS,CAAC,CAACb,CAAiB,GAExFc,IAAcC,EAA4E;AAAA,IAC9F,UAAUC,EAAYC,EAAoCN,CAAyB,CAAC;AAAA,IACpF,eAAAZ;AAAA,EAAA,CACD,GAEK,EAAE,SAAAmB,GAAS,UAAAC,GAAU,aAAAC,EAAA,IAAgBN,GACrCO,IAAsBC,EAAS,EAAE,SAAAJ,GAAS,MAAM,uBAAuB,GACvEK,IAAeD,EAAS,EAAE,SAAAJ,GAAS,MAAM,gBAAgB,GAEzDM,IAAgB,OAAO,OAAOC,CAAmB,EAAE,IAAI,CAAAC,OAAU;AAAA,IACrE,OAAAA;AAAA,IACA,OAAOjB,EAAE,kBAAkBiB,CAAK,EAAE;AAAA,EAAA,EAClC,GAEIC,IAA+B,OAAO,OAAOC,CAA2B,EAAE,IAAI,CAAAF,OAAU;AAAA,IAC5F,OAAAA;AAAA,IACA,OAAOjB,EAAE,iCAAiCiB,CAAK,EAAE;AAAA,EAAA,EACjD,GAEIG,IAAkC,MAAM;AAC5C,IAAAV,E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/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport { FormProvider, useForm, useWatch, type SubmitHandler } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n AuthorizationStatus,\n DocumentType as I9AuthorizationDocumentType,\n} from '@gusto/embedded-api/models/components/i9authorization'\nimport {\n generateEmploymentEligibilitySchema,\n type EmploymentEligibilityInputs,\n type EmploymentEligibilityPayload,\n} from './EmploymentEligibilitySchema'\nimport { COUNTRIES } from './countries'\nimport {\n Flex,\n SelectField,\n RadioGroupField,\n TextInputField,\n DatePickerField,\n ActionsLayout,\n} from '@/components/Common'\nimport { ComboBoxField } from '@/components/Common/Fields/ComboBoxField/ComboBoxField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\ninterface EmploymentEligibilityPresentationProps {\n /** CSS class name applied to the root element. */\n className?: string\n onSubmit: SubmitHandler<EmploymentEligibilityPayload>\n defaultValues?: Partial<EmploymentEligibilityInputs>\n hasDocumentNumber?: boolean | null\n isPending?: boolean\n}\n\nconst statusDescriptionKeys = {\n citizen: 'statusDescriptions.citizen',\n permanent_resident: 'statusDescriptions.permanent_resident',\n noncitizen: 'statusDescriptions.noncitizen',\n alien: 'statusDescriptions.alien',\n} as const satisfies Record<AuthorizationStatus, string>\n\n/** @internal */\nexport const EmploymentEligibilityPresentation = ({\n className,\n onSubmit,\n defaultValues,\n hasDocumentNumber,\n isPending,\n}: EmploymentEligibilityPresentationProps) => {\n useI18n('Employee.EmploymentEligibility')\n const { Heading, Text, Alert, Button, Link } = useComponentContext()\n const { t } = useTranslation('Employee.EmploymentEligibility')\n\n const [hasExistingDocumentNumber, setHasExistingDocumentNumber] = useState(!!hasDocumentNumber)\n\n const formMethods = useForm<EmploymentEligibilityInputs, unknown, EmploymentEligibilityPayload>({\n resolver: zodResolver(generateEmploymentEligibilitySchema(hasExistingDocumentNumber)),\n defaultValues,\n })\n\n const { control, setValue, clearErrors } = formMethods\n const authorizationStatus = useWatch({ control, name: 'authorizationStatus' })\n const documentType = useWatch({ control, name: 'documentType' })\n\n const statusOptions = Object.values(AuthorizationStatus).map(value => ({\n value,\n label: t(`select.options.${value}`),\n }))\n\n const authorizationDocumentOptions = Object.values(I9AuthorizationDocumentType).map(value => ({\n value,\n label: t(`authorizationDocument.options.${value}`),\n }))\n\n const handleAuthorizationStatusChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const handleDocumentTypeChange = () => {\n setValue('documentNumber', '')\n clearErrors('documentNumber')\n setHasExistingDocumentNumber(false)\n }\n\n const showDocumentTypeRadio = authorizationStatus === 'alien'\n const showDocumentNumberInput =\n authorizationStatus === 'permanent_resident' ||\n (authorizationStatus === 'alien' && !!documentType)\n const activeDocumentType =\n authorizationStatus === 'permanent_resident' ? 'uscis_alien_registration_number' : documentType\n\n const documentNumberMaxLength: Partial<Record<I9AuthorizationDocumentType, number>> = {\n uscis_alien_registration_number: 9,\n form_i94: 11,\n }\n\n return (\n <FormProvider {...formMethods}>\n <Form className={className} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">\n <Trans\n i18nKey={'subtitle'}\n t={t}\n components={{\n formI9Link: <Link />,\n }}\n />\n </Text>\n </Flex>\n\n <SelectField\n name=\"authorizationStatus\"\n label={t('select.label')}\n description={t('select.description')}\n placeholder={t('select.placeholder')}\n options={statusOptions}\n isRequired\n onChange={handleAuthorizationStatusChange}\n />\n\n {authorizationStatus && (\n <Alert\n status=\"info\"\n label={t(statusDescriptionKeys[authorizationStatus])}\n disableScrollIntoView\n />\n )}\n\n {authorizationStatus === 'alien' && (\n <DatePickerField name=\"expirationDate\" label={t('expirationDate.label')} />\n )}\n\n {showDocumentTypeRadio && (\n <RadioGroupField\n name=\"documentType\"\n label={t('authorizationDocument.label')}\n options={authorizationDocumentOptions}\n isRequired\n onChange={handleDocumentTypeChange}\n />\n )}\n\n {showDocumentNumberInput && activeDocumentType && (\n <TextInputField\n name=\"documentNumber\"\n label={t(`documentNumber.${activeDocumentType}.label`)}\n description={\n activeDocumentType !== 'foreign_passport'\n ? t(`documentNumber.${activeDocumentType}.description`)\n : undefined\n }\n placeholder={\n hasExistingDocumentNumber\n ? t(`documentNumber.${activeDocumentType}.placeholder`)\n : undefined\n }\n maxLength={documentNumberMaxLength[activeDocumentType]}\n isRequired\n />\n )}\n\n {documentType === 'foreign_passport' && authorizationStatus === 'alien' && (\n <ComboBoxField\n name=\"country\"\n label={t('country.label')}\n description={t('country.description')}\n options={COUNTRIES}\n placeholder={t('country.placeholder')}\n allowsCustomValue\n isRequired\n />\n )}\n\n <ActionsLayout>\n <Button type=\"submit\" isLoading={isPending}>\n {t('submit')}\n </Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["statusDescriptionKeys","EmploymentEligibilityPresentation","className","onSubmit","defaultValues","hasDocumentNumber","isPending","useI18n","Heading","Text","Alert","Button","Link","useComponentContext","t","useTranslation","hasExistingDocumentNumber","setHasExistingDocumentNumber","useState","formMethods","useForm","zodResolver","generateEmploymentEligibilitySchema","control","setValue","clearErrors","authorizationStatus","useWatch","documentType","statusOptions","AuthorizationStatus","value","authorizationDocumentOptions","I9AuthorizationDocumentType","handleAuthorizationStatusChange","handleDocumentTypeChange","showDocumentTypeRadio","showDocumentNumberInput","activeDocumentType","documentNumberMaxLength","FormProvider","jsx","Form","jsxs","Flex","Trans","SelectField","DatePickerField","RadioGroupField","TextInputField","ComboBoxField","COUNTRIES","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,MAAMA,IAAwB;AAAA,EAC5B,SAAS;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AsB,GAAG;AAAA,IAG1EsB,KACC,gBAAAK;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOlC,EAAE,6BAA6B;AAAA,QACtC,SAASkB;AAAA,QACT,YAAU;AAAA,QACV,UAAUG;AAAA,MAAA;AAAA,IAAA;AAAA,IAIbE,KAA2BC,KAC1B,gBAAAG;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOnC,EAAE,kBAAkBwB,CAAkB,QAAQ;AAAA,QACrD,aACEA,MAAuB,qBACnBxB,EAAE,kBAAkBwB,CAAkB,cAAc,IACpD;AAAA,QAEN,aACEtB,IACIF,EAAE,kBAAkBwB,CAAkB,cAAc,IACpD;AAAA,QAEN,WAAWC,EAAwBD,CAAkB;AAAA,QACrD,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAIbV,MAAiB,sBAAsBF,MAAwB,WAC9D,gBAAAe;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpC,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,SAASqC;AAAA,QACT,aAAarC,EAAE,qBAAqB;AAAA,QACpC,mBAAiB;AAAA,QACjB,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAId,gBAAA2B,EAACW,GAAA,EACC,UAAA,gBAAAX,EAAC9B,GAAA,EAAO,MAAK,UAAS,WAAWL,GAC9B,UAAAQ,EAAE,QAAQ,EAAA,CACb,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -1,30 +1,31 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { useIsMutating as D } from "@tanstack/react-query";
3
- import { useEmployeesGetSuspense as d } from "@gusto/embedded-api/react-query/employeesGet";
4
- import { useEmployeesUpdateOnboardingDocumentsConfigMutation as y, mutationKeyEmployeesUpdateOnboardingDocumentsConfig as f } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingDocumentsConfig";
5
- import { EmployeeDocumentsPresentation as g } from "./EmployeeDocumentsPresentation.js";
6
- import { BaseComponent as O } from "../../../../Base/Base.js";
7
- import { useBase as S } from "../../../../Base/useBase.js";
8
- import { useComponentDictionary as b } from "../../../../../i18n/I18n.js";
9
- import { EmployeeSelfOnboardingStatuses as N, EmployeeOnboardingStatus as C, componentEvents as m } from "../../../../../shared/constants.js";
10
- import { useFlow as _ } from "../../../../Flow/useFlow.js";
11
- import { ensureRequired as I } from "../../../../../helpers/ensureRequired.js";
12
- function M(o) {
13
- return /* @__PURE__ */ n(O, { ...o, children: /* @__PURE__ */ n(P, { ...o }) });
2
+ import { useIsMutating as d } from "@tanstack/react-query";
3
+ import { useEmployeesGetSuspense as y } from "@gusto/embedded-api/react-query/employeesGet";
4
+ import { useEmployeesUpdateOnboardingDocumentsConfigMutation as f, mutationKeyEmployeesUpdateOnboardingDocumentsConfig as g } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingDocumentsConfig";
5
+ import { EmployeeDocumentsPresentation as O } from "./EmployeeDocumentsPresentation.js";
6
+ import { BaseComponent as S } from "../../../../Base/Base.js";
7
+ import { useBase as b } from "../../../../Base/useBase.js";
8
+ import { useComponentDictionary as N } from "../../../../../i18n/I18n.js";
9
+ import { EmployeeSelfOnboardingStatuses as C, EmployeeOnboardingStatus as _, componentEvents as m } from "../../../../../shared/constants.js";
10
+ import { useFlow as I } from "../../../../Flow/useFlow.js";
11
+ import { ensureRequired as M } from "../../../../../helpers/ensureRequired.js";
12
+ function P(o) {
13
+ return /* @__PURE__ */ n(S, { ...o, children: /* @__PURE__ */ n(U, { ...o }) });
14
14
  }
15
- const P = ({ employeeId: o, dictionary: t }) => {
16
- b("Employee.EmployeeDocuments", t);
17
- const { onEvent: s, baseSubmitHandler: r } = S(), { data: u } = d({ employeeId: o }), e = u.employee, a = e?.onboardingDocumentsConfig?.i9Document ?? !1, c = e?.onboardingStatus ? N.has(e.onboardingStatus) || e.onboardingStatus === C.SELF_ONBOARDING_PENDING_INVITE : !1, { mutateAsync: p } = y(), E = D({
18
- mutationKey: f()
15
+ const U = ({ employeeId: o, dictionary: t, className: r }) => {
16
+ N("Employee.EmployeeDocuments", t);
17
+ const { onEvent: s, baseSubmitHandler: u } = b(), { data: a } = y({ employeeId: o }), e = a.employee, c = e?.onboardingDocumentsConfig?.i9Document ?? !1, p = e?.onboardingStatus ? C.has(e.onboardingStatus) || e.onboardingStatus === _.SELF_ONBOARDING_PENDING_INVITE : !1, { mutateAsync: E } = f(), l = d({
18
+ mutationKey: g()
19
19
  }) > 0;
20
20
  return /* @__PURE__ */ n(
21
- g,
21
+ O,
22
22
  {
23
- isEmployeeSelfOnboarding: c,
24
- currentI9Status: a,
23
+ className: r,
24
+ isEmployeeSelfOnboarding: p,
25
+ currentI9Status: c,
25
26
  onSubmit: async (i) => {
26
- await r(i, async () => {
27
- const l = await p({
27
+ await u(i, async () => {
28
+ const D = await E({
28
29
  request: {
29
30
  employeeId: o,
30
31
  employeeOnboardingDocumentsConfigRequest: {
@@ -32,21 +33,21 @@ const P = ({ employeeId: o, dictionary: t }) => {
32
33
  }
33
34
  }
34
35
  });
35
- s(m.EMPLOYEE_ONBOARDING_DOCUMENTS_CONFIG_UPDATED, l), s(m.EMPLOYEE_DOCUMENTS_DONE);
36
+ s(m.EMPLOYEE_ONBOARDING_DOCUMENTS_CONFIG_UPDATED, D), s(m.EMPLOYEE_DOCUMENTS_DONE);
36
37
  });
37
38
  },
38
39
  onDone: () => {
39
40
  s(m.EMPLOYEE_DOCUMENTS_DONE);
40
41
  },
41
- isPending: E
42
+ isPending: l
42
43
  }
43
44
  );
44
- }, K = () => {
45
- const { employeeId: o, onEvent: t } = _();
46
- return /* @__PURE__ */ n(M, { employeeId: I(o), onEvent: t });
45
+ }, j = () => {
46
+ const { employeeId: o, onEvent: t } = I();
47
+ return /* @__PURE__ */ n(P, { employeeId: M(o), onEvent: t });
47
48
  };
48
49
  export {
49
- M as EmployeeDocuments,
50
- K as EmployeeDocumentsContextual
50
+ P as EmployeeDocuments,
51
+ j as EmployeeDocumentsContextual
51
52
  };
52
53
  //# sourceMappingURL=EmployeeDocuments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeDocuments.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.tsx"],"sourcesContent":["import { useIsMutating } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeesUpdateOnboardingDocumentsConfigMutation,\n mutationKeyEmployeesUpdateOnboardingDocumentsConfig,\n} from '@gusto/embedded-api/react-query/employeesUpdateOnboardingDocumentsConfig'\nimport {\n EmployeeDocumentsPresentation,\n type EmployeeDocumentsFormValues,\n} from './EmployeeDocumentsPresentation'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n componentEvents,\n EmployeeSelfOnboardingStatuses,\n EmployeeOnboardingStatus,\n} from '@/shared/constants'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport type { OnboardingContextInterface } from '@/components/Employee/OnboardingFlow/OnboardingFlowComponents'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link EmployeeDocuments}.\n *\n * @public\n */\nexport interface EmployeeDocumentsProps extends BaseComponentInterface<'Employee.EmployeeDocuments'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for selecting which documents the employee must complete.\n *\n * @remarks\n * Shows the I-9 toggle when the employee is self-onboarding (so the employee\n * can choose whether their employer will collect I-9 verification) and a\n * summary otherwise. Persists the selection to the employee's onboarding\n * documents configuration and advances the parent flow.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/onboardingDocumentsConfig/updated` | Fired after the employee's documents configuration is saved | The updated documents configuration response |\n * | `employee/documents/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - Component props including `employeeId` and `onEvent`.\n * @returns The employee documents onboarding step.\n * @public\n */\nexport function EmployeeDocuments(props: EmployeeDocumentsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary }: EmployeeDocumentsProps) => {\n useComponentDictionary('Employee.EmployeeDocuments', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeesGetSuspense({ employeeId })\n const employee = data.employee\n const currentI9Status = employee?.onboardingDocumentsConfig?.i9Document ?? false\n\n const isEmployeeSelfOnboarding = employee?.onboardingStatus\n ? EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus) ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n : false\n\n const { mutateAsync: updateOnboardingDocumentsConfig } =\n useEmployeesUpdateOnboardingDocumentsConfigMutation()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyEmployeesUpdateOnboardingDocumentsConfig(),\n })\n const isPending = isMutating > 0\n\n const onSubmit = async (formData: EmployeeDocumentsFormValues) => {\n await baseSubmitHandler(formData, async () => {\n const response = await updateOnboardingDocumentsConfig({\n request: {\n employeeId,\n employeeOnboardingDocumentsConfigRequest: {\n i9Document: formData.includeI9,\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DOCUMENTS_CONFIG_UPDATED, response)\n onEvent(componentEvents.EMPLOYEE_DOCUMENTS_DONE)\n })\n }\n\n const handleDone = () => {\n onEvent(componentEvents.EMPLOYEE_DOCUMENTS_DONE)\n }\n\n return (\n <EmployeeDocumentsPresentation\n isEmployeeSelfOnboarding={isEmployeeSelfOnboarding}\n currentI9Status={currentI9Status}\n onSubmit={onSubmit}\n onDone={handleDone}\n isPending={isPending}\n />\n )\n}\n\n/** @internal */\nexport const EmployeeDocumentsContextual = () => {\n const { employeeId, onEvent } = useFlow<OnboardingContextInterface>()\n\n return <EmployeeDocuments employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n"],"names":["EmployeeDocuments","props","jsx","BaseComponent","Root","employeeId","dictionary","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useEmployeesGetSuspense","employee","currentI9Status","isEmployeeSelfOnboarding","EmployeeSelfOnboardingStatuses","EmployeeOnboardingStatus","updateOnboardingDocumentsConfig","useEmployeesUpdateOnboardingDocumentsConfigMutation","isPending","useIsMutating","mutationKeyEmployeesUpdateOnboardingDocumentsConfig","EmployeeDocumentsPresentation","formData","response","componentEvents","EmployeeDocumentsContextual","useFlow","ensureRequired"],"mappings":";;;;;;;;;;;AAkDO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAAyC;AACnE,EAAAC,EAAuB,8BAA8BD,CAAU;AAC/D,QAAM,EAAE,SAAAE,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAwB,EAAE,YAAAP,GAAY,GACjDQ,IAAWF,EAAK,UAChBG,IAAkBD,GAAU,2BAA2B,cAAc,IAErEE,IAA2BF,GAAU,mBACvCG,EAA+B,IAAIH,EAAS,gBAAgB,KAC5DA,EAAS,qBAAqBI,EAAyB,iCACvD,IAEE,EAAE,aAAaC,EAAA,IACnBC,EAAA,GAKIC,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAoD,CAClE,IAC8B;AAsB/B,SACE,gBAAApB;AAAA,IAACqB;AAAA,IAAA;AAAA,MACC,0BAAAR;AAAA,MACA,iBAAAD;AAAA,MACA,UAxBa,OAAOU,MAA0C;AAChE,cAAMf,EAAkBe,GAAU,YAAY;AAC5C,gBAAMC,IAAW,MAAMP,EAAgC;AAAA,YACrD,SAAS;AAAA,cACP,YAAAb;AAAA,cACA,0CAA0C;AAAA,gBACxC,YAAYmB,EAAS;AAAA,cAAA;AAAA,YACvB;AAAA,UACF,CACD;AAED,UAAAhB,EAAQkB,EAAgB,8CAA8CD,CAAQ,GAC9EjB,EAAQkB,EAAgB,uBAAuB;AAAA,QACjD,CAAC;AAAA,MACH;AAAA,MAWI,QATe,MAAM;AACvB,QAAAlB,EAAQkB,EAAgB,uBAAuB;AAAA,MACjD;AAAA,MAQI,WAAAN;AAAA,IAAA;AAAA,EAAA;AAGN,GAGaO,IAA8B,MAAM;AAC/C,QAAM,EAAE,YAAAtB,GAAY,SAAAG,EAAA,IAAYoB,EAAA;AAEhC,2BAAQ5B,GAAA,EAAkB,YAAY6B,EAAexB,CAAU,GAAG,SAAAG,GAAkB;AACtF;"}
1
+ {"version":3,"file":"EmployeeDocuments.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.tsx"],"sourcesContent":["import { useIsMutating } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeesUpdateOnboardingDocumentsConfigMutation,\n mutationKeyEmployeesUpdateOnboardingDocumentsConfig,\n} from '@gusto/embedded-api/react-query/employeesUpdateOnboardingDocumentsConfig'\nimport {\n EmployeeDocumentsPresentation,\n type EmployeeDocumentsFormValues,\n} from './EmployeeDocumentsPresentation'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n'\nimport {\n componentEvents,\n EmployeeSelfOnboardingStatuses,\n EmployeeOnboardingStatus,\n} from '@/shared/constants'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport type { OnboardingContextInterface } from '@/components/Employee/OnboardingFlow/OnboardingFlowComponents'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link EmployeeDocuments}.\n *\n * @public\n */\nexport interface EmployeeDocumentsProps extends BaseComponentInterface<'Employee.EmployeeDocuments'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Onboarding step for selecting which documents the employee must complete.\n *\n * @remarks\n * Shows the I-9 toggle when the employee is self-onboarding (so the employee\n * can choose whether their employer will collect I-9 verification) and a\n * summary otherwise. Persists the selection to the employee's onboarding\n * documents configuration and advances the parent flow.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/onboardingDocumentsConfig/updated` | Fired after the employee's documents configuration is saved | The updated documents configuration response |\n * | `employee/documents/done` | Fired when the step is complete and the parent flow can advance | — |\n *\n * @param props - Component props including `employeeId` and `onEvent`.\n * @returns The employee documents onboarding step.\n * @public\n */\nexport function EmployeeDocuments(props: EmployeeDocumentsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, dictionary, className }: EmployeeDocumentsProps) => {\n useComponentDictionary('Employee.EmployeeDocuments', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeesGetSuspense({ employeeId })\n const employee = data.employee\n const currentI9Status = employee?.onboardingDocumentsConfig?.i9Document ?? false\n\n const isEmployeeSelfOnboarding = employee?.onboardingStatus\n ? EmployeeSelfOnboardingStatuses.has(employee.onboardingStatus) ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n : false\n\n const { mutateAsync: updateOnboardingDocumentsConfig } =\n useEmployeesUpdateOnboardingDocumentsConfigMutation()\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyEmployeesUpdateOnboardingDocumentsConfig(),\n })\n const isPending = isMutating > 0\n\n const onSubmit = async (formData: EmployeeDocumentsFormValues) => {\n await baseSubmitHandler(formData, async () => {\n const response = await updateOnboardingDocumentsConfig({\n request: {\n employeeId,\n employeeOnboardingDocumentsConfigRequest: {\n i9Document: formData.includeI9,\n },\n },\n })\n\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DOCUMENTS_CONFIG_UPDATED, response)\n onEvent(componentEvents.EMPLOYEE_DOCUMENTS_DONE)\n })\n }\n\n const handleDone = () => {\n onEvent(componentEvents.EMPLOYEE_DOCUMENTS_DONE)\n }\n\n return (\n <EmployeeDocumentsPresentation\n className={className}\n isEmployeeSelfOnboarding={isEmployeeSelfOnboarding}\n currentI9Status={currentI9Status}\n onSubmit={onSubmit}\n onDone={handleDone}\n isPending={isPending}\n />\n )\n}\n\n/** @internal */\nexport const EmployeeDocumentsContextual = () => {\n const { employeeId, onEvent } = useFlow<OnboardingContextInterface>()\n\n return <EmployeeDocuments employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n"],"names":["EmployeeDocuments","props","jsx","BaseComponent","Root","employeeId","dictionary","className","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useEmployeesGetSuspense","employee","currentI9Status","isEmployeeSelfOnboarding","EmployeeSelfOnboardingStatuses","EmployeeOnboardingStatus","updateOnboardingDocumentsConfig","useEmployeesUpdateOnboardingDocumentsConfigMutation","isPending","useIsMutating","mutationKeyEmployeesUpdateOnboardingDocumentsConfig","EmployeeDocumentsPresentation","formData","response","componentEvents","EmployeeDocumentsContextual","useFlow","ensureRequired"],"mappings":";;;;;;;;;;;AAkDO,SAASA,EAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,YAAAC,GAAY,WAAAC,QAAwC;AAC9E,EAAAC,EAAuB,8BAA8BF,CAAU;AAC/D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAwB,EAAE,YAAAR,GAAY,GACjDS,IAAWF,EAAK,UAChBG,IAAkBD,GAAU,2BAA2B,cAAc,IAErEE,IAA2BF,GAAU,mBACvCG,EAA+B,IAAIH,EAAS,gBAAgB,KAC5DA,EAAS,qBAAqBI,EAAyB,iCACvD,IAEE,EAAE,aAAaC,EAAA,IACnBC,EAAA,GAKIC,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAoD,CAClE,IAC8B;AAsB/B,SACE,gBAAArB;AAAA,IAACsB;AAAA,IAAA;AAAA,MACC,WAAAjB;AAAA,MACA,0BAAAS;AAAA,MACA,iBAAAD;AAAA,MACA,UAzBa,OAAOU,MAA0C;AAChE,cAAMf,EAAkBe,GAAU,YAAY;AAC5C,gBAAMC,IAAW,MAAMP,EAAgC;AAAA,YACrD,SAAS;AAAA,cACP,YAAAd;AAAA,cACA,0CAA0C;AAAA,gBACxC,YAAYoB,EAAS;AAAA,cAAA;AAAA,YACvB;AAAA,UACF,CACD;AAED,UAAAhB,EAAQkB,EAAgB,8CAA8CD,CAAQ,GAC9EjB,EAAQkB,EAAgB,uBAAuB;AAAA,QACjD,CAAC;AAAA,MACH;AAAA,MAYI,QAVe,MAAM;AACvB,QAAAlB,EAAQkB,EAAgB,uBAAuB;AAAA,MACjD;AAAA,MASI,WAAAN;AAAA,IAAA;AAAA,EAAA;AAGN,GAGaO,IAA8B,MAAM;AAC/C,QAAM,EAAE,YAAAvB,GAAY,SAAAI,EAAA,IAAYoB,EAAA;AAEhC,2BAAQ7B,GAAA,EAAkB,YAAY8B,EAAezB,CAAU,GAAG,SAAAI,GAAkB;AACtF;"}
@@ -1,4 +1,4 @@
1
- import { jsx as n, Fragment as S, jsxs as r } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as y, Trans as p } from "react-i18next";
3
3
  import { useForm as I, FormProvider as L } from "react-hook-form";
4
4
  import { zodResolver as v } from "@hookform/resolvers/zod";
@@ -11,21 +11,22 @@ import { CheckboxField as F } from "../../../../Common/Fields/CheckboxField/Chec
11
11
  const g = "gusto-sdk-employee-documents-form", T = u.object({
12
12
  includeI9: u.boolean()
13
13
  }), V = ({
14
+ className: h,
14
15
  isEmployeeSelfOnboarding: a,
15
- currentI9Status: h,
16
- onSubmit: f,
17
- onDone: b,
18
- isPending: O
16
+ currentI9Status: f,
17
+ onSubmit: b,
18
+ onDone: O,
19
+ isPending: D
19
20
  }) => {
20
21
  C("Employee.EmployeeDocuments");
21
- const { t: e } = y("Employee.EmployeeDocuments"), { Alert: d, Heading: l, Text: i, Button: s, Link: m, UnorderedList: D } = w(), c = I({
22
+ const { t: e } = y("Employee.EmployeeDocuments"), { Alert: d, Heading: l, Text: i, Button: s, Link: m, UnorderedList: x } = w(), c = I({
22
23
  resolver: v(T),
23
24
  defaultValues: {
24
- includeI9: h
25
+ includeI9: f
25
26
  }
26
- }), x = c.watch("includeI9");
27
- return /* @__PURE__ */ n(S, { 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: [
27
+ }), S = c.watch("includeI9");
28
+ return /* @__PURE__ */ r(o, { className: h, flexDirection: "column", gap: 16, children: [
29
+ a ? /* @__PURE__ */ n(L, { ...c, children: /* @__PURE__ */ n(E, { id: g, onSubmit: c.handleSubmit(b), children: /* @__PURE__ */ r(o, { flexDirection: "column", gap: 16, children: [
29
30
  /* @__PURE__ */ r(o, { flexDirection: "column", gap: 4, children: [
30
31
  /* @__PURE__ */ n(l, { as: "h2", children: e("selfOnboarding.title") }),
31
32
  /* @__PURE__ */ n(i, { variant: "supporting", children: e("selfOnboarding.description") })
@@ -48,8 +49,8 @@ const g = "gusto-sdk-employee-documents-form", T = u.object({
48
49
  description: e("selfOnboarding.includeI9Description")
49
50
  }
50
51
  ),
51
- x ? /* @__PURE__ */ n(d, { status: "warning", label: e("selfOnboarding.alerts.includedTitle"), children: /* @__PURE__ */ n(
52
- D,
52
+ S ? /* @__PURE__ */ n(d, { status: "warning", label: e("selfOnboarding.alerts.includedTitle"), children: /* @__PURE__ */ n(
53
+ x,
53
54
  {
54
55
  items: [
55
56
  /* @__PURE__ */ n(
@@ -103,11 +104,11 @@ const g = "gusto-sdk-employee-documents-form", T = u.object({
103
104
  variant: "primary",
104
105
  type: "submit",
105
106
  form: g,
106
- isLoading: O,
107
+ isLoading: D,
107
108
  children: e("continueCta")
108
109
  }
109
- ) : /* @__PURE__ */ n(s, { variant: "primary", onClick: b, children: e("continueCta") }) })
110
- ] }) });
110
+ ) : /* @__PURE__ */ n(s, { variant: "primary", onClick: O, children: e("continueCta") }) })
111
+ ] });
111
112
  };
112
113
  export {
113
114
  V as EmployeeDocumentsPresentation
@@ -1 +1 @@
1
- {"version":3,"file":"EmployeeDocumentsPresentation.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { Flex, CheckboxField, FlexItem } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nconst EMPLOYEE_DOCUMENTS_FORM_ID = 'gusto-sdk-employee-documents-form'\n\nconst EmployeeDocumentsSchema = z.object({\n includeI9: z.boolean(),\n})\n\n/** @internal */\nexport type EmployeeDocumentsFormValues = z.infer<typeof EmployeeDocumentsSchema>\n\n/** @internal */\nexport interface EmployeeDocumentsPresentationProps {\n isEmployeeSelfOnboarding: boolean\n currentI9Status: boolean\n onSubmit: (formData: EmployeeDocumentsFormValues) => Promise<void>\n onDone: () => void\n isPending: boolean\n}\n\n/** @internal */\nexport const EmployeeDocumentsPresentation = ({\n isEmployeeSelfOnboarding,\n currentI9Status,\n onSubmit,\n onDone,\n isPending,\n}: EmployeeDocumentsPresentationProps) => {\n useI18n('Employee.EmployeeDocuments')\n const { t } = useTranslation('Employee.EmployeeDocuments')\n const { Alert, Heading, Text, Button, Link, UnorderedList } = useComponentContext()\n\n const formMethods = useForm<EmployeeDocumentsFormValues>({\n resolver: zodResolver(EmployeeDocumentsSchema),\n defaultValues: {\n includeI9: currentI9Status,\n },\n })\n\n const includeI9 = formMethods.watch('includeI9')\n\n const renderSelfOnboarding = () => (\n <FormProvider {...formMethods}>\n <Form id={EMPLOYEE_DOCUMENTS_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('selfOnboarding.title')}</Heading>\n <Text variant=\"supporting\">{t('selfOnboarding.description')}</Text>\n </Flex>\n\n <Heading as=\"h3\">{t('selfOnboarding.documentsIncludedLabel')}</Heading>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.taxWithholdingLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.directDepositLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n\n <Heading as=\"h3\">{t('selfOnboarding.includeI9Heading')}</Heading>\n <CheckboxField\n name=\"includeI9\"\n label={t('selfOnboarding.includeI9Label')}\n description={t('selfOnboarding.includeI9Description')}\n />\n\n {includeI9 ? (\n <Alert status=\"warning\" label={t('selfOnboarding.alerts.includedTitle')}>\n <UnorderedList\n items={[\n <Trans\n key=\"included-description-1\"\n i18nKey={'selfOnboarding.alerts.includedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />,\n <span key=\"included-description-2\">\n {t('selfOnboarding.alerts.includedDescription2')}\n </span>,\n ]}\n />\n </Alert>\n ) : (\n <Alert status=\"info\" label={t('selfOnboarding.alerts.notIncludedTitle')}>\n <Trans\n i18nKey={'selfOnboarding.alerts.notIncludedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />\n </Alert>\n )}\n </Flex>\n </Form>\n </FormProvider>\n )\n\n const renderNotSelfOnboarding = () => (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('notSelfOnboarding.title')}</Heading>\n <Text variant=\"supporting\">{t('notSelfOnboarding.description')}</Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={20}>\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.employmentEligibilityLabel')}</Text>\n <Text variant=\"supporting\">\n {t('notSelfOnboarding.employmentEligibilityDescription')}\n </Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.taxWithholdingLabel')}</Text>\n <Text variant=\"supporting\">{t('notSelfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.directDepositLabel')}</Text>\n <Text variant=\"supporting\">{t('notSelfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n </Flex>\n <Alert status=\"info\" label={t('notSelfOnboarding.alertTitle')} disableScrollIntoView></Alert>\n </Flex>\n )\n\n return (\n <>\n <Flex flexDirection=\"column\" gap={16}>\n {isEmployeeSelfOnboarding ? renderSelfOnboarding() : renderNotSelfOnboarding()}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n {isEmployeeSelfOnboarding ? (\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={EMPLOYEE_DOCUMENTS_FORM_ID}\n isLoading={isPending}\n >\n {t('continueCta')}\n </Button>\n ) : (\n <Button variant=\"primary\" onClick={onDone}>\n {t('continueCta')}\n </Button>\n )}\n </Flex>\n </Flex>\n </>\n )\n}\n"],"names":["EMPLOYEE_DOCUMENTS_FORM_ID","EmployeeDocumentsSchema","z","EmployeeDocumentsPresentation","isEmployeeSelfOnboarding","currentI9Status","onSubmit","onDone","isPending","useI18n","t","useTranslation","Alert","Heading","Text","Button","Link","UnorderedList","useComponentContext","formMethods","useForm","zodResolver","includeI9","jsxs","Flex","jsx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e,YAAW,KAAK,IAClC,UAAApB,IACC,gBAAAqB;AAAA,MAACV;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMf;AAAA,QACN,WAAWQ;AAAA,QAEV,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA,IAGlB,gBAAAiB,EAACV,GAAA,EAAO,SAAQ,WAAU,SAASR,GAChC,UAAAG,EAAE,aAAa,EAAA,CAClB,EAAA,CAEJ;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"EmployeeDocumentsPresentation.js","sources":["../../../../../../src/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { Flex, CheckboxField, FlexItem } from '@/components/Common'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nconst EMPLOYEE_DOCUMENTS_FORM_ID = 'gusto-sdk-employee-documents-form'\n\nconst EmployeeDocumentsSchema = z.object({\n includeI9: z.boolean(),\n})\n\n/** @internal */\nexport type EmployeeDocumentsFormValues = z.infer<typeof EmployeeDocumentsSchema>\n\n/** @internal */\nexport interface EmployeeDocumentsPresentationProps {\n /** CSS class name applied to the root element. */\n className?: string\n isEmployeeSelfOnboarding: boolean\n currentI9Status: boolean\n onSubmit: (formData: EmployeeDocumentsFormValues) => Promise<void>\n onDone: () => void\n isPending: boolean\n}\n\n/** @internal */\nexport const EmployeeDocumentsPresentation = ({\n className,\n isEmployeeSelfOnboarding,\n currentI9Status,\n onSubmit,\n onDone,\n isPending,\n}: EmployeeDocumentsPresentationProps) => {\n useI18n('Employee.EmployeeDocuments')\n const { t } = useTranslation('Employee.EmployeeDocuments')\n const { Alert, Heading, Text, Button, Link, UnorderedList } = useComponentContext()\n\n const formMethods = useForm<EmployeeDocumentsFormValues>({\n resolver: zodResolver(EmployeeDocumentsSchema),\n defaultValues: {\n includeI9: currentI9Status,\n },\n })\n\n const includeI9 = formMethods.watch('includeI9')\n\n const renderSelfOnboarding = () => (\n <FormProvider {...formMethods}>\n <Form id={EMPLOYEE_DOCUMENTS_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('selfOnboarding.title')}</Heading>\n <Text variant=\"supporting\">{t('selfOnboarding.description')}</Text>\n </Flex>\n\n <Heading as=\"h3\">{t('selfOnboarding.documentsIncludedLabel')}</Heading>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.taxWithholdingLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n <FlexItem>\n <Text weight=\"medium\">{t('selfOnboarding.directDepositLabel')}</Text>\n <Text variant=\"supporting\">{t('selfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n\n <Heading as=\"h3\">{t('selfOnboarding.includeI9Heading')}</Heading>\n <CheckboxField\n name=\"includeI9\"\n label={t('selfOnboarding.includeI9Label')}\n description={t('selfOnboarding.includeI9Description')}\n />\n\n {includeI9 ? (\n <Alert status=\"warning\" label={t('selfOnboarding.alerts.includedTitle')}>\n <UnorderedList\n items={[\n <Trans\n key=\"included-description-1\"\n i18nKey={'selfOnboarding.alerts.includedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />,\n <span key=\"included-description-2\">\n {t('selfOnboarding.alerts.includedDescription2')}\n </span>,\n ]}\n />\n </Alert>\n ) : (\n <Alert status=\"info\" label={t('selfOnboarding.alerts.notIncludedTitle')}>\n <Trans\n i18nKey={'selfOnboarding.alerts.notIncludedDescription'}\n t={t}\n components={{\n Link: <Link />,\n }}\n />\n </Alert>\n )}\n </Flex>\n </Form>\n </FormProvider>\n )\n\n const renderNotSelfOnboarding = () => (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\">{t('notSelfOnboarding.title')}</Heading>\n <Text variant=\"supporting\">{t('notSelfOnboarding.description')}</Text>\n </Flex>\n <Flex flexDirection=\"column\" gap={20}>\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.employmentEligibilityLabel')}</Text>\n <Text variant=\"supporting\">\n {t('notSelfOnboarding.employmentEligibilityDescription')}\n </Text>\n </FlexItem>\n\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.taxWithholdingLabel')}</Text>\n <Text variant=\"supporting\">{t('notSelfOnboarding.taxWithholdingDescription')}</Text>\n </FlexItem>\n <FlexItem>\n <Text weight=\"medium\">{t('notSelfOnboarding.directDepositLabel')}</Text>\n <Text variant=\"supporting\">{t('notSelfOnboarding.directDepositDescription')}</Text>\n </FlexItem>\n </Flex>\n <Alert status=\"info\" label={t('notSelfOnboarding.alertTitle')} disableScrollIntoView></Alert>\n </Flex>\n )\n\n return (\n <Flex className={className} flexDirection=\"column\" gap={16}>\n {isEmployeeSelfOnboarding ? renderSelfOnboarding() : renderNotSelfOnboarding()}\n\n <Flex justifyContent=\"flex-end\" gap={12}>\n {isEmployeeSelfOnboarding ? (\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={EMPLOYEE_DOCUMENTS_FORM_ID}\n isLoading={isPending}\n >\n {t('continueCta')}\n </Button>\n ) : (\n <Button variant=\"primary\" onClick={onDone}>\n {t('continueCta')}\n </Button>\n )}\n </Flex>\n </Flex>\n )\n}\n"],"names":["EMPLOYEE_DOCUMENTS_FORM_ID","EmployeeDocumentsSchema","z","EmployeeDocumentsPresentation","className","isEmployeeSelfOnboarding","currentI9Status","onSubmit","onDone","isPending","useI18n","t","useTranslation","Alert","Heading","Text","Button","Link","UnorderedList","useComponentContext","formMethods","useForm","zodResolver","includeI9","Flex","jsx","FormProvider","Form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Ga,GAAA,EAAK,gBAAe,YAAW,KAAK,IAClC,UAAAnB,IACC,gBAAAoB;AAAA,MAACT;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMhB;AAAA,QACN,WAAWS;AAAA,QAEV,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA,IAGlB,gBAAAgB,EAACT,GAAA,EAAO,SAAQ,WAAU,SAASR,GAChC,UAAAG,EAAE,aAAa,EAAA,CAClB,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { useState as L, useMemo as M } from "react";
3
- import { useEmployeeList as h } from "../shared/useEmployeeList.js";
4
- import { ManagementEmployeeListView as T } from "./ManagementEmployeeListView.js";
5
- import { BaseBoundaries as f, BaseLayout as E } from "../../../Base/Base.js";
6
- import { useI18n as D, useComponentDictionary as b } from "../../../../i18n/I18n.js";
2
+ import { useState as M, useMemo as h } from "react";
3
+ import { useEmployeeList as T } from "../shared/useEmployeeList.js";
4
+ import { ManagementEmployeeListView as f } from "./ManagementEmployeeListView.js";
5
+ import { BaseBoundaries as D, BaseLayout as E } from "../../../Base/Base.js";
6
+ import { useI18n as b, useComponentDictionary as P } from "../../../../i18n/I18n.js";
7
7
  import { componentEvents as i } from "../../../../shared/constants.js";
8
- const P = (n) => {
8
+ const S = (n) => {
9
9
  switch (n) {
10
10
  case "active":
11
11
  return "active";
@@ -15,17 +15,18 @@ const P = (n) => {
15
15
  return "terminated";
16
16
  }
17
17
  };
18
- function S({
18
+ function A({
19
19
  companyId: n,
20
20
  initialTab: a = "active",
21
21
  onEvent: o,
22
22
  dictionary: p,
23
- LoaderComponent: m
23
+ LoaderComponent: m,
24
+ className: c
24
25
  }) {
25
- D("Employee.ManagementEmployeeList"), b("Employee.ManagementEmployeeList", p);
26
- const [r, c] = L(a), l = M(() => P(r), [r]), e = h({
26
+ b("Employee.ManagementEmployeeList"), P("Employee.ManagementEmployeeList", p);
27
+ const [r, l] = M(a), d = h(() => S(r), [r]), e = T({
27
28
  companyId: n,
28
- employeeType: l
29
+ employeeType: d
29
30
  });
30
31
  if (e.isLoading)
31
32
  return /* @__PURE__ */ s(
@@ -36,49 +37,50 @@ function S({
36
37
  LoaderComponent: m
37
38
  }
38
39
  );
39
- const d = (t) => {
40
+ const y = (t) => {
40
41
  o(i.EMPLOYEE_UPDATE, { employeeId: t });
41
- }, y = () => {
42
+ }, u = () => {
42
43
  o(i.EMPLOYEE_CREATE);
43
- }, u = (t) => {
44
- o(i.EMPLOYEE_DISMISS, { employeeId: t });
45
44
  }, g = (t) => {
46
- c(t);
45
+ o(i.EMPLOYEE_DISMISS, { employeeId: t });
46
+ }, L = (t) => {
47
+ l(t);
47
48
  };
48
49
  return /* @__PURE__ */ s(E, { error: e.errorHandling.errors, LoaderComponent: m, children: /* @__PURE__ */ s(
49
- T,
50
+ f,
50
51
  {
51
52
  selectedTab: r,
52
- onTabChange: g,
53
+ onTabChange: L,
53
54
  employees: e.data.employees,
54
55
  isFetching: e.status.isFetching,
55
56
  pagination: e.pagination,
56
57
  status: e.status,
57
- onEdit: d,
58
- onDismiss: u,
58
+ onEdit: y,
59
+ onDismiss: g,
59
60
  onDelete: async (t) => {
60
61
  await e.actions.onDelete(t), o(i.EMPLOYEE_DELETED, { employeeId: t });
61
62
  },
62
- onAddEmployee: y
63
+ onAddEmployee: u,
64
+ className: c
63
65
  }
64
66
  ) });
65
67
  }
66
- function C({
68
+ function F({
67
69
  FallbackComponent: n,
68
70
  LoaderComponent: a,
69
71
  ...o
70
72
  }) {
71
73
  return /* @__PURE__ */ s(
72
- f,
74
+ D,
73
75
  {
74
76
  componentName: "Employee.ManagementEmployeeList",
75
77
  FallbackComponent: n,
76
78
  LoaderComponent: a,
77
- children: /* @__PURE__ */ s(S, { LoaderComponent: a, ...o })
79
+ children: /* @__PURE__ */ s(A, { LoaderComponent: a, ...o })
78
80
  }
79
81
  );
80
82
  }
81
83
  export {
82
- C as ManagementEmployeeList
84
+ F as ManagementEmployeeList
83
85
  };
84
86
  //# sourceMappingURL=ManagementEmployeeList.js.map