@gusto/embedded-react-sdk 0.51.0 → 0.52.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 (648) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/components/Base/useBaseSubmit.js +4 -4
  3. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  4. package/dist/components/Common/DocumentList/DocumentList.d.ts +8 -1
  5. package/dist/components/Common/DocumentList/DocumentList.js +24 -21
  6. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  7. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +1 -1
  8. package/dist/components/Common/OnboardingStatusBadge/index.d.ts +2 -2
  9. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  10. package/dist/components/Common/TaxInputs/TaxInputs.d.ts +2 -2
  11. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  12. package/dist/components/Common/UI/FormBox/FormBox.d.ts +9 -0
  13. package/dist/components/Common/UI/FormBox/FormBox.js +13 -0
  14. package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -0
  15. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +14 -0
  16. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -0
  17. package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +26 -0
  18. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.d.ts +9 -0
  19. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js +23 -0
  20. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js.map +1 -0
  21. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js +8 -0
  22. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js.map +1 -0
  23. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.d.ts +36 -0
  24. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js +7 -0
  25. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js.map +1 -0
  26. package/dist/components/Common/UI/FormBoxHeader/index.d.ts +1 -0
  27. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -0
  28. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +5 -5
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +1 -2
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +1 -1
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +9 -8
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -3
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +1 -1
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +1 -1
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +9 -8
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +11 -10
  42. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  44. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +1 -1
  48. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountForm/context.js +9 -8
  51. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  53. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountList/context.d.ts +1 -1
  55. package/dist/components/Company/BankAccount/BankAccountList/context.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +1 -1
  57. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -1
  59. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  60. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  61. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.d.ts +2 -2
  62. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +9 -8
  63. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  64. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  65. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  66. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +2 -2
  67. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  68. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +1 -1
  69. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +1 -1
  70. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +3 -3
  71. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
  72. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  73. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  74. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  75. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  76. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +2 -2
  77. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -11
  78. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  79. package/dist/components/Company/Industry/Context.js +12 -11
  80. package/dist/components/Company/Industry/Context.js.map +1 -1
  81. package/dist/components/Company/Industry/Industry.js +2 -2
  82. package/dist/components/Company/Industry/Industry.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -7
  84. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationForm/Form.d.ts +1 -1
  86. package/dist/components/Company/Locations/LocationForm/LocationForm.js +46 -45
  87. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  88. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +9 -8
  89. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  90. package/dist/components/Company/Locations/LocationsList/LocationsList.js +1 -1
  91. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  92. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -1
  93. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +9 -8
  94. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  95. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +1 -1
  96. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  97. package/dist/components/Company/OnboardingOverview/context.d.ts +1 -1
  98. package/dist/components/Company/OnboardingOverview/context.js +9 -8
  99. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  100. package/dist/components/Company/PaySchedule/PaySchedule.js +1 -1
  101. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/PayScheduleList.js +1 -1
  103. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -3
  105. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +3 -3
  106. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +6 -6
  107. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  108. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +10 -1
  109. package/dist/components/Company/StateTaxes/StateTaxes.js +23 -17
  110. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  111. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
  112. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +17 -10
  113. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  114. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -3
  115. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  116. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +2 -2
  117. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  118. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +1 -1
  119. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -1
  120. package/dist/components/Company/StateTaxes/StateTaxesForm/context.d.ts +1 -1
  121. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +9 -8
  122. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  123. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +27 -27
  124. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  125. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +9 -0
  126. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +24 -24
  127. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +9 -8
  130. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  131. package/dist/components/Contractor/Address/Address.d.ts +4 -3
  132. package/dist/components/Contractor/Address/Address.js.map +1 -1
  133. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -2
  134. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +3 -3
  135. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +3 -3
  136. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
  137. package/dist/components/Contractor/ContractorList/index.js +95 -92
  138. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  139. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +1 -1
  140. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  141. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  142. package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.d.ts +1 -1
  143. package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  144. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.d.ts +3 -1
  145. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +64 -51
  146. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
  147. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +1 -1
  148. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +1 -1
  149. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -1
  150. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +202 -159
  151. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
  152. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +1 -1
  153. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +3 -3
  154. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js +3 -3
  155. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -1
  156. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +2 -2
  157. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js +55 -54
  158. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -1
  159. package/dist/components/Contractor/Landing/Landing.js +2 -2
  160. package/dist/components/Contractor/Landing/Landing.js.map +1 -1
  161. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -2
  162. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  163. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.d.ts +1 -1
  164. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js +2 -2
  165. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js.map +1 -1
  166. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +1 -1
  167. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +1 -1
  168. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -1
  169. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +3 -3
  170. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js +2 -2
  171. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js.map +1 -1
  172. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +5 -5
  173. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  174. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -2
  175. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  176. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -2
  177. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  178. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -1
  179. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
  180. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +4 -4
  181. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  182. package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -1
  183. package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
  184. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +2 -2
  185. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  186. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  187. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +3 -3
  188. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  189. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +2 -2
  190. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  191. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +4 -4
  192. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  193. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +3 -3
  194. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  195. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +17 -5
  196. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +32 -31
  197. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  198. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -3
  199. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  200. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +16 -4
  201. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +34 -30
  202. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  203. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -1
  204. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +1 -1
  205. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  206. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +1 -1
  207. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -1
  208. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +1 -1
  209. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +6 -6
  210. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
  211. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +2 -2
  212. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +3 -3
  213. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
  214. package/dist/components/Contractor/Submit/Submit.js +3 -3
  215. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  216. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js +1 -1
  217. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
  218. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +1 -1
  219. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  220. package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +1 -1
  221. package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
  222. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  223. package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +2 -6
  224. package/dist/components/Employee/Compensation/onboarding/Compensation.js +38 -42
  225. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  226. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.d.ts +2 -2
  227. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -1
  228. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +2 -2
  229. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
  230. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.d.ts +1 -1
  231. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
  232. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  233. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +1 -1
  234. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -1
  235. package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.d.ts +2 -2
  236. package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.js.map +1 -1
  237. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +2 -2
  238. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +3 -3
  239. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  240. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +4 -4
  241. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +7 -7
  242. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  243. package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.d.ts +1 -1
  244. package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +4 -4
  245. package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
  246. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +1 -1
  247. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +3 -3
  248. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +7 -7
  249. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  250. package/dist/components/Employee/Dashboard/Dashboard.js +1 -1
  251. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  252. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  253. package/dist/components/Employee/Dashboard/index.d.ts +1 -1
  254. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
  255. package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
  256. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.d.ts +1 -1
  257. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
  258. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +1 -1
  259. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
  260. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.d.ts +1 -1
  261. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  262. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.d.ts +1 -1
  263. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
  264. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.d.ts +1 -1
  265. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
  266. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +1 -1
  267. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -1
  268. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +1 -1
  269. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -1
  270. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +2 -2
  271. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +1 -1
  272. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
  273. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +1 -1
  274. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -1
  275. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +3 -3
  276. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +5 -5
  277. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  278. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -2
  279. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +1 -1
  280. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -1
  281. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +1 -1
  282. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -1
  283. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +1 -1
  284. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +3 -3
  285. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  286. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +1 -1
  287. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +2 -2
  288. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -1
  289. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +1 -1
  290. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -1
  291. package/dist/components/Employee/Documents/management/DocumentManager.js +2 -2
  292. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  293. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
  294. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +1 -1
  295. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  296. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.d.ts +1 -1
  297. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +9 -8
  298. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  299. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +2 -2
  300. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  301. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +3 -3
  302. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  303. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +1 -1
  304. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  305. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +2 -2
  306. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +1 -1
  307. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
  308. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +1 -1
  309. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  310. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.d.ts +1 -1
  311. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  312. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +3 -6
  313. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  314. package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.d.ts +1 -1
  315. package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js +1 -1
  316. package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js.map +1 -1
  317. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -2
  318. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js +27 -32
  319. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
  320. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +1 -1
  321. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js +3 -3
  322. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  323. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
  324. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +1 -1
  325. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  326. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.d.ts +3 -3
  327. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +4 -5
  328. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  329. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -2
  330. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +1 -1
  331. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -1
  332. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +2 -2
  333. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +2 -2
  334. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -1
  335. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.d.ts +1 -1
  336. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js +1 -1
  337. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js.map +1 -1
  338. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
  339. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +1 -1
  340. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  341. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +1 -1
  342. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -1
  343. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +1 -1
  344. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +3 -3
  345. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  346. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.d.ts +1 -1
  347. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js +1 -1
  348. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js.map +1 -1
  349. package/dist/components/Employee/Landing/Landing.js +2 -2
  350. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  351. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -1
  352. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
  353. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +1 -1
  354. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js +1 -3
  355. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
  356. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +55 -49
  357. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  358. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
  359. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
  360. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.d.ts +1 -1
  361. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
  362. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +1 -1
  363. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +1 -1
  364. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -1
  365. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +1 -1
  366. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +1 -1
  367. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +2 -2
  368. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -1
  369. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +2 -2
  370. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +4 -4
  371. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -1
  372. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +2 -2
  373. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +3 -3
  374. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -1
  375. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +1 -1
  376. package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.d.ts +1 -1
  377. package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js +3 -3
  378. package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js.map +1 -1
  379. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  380. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
  381. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
  382. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
  383. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +1 -1
  384. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +5 -5
  385. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  386. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.d.ts +1 -1
  387. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js +1 -1
  388. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js.map +1 -1
  389. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
  390. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +1 -1
  391. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -1
  392. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +2 -2
  393. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +4 -4
  394. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  395. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.d.ts +1 -1
  396. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -1
  397. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +1 -1
  398. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -1
  399. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +2 -2
  400. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +5 -5
  401. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  402. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
  403. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  404. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  405. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +1 -1
  406. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +1 -1
  407. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +1 -1
  408. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -1
  409. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +1 -1
  410. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -1
  411. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +1 -1
  412. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
  413. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +1 -1
  414. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +2 -2
  415. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  416. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.d.ts +1 -1
  417. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js +1 -1
  418. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js.map +1 -1
  419. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +9 -9
  420. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  421. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +1 -1
  422. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  423. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +4 -4
  424. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
  425. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
  426. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +1 -1
  427. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  428. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +2 -2
  429. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -1
  430. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +1 -1
  431. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +3 -3
  432. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  433. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.d.ts +1 -1
  434. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js +1 -1
  435. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
  436. package/dist/components/Employee/exports/employeeManagement.d.ts +1 -1
  437. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +4 -5
  438. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +101 -125
  439. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  440. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +2 -2
  441. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  442. package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +0 -5
  443. package/dist/components/InformationRequests/InformationRequestsComponents.js +12 -13
  444. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
  445. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +1 -1
  446. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  447. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +2 -2
  448. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  449. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +3 -3
  450. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  451. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +2 -2
  452. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  453. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +5 -5
  454. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  455. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +4 -4
  456. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  457. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +8 -7
  458. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  459. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +1 -1
  460. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +9 -9
  461. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  462. package/dist/components/Payroll/OffCycle/index.d.ts +1 -1
  463. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +4 -4
  464. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  465. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +1 -1
  466. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  467. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -2
  468. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js +1 -1
  469. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
  470. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +4 -4
  471. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  472. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +2 -2
  473. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  474. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +100 -95
  475. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  476. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -6
  477. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  478. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -5
  479. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +6 -6
  480. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  481. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +57 -56
  482. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  483. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -4
  484. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +1 -1
  485. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  486. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +2 -2
  487. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  488. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +24 -7
  489. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +37 -33
  490. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  491. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +2 -2
  492. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  493. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +7 -7
  494. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  495. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -1
  496. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  497. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +2 -2
  498. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
  499. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  500. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +4 -4
  501. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  502. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
  503. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  504. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +2 -2
  505. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  506. package/dist/components/Payroll/PayrollList/PayrollList.js +8 -8
  507. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  508. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -3
  509. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
  510. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  511. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +7 -7
  512. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  513. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -4
  514. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +31 -31
  515. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  516. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
  517. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  518. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -1
  519. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  520. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +1 -1
  521. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  522. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -1
  523. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  524. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +1 -1
  525. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +2 -2
  526. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
  527. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +9 -5
  528. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  529. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
  530. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  531. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +2 -2
  532. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  533. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -1
  534. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +2 -2
  535. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  536. package/dist/components/Payroll/Transition/index.d.ts +1 -1
  537. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +4 -4
  538. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  539. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +3 -3
  540. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  541. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
  542. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  543. package/dist/components/Payroll/helpers.d.ts +26 -12
  544. package/dist/components/Payroll/helpers.js +1 -1
  545. package/dist/components/Payroll/helpers.js.map +1 -1
  546. package/dist/components/Payroll/index.d.ts +3 -2
  547. package/dist/components/Payroll/payrollTypes.d.ts +1 -1
  548. package/dist/components/Payroll/payrollTypes.js +1 -1
  549. package/dist/components/Payroll/payrollTypes.js.map +1 -1
  550. package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
  551. package/dist/components/Payroll/usePreparedPayrollData.js +16 -15
  552. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  553. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.d.ts +1 -1
  554. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +3 -3
  555. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
  556. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +3 -3
  557. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  558. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +3 -3
  559. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  560. package/dist/components/TimeOff/PolicyList/PolicyList.js +6 -6
  561. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  562. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +30 -29
  563. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  564. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +1 -1
  565. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  566. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +2 -2
  567. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -1
  568. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +27 -26
  569. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  570. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +2 -2
  571. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  572. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -1
  573. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +69 -68
  574. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  575. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +20 -20
  576. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  577. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +67 -66
  578. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  579. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -5
  580. package/dist/contexts/ApiProvider/ApiProvider.js +3 -3
  581. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  582. package/dist/contexts/ApiProvider/apiVersion.d.ts +23 -0
  583. package/dist/contexts/ApiProvider/apiVersion.js +6 -0
  584. package/dist/contexts/ApiProvider/apiVersion.js.map +1 -0
  585. package/dist/contexts/ApiProvider/apiVersionHook.js +3 -2
  586. package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -1
  587. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +1 -1
  588. package/dist/contexts/ApiProvider/createSdkQueryClient.js +7 -6
  589. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -1
  590. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +40 -36
  591. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  592. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
  593. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  594. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +18 -16
  595. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  596. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +6 -0
  597. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  598. package/dist/contexts/GustoProvider/GustoProvider.d.ts +4 -5
  599. package/dist/contexts/GustoProvider/GustoProvider.js +6 -6
  600. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  601. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +7 -7
  602. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -8
  603. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  604. package/dist/contexts/GustoProvider/index.d.ts +1 -1
  605. package/dist/contexts/index.d.ts +2 -6
  606. package/dist/helpers/apiErrorToList.d.ts +1 -1
  607. package/dist/helpers/apiErrorToList.js.map +1 -1
  608. package/dist/helpers/formattedStrings.d.ts +2 -2
  609. package/dist/helpers/formattedStrings.js.map +1 -1
  610. package/dist/hooks/useCompanyPaymentSpeed.d.ts +1 -1
  611. package/dist/hooks/useCompanyPaymentSpeed.js +1 -1
  612. package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -1
  613. package/dist/i18n/en/Contractor.ContractorList.json.js +18 -16
  614. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  615. package/dist/i18n/en/Contractor.DocumentsList.json.js +20 -16
  616. package/dist/i18n/en/Contractor.DocumentsList.json.js.map +1 -1
  617. package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
  618. package/dist/i18n/en/Employee.OnboardingSummary.json.js +24 -20
  619. package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
  620. package/dist/i18n/types.d.ts +12 -0
  621. package/dist/index.d.ts +8 -7
  622. package/dist/index.js +121 -134
  623. package/dist/index.js.map +1 -1
  624. package/dist/models/WA_RISK_CODES.d.ts +5 -2
  625. package/dist/models/WA_RISK_CODES.js.map +1 -1
  626. package/dist/models/external.d.ts +236 -226
  627. package/dist/partner-hook-utils/composeErrorHandler.d.ts +9 -4
  628. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
  629. package/dist/partner-hook-utils/form/SDKFormProvider.d.ts +10 -2
  630. package/dist/partner-hook-utils/form/SDKFormProvider.js +7 -1
  631. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  632. package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +7 -4
  633. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  634. package/dist/partner-hook-utils/form/fields/index.d.ts +1 -0
  635. package/dist/partner-hook-utils/form/index.d.ts +3 -3
  636. package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
  637. package/dist/partner-hook-utils/index.d.ts +1 -1
  638. package/dist/partner-hook-utils/types.d.ts +7 -3
  639. package/dist/shared/constants.d.ts +2 -2
  640. package/dist/shared/constants.js +5 -5
  641. package/dist/shared/constants.js.map +1 -1
  642. package/dist/style.css +1 -1
  643. package/dist/types/Helpers.d.ts +11 -0
  644. package/dist/types/hooks.d.ts +2 -2
  645. package/dist/types/sdkError.js +3 -3
  646. package/dist/types/sdkError.js.map +1 -1
  647. package/docs/guides/endpoint-inventory.json +1201 -297
  648. package/package.json +12 -12
@@ -1,169 +1,145 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import B from "dompurify";
3
- import { useTranslation as D } from "react-i18next";
4
- import { useForm as W, FormProvider as H } from "react-hook-form";
5
- import { zodResolver as G } from "@hookform/resolvers/zod";
6
- import { z as f } from "zod";
7
- import { useIsMutating as K } from "@tanstack/react-query";
8
- import { useInformationRequestsGetInformationRequestsSuspense as _ } from "@gusto/embedded-api-v-2026-02-01/react-query/informationRequestsGetInformationRequests";
9
- import { useInformationRequestsSubmitMutation as V, mutationKeyInformationRequestsSubmit as X } from "@gusto/embedded-api-v-2026-02-01/react-query/informationRequestsSubmit";
10
- import { ResponseType as u } from "@gusto/embedded-api-v-2026-02-01/models/components/informationrequest";
11
- import { ResponseType as U } from "@gusto/embedded-api-v-2026-02-01/models/operations/submitinformationrequest";
12
- import i from "./InformationRequestForm.module.scss.js";
13
- import { BaseComponent as Y } from "../../Base/Base.js";
14
- import { useBase as $ } from "../../Base/useBase.js";
15
- import { Flex as q } from "../../Common/Flex/Flex.js";
16
- import { useComponentContext as P } from "../../../contexts/ComponentAdapter/useComponentContext.js";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import M from "dompurify";
3
+ import { useTranslation as C } from "react-i18next";
4
+ import { useForm as L, FormProvider as Q } from "react-hook-form";
5
+ import { zodResolver as k } from "@hookform/resolvers/zod";
6
+ import { z as l } from "zod";
7
+ import "@tanstack/react-query";
8
+ import { useInformationRequestsGetInformationRequestsSuspense as z } from "@gusto/embedded-api/react-query/informationRequestsGetInformationRequests";
9
+ import { useInformationRequestsSubmitMutation as B } from "@gusto/embedded-api/react-query/informationRequestsSubmit";
10
+ import { ResponseType as i } from "@gusto/embedded-api/models/components/informationrequest";
11
+ import { ResponseType as v } from "@gusto/embedded-api/models/operations/submitinformationrequest";
12
+ import s from "./InformationRequestForm.module.scss.js";
13
+ import { BaseComponent as W } from "../../Base/Base.js";
14
+ import { useBase as j } from "../../Base/useBase.js";
15
+ import { Flex as E } from "../../Common/Flex/Flex.js";
16
+ import { useComponentContext as H } from "../../../contexts/ComponentAdapter/useComponentContext.js";
17
17
  import "react";
18
- import { FileInputField as J } from "../../Common/Fields/FileInputField/FileInputField.js";
19
- import { Form as Z } from "../../Common/Form/Form.js";
20
- import { useComponentDictionary as ee, useI18n as A } from "../../../i18n/I18n.js";
21
- import { informationRequestEvents as C } from "../../../shared/constants.js";
22
- import { useFlow as ne } from "../../Flow/useFlow.js";
23
- import { TextInputField as te } from "../../Common/Fields/TextInputField/TextInputField.js";
24
- const M = "gusto-sdk-information-request-form", oe = ["image/jpeg", "image/png", "application/pdf"], se = {
18
+ import { FileInputField as G } from "../../Common/Fields/FileInputField/FileInputField.js";
19
+ import { Form as V } from "../../Common/Form/Form.js";
20
+ import { useComponentDictionary as X, useI18n as Y } from "../../../i18n/I18n.js";
21
+ import { informationRequestEvents as $ } from "../../../shared/constants.js";
22
+ import "../../Flow/useFlow.js";
23
+ import { TextInputField as J } from "../../Common/Fields/TextInputField/TextInputField.js";
24
+ const K = "gusto-sdk-information-request-form", Z = ["image/jpeg", "image/png", "application/pdf"], ee = {
25
25
  ALLOWED_TAGS: ["a", "b", "strong"],
26
26
  ALLOWED_ATTR: ["target", "href", "rel"]
27
- }, ie = 5e3, re = f.record(
28
- f.string(),
29
- f.union([f.string().min(1), f.instanceof(File)])
27
+ }, oe = 5e3, ne = l.record(
28
+ l.string(),
29
+ l.union([l.string().min(1), l.instanceof(File)])
30
30
  );
31
- function ae(o) {
32
- return /* @__PURE__ */ e(Y, { ...o, children: /* @__PURE__ */ e(le, { ...o, children: o.children }) });
31
+ function Pe(t) {
32
+ return /* @__PURE__ */ e(W, { ...t, children: /* @__PURE__ */ e(ae, { ...t, children: t.children }) });
33
33
  }
34
- const ue = (o) => new Promise((s, r) => {
35
- const n = new FileReader();
36
- n.onload = () => {
37
- s(n.result);
38
- }, n.onerror = r, n.readAsDataURL(o);
39
- }), me = [u.Text, u.Document];
40
- function O(o) {
41
- return o.some((s) => !me.includes(s.responseType));
34
+ const te = (t) => new Promise((r, h) => {
35
+ const o = new FileReader();
36
+ o.onload = () => {
37
+ r(o.result);
38
+ }, o.onerror = h, o.readAsDataURL(t);
39
+ }), se = [i.Text, i.Document];
40
+ function re(t) {
41
+ return t.some((r) => !se.includes(r.responseType));
42
42
  }
43
- function ce(o) {
44
- return o.some((s) => s.responseType === u.Persona);
43
+ function ie(t) {
44
+ return t.some((r) => r.responseType === i.Persona);
45
45
  }
46
- function le({ companyId: o, requestId: s, dictionary: r }) {
47
- ee("InformationRequests.InformationRequestForm", r), A("InformationRequests.InformationRequestForm");
48
- const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: T, Heading: y, Text: m } = P(), { onEvent: g, baseSubmitHandler: I } = $(), { data: x } = _({
49
- companyUuid: o
50
- }), l = x.informationRequests?.find((t) => t.uuid === s), a = l?.requiredQuestions ?? [], F = l?.blockingPayroll ?? !1, w = O(a), N = ce(a), { mutateAsync: Q } = V(), v = {}, E = [];
51
- a.forEach((t) => {
52
- t.responseType === u.Text ? (E.push(t.questionUuid), v[t.questionUuid] = "") : t.responseType === u.Document && (E.push(t.questionUuid), v[t.questionUuid] = void 0);
46
+ function ae({ companyId: t, requestId: r, dictionary: h }) {
47
+ X("InformationRequests.InformationRequestForm", h), Y("InformationRequests.InformationRequestForm");
48
+ const { t: o } = C("InformationRequests.InformationRequestForm"), { Alert: F, Heading: S, Text: a } = H(), { onEvent: x, baseSubmitHandler: N } = j(), { data: D } = z({
49
+ companyUuid: t
50
+ }), y = D.informationRequests?.find((n) => n.uuid === r), c = y?.requiredQuestions ?? [], U = y?.blockingPayroll ?? !1, b = re(c), g = ie(c), { mutateAsync: P } = B(), T = {}, R = [];
51
+ c.forEach((n) => {
52
+ n.responseType === i.Text ? (R.push(n.questionUuid), T[n.questionUuid] = "") : n.responseType === i.Document && (R.push(n.questionUuid), T[n.questionUuid] = void 0);
53
53
  });
54
- const b = W({
55
- resolver: G(re),
56
- defaultValues: v
57
- }), L = async (t) => {
58
- await I(t, async () => {
59
- const h = (await Promise.all(
60
- E.map(async (p) => {
61
- const d = t[p];
62
- if (typeof d == "string")
54
+ const I = L({
55
+ resolver: k(ne),
56
+ defaultValues: T
57
+ }), _ = async (n) => {
58
+ await N(n, async () => {
59
+ const f = (await Promise.all(
60
+ R.map(async (u) => {
61
+ const m = n[u];
62
+ if (typeof m == "string")
63
63
  return {
64
- questionUuid: p,
65
- responseType: U.Text,
66
- textResponse: d
64
+ questionUuid: u,
65
+ responseType: v.Text,
66
+ textResponse: m
67
67
  };
68
- if (d instanceof File) {
69
- const z = await ue(d);
68
+ if (m instanceof File) {
69
+ const w = await te(m);
70
70
  return {
71
- questionUuid: p,
72
- responseType: U.Document,
73
- fileResponse: z,
74
- fileName: d.name
71
+ questionUuid: u,
72
+ responseType: v.Document,
73
+ fileResponse: w,
74
+ fileName: m.name
75
75
  };
76
76
  }
77
77
  return null;
78
78
  })
79
- )).filter((p) => p !== null), S = await Q({
79
+ )).filter((u) => u !== null), q = await P({
80
80
  request: {
81
- informationRequestUuid: s,
81
+ informationRequestUuid: r,
82
82
  requestBody: {
83
- requiredQuestions: h
83
+ requiredQuestions: f
84
84
  }
85
85
  }
86
86
  });
87
- g(C.INFORMATION_REQUEST_FORM_DONE, S.informationRequest);
87
+ x($.INFORMATION_REQUEST_FORM_DONE, q.informationRequest);
88
88
  });
89
- }, k = (t) => {
90
- const R = t.questionUuid, h = t.responseType === u.Document, S = t.responseType === u.Text;
91
- return /* @__PURE__ */ c("div", { className: i.questionCard, children: [
92
- /* @__PURE__ */ c("div", { className: i.questionDescription, children: [
93
- /* @__PURE__ */ e(m, { size: "sm", weight: "medium", children: n(h ? "questionTypes.document" : "questionTypes.answer") }),
94
- /* @__PURE__ */ e(m, { size: "sm", variant: "supporting", children: /* @__PURE__ */ e(
89
+ }, A = (n) => {
90
+ const d = n.questionUuid, f = n.responseType === i.Document, q = n.responseType === i.Text;
91
+ return /* @__PURE__ */ p("div", { className: s.questionCard, children: [
92
+ /* @__PURE__ */ p("div", { className: s.questionDescription, children: [
93
+ /* @__PURE__ */ e(a, { size: "sm", weight: "medium", children: o(f ? "questionTypes.document" : "questionTypes.answer") }),
94
+ /* @__PURE__ */ e(a, { size: "sm", variant: "supporting", children: /* @__PURE__ */ e(
95
95
  "span",
96
96
  {
97
97
  dangerouslySetInnerHTML: {
98
- __html: B.sanitize(t.questionText, se)
98
+ __html: M.sanitize(n.questionText, ee)
99
99
  }
100
100
  }
101
101
  ) })
102
102
  ] }),
103
- /* @__PURE__ */ e("hr", { className: i.divider }),
104
- S && /* @__PURE__ */ e("div", { className: i.textInputWrapper, children: /* @__PURE__ */ e(
105
- te,
103
+ /* @__PURE__ */ e("hr", { className: s.divider }),
104
+ q && /* @__PURE__ */ e("div", { className: s.textInputWrapper, children: /* @__PURE__ */ e(
105
+ J,
106
106
  {
107
- name: R,
108
- label: n("fields.textAnswer.label"),
109
- placeholder: n("fields.textAnswer.placeholder"),
110
- maxLength: ie,
107
+ name: d,
108
+ label: o("fields.textAnswer.label"),
109
+ placeholder: o("fields.textAnswer.placeholder"),
110
+ maxLength: oe,
111
111
  isRequired: !0,
112
- errorMessage: n("validation.required")
112
+ errorMessage: o("validation.required")
113
113
  }
114
114
  ) }),
115
- h && /* @__PURE__ */ e("div", { className: i.fileInputWrapper, children: /* @__PURE__ */ e(
116
- J,
115
+ f && /* @__PURE__ */ e("div", { className: s.fileInputWrapper, children: /* @__PURE__ */ e(
116
+ G,
117
117
  {
118
- name: R,
119
- label: n("fields.fileUpload.label"),
120
- accept: oe,
118
+ name: d,
119
+ label: o("fields.fileUpload.label"),
120
+ accept: Z,
121
121
  isRequired: !0,
122
- errorMessage: n("validation.required")
122
+ errorMessage: o("validation.required")
123
123
  }
124
124
  ) })
125
- ] }, R);
126
- }, j = /* @__PURE__ */ c("div", { className: i.questionCard, children: [
127
- /* @__PURE__ */ c("div", { className: i.questionDescription, children: [
128
- /* @__PURE__ */ e(m, { weight: "medium", children: n(N ? "unsupported.persona.title" : "unsupported.generic.title") }),
129
- /* @__PURE__ */ e(m, { children: n(
130
- N ? "unsupported.persona.description" : "unsupported.generic.description"
125
+ ] }, d);
126
+ }, O = /* @__PURE__ */ p("div", { className: s.questionCard, children: [
127
+ /* @__PURE__ */ p("div", { className: s.questionDescription, children: [
128
+ /* @__PURE__ */ e(a, { weight: "medium", children: o(g ? "unsupported.persona.title" : "unsupported.generic.title") }),
129
+ /* @__PURE__ */ e(a, { children: o(
130
+ g ? "unsupported.persona.description" : "unsupported.generic.description"
131
131
  ) })
132
132
  ] }),
133
- /* @__PURE__ */ e("hr", { className: i.divider }),
134
- /* @__PURE__ */ e("div", { className: i.contactSupport, children: /* @__PURE__ */ e(m, { variant: "supporting", children: n("unsupported.contactSupport") }) })
133
+ /* @__PURE__ */ e("hr", { className: s.divider }),
134
+ /* @__PURE__ */ e("div", { className: s.contactSupport, children: /* @__PURE__ */ e(a, { variant: "supporting", children: o("unsupported.contactSupport") }) })
135
135
  ] });
136
- return /* @__PURE__ */ e("div", { className: i.root, children: /* @__PURE__ */ c(q, { flexDirection: "column", gap: 16, children: [
137
- /* @__PURE__ */ e(y, { as: "h2", children: n("title") }),
138
- F && /* @__PURE__ */ e(T, { status: "error", label: n("blockingAlert.title"), disableScrollIntoView: !0, children: n("blockingAlert.description") }),
139
- w ? j : /* @__PURE__ */ e(H, { ...b, children: /* @__PURE__ */ e(Z, { id: M, onSubmit: b.handleSubmit(L), children: /* @__PURE__ */ e(q, { flexDirection: "column", gap: 16, children: a.map(k) }) }) })
136
+ return /* @__PURE__ */ e("div", { className: s.root, children: /* @__PURE__ */ p(E, { flexDirection: "column", gap: 16, children: [
137
+ /* @__PURE__ */ e(S, { as: "h2", children: o("title") }),
138
+ U && /* @__PURE__ */ e(F, { status: "error", label: o("blockingAlert.title"), disableScrollIntoView: !0, children: o("blockingAlert.description") }),
139
+ b ? O : /* @__PURE__ */ e(Q, { ...I, children: /* @__PURE__ */ e(V, { id: K, onSubmit: I.handleSubmit(_), children: /* @__PURE__ */ e(E, { flexDirection: "column", gap: 16, children: c.map(A) }) }) })
140
140
  ] }) });
141
141
  }
142
- const pe = ({ onEvent: o }) => {
143
- A("InformationRequests.InformationRequestForm");
144
- const { t: s } = D("InformationRequests.InformationRequestForm"), { Button: r } = P(), { companyId: n, selectedRequestId: T } = ne(), { data: y } = _({
145
- companyUuid: n
146
- }), g = y.informationRequests?.find((F) => F.uuid === T)?.requiredQuestions ?? [], I = O(g), l = K({
147
- mutationKey: X()
148
- }) > 0, a = () => {
149
- o(C.INFORMATION_REQUEST_FORM_CANCEL);
150
- };
151
- return I ? /* @__PURE__ */ e(q, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(r, { variant: "secondary", onClick: a, children: s("cta.close") }) }) : /* @__PURE__ */ c(q, { justifyContent: "flex-end", gap: 12, children: [
152
- /* @__PURE__ */ e(r, { variant: "secondary", onClick: a, isDisabled: l, children: s("cta.cancel") }),
153
- /* @__PURE__ */ e(
154
- r,
155
- {
156
- variant: "primary",
157
- type: "submit",
158
- form: M,
159
- isLoading: l,
160
- children: s("cta.submit")
161
- }
162
- )
163
- ] });
164
- };
165
- ae.Footer = pe;
166
142
  export {
167
- ae as InformationRequestForm
143
+ Pe as InformationRequestForm
168
144
  };
169
145
  //# sourceMappingURL=InformationRequestForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InformationRequestForm.js","sources":["../../../../src/components/InformationRequests/InformationRequestForm/InformationRequestForm.tsx"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { useIsMutating } from '@tanstack/react-query'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/informationRequestsGetInformationRequests'\nimport {\n useInformationRequestsSubmitMutation,\n mutationKeyInformationRequestsSubmit,\n} from '@gusto/embedded-api-v-2026-02-01/react-query/informationRequestsSubmit'\nimport type { RequiredQuestions } from '@gusto/embedded-api-v-2026-02-01/models/components/informationrequest'\nimport { ResponseType } from '@gusto/embedded-api-v-2026-02-01/models/components/informationrequest'\nimport { ResponseType as SubmitResponseType } from '@gusto/embedded-api-v-2026-02-01/models/operations/submitinformationrequest'\nimport type { InformationRequestsContextInterface } from '../InformationRequestsComponents'\nimport styles from './InformationRequestForm.module.scss'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex, TextInputField } from '@/components/Common'\nimport { FileInputField } from '@/components/Common/Fields/FileInputField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { informationRequestEvents, type EventType } from '@/shared/constants'\nimport { useFlow } from '@/components/Flow/useFlow'\n\nconst INFORMATION_REQUEST_FORM_ID = 'gusto-sdk-information-request-form'\nconst ACCEPTED_FILE_TYPES = ['image/jpeg', 'image/png', 'application/pdf']\nconst dompurifyConfig = {\n ALLOWED_TAGS: ['a', 'b', 'strong'],\n ALLOWED_ATTR: ['target', 'href', 'rel'],\n}\n\n/* API does not enforce an upper limit, so set a reasonable character max for a single-line input. */\nconst MAX_TEXT_RESPONSE = 5000\n\nconst InformationRequestFormSchema = z.record(\n z.string(),\n z.union([z.string().min(1), z.instanceof(File)]),\n)\n\ntype InformationRequestFormValues = z.infer<typeof InformationRequestFormSchema>\n\n/**\n * Props for {@link InformationRequestForm}.\n *\n * @public\n */\nexport interface InformationRequestFormProps extends BaseComponentInterface<'InformationRequests.InformationRequestForm'> {\n /** The associated company identifier. */\n companyId: string\n /** The identifier of the information request to respond to. */\n requestId: string\n /** Event handler invoked when the form is submitted or cancelled. See the events table in {@link InformationRequestForm}. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Dynamic response form for a single information request.\n *\n * Renders supported question types (text and document upload) based on the request's\n * `requiredQuestions` payload and submits responses to the Submit information request\n * endpoint. Use this component directly when you have built your own list or routing\n * surface and need to host the form — typically inside a modal or page you control.\n *\n * Requests with unsupported response types (e.g. `persona`-driven identity verification)\n * display a guidance message instead of the form; in those cases the user must complete\n * the request through your own integration with the underlying provider.\n *\n * Text inputs accept up to 5,000 characters. Document uploads are restricted to JPEG,\n * PNG, or PDF.\n *\n * @remarks\n * Events emitted via `onEvent`:\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `informationRequest/form/done` | Fired when the form is successfully submitted | The `informationRequest` field from the Submit information request response |\n * | `informationRequest/form/cancel` | Fired when the user cancels the form | — |\n *\n * @param props - See {@link InformationRequestFormProps}.\n * @returns The rendered information request response form.\n * @public\n */\nexport function InformationRequestForm(props: InformationRequestFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst convertFileToDataUrl = (file: File) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = () => {\n resolve(reader.result as string)\n }\n reader.onerror = reject\n reader.readAsDataURL(file)\n })\n}\n\nconst SUPPORTED_RESPONSE_TYPES: ResponseType[] = [ResponseType.Text, ResponseType.Document]\n\nfunction hasUnsupportedQuestionTypes(questions: RequiredQuestions[]) {\n return questions.some(question => !SUPPORTED_RESPONSE_TYPES.includes(question.responseType))\n}\n\nfunction hasPersonaQuestionType(questions: RequiredQuestions[]) {\n return questions.some(question => question.responseType === ResponseType.Persona)\n}\n\nfunction Root({ companyId, requestId, dictionary }: InformationRequestFormProps) {\n useComponentDictionary('InformationRequests.InformationRequestForm', dictionary)\n useI18n('InformationRequests.InformationRequestForm')\n const { t } = useTranslation('InformationRequests.InformationRequestForm')\n const { Alert, Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequest = data.informationRequests?.find(req => req.uuid === requestId)\n const requiredQuestions = informationRequest?.requiredQuestions ?? []\n const isBlockingPayroll = informationRequest?.blockingPayroll ?? false\n const hasUnsupportedTypes = hasUnsupportedQuestionTypes(requiredQuestions)\n const hasPersonaType = hasPersonaQuestionType(requiredQuestions)\n\n const { mutateAsync: submitInformationRequest } = useInformationRequestsSubmitMutation()\n\n const defaultValues: Record<string, string | File | undefined> = {}\n const questionUuids: string[] = []\n\n requiredQuestions.forEach(question => {\n if (question.responseType === ResponseType.Text) {\n questionUuids.push(question.questionUuid)\n defaultValues[question.questionUuid] = ''\n } else if (question.responseType === ResponseType.Document) {\n questionUuids.push(question.questionUuid)\n defaultValues[question.questionUuid] = undefined\n }\n })\n\n const formMethods = useForm<InformationRequestFormValues>({\n resolver: zodResolver(InformationRequestFormSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InformationRequestFormValues) => {\n await baseSubmitHandler(formData, async () => {\n const questionResponses = await Promise.all(\n questionUuids.map(async uuid => {\n const value = formData[uuid]\n\n if (typeof value === 'string') {\n return {\n questionUuid: uuid,\n responseType: SubmitResponseType.Text,\n textResponse: value,\n }\n }\n\n if (value instanceof File) {\n const fileResponse = await convertFileToDataUrl(value)\n return {\n questionUuid: uuid,\n responseType: SubmitResponseType.Document,\n fileResponse,\n fileName: value.name,\n }\n }\n\n return null\n }),\n )\n\n const validResponses = questionResponses.filter(response => response !== null)\n\n const response = await submitInformationRequest({\n request: {\n informationRequestUuid: requestId,\n requestBody: {\n requiredQuestions: validResponses,\n },\n },\n })\n\n onEvent(informationRequestEvents.INFORMATION_REQUEST_FORM_DONE, response.informationRequest)\n })\n }\n\n const renderQuestion = (question: RequiredQuestions) => {\n const fieldName = question.questionUuid\n const isDocumentType = question.responseType === ResponseType.Document\n const isTextType = question.responseType === ResponseType.Text\n\n return (\n <div key={fieldName} className={styles.questionCard}>\n <div className={styles.questionDescription}>\n <Text size=\"sm\" weight=\"medium\">\n {isDocumentType ? t('questionTypes.document') : t('questionTypes.answer')}\n </Text>\n <Text size=\"sm\" variant=\"supporting\">\n {/* SECURITY: XSS mitigated via DOMPurify with strict allowlist. Pattern matches TaxInputs.tsx */}\n <span\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(question.questionText, dompurifyConfig),\n }}\n />\n </Text>\n </div>\n\n <hr className={styles.divider} />\n\n {isTextType && (\n <div className={styles.textInputWrapper}>\n <TextInputField\n name={fieldName}\n label={t('fields.textAnswer.label')}\n placeholder={t('fields.textAnswer.placeholder')}\n maxLength={MAX_TEXT_RESPONSE}\n isRequired\n errorMessage={t('validation.required')}\n />\n </div>\n )}\n\n {isDocumentType && (\n <div className={styles.fileInputWrapper}>\n <FileInputField\n name={fieldName}\n label={t('fields.fileUpload.label')}\n accept={ACCEPTED_FILE_TYPES}\n isRequired\n errorMessage={t('validation.required')}\n />\n </div>\n )}\n </div>\n )\n }\n\n const unsupportedPlaceholder = (\n <div className={styles.questionCard}>\n <div className={styles.questionDescription}>\n <Text weight=\"medium\">\n {t(hasPersonaType ? 'unsupported.persona.title' : 'unsupported.generic.title')}\n </Text>\n <Text>\n {t(\n hasPersonaType ? 'unsupported.persona.description' : 'unsupported.generic.description',\n )}\n </Text>\n </div>\n\n <hr className={styles.divider} />\n\n <div className={styles.contactSupport}>\n <Text variant=\"supporting\">{t('unsupported.contactSupport')}</Text>\n </div>\n </div>\n )\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('title')}</Heading>\n\n {isBlockingPayroll && (\n <Alert status=\"error\" label={t('blockingAlert.title')} disableScrollIntoView>\n {t('blockingAlert.description')}\n </Alert>\n )}\n\n {hasUnsupportedTypes ? (\n unsupportedPlaceholder\n ) : (\n <FormProvider {...formMethods}>\n <Form id={INFORMATION_REQUEST_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n {requiredQuestions.map(renderQuestion)}\n </Flex>\n </Form>\n </FormProvider>\n )}\n </Flex>\n </div>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('InformationRequests.InformationRequestForm')\n const { t } = useTranslation('InformationRequests.InformationRequestForm')\n const { Button } = useComponentContext()\n const { companyId, selectedRequestId } = useFlow<InformationRequestsContextInterface>()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequest = data.informationRequests?.find(req => req.uuid === selectedRequestId)\n const requiredQuestions = informationRequest?.requiredQuestions ?? []\n const hasUnsupportedTypes = hasUnsupportedQuestionTypes(requiredQuestions)\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyInformationRequestsSubmit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL)\n }\n\n if (hasUnsupportedTypes) {\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel}>\n {t('cta.close')}\n </Button>\n </Flex>\n )\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={INFORMATION_REQUEST_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.submit')}\n </Button>\n </Flex>\n )\n}\n\nInformationRequestForm.Footer = Footer\n"],"names":["INFORMATION_REQUEST_FORM_ID","ACCEPTED_FILE_TYPES","dompurifyConfig","MAX_TEXT_RESPONSE","InformationRequestFormSchema","z","InformationRequestForm","props","jsx","BaseComponent","Root","convertFileToDataUrl","file","resolve","reject","reader","SUPPORTED_RESPONSE_TYPES","ResponseType","hasUnsupportedQuestionTypes","questions","question","hasPersonaQuestionType","companyId","requestId","dictionary","useComponentDictionary","useI18n","t","useTranslation","Alert","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","data","useInformationRequestsGetInformationRequestsSuspense","informationRequest","req","requiredQuestions","isBlockingPayroll","hasUnsupportedTypes","hasPersonaType","submitInformationRequest","useInformationRequestsSubmitMutation","defaultValues","questionUuids","formMethods","useForm","zodResolver","onSubmit","formData","validResponses","uuid","value","SubmitResponseType","fileResponse","response","informationRequestEvents","renderQuestion","fieldName","isDocumentType","isTextType","jsxs","styles","DOMPurify","TextInputField","FileInputField","unsupportedPlaceholder","Flex","FormProvider","Form","Footer","Button","selectedRequestId","useFlow","isPending","useIsMutating","mutationKeyInformationRequestsSubmit","handleCancel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,IAA8B,sCAC9BC,KAAsB,CAAC,cAAc,aAAa,iBAAiB,GACnEC,KAAkB;AAAA,EACtB,cAAc,CAAC,KAAK,KAAK,QAAQ;AAAA,EACjC,cAAc,CAAC,UAAU,QAAQ,KAAK;AACxC,GAGMC,KAAoB,KAEpBC,KAA+BC,EAAE;AAAA,EACrCA,EAAE,OAAA;AAAA,EACFA,EAAE,MAAM,CAACA,EAAE,OAAA,EAAS,IAAI,CAAC,GAAGA,EAAE,WAAW,IAAI,CAAC,CAAC;AACjD;AA8CO,SAASC,GAAuBC,GAAoC;AACzE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,MAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMI,KAAuB,CAACC,MACrB,IAAI,QAAgB,CAACC,GAASC,MAAW;AAC9C,QAAMC,IAAS,IAAI,WAAA;AACnB,EAAAA,EAAO,SAAS,MAAM;AACpB,IAAAF,EAAQE,EAAO,MAAgB;AAAA,EACjC,GACAA,EAAO,UAAUD,GACjBC,EAAO,cAAcH,CAAI;AAC3B,CAAC,GAGGI,KAA2C,CAACC,EAAa,MAAMA,EAAa,QAAQ;AAE1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,CAAiB,GACjD,qBAAqB,CAAA,GAC7DjC,IAAsBxB,EAA4BsB,CAAiB,GAKnEqC,IAHaC,EAAc;AAAA,IAC/B,aAAaC,EAAA;AAAA,EAAqC,CACnD,IAC8B,GAEzBC,IAAe,MAAM;AACzB,IAAA/C,EAAQ0B,EAAyB,+BAA+B;AAAA,EAClE;AAEA,SAAIjB,IAEA,gBAAAlC,EAAC8D,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA,gBAAA9D,EAACkE,GAAA,EAAO,SAAQ,aAAY,SAASM,GAClC,UAAArD,EAAE,WAAW,GAChB,GACF,IAKF,gBAAAqC,EAACM,GAAA,EAAK,gBAAe,YAAW,KAAK,IACnC,UAAA;AAAA,IAAA,gBAAA9D,EAACkE,GAAA,EAAO,SAAQ,aAAY,SAASM,GAAc,YAAYH,GAC5D,UAAAlD,EAAE,YAAY,EAAA,CACjB;AAAA,IACA,gBAAAnB;AAAA,MAACkE;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAM1E;AAAA,QACN,WAAW6E;AAAA,QAEV,YAAE,YAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EACjB,GACF;AAEJ;AAEAvE,GAAuB,SAASmE;"}
1
+ {"version":3,"file":"InformationRequestForm.js","sources":["../../../../src/components/InformationRequests/InformationRequestForm/InformationRequestForm.tsx"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { useTranslation } from 'react-i18next'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z } from 'zod'\nimport { useIsMutating } from '@tanstack/react-query'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport {\n useInformationRequestsSubmitMutation,\n mutationKeyInformationRequestsSubmit,\n} from '@gusto/embedded-api/react-query/informationRequestsSubmit'\nimport type { RequiredQuestions } from '@gusto/embedded-api/models/components/informationrequest'\nimport { ResponseType } from '@gusto/embedded-api/models/components/informationrequest'\nimport { ResponseType as SubmitResponseType } from '@gusto/embedded-api/models/operations/submitinformationrequest'\nimport type { InformationRequestsContextInterface } from '../InformationRequestsComponents'\nimport styles from './InformationRequestForm.module.scss'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex, TextInputField } from '@/components/Common'\nimport { FileInputField } from '@/components/Common/Fields/FileInputField'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { informationRequestEvents, type EventType } from '@/shared/constants'\nimport { useFlow } from '@/components/Flow/useFlow'\n\nconst INFORMATION_REQUEST_FORM_ID = 'gusto-sdk-information-request-form'\nconst ACCEPTED_FILE_TYPES = ['image/jpeg', 'image/png', 'application/pdf']\nconst dompurifyConfig = {\n ALLOWED_TAGS: ['a', 'b', 'strong'],\n ALLOWED_ATTR: ['target', 'href', 'rel'],\n}\n\n/* API does not enforce an upper limit, so set a reasonable character max for a single-line input. */\nconst MAX_TEXT_RESPONSE = 5000\n\nconst InformationRequestFormSchema = z.record(\n z.string(),\n z.union([z.string().min(1), z.instanceof(File)]),\n)\n\ntype InformationRequestFormValues = z.infer<typeof InformationRequestFormSchema>\n\n/**\n * Props for {@link InformationRequestForm}.\n *\n * @public\n */\nexport interface InformationRequestFormProps extends BaseComponentInterface<'InformationRequests.InformationRequestForm'> {\n /** The associated company identifier. */\n companyId: string\n /** The identifier of the information request to respond to. */\n requestId: string\n /** Event handler invoked when the form is submitted or cancelled. See the events table in {@link InformationRequestForm}. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Dynamic response form for a single information request.\n *\n * Renders supported question types (text and document upload) based on the request's\n * `requiredQuestions` payload and submits responses to the Submit information request\n * endpoint. Use this component directly when you have built your own list or routing\n * surface and need to host the form — typically inside a modal or page you control.\n *\n * Requests with unsupported response types (e.g. `persona`-driven identity verification)\n * display a guidance message instead of the form; in those cases the user must complete\n * the request through your own integration with the underlying provider.\n *\n * Text inputs accept up to 5,000 characters. Document uploads are restricted to JPEG,\n * PNG, or PDF.\n *\n * @remarks\n * Events emitted via `onEvent`:\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `informationRequest/form/done` | Fired when the form is successfully submitted | The `informationRequest` field from the Submit information request response |\n * | `informationRequest/form/cancel` | Fired when the user cancels the form | — |\n *\n * @param props - See {@link InformationRequestFormProps}.\n * @returns The rendered information request response form.\n * @public\n */\nexport function InformationRequestForm(props: InformationRequestFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst convertFileToDataUrl = (file: File) => {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = () => {\n resolve(reader.result as string)\n }\n reader.onerror = reject\n reader.readAsDataURL(file)\n })\n}\n\nconst SUPPORTED_RESPONSE_TYPES: ResponseType[] = [ResponseType.Text, ResponseType.Document]\n\nfunction hasUnsupportedQuestionTypes(questions: RequiredQuestions[]) {\n return questions.some(question => !SUPPORTED_RESPONSE_TYPES.includes(question.responseType))\n}\n\nfunction hasPersonaQuestionType(questions: RequiredQuestions[]) {\n return questions.some(question => question.responseType === ResponseType.Persona)\n}\n\nfunction Root({ companyId, requestId, dictionary }: InformationRequestFormProps) {\n useComponentDictionary('InformationRequests.InformationRequestForm', dictionary)\n useI18n('InformationRequests.InformationRequestForm')\n const { t } = useTranslation('InformationRequests.InformationRequestForm')\n const { Alert, Heading, Text } = useComponentContext()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequest = data.informationRequests?.find(req => req.uuid === requestId)\n const requiredQuestions = informationRequest?.requiredQuestions ?? []\n const isBlockingPayroll = informationRequest?.blockingPayroll ?? false\n const hasUnsupportedTypes = hasUnsupportedQuestionTypes(requiredQuestions)\n const hasPersonaType = hasPersonaQuestionType(requiredQuestions)\n\n const { mutateAsync: submitInformationRequest } = useInformationRequestsSubmitMutation()\n\n const defaultValues: Record<string, string | File | undefined> = {}\n const questionUuids: string[] = []\n\n requiredQuestions.forEach(question => {\n if (question.responseType === ResponseType.Text) {\n questionUuids.push(question.questionUuid)\n defaultValues[question.questionUuid] = ''\n } else if (question.responseType === ResponseType.Document) {\n questionUuids.push(question.questionUuid)\n defaultValues[question.questionUuid] = undefined\n }\n })\n\n const formMethods = useForm<InformationRequestFormValues>({\n resolver: zodResolver(InformationRequestFormSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InformationRequestFormValues) => {\n await baseSubmitHandler(formData, async () => {\n const questionResponses = await Promise.all(\n questionUuids.map(async uuid => {\n const value = formData[uuid]\n\n if (typeof value === 'string') {\n return {\n questionUuid: uuid,\n responseType: SubmitResponseType.Text,\n textResponse: value,\n }\n }\n\n if (value instanceof File) {\n const fileResponse = await convertFileToDataUrl(value)\n return {\n questionUuid: uuid,\n responseType: SubmitResponseType.Document,\n fileResponse,\n fileName: value.name,\n }\n }\n\n return null\n }),\n )\n\n const validResponses = questionResponses.filter(response => response !== null)\n\n const response = await submitInformationRequest({\n request: {\n informationRequestUuid: requestId,\n requestBody: {\n requiredQuestions: validResponses,\n },\n },\n })\n\n onEvent(informationRequestEvents.INFORMATION_REQUEST_FORM_DONE, response.informationRequest)\n })\n }\n\n const renderQuestion = (question: RequiredQuestions) => {\n const fieldName = question.questionUuid\n const isDocumentType = question.responseType === ResponseType.Document\n const isTextType = question.responseType === ResponseType.Text\n\n return (\n <div key={fieldName} className={styles.questionCard}>\n <div className={styles.questionDescription}>\n <Text size=\"sm\" weight=\"medium\">\n {isDocumentType ? t('questionTypes.document') : t('questionTypes.answer')}\n </Text>\n <Text size=\"sm\" variant=\"supporting\">\n {/* SECURITY: XSS mitigated via DOMPurify with strict allowlist. Pattern matches TaxInputs.tsx */}\n <span\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(question.questionText, dompurifyConfig),\n }}\n />\n </Text>\n </div>\n\n <hr className={styles.divider} />\n\n {isTextType && (\n <div className={styles.textInputWrapper}>\n <TextInputField\n name={fieldName}\n label={t('fields.textAnswer.label')}\n placeholder={t('fields.textAnswer.placeholder')}\n maxLength={MAX_TEXT_RESPONSE}\n isRequired\n errorMessage={t('validation.required')}\n />\n </div>\n )}\n\n {isDocumentType && (\n <div className={styles.fileInputWrapper}>\n <FileInputField\n name={fieldName}\n label={t('fields.fileUpload.label')}\n accept={ACCEPTED_FILE_TYPES}\n isRequired\n errorMessage={t('validation.required')}\n />\n </div>\n )}\n </div>\n )\n }\n\n const unsupportedPlaceholder = (\n <div className={styles.questionCard}>\n <div className={styles.questionDescription}>\n <Text weight=\"medium\">\n {t(hasPersonaType ? 'unsupported.persona.title' : 'unsupported.generic.title')}\n </Text>\n <Text>\n {t(\n hasPersonaType ? 'unsupported.persona.description' : 'unsupported.generic.description',\n )}\n </Text>\n </div>\n\n <hr className={styles.divider} />\n\n <div className={styles.contactSupport}>\n <Text variant=\"supporting\">{t('unsupported.contactSupport')}</Text>\n </div>\n </div>\n )\n\n return (\n <div className={styles.root}>\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('title')}</Heading>\n\n {isBlockingPayroll && (\n <Alert status=\"error\" label={t('blockingAlert.title')} disableScrollIntoView>\n {t('blockingAlert.description')}\n </Alert>\n )}\n\n {hasUnsupportedTypes ? (\n unsupportedPlaceholder\n ) : (\n <FormProvider {...formMethods}>\n <Form id={INFORMATION_REQUEST_FORM_ID} onSubmit={formMethods.handleSubmit(onSubmit)}>\n <Flex flexDirection=\"column\" gap={16}>\n {requiredQuestions.map(renderQuestion)}\n </Flex>\n </Form>\n </FormProvider>\n )}\n </Flex>\n </div>\n )\n}\n\n/** @internal */\nexport function Footer({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) {\n useI18n('InformationRequests.InformationRequestForm')\n const { t } = useTranslation('InformationRequests.InformationRequestForm')\n const { Button } = useComponentContext()\n const { companyId, selectedRequestId } = useFlow<InformationRequestsContextInterface>()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequest = data.informationRequests?.find(req => req.uuid === selectedRequestId)\n const requiredQuestions = informationRequest?.requiredQuestions ?? []\n const hasUnsupportedTypes = hasUnsupportedQuestionTypes(requiredQuestions)\n\n const isMutating = useIsMutating({\n mutationKey: mutationKeyInformationRequestsSubmit(),\n })\n const isPending = isMutating > 0\n\n const handleCancel = () => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_FORM_CANCEL)\n }\n\n if (hasUnsupportedTypes) {\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel}>\n {t('cta.close')}\n </Button>\n </Flex>\n )\n }\n\n return (\n <Flex justifyContent=\"flex-end\" gap={12}>\n <Button variant=\"secondary\" onClick={handleCancel} isDisabled={isPending}>\n {t('cta.cancel')}\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={INFORMATION_REQUEST_FORM_ID}\n isLoading={isPending}\n >\n {t('cta.submit')}\n </Button>\n </Flex>\n )\n}\n"],"names":["INFORMATION_REQUEST_FORM_ID","ACCEPTED_FILE_TYPES","dompurifyConfig","MAX_TEXT_RESPONSE","InformationRequestFormSchema","z","InformationRequestForm","props","jsx","BaseComponent","Root","convertFileToDataUrl","file","resolve","reject","reader","SUPPORTED_RESPONSE_TYPES","ResponseType","hasUnsupportedQuestionTypes","questions","question","hasPersonaQuestionType","companyId","requestId","dictionary","useComponentDictionary","useI18n","t","useTranslation","Alert","Heading","Text","useComponentContext","onEvent","baseSubmitHandler","useBase","data","useInformationRequestsGetInformationRequestsSuspense","informationRequest","req","requiredQuestions","isBlockingPayroll","hasUnsupportedTypes","hasPersonaType","submitInformationRequest","useInformationRequestsSubmitMutation","defaultValues","questionUuids","formMethods","useForm","zodResolver","onSubmit","formData","validResponses","uuid","value","SubmitResponseType","fileResponse","response","informationRequestEvents","renderQuestion","fieldName","isDocumentType","isTextType","jsxs","styles","DOMPurify","TextInputField","FileInputField","unsupportedPlaceholder","Flex","FormProvider","Form"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,IAA8B,sCAC9BC,IAAsB,CAAC,cAAc,aAAa,iBAAiB,GACnEC,KAAkB;AAAA,EACtB,cAAc,CAAC,KAAK,KAAK,QAAQ;AAAA,EACjC,cAAc,CAAC,UAAU,QAAQ,KAAK;AACxC,GAGMC,KAAoB,KAEpBC,KAA+BC,EAAE;AAAA,EACrCA,EAAE,OAAA;AAAA,EACFA,EAAE,MAAM,CAACA,EAAE,OAAA,EAAS,IAAI,CAAC,GAAGA,EAAE,WAAW,IAAI,CAAC,CAAC;AACjD;AA8CO,SAASC,GAAuBC,GAAoC;AACzE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,MAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMI,KAAuB,CAACC,MACrB,IAAI,QAAgB,CAACC,GAASC,MAAW;AAC9C,QAAMC,IAAS,IAAI,WAAA;AACnB,EAAAA,EAAO,SAAS,MAAM;AACpB,IAAAF,EAAQE,EAAO,MAAgB;AAAA,EACjC,GACAA,EAAO,UAAUD,GACjBC,EAAO,cAAcH,CAAI;AAC3B,CAAC,GAGGI,KAA2C,CAACC,EAAa,MAAMA,EAAa,QAAQ;AAE1F,SAASC,GAA4BC,GAAgC;AACnE,SAAOA,EAAU,KAAK,CAAAC,MAAY,CAACJ,GAAyB,SAASI,EAAS,YAAY,CAAC;AAC7F;AAEA,SAASC,GAAuBF,GAAgC;AAC9D,SAAOA,EAAU,KAAK,CAAAC,MAAYA,EAAS,iBAAiBH,EAAa,OAAO;AAClF;AAEA,SAASP,GAAK,EAAE,WAAAY,GAAW,WAAAC,GAAW,YAAAC,KAA2C;A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rB,4BAACK,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAA9D,EAACsB,GAAA,EAAQ,IAAG,MAAM,UAAAH,EAAE,OAAO,GAAE;AAAA,IAE5Bc,KACC,gBAAAjC,EAACqB,GAAA,EAAM,QAAO,SAAQ,OAAOF,EAAE,qBAAqB,GAAG,uBAAqB,IACzE,UAAAA,EAAE,2BAA2B,GAChC;AAAA,IAGDe,IACC2B,IAEA,gBAAA7D,EAAC+D,GAAA,EAAc,GAAGvB,GAChB,UAAA,gBAAAxC,EAACgE,GAAA,EAAK,IAAIxE,GAA6B,UAAUgD,EAAY,aAAaG,CAAQ,GAChF,UAAA,gBAAA3C,EAAC8D,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA9B,EAAkB,IAAIoB,CAAc,EAAA,CACvC,EAAA,CACF,EAAA,CACF;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF;AAEJ;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as a } from "react/jsx-runtime";
2
2
  import { useTranslation as b } from "react-i18next";
3
- import { useInformationRequestsGetInformationRequestsSuspense as P } from "@gusto/embedded-api-v-2026-02-01/react-query/informationRequestsGetInformationRequests";
4
- import { InformationRequestStatus as r, InformationRequestType as i } from "@gusto/embedded-api-v-2026-02-01/models/components/informationrequest";
3
+ import { useInformationRequestsGetInformationRequestsSuspense as P } from "@gusto/embedded-api/react-query/informationRequestsGetInformationRequests";
4
+ import { InformationRequestStatus as r, InformationRequestType as i } from "@gusto/embedded-api/models/components/informationrequest";
5
5
  import { BaseComponent as w } from "../../Base/Base.js";
6
6
  import "../../Base/useBase.js";
7
7
  import { useComponentContext as x } from "../../../contexts/ComponentAdapter/useComponentContext.js";
@@ -1 +1 @@
1
- {"version":3,"file":"InformationRequestList.js","sources":["../../../../src/components/InformationRequests/InformationRequestList/InformationRequestList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/informationRequestsGetInformationRequests'\nimport type { InformationRequest } from '@gusto/embedded-api-v-2026-02-01/models/components/informationrequest'\nimport {\n InformationRequestStatus,\n InformationRequestType,\n} from '@gusto/embedded-api-v-2026-02-01/models/components/informationrequest'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { EmptyData, Flex, FlexItem } from '@/components/Common'\nimport { informationRequestEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\n\n/**\n * Props for {@link InformationRequestList}.\n *\n * @public\n */\nexport interface InformationRequestListProps extends BaseComponentInterface<'InformationRequests.InformationRequestList'> {\n /** The associated company identifier. */\n companyId: string\n /** Event callback. See the events table on {@link InformationRequestList} for emitted events. */\n onEvent: BaseComponentInterface['onEvent']\n}\n\n/**\n * Displays the list of outstanding information requests for a company with a \"Respond\" CTA on each open request.\n *\n * @remarks\n * Renders status badges for each request and an extra \"Payroll blocking\" badge when the request is currently blocking payroll. Approved requests are filtered out of the list. Used as the top-level surface of `InformationRequests.InformationRequestsFlow`, but can be rendered directly when you want to host the response form yourself (e.g. in a custom modal or page).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `informationRequest/respond` | Fired when the user clicks \"Respond\" on an open request | `{ requestId: string }` |\n *\n * @param props - See {@link InformationRequestListProps}.\n * @returns The rendered information request list.\n * @public\n */\nexport function InformationRequestList(props: InformationRequestListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\ntype StatusMapping = {\n label: string\n badgeStatus: BadgeProps['status']\n} | null\n\nfunction Root({ companyId, dictionary, onEvent }: InformationRequestListProps) {\n useComponentDictionary('InformationRequests.InformationRequestList', dictionary)\n useI18n('InformationRequests.InformationRequestList')\n const { t } = useTranslation('InformationRequests.InformationRequestList')\n const { Heading, Text, Button, Badge } = useComponentContext()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequests = data.informationRequests ?? []\n\n const visibleRequests = informationRequests.filter(\n request => request.status !== InformationRequestStatus.Approved,\n )\n\n const getTypeLabel = (type: InformationRequest['type']): string => {\n switch (type) {\n case InformationRequestType.CompanyOnboarding:\n return t('types.companyOnboarding')\n case InformationRequestType.AccountProtection:\n return t('types.accountProtection')\n case InformationRequestType.PaymentRequest:\n return t('types.paymentRequest')\n case InformationRequestType.PaymentError:\n return t('types.paymentError')\n default:\n return t('types.unknown')\n }\n }\n\n const getStatusMapping = (status: InformationRequest['status']): StatusMapping => {\n switch (status) {\n case InformationRequestStatus.PendingResponse:\n return { label: t('status.incomplete'), badgeStatus: 'info' }\n case InformationRequestStatus.PendingReview:\n return { label: t('status.underReview'), badgeStatus: 'warning' }\n default:\n return null\n }\n }\n\n const dataViewProps = useDataView({\n data: visibleRequests,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n columns: [\n {\n key: 'type',\n title: t('columns.type'),\n render: request => (\n <FlexItem flexGrow={1}>\n <Text weight=\"medium\">{getTypeLabel(request.type)}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: request => {\n const statusMapping = getStatusMapping(request.status)\n const showPayrollBlockingBadge = request.blockingPayroll\n\n if (!statusMapping && !showPayrollBlockingBadge) {\n return null\n }\n\n return (\n <Flex gap={8} alignItems=\"center\">\n {statusMapping && (\n <Badge status={statusMapping.badgeStatus}>{statusMapping.label}</Badge>\n )}\n {showPayrollBlockingBadge && (\n <Badge status=\"error\">{t('status.payrollBlocking')}</Badge>\n )}\n </Flex>\n )\n },\n },\n ],\n itemMenu: request => {\n const isPendingResponse = request.status === InformationRequestStatus.PendingResponse\n if (!isPendingResponse) {\n return null\n }\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_RESPOND, {\n requestId: request.uuid,\n })\n }}\n >\n {t('cta.respond')}\n </Button>\n )\n },\n })\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n {visibleRequests.length > 0 && <Text>{t('description')}</Text>}\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n )\n}\n"],"names":["InformationRequestList","props","jsx","BaseComponent","Root","companyId","dictionary","onEvent","useComponentDictionary","useI18n","useTranslation","Heading","Text","Button","Badge","useComponentContext","data","useInformationRequestsGetInformationRequestsSuspense","visibleRequests","request","InformationRequestStatus","getTypeLabel","type","InformationRequestType","getStatusMapping","status","dataViewProps","useDataView","EmptyData","FlexItem","statusMapping","showPayrollBlockingBadge","jsxs","Flex","informationRequestEvents","DataView"],"mappings":";;;;;;;;;;;;;;AA2CO,SAASA,EAAuBC,GAAoC;AACzE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAOA,SAASG,EAAK,EAAE,WAAAC,GAAW,YAAAC,GAAY,SAAAC,KAAwC;AAC7E,EAAAC,EAAuB,8CAA8CF,CAAU,GAC/EG,EAAQ,4CAA4C;AACpD,QAAM,EAAE,EAAA,IAAMC,EAAe,4CAA4C,GACnE,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,OAAAC,EAAA,IAAUC,EAAA,GAEnC,EAAE,MAAAC,EAAA,IAASC,EAAqD;AAAA,IACpE,aAAaZ;AAAA,EAAA,CACd,GAIKa,KAFsBF,EAAK,uBAAuB,CAAA,GAEZ;AAAA,IAC1C,CAAAG,MAAWA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gBAAAC,EAACC,GAAA,EAAK,KAAK,GAAG,YAAW,UACtB,UAAA;AAAA,YAAAH,uBACEhB,GAAA,EAAM,QAAQgB,EAAc,aAAc,YAAc,OAAM;AAAA,YAEhEC,KACC,gBAAA7B,EAACY,GAAA,EAAM,QAAO,SAAS,UAAA,EAAE,wBAAwB,EAAA,CAAE;AAAA,UAAA,GAEvD;AAAA,QAEJ;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,UAAU,CAAAK,MACkBA,EAAQ,WAAWC,EAAyB,kBAKpE,gBAAAlB;AAAA,MAACW;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAN,EAAQ2B,EAAyB,6BAA6B;AAAA,YAC5D,WAAWf,EAAQ;AAAA,UAAA,CACpB;AAAA,QACH;AAAA,QAEC,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA,IAXX;AAAA,EAcX,CACD;AAED,SACE,gBAAAa,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAA/B,EAACS,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAA,EAAE,OAAO,GACZ;AAAA,MACCO,EAAgB,SAAS,uBAAMN,GAAA,EAAM,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GACzD;AAAA,sBAECuB,GAAA,EAAU,GAAGT,GAAe,OAAO,EAAE,OAAO,EAAA,CAAG;AAAA,EAAA,GAClD;AAEJ;"}
1
+ {"version":3,"file":"InformationRequestList.js","sources":["../../../../src/components/InformationRequests/InformationRequestList/InformationRequestList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport type { InformationRequest } from '@gusto/embedded-api/models/components/informationrequest'\nimport {\n InformationRequestStatus,\n InformationRequestType,\n} from '@gusto/embedded-api/models/components/informationrequest'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { EmptyData, Flex, FlexItem } from '@/components/Common'\nimport { informationRequestEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\n\n/**\n * Props for {@link InformationRequestList}.\n *\n * @public\n */\nexport interface InformationRequestListProps extends BaseComponentInterface<'InformationRequests.InformationRequestList'> {\n /** The associated company identifier. */\n companyId: string\n /** Event callback. See the events table on {@link InformationRequestList} for emitted events. */\n onEvent: BaseComponentInterface['onEvent']\n}\n\n/**\n * Displays the list of outstanding information requests for a company with a \"Respond\" CTA on each open request.\n *\n * @remarks\n * Renders status badges for each request and an extra \"Payroll blocking\" badge when the request is currently blocking payroll. Approved requests are filtered out of the list. Used as the top-level surface of `InformationRequests.InformationRequestsFlow`, but can be rendered directly when you want to host the response form yourself (e.g. in a custom modal or page).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `informationRequest/respond` | Fired when the user clicks \"Respond\" on an open request | `{ requestId: string }` |\n *\n * @param props - See {@link InformationRequestListProps}.\n * @returns The rendered information request list.\n * @public\n */\nexport function InformationRequestList(props: InformationRequestListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\ntype StatusMapping = {\n label: string\n badgeStatus: BadgeProps['status']\n} | null\n\nfunction Root({ companyId, dictionary, onEvent }: InformationRequestListProps) {\n useComponentDictionary('InformationRequests.InformationRequestList', dictionary)\n useI18n('InformationRequests.InformationRequestList')\n const { t } = useTranslation('InformationRequests.InformationRequestList')\n const { Heading, Text, Button, Badge } = useComponentContext()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequests = data.informationRequests ?? []\n\n const visibleRequests = informationRequests.filter(\n request => request.status !== InformationRequestStatus.Approved,\n )\n\n const getTypeLabel = (type: InformationRequest['type']): string => {\n switch (type) {\n case InformationRequestType.CompanyOnboarding:\n return t('types.companyOnboarding')\n case InformationRequestType.AccountProtection:\n return t('types.accountProtection')\n case InformationRequestType.PaymentRequest:\n return t('types.paymentRequest')\n case InformationRequestType.PaymentError:\n return t('types.paymentError')\n default:\n return t('types.unknown')\n }\n }\n\n const getStatusMapping = (status: InformationRequest['status']): StatusMapping => {\n switch (status) {\n case InformationRequestStatus.PendingResponse:\n return { label: t('status.incomplete'), badgeStatus: 'info' }\n case InformationRequestStatus.PendingReview:\n return { label: t('status.underReview'), badgeStatus: 'warning' }\n default:\n return null\n }\n }\n\n const dataViewProps = useDataView({\n data: visibleRequests,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n columns: [\n {\n key: 'type',\n title: t('columns.type'),\n render: request => (\n <FlexItem flexGrow={1}>\n <Text weight=\"medium\">{getTypeLabel(request.type)}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: request => {\n const statusMapping = getStatusMapping(request.status)\n const showPayrollBlockingBadge = request.blockingPayroll\n\n if (!statusMapping && !showPayrollBlockingBadge) {\n return null\n }\n\n return (\n <Flex gap={8} alignItems=\"center\">\n {statusMapping && (\n <Badge status={statusMapping.badgeStatus}>{statusMapping.label}</Badge>\n )}\n {showPayrollBlockingBadge && (\n <Badge status=\"error\">{t('status.payrollBlocking')}</Badge>\n )}\n </Flex>\n )\n },\n },\n ],\n itemMenu: request => {\n const isPendingResponse = request.status === InformationRequestStatus.PendingResponse\n if (!isPendingResponse) {\n return null\n }\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_RESPOND, {\n requestId: request.uuid,\n })\n }}\n >\n {t('cta.respond')}\n </Button>\n )\n },\n })\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n {visibleRequests.length > 0 && <Text>{t('description')}</Text>}\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n )\n}\n"],"names":["InformationRequestList","props","jsx","BaseComponent","Root","companyId","dictionary","onEvent","useComponentDictionary","useI18n","useTranslation","Heading","Text","Button","Badge","useComponentContext","data","useInformationRequestsGetInformationRequestsSuspense","visibleRequests","request","InformationRequestStatus","getTypeLabel","type","InformationRequestType","getStatusMapping","status","dataViewProps","useDataView","EmptyData","FlexItem","statusMapping","showPayrollBlockingBadge","jsxs","Flex","informationRequestEvents","DataView"],"mappings":";;;;;;;;;;;;;;AA2CO,SAASA,EAAuBC,GAAoC;AACzE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAOA,SAASG,EAAK,EAAE,WAAAC,GAAW,YAAAC,GAAY,SAAAC,KAAwC;AAC7E,EAAAC,EAAuB,8CAA8CF,CAAU,GAC/EG,EAAQ,4CAA4C;AACpD,QAAM,EAAE,EAAA,IAAMC,EAAe,4CAA4C,GACnE,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,OAAAC,EAAA,IAAUC,EAAA,GAEnC,EAAE,MAAAC,EAAA,IAASC,EAAqD;AAAA,IACpE,aAAaZ;AAAA,EAAA,CACd,GAIKa,KAFsBF,EAAK,uBAAuB,CAAA,GAEZ;AAAA,IAC1C,CAAAG,MAAWA,EAAQ,WAAWC,EAAyB;AAAA,EAAA,GAGnDC,IAAe,CAACC,MAA6C;AACjE,YAAQA,GAAA;AAAA,MACN,KAAKC,EAAuB;AAC1B,eAAO,EAAE,yBAAyB;AAAA,MACpC,KAAK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EAACY,GAAA,EAAM,QAAO,SAAS,UAAA,EAAE,wBAAwB,EAAA,CAAE;AAAA,UAAA,GAEvD;AAAA,QAEJ;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,UAAU,CAAAK,MACkBA,EAAQ,WAAWC,EAAyB,kBAKpE,gBAAAlB;AAAA,MAACW;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAN,EAAQ2B,EAAyB,6BAA6B;AAAA,YAC5D,WAAWf,EAAQ;AAAA,UAAA,CACpB;AAAA,QACH;AAAA,QAEC,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA,IAXX;AAAA,EAcX,CACD;AAED,SACE,gBAAAa,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAA/B,EAACS,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAA,EAAE,OAAO,GACZ;AAAA,MACCO,EAAgB,SAAS,uBAAMN,GAAA,EAAM,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,GACzD;AAAA,sBAECuB,GAAA,EAAU,GAAGT,GAAe,OAAO,EAAE,OAAO,EAAA,CAAG;AAAA,EAAA,GAClD;AAEJ;"}
@@ -14,8 +14,3 @@ export interface InformationRequestsContextInterface extends FlowContextInterfac
14
14
  }
15
15
  /** @internal */
16
16
  export declare function InformationRequestFormContextual(): import("react").JSX.Element;
17
- export declare namespace InformationRequestFormContextual {
18
- var Footer: ({ onEvent }: {
19
- onEvent: OnEventType<EventType, unknown>;
20
- }) => import("react").JSX.Element;
21
- }
@@ -1,20 +1,19 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { useFlow as n } from "../Flow/useFlow.js";
3
- import { ensureRequired as u } from "../../helpers/ensureRequired.js";
4
- import { InformationRequestForm as o } from "./InformationRequestForm/InformationRequestForm.js";
5
- function s() {
6
- const { companyId: e, selectedRequestId: r, onEvent: t } = n();
7
- return /* @__PURE__ */ m(
8
- o,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useFlow as m } from "../Flow/useFlow.js";
3
+ import { ensureRequired as n } from "../../helpers/ensureRequired.js";
4
+ import { InformationRequestForm as u } from "./InformationRequestForm/InformationRequestForm.js";
5
+ function d() {
6
+ const { companyId: o, selectedRequestId: e, onEvent: r } = m();
7
+ return /* @__PURE__ */ t(
8
+ u,
9
9
  {
10
- companyId: e,
11
- requestId: u(r),
12
- onEvent: t
10
+ companyId: o,
11
+ requestId: n(e),
12
+ onEvent: r
13
13
  }
14
14
  );
15
15
  }
16
- s.Footer = o.Footer;
17
16
  export {
18
- s as InformationRequestFormContextual
17
+ d as InformationRequestFormContextual
19
18
  };
20
19
  //# sourceMappingURL=InformationRequestsComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InformationRequestsComponents.js","sources":["../../../src/components/InformationRequests/InformationRequestsComponents.tsx"],"sourcesContent":["import { InformationRequestForm } from './InformationRequestForm'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { CommonComponentInterface } from '@/components/Base'\nimport type { EventType } from '@/types/Helpers'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n/** @internal */\nexport interface InformationRequestsContextInterface extends FlowContextInterface {\n companyId: string\n selectedRequestId?: string\n component:\n | (React.ComponentType<CommonComponentInterface> & {\n Footer?: React.ComponentType<{\n onEvent: OnEventType<EventType, unknown>\n }>\n })\n | null\n}\n\n/** @internal */\nexport function InformationRequestFormContextual() {\n const { companyId, selectedRequestId, onEvent } = useFlow<InformationRequestsContextInterface>()\n\n return (\n <InformationRequestForm\n companyId={companyId}\n requestId={ensureRequired(selectedRequestId)}\n onEvent={onEvent}\n />\n )\n}\n\nInformationRequestFormContextual.Footer = InformationRequestForm.Footer\n"],"names":["InformationRequestFormContextual","companyId","selectedRequestId","onEvent","useFlow","jsx","InformationRequestForm","ensureRequired"],"mappings":";;;;AAsBO,SAASA,IAAmC;AACjD,QAAM,EAAE,WAAAC,GAAW,mBAAAC,GAAmB,SAAAC,EAAA,IAAYC,EAAA;AAElD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAL;AAAA,MACA,WAAWM,EAAeL,CAAiB;AAAA,MAC3C,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAH,EAAiC,SAASM,EAAuB;"}
1
+ {"version":3,"file":"InformationRequestsComponents.js","sources":["../../../src/components/InformationRequests/InformationRequestsComponents.tsx"],"sourcesContent":["import { InformationRequestForm } from './InformationRequestForm'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { CommonComponentInterface } from '@/components/Base'\nimport type { EventType } from '@/types/Helpers'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n/** @internal */\nexport interface InformationRequestsContextInterface extends FlowContextInterface {\n companyId: string\n selectedRequestId?: string\n component:\n | (React.ComponentType<CommonComponentInterface> & {\n Footer?: React.ComponentType<{\n onEvent: OnEventType<EventType, unknown>\n }>\n })\n | null\n}\n\n/** @internal */\nexport function InformationRequestFormContextual() {\n const { companyId, selectedRequestId, onEvent } = useFlow<InformationRequestsContextInterface>()\n\n return (\n <InformationRequestForm\n companyId={companyId}\n requestId={ensureRequired(selectedRequestId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["InformationRequestFormContextual","companyId","selectedRequestId","onEvent","useFlow","jsx","InformationRequestForm","ensureRequired"],"mappings":";;;;AAsBO,SAASA,IAAmC;AACjD,QAAM,EAAE,WAAAC,GAAW,mBAAAC,GAAmB,SAAAC,EAAA,IAAYC,EAAA;AAElD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAL;AAAA,MACA,WAAWM,EAAeL,CAAiB;AAAA,MAC3C,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as S } from "react/jsx-runtime";
2
2
  import { createMachine as M } from "robot3";
3
3
  import { useMachine as T } from "react-robot";
4
4
  import { useState as v, useRef as x, useMemo as d, Suspense as N } from "react";
5
- import { useWireInRequestsListSuspense as F } from "@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsList";
5
+ import { useWireInRequestsListSuspense as F } from "@gusto/embedded-api/react-query/wireInRequestsList";
6
6
  import { confirmWireDetailsMachine as D } from "./confirmWireDetailsStateMachine.js";
7
7
  import P from "./ConfirmWireDetails.module.scss.js";
8
8
  import { BaseComponent as Y, BaseBoundaries as q } from "../../Base/Base.js";
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmWireDetails.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMachine } from 'react-robot'\nimport { Suspense, useMemo, useRef, useState } from 'react'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsList'\nimport { ConfirmWireDetailsBanner } from './ConfirmWireDetailsBanner'\nimport { confirmWireDetailsMachine } from './confirmWireDetailsStateMachine'\nimport { type ConfirmWireDetailsContextInterface } from './ConfirmWireDetailsComponents'\nimport type { ConfirmWireDetailsProps } from './types'\nexport type { ConfirmWireDetailsComponentType } from './types'\nimport styles from './ConfirmWireDetails.module.scss'\nimport { BaseComponent, BaseBoundaries } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FlowContext } from '@/components/Flow/useFlow'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\n\n/**\n * Wire transfer confirmation workflow for payroll funding.\n *\n * Displays a banner when wire transfers are awaiting funds and walks the user\n * through viewing wire instructions and confirming transfer details via a modal.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `payroll/wire/startTransfer` | User initiates the wire transfer flow | — |\n * | `payroll/wire/instructions/select` | User selects a wire-in request from the instructions screen | `{ selectedWireInId: string }` |\n * | `payroll/wire/instructions/done` | User completes viewing wire instructions | `{ selectedWireInId: string }` |\n * | `payroll/wire/instructions/cancel` | User cancels viewing wire instructions | — |\n * | `payroll/wire/form/done` | User completes the wire confirmation form | `{ wireInRequest: WireInRequest }` |\n * | `payroll/wire/form/cancel` | User cancels the wire confirmation form | — |\n *\n * @param props - {@link ConfirmWireDetailsProps}\n * @returns The wire confirmation banner and modal flow.\n * @public\n *\n * @example\n * ```tsx\n * import { Payroll } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <Payroll.ConfirmWireDetails\n * companyId=\"your-company-id\"\n * wireInId=\"your-wire-in-id\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function ConfirmWireDetails({ onEvent, ...props }: ConfirmWireDetailsProps) {\n return (\n <BaseComponent {...props} onEvent={onEvent}>\n <Root {...props} onEvent={onEvent} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, wireInId, onEvent }: ConfirmWireDetailsProps) {\n const { Modal, LoadingSpinner } = useComponentContext()\n const [isModalOpen, setIsModalOpen] = useState(false)\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n r => r.status === 'awaiting_funds',\n )\n\n const selectedWireInId = useMemo(() => {\n if (wireInId) {\n return wireInId\n }\n\n return activeWireInRequests[0]?.uuid\n }, [wireInId, activeWireInRequests[0]?.uuid])\n\n const confirmWireDetailsMachineInstance = useMemo(\n () =>\n createMachine(\n 'banner',\n confirmWireDetailsMachine,\n (): ConfirmWireDetailsContextInterface => ({\n component: null,\n companyId,\n wireInId,\n selectedWireInId,\n onEvent: handleEvent,\n modalContainerRef,\n }),\n ),\n [companyId, wireInId],\n )\n const [current, send] = useMachine(confirmWireDetailsMachineInstance)\n\n function handleEvent(type: EventType, data?: unknown) {\n send({ type, payload: data })\n\n if (type === payrollWireEvents.PAYROLL_WIRE_START_TRANSFER) {\n setIsModalOpen(true)\n }\n\n if (\n type === payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_CANCEL ||\n type === payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL ||\n type === payrollWireEvents.PAYROLL_WIRE_FORM_DONE\n ) {\n setIsModalOpen(false)\n }\n\n onEvent(type, data)\n }\n\n const handleStartWireTransfer = () => {\n handleEvent(payrollWireEvents.PAYROLL_WIRE_START_TRANSFER)\n }\n\n const handleCloseModal = () => {\n setIsModalOpen(false)\n }\n\n const CurrentComponent = current.context.component\n const Footer = CurrentComponent?.Footer || undefined\n\n return (\n <FlowContext.Provider\n value={{\n ...current.context,\n onEvent: handleEvent,\n }}\n >\n <ConfirmWireDetailsBanner\n companyId={companyId}\n wireInId={wireInId}\n onStartWireTransfer={handleStartWireTransfer}\n onEvent={onEvent}\n confirmationAlert={current.context.confirmationAlert}\n />\n <Modal\n isOpen={isModalOpen}\n onClose={handleCloseModal}\n containerRef={modalContainerRef}\n footer={\n Footer && (\n <BaseBoundaries>\n <Suspense\n fallback={\n <div className={styles.footer}>\n <LoadingSpinner size=\"sm\" />\n </div>\n }\n >\n <Footer onEvent={handleEvent} />\n </Suspense>\n </BaseBoundaries>\n )\n }\n >\n {CurrentComponent && <CurrentComponent />}\n </Modal>\n </FlowContext.Provider>\n )\n}\n"],"names":["ConfirmWireDetails","onEvent","props","jsx","BaseComponent","Root","companyId","wireInId","Modal","LoadingSpinner","useComponentContext","isModalOpen","setIsModalOpen","useState","modalContainerRef","useRef","wireInRequestsData","useWireInRequestsListSuspense","activeWireInRequests","r","selectedWireInId","useMemo","confirmWireDetailsMachineInstance","createMachine","confirmWireDetailsMachine","handleEvent","current","send","useMachine","type","data","payrollWireEvents","handleStartWireTransfer","handleCloseModal","CurrentComponent","Foot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B,4BAC3BF,MAASE,EAAkB,2BAE3BnB,EAAe,EAAK,GAGtBX,EAAQ4B,GAAMC,CAAI;AAAA,EACpB;AAEA,QAAME,IAA0B,MAAM;AACpC,IAAAP,EAAYM,EAAkB,2BAA2B;AAAA,EAC3D,GAEME,IAAmB,MAAM;AAC7B,IAAArB,EAAe,EAAK;AAAA,EACtB,GAEMsB,IAAmBR,EAAQ,QAAQ,WACnCS,IAASD,GAAkB,UAAU;AAE3C,SACE,gBAAAE;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGX,EAAQ;AAAA,QACX,SAASD;AAAA,MAAA;AAAA,MAGX,UAAA;AAAA,QAAA,gBAAAtB;AAAA,UAACmC;AAAA,UAAA;AAAA,YACC,WAAAhC;AAAA,YACA,UAAAC;AAAA,YACA,qBAAqByB;AAAA,YACrB,SAAA/B;AAAA,YACA,mBAAmByB,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAErC,gBAAAvB;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,QAAQG;AAAA,YACR,SAASsB;AAAA,YACT,cAAcnB;AAAA,YACd,QACEqB,KACE,gBAAAhC,EAACoC,GAAA,EACC,UAAA,gBAAApC;AAAA,cAACqC;AAAA,cAAA;AAAA,gBACC,UACE,gBAAArC,EAAC,OAAA,EAAI,WAAWsC,EAAO,QACrB,UAAA,gBAAAtC,EAACM,GAAA,EAAe,MAAK,KAAA,CAAK,EAAA,CAC5B;AAAA,gBAGF,UAAA,gBAAAN,EAACgC,GAAA,EAAO,SAASV,EAAA,CAAa;AAAA,cAAA;AAAA,YAAA,GAElC;AAAA,YAIH,UAAAS,uBAAqBA,GAAA,CAAA,CAAiB;AAAA,UAAA;AAAA,QAAA;AAAA,MACzC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"ConfirmWireDetails.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMachine } from 'react-robot'\nimport { Suspense, useMemo, useRef, useState } from 'react'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api/react-query/wireInRequestsList'\nimport { ConfirmWireDetailsBanner } from './ConfirmWireDetailsBanner'\nimport { confirmWireDetailsMachine } from './confirmWireDetailsStateMachine'\nimport { type ConfirmWireDetailsContextInterface } from './ConfirmWireDetailsComponents'\nimport type { ConfirmWireDetailsProps } from './types'\nexport type { ConfirmWireDetailsComponentType } from './types'\nimport styles from './ConfirmWireDetails.module.scss'\nimport { BaseComponent, BaseBoundaries } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FlowContext } from '@/components/Flow/useFlow'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\n\n/**\n * Wire transfer confirmation workflow for payroll funding.\n *\n * Displays a banner when wire transfers are awaiting funds and walks the user\n * through viewing wire instructions and confirming transfer details via a modal.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `payroll/wire/startTransfer` | User initiates the wire transfer flow | — |\n * | `payroll/wire/instructions/select` | User selects a wire-in request from the instructions screen | `{ selectedWireInId: string }` |\n * | `payroll/wire/instructions/done` | User completes viewing wire instructions | `{ selectedWireInId: string }` |\n * | `payroll/wire/instructions/cancel` | User cancels viewing wire instructions | — |\n * | `payroll/wire/form/done` | User completes the wire confirmation form | `{ wireInRequest: WireInRequest }` |\n * | `payroll/wire/form/cancel` | User cancels the wire confirmation form | — |\n *\n * @param props - {@link ConfirmWireDetailsProps}\n * @returns The wire confirmation banner and modal flow.\n * @public\n *\n * @example\n * ```tsx\n * import { Payroll } from '@gusto/embedded-react-sdk'\n *\n * function MyComponent() {\n * return (\n * <Payroll.ConfirmWireDetails\n * companyId=\"your-company-id\"\n * wireInId=\"your-wire-in-id\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport function ConfirmWireDetails({ onEvent, ...props }: ConfirmWireDetailsProps) {\n return (\n <BaseComponent {...props} onEvent={onEvent}>\n <Root {...props} onEvent={onEvent} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, wireInId, onEvent }: ConfirmWireDetailsProps) {\n const { Modal, LoadingSpinner } = useComponentContext()\n const [isModalOpen, setIsModalOpen] = useState(false)\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n r => r.status === 'awaiting_funds',\n )\n\n const selectedWireInId = useMemo(() => {\n if (wireInId) {\n return wireInId\n }\n\n return activeWireInRequests[0]?.uuid\n }, [wireInId, activeWireInRequests[0]?.uuid])\n\n const confirmWireDetailsMachineInstance = useMemo(\n () =>\n createMachine(\n 'banner',\n confirmWireDetailsMachine,\n (): ConfirmWireDetailsContextInterface => ({\n component: null,\n companyId,\n wireInId,\n selectedWireInId,\n onEvent: handleEvent,\n modalContainerRef,\n }),\n ),\n [companyId, wireInId],\n )\n const [current, send] = useMachine(confirmWireDetailsMachineInstance)\n\n function handleEvent(type: EventType, data?: unknown) {\n send({ type, payload: data })\n\n if (type === payrollWireEvents.PAYROLL_WIRE_START_TRANSFER) {\n setIsModalOpen(true)\n }\n\n if (\n type === payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_CANCEL ||\n type === payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL ||\n type === payrollWireEvents.PAYROLL_WIRE_FORM_DONE\n ) {\n setIsModalOpen(false)\n }\n\n onEvent(type, data)\n }\n\n const handleStartWireTransfer = () => {\n handleEvent(payrollWireEvents.PAYROLL_WIRE_START_TRANSFER)\n }\n\n const handleCloseModal = () => {\n setIsModalOpen(false)\n }\n\n const CurrentComponent = current.context.component\n const Footer = CurrentComponent?.Footer || undefined\n\n return (\n <FlowContext.Provider\n value={{\n ...current.context,\n onEvent: handleEvent,\n }}\n >\n <ConfirmWireDetailsBanner\n companyId={companyId}\n wireInId={wireInId}\n onStartWireTransfer={handleStartWireTransfer}\n onEvent={onEvent}\n confirmationAlert={current.context.confirmationAlert}\n />\n <Modal\n isOpen={isModalOpen}\n onClose={handleCloseModal}\n containerRef={modalContainerRef}\n footer={\n Footer && (\n <BaseBoundaries>\n <Suspense\n fallback={\n <div className={styles.footer}>\n <LoadingSpinner size=\"sm\" />\n </div>\n }\n >\n <Footer onEvent={handleEvent} />\n </Suspense>\n </BaseBoundaries>\n )\n }\n >\n {CurrentComponent && <CurrentComponent />}\n </Modal>\n </FlowContext.Provider>\n )\n}\n"],"names":["ConfirmWireDetails","onEvent","props","jsx","BaseComponent","Root","companyId","wireInId","Modal","LoadingSpinner","useComponentContext","isModalOpen","setIsModalOpen","useState","modalContainerRef","useRef","wireInRequestsData","useWireInRequestsListSuspense","activeWireInRequests","r","selectedWireInId","useMemo","confirmWireDetailsMachineInstance","createMachine","confirmWireDetailsMachine","handleEvent","current","send","useMachine","type","data","payrollWireEvents","handleStartWireTransfer","handleCloseModal","CurrentComponent","Footer","jsxs","FlowContext","ConfirmWireDetailsBanner","BaseBoundaries","Suspense","styles"],"mappings":";;;;;;;;;;;;;AAkDO,SAASA,EAAmB,EAAE,SAAAC,GAAS,GAAGC,KAAkC;AACjF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GAAO,SAAAD,GACxB,4BAACI,GAAA,EAAM,GAAGH,GAAO,SAAAD,EAAA,CAAkB,EAAA,CACrC;AAEJ;AAEA,SAASI,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,SAAAN,KAAoC;AACvE,QAAM,EAAE,OAAAO,GAAO,gBAAAC,EAAA,IAAmBC,EAAA,GAC5B,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAC9CC,IAAoBC,EAAuB,IAAI,GAE/C,EAAE,MAAMC,EAAA,IAAuBC,EAA8B;AAAA,IACjE,aAAaX;AAAA,EAAA,CACd,GAEKY,KAAwBF,EAAmB,qBAAqB,CAAA,G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AA,UAAA;AAAA,QAAA;AAAA,QAErC,gBAAAvB;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,QAAQG;AAAA,YACR,SAASsB;AAAA,YACT,cAAcnB;AAAA,YACd,QACEqB,KACE,gBAAAhC,EAACoC,GAAA,EACC,UAAA,gBAAApC;AAAA,cAACqC;AAAA,cAAA;AAAA,gBACC,UACE,gBAAArC,EAAC,OAAA,EAAI,WAAWsC,EAAO,QACrB,UAAA,gBAAAtC,EAACM,GAAA,EAAe,MAAK,KAAA,CAAK,EAAA,CAC5B;AAAA,gBAGF,UAAA,gBAAAN,EAACgC,GAAA,EAAO,SAASV,EAAA,CAAa;AAAA,cAAA;AAAA,YAAA,GAElC;AAAA,YAIH,UAAAS,uBAAqBA,GAAA,CAAA,CAAiB;AAAA,UAAA;AAAA,QAAA;AAAA,MACzC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as h } from "react/jsx-runtime";
2
2
  import { useTranslation as v } from "react-i18next";
3
- import { useWireInRequestsListSuspense as M } from "@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsList";
4
- import { usePayrollsListSuspense as N } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsList";
3
+ import { useWireInRequestsListSuspense as M } from "@gusto/embedded-api/react-query/wireInRequestsList";
4
+ import { usePayrollsListSuspense as N } from "@gusto/embedded-api/react-query/payrollsList";
5
5
  import { useState as Z, useEffect as _ } from "react";
6
6
  import { BaseComponent as j } from "../../../Base/Base.js";
7
7
  import "../../../Base/useBase.js";