@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 +1 @@
1
- {"version":3,"file":"ConfirmWireDetailsBanner.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/payrollsList'\nimport { useState, useEffect } from 'react'\nimport type { ConfirmationAlert } from '../types'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\ninterface ConfirmWireDetailsBannerProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsBanner'> {\n wireInId?: string\n companyId: string\n confirmationAlert?: ConfirmationAlert\n onStartWireTransfer: () => void\n}\n\n/** @internal */\nexport function ConfirmWireDetailsBanner(props: ConfirmWireDetailsBannerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n confirmationAlert,\n onStartWireTransfer,\n}: ConfirmWireDetailsBannerProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsBanner', dictionary)\n useI18n('Payroll.ConfirmWireDetailsBanner')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsBanner')\n const { Alert, Banner, Button, UnorderedList, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const [isConfirmationAlertDismissed, setIsConfirmationAlertDismissed] = useState(false)\n const currencyFormatter = useNumberFormatter('currency')\n\n useEffect(() => {\n if (confirmationAlert) {\n setIsConfirmationAlertDismissed(false)\n }\n }, [confirmationAlert])\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n request => request.status === 'awaiting_funds',\n )\n const wireInRequests = wireInId\n ? activeWireInRequests.filter(request => request.uuid === wireInId)\n : activeWireInRequests\n\n const payrolls = payrollsData.payrollList || []\n\n const wireInRequestsWithPayrolls = wireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(payroll.payPeriod.startDate, payroll.payPeriod.endDate)\n : ''\n return {\n wireInRequest,\n payroll,\n payrollRange,\n paymentType: wireInRequest.paymentType,\n requestedAmount: wireInRequest.requestedAmount ?? '',\n }\n })\n\n const shouldShowBanner =\n wireInRequestsWithPayrolls.length > 0 &&\n (wireInRequestsWithPayrolls.length > 1 || wireInRequestsWithPayrolls[0]?.wireInRequest)\n\n const shouldShowConfirmationAlert = !isConfirmationAlertDismissed && confirmationAlert\n\n if (!shouldShowBanner && !shouldShowConfirmationAlert) {\n return null\n }\n\n const formatDeadline = (deadline: string) => {\n const date = new Date(deadline)\n\n const timeRaw = date.toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: date.getMinutes() === 0 ? undefined : '2-digit',\n hour12: true,\n timeZone: 'America/Los_Angeles',\n timeZoneName: 'short',\n })\n\n const time = timeRaw.replace(/\\s?(AM|PM)/i, match => match.trim().toLowerCase())\n\n const dateString = date.toLocaleDateString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'America/Los_Angeles',\n })\n\n return { time, date: dateString }\n }\n\n const getBannerTitle = () => {\n const isSingleWireInRequest = wireInRequestsWithPayrolls.length === 1\n const { wireInRequest, payrollRange } = wireInRequestsWithPayrolls[0] || {}\n\n if (isSingleWireInRequest) {\n if (wireInId && wireInRequest?.wireInDeadline) {\n const { time, date } = formatDeadline(wireInRequest.wireInDeadline)\n return t('banner.title', { time, date })\n }\n return t('banner.titleWithPayroll', { payrollRange })\n }\n return t('banner.titleMultiple', { count: wireInRequestsWithPayrolls.length })\n }\n\n const getBannerContent = () => {\n if (wireInRequestsWithPayrolls.length > 1) {\n return (\n <UnorderedList\n items={wireInRequestsWithPayrolls.map(\n ({ paymentType, payrollRange, requestedAmount }, index) =>\n paymentType === 'Payroll' ? (\n <Text key={index}>{t('banner.requestLabelPayroll', { payrollRange })}</Text>\n ) : (\n <Text key={index}>\n {t('banner.requestLabelContractorPaymentGroup', {\n requestedAmount: currencyFormatter(Number(requestedAmount)),\n })}\n </Text>\n ),\n )}\n />\n )\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {shouldShowConfirmationAlert && (\n <Alert\n status=\"success\"\n label={confirmationAlert.title}\n onDismiss={() => {\n setIsConfirmationAlertDismissed(true)\n }}\n >\n {confirmationAlert.content}\n </Alert>\n )}\n {shouldShowBanner && (\n <Banner status=\"warning\" title={getBannerTitle()}>\n <Flex flexDirection=\"column\" gap={16} alignItems=\"flex-start\">\n <div>{t('banner.description')}</div>\n {getBannerContent()}\n <Button variant=\"secondary\" onClick={onStartWireTransfer}>\n {t('cta.startWireTransfer')}\n </Button>\n </Flex>\n </Banner>\n )}\n </Flex>\n )\n}\n"],"names":["ConfirmWireDetailsBanner","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","confirmationAlert","onStartWireTransfer","useComponentDictionary","useI18n","t","useTranslation","Alert","Banner","Button","UnorderedList","Text","useComponentContext","dateFormatter","useDateFormatter","isConfirmationAlertDismissed","setIsConfirmationAlertDismissed","useState","currencyFormatter","useNumberFormatter","useEffect","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","request","wireInRequests","payrolls","wireInRequestsWithPayrolls","wireInRequest","payroll","p","payrollRange","shouldShowBanner","shouldShowConfirmationAlert","formatDeadline","deadline","date","time","match","dateString","getBannerTitle","isSingleWireInRequest","getBannerContent","paymentType","requestedAmount","index","jsxs","Flex"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,GAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,qBAAAC;AACF,MAAqC;AACnC,EAAAC,EAAuB,oCAAoCH,CAAU,GACrEI,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,GAAQ,eAAAC,GAAe,MAAAC,EAAA,IAASC,EAAA,GACjDC,IAAgBC,EAAA,GAChB,CAACC,GAA8BC,CAA+B,IAAIC,EAAS,EAAK,GAChFC,IAAoBC,EAAmB,UAAU;AAEvD,EAAAC,EAAU,MAAM;AACd,IAAInB,KACFe,EAAgC,EAAK;AAAA,EAEzC,GAAG,CAACf,CAAiB,CAAC;AAEtB,QAAM,EAAE,MAAMoB,EAAA,IAAuBC,EAA8B;AAAA,IACjE,aAAavB;AAAA,EAAA,CACd,GAEK,EAAE,MAAMwB,EAAA,IAAiBC,EAAwB;AAAA,IACrD,WAAAzB;AAAA,IACA,WAAW;AAAA,EAAA,CACZ,GAEK0B,KAAwBJ,EAAmB,qBAAqB,CAAA,GAAI;AAAA,IACxE,CAAAK,MAAWA,EAAQ,WAAW;AAAA,EAAA,GAE1BC,IAAiB7B,IACnB2B,EAAqB,OAAO,OAAWC,EAAQ,SAAS5B,CAAQ,IAChE2B,GAEEG,IAAWL,EAAa,eAAe,CAAA,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jD,EAACc,KAAO,SAAQ,aAAY,SAASP,GAClC,UAAAG,EAAE,uBAAuB,EAAA,CAC5B;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"ConfirmWireDetailsBanner.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api/react-query/payrollsList'\nimport { useState, useEffect } from 'react'\nimport type { ConfirmationAlert } from '../types'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\ninterface ConfirmWireDetailsBannerProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsBanner'> {\n wireInId?: string\n companyId: string\n confirmationAlert?: ConfirmationAlert\n onStartWireTransfer: () => void\n}\n\n/** @internal */\nexport function ConfirmWireDetailsBanner(props: ConfirmWireDetailsBannerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n confirmationAlert,\n onStartWireTransfer,\n}: ConfirmWireDetailsBannerProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsBanner', dictionary)\n useI18n('Payroll.ConfirmWireDetailsBanner')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsBanner')\n const { Alert, Banner, Button, UnorderedList, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const [isConfirmationAlertDismissed, setIsConfirmationAlertDismissed] = useState(false)\n const currencyFormatter = useNumberFormatter('currency')\n\n useEffect(() => {\n if (confirmationAlert) {\n setIsConfirmationAlertDismissed(false)\n }\n }, [confirmationAlert])\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n request => request.status === 'awaiting_funds',\n )\n const wireInRequests = wireInId\n ? activeWireInRequests.filter(request => request.uuid === wireInId)\n : activeWireInRequests\n\n const payrolls = payrollsData.payrollList || []\n\n const wireInRequestsWithPayrolls = wireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(payroll.payPeriod.startDate, payroll.payPeriod.endDate)\n : ''\n return {\n wireInRequest,\n payroll,\n payrollRange,\n paymentType: wireInRequest.paymentType,\n requestedAmount: wireInRequest.requestedAmount ?? '',\n }\n })\n\n const shouldShowBanner =\n wireInRequestsWithPayrolls.length > 0 &&\n (wireInRequestsWithPayrolls.length > 1 || wireInRequestsWithPayrolls[0]?.wireInRequest)\n\n const shouldShowConfirmationAlert = !isConfirmationAlertDismissed && confirmationAlert\n\n if (!shouldShowBanner && !shouldShowConfirmationAlert) {\n return null\n }\n\n const formatDeadline = (deadline: string) => {\n const date = new Date(deadline)\n\n const timeRaw = date.toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: date.getMinutes() === 0 ? undefined : '2-digit',\n hour12: true,\n timeZone: 'America/Los_Angeles',\n timeZoneName: 'short',\n })\n\n const time = timeRaw.replace(/\\s?(AM|PM)/i, match => match.trim().toLowerCase())\n\n const dateString = date.toLocaleDateString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'America/Los_Angeles',\n })\n\n return { time, date: dateString }\n }\n\n const getBannerTitle = () => {\n const isSingleWireInRequest = wireInRequestsWithPayrolls.length === 1\n const { wireInRequest, payrollRange } = wireInRequestsWithPayrolls[0] || {}\n\n if (isSingleWireInRequest) {\n if (wireInId && wireInRequest?.wireInDeadline) {\n const { time, date } = formatDeadline(wireInRequest.wireInDeadline)\n return t('banner.title', { time, date })\n }\n return t('banner.titleWithPayroll', { payrollRange })\n }\n return t('banner.titleMultiple', { count: wireInRequestsWithPayrolls.length })\n }\n\n const getBannerContent = () => {\n if (wireInRequestsWithPayrolls.length > 1) {\n return (\n <UnorderedList\n items={wireInRequestsWithPayrolls.map(\n ({ paymentType, payrollRange, requestedAmount }, index) =>\n paymentType === 'Payroll' ? (\n <Text key={index}>{t('banner.requestLabelPayroll', { payrollRange })}</Text>\n ) : (\n <Text key={index}>\n {t('banner.requestLabelContractorPaymentGroup', {\n requestedAmount: currencyFormatter(Number(requestedAmount)),\n })}\n </Text>\n ),\n )}\n />\n )\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n {shouldShowConfirmationAlert && (\n <Alert\n status=\"success\"\n label={confirmationAlert.title}\n onDismiss={() => {\n setIsConfirmationAlertDismissed(true)\n }}\n >\n {confirmationAlert.content}\n </Alert>\n )}\n {shouldShowBanner && (\n <Banner status=\"warning\" title={getBannerTitle()}>\n <Flex flexDirection=\"column\" gap={16} alignItems=\"flex-start\">\n <div>{t('banner.description')}</div>\n {getBannerContent()}\n <Button variant=\"secondary\" onClick={onStartWireTransfer}>\n {t('cta.startWireTransfer')}\n </Button>\n </Flex>\n </Banner>\n )}\n </Flex>\n )\n}\n"],"names":["ConfirmWireDetailsBanner","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","confirmationAlert","onStartWireTransfer","useComponentDictionary","useI18n","t","useTranslation","Alert","Banner","Button","UnorderedList","Text","useComponentContext","dateFormatter","useDateFormatter","isConfirmationAlertDismissed","setIsConfirmationAlertDismissed","useState","currencyFormatter","useNumberFormatter","useEffect","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","request","wireInRequests","payrolls","wireInRequestsWithPayrolls","wireInRequest","payroll","p","payrollRange","shouldShowBanner","shouldShowConfirmationAlert","formatDeadline","deadline","date","time","match","dateString","getBannerTitle","isSingleWireInRequest","getBannerContent","paymentType","requestedAmount","index","jsxs","Flex"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,GAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,qBAAAC;AACF,MAAqC;AACnC,EAAAC,EAAuB,oCAAoCH,CAAU,GACrEI,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,GAAQ,eAAAC,GAAe,MAAAC,EAAA,IAASC,EAAA,GACjDC,IAAgBC,EAAA,GAChB,CAACC,GAA8BC,CAA+B,IAAIC,EAAS,EAAK,GAChFC,IAAoBC,EAAmB,UAAU;AAEvD,EAAAC,EAAU,MAAM;AACd,IAAInB,KACFe,EAAgC,EAAK;AAAA,EAEzC,GAAG,CAACf,CAAiB,CAAC;AAEtB,QAAM,EAAE,MAAMoB,EAAA,IAAuBC,EAA8B;AAAA,IACjE,aAAavB;AAAA,EAAA,CACd,GAEK,EAAE,MAAMwB,EAAA,IAAiBC,EAAwB;AAAA,IACrD,WAAAzB;AAAA,IACA,WAAW;AAAA,EAAA,CACZ,GAEK0B,KAAwBJ,EAAmB,qBAAqB,CAAA,GAAI;AAAA,IACxE,CAAAK,MAAWA,EAAQ,WAAW;AAAA,EAAA,GAE1BC,IAAiB7B,IACnB2B,EAAqB,OAAO,OAAWC,EAAQ,SAAS5B,CA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,CAAE;AAAA,MAC7BuC,EAAA;AAAA,MACD,gBAAAjD,EAACc,KAAO,SAAQ,aAAY,SAASP,GAClC,UAAAG,EAAE,uBAAuB,EAAA,CAC5B;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -4,9 +4,9 @@ import r from "zod";
4
4
  import { useForm as _, FormProvider as O } from "react-hook-form";
5
5
  import { zodResolver as T } from "@hookform/resolvers/zod";
6
6
  import { useIsMutating as E } from "@tanstack/react-query";
7
- import { useWireInRequestsSubmitMutation as U, mutationKeyWireInRequestsSubmit as j } from "@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsSubmit";
8
- import { useWireInRequestsGetSuspense as B } from "@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsGet";
9
- import { usePayrollsListSuspense as G } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsList";
7
+ import { useWireInRequestsSubmitMutation as U, mutationKeyWireInRequestsSubmit as j } from "@gusto/embedded-api/react-query/wireInRequestsSubmit";
8
+ import { useWireInRequestsGetSuspense as B } from "@gusto/embedded-api/react-query/wireInRequestsGet";
9
+ import { usePayrollsListSuspense as G } from "@gusto/embedded-api/react-query/payrollsList";
10
10
  import d from "./ConfirmWireDetailsForm.module.scss.js";
11
11
  import { Form as H } from "../../../Common/Form/Form.js";
12
12
  import { BaseComponent as K } from "../../../Base/Base.js";
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmWireDetailsForm.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport z from 'zod'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useWireInRequestsSubmitMutation,\n mutationKeyWireInRequestsSubmit,\n} from '@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsSubmit'\nimport { useWireInRequestsGetSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsGet'\nimport type { PutWireInRequestsWireInRequestUuidRequest } from '@gusto/embedded-api-v-2026-02-01/models/operations/putwireinrequestswireinrequestuuid'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/payrollsList'\nimport styles from './ConfirmWireDetailsForm.module.scss'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex, FlexItem } from '@/components/Common/Flex/Flex'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport { DatePickerField, NumberInputField, TextInputField } from '@/components/Common'\nimport { TextAreaField } from '@/components/Common/Fields/TextAreaField'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface ConfirmWireDetailsFormProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {\n wireInId: string\n companyId: string\n modalContainerRef?: React.RefObject<HTMLDivElement | null>\n}\n\nconst ConfirmWireDetailsFormSchema = z.object({\n amountSent: z.number().positive(),\n dateSent: z.date(),\n bankName: z.string().min(1),\n additionalNotes: z.string().optional(),\n})\n\ntype ConfirmWireDetailsFormValues = z.infer<typeof ConfirmWireDetailsFormSchema>\n\nconst CONFIRM_WIRE_FORM_ID = 'confirm-wire-details-form'\n\nconst transformFormDataToPayload = (\n data: ConfirmWireDetailsFormValues,\n): PutWireInRequestsWireInRequestUuidRequest['wireInRequestUpdateRequestBody'] => {\n return {\n amountSent: String(data.amountSent),\n dateSent: data.dateSent.toISOString().split('T')[0] || '',\n bankName: data.bankName,\n additionalNotes: data.additionalNotes || undefined,\n }\n}\n\n/** @internal */\nexport function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n modalContainerRef,\n}: ConfirmWireDetailsFormProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsForm', dictionary)\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Heading, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const { data } = useWireInRequestsGetSuspense({\n wireInRequestUuid: wireInId,\n })\n const wireInRequest = data.wireInRequest\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const payrollData = payrollsData.payrollList?.find(\n payroll => payroll.payrollUuid === wireInRequest?.paymentUuid,\n )\n const payPeriod = payrollData?.payPeriod\n const payPeriodRange =\n payPeriod?.startDate && payPeriod.endDate\n ? dateFormatter.formatPayPeriodRange(payPeriod.startDate, payPeriod.endDate)\n : undefined\n\n const checkDate = payrollData\n ? dateFormatter.formatShortWithYear(payrollData.checkDate)\n : undefined\n\n const formHandlers = useForm<ConfirmWireDetailsFormValues>({\n resolver: zodResolver(ConfirmWireDetailsFormSchema),\n defaultValues: {\n bankName: '',\n },\n })\n\n const { mutateAsync: submitWireInRequest } = useWireInRequestsSubmitMutation()\n\n const onSubmit = async (data: ConfirmWireDetailsFormValues) => {\n await baseSubmitHandler(data, async innerData => {\n const payload = transformFormDataToPayload(innerData)\n const response = await submitWireInRequest({\n request: {\n wireInRequestUuid: wireInId,\n wireInRequestUpdateRequestBody: payload,\n },\n })\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_DONE, {\n wireInRequest: response.wireInRequest,\n confirmationAlert: {\n title: payPeriodRange\n ? t('confirmationAlert.title', { payrollRange: payPeriodRange })\n : t('confirmationAlert.emptyTitle'),\n content: checkDate ? (\n <Text>{t('confirmationAlert.content', { checkDate })}</Text>\n ) : undefined,\n },\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <FlexItem>\n <Heading as=\"h2\">\n <Trans i18nKey=\"title\" t={t} values={{ payrollRange: payPeriodRange }} />\n </Heading>\n <Text>{t('description')}</Text>\n </FlexItem>\n\n <FormProvider {...formHandlers}>\n <HtmlForm\n id={CONFIRM_WIRE_FORM_ID}\n onSubmit={formHandlers.handleSubmit(onSubmit)}\n className={styles.form}\n >\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"amountSent\"\n label={t('amountLabel')}\n isRequired\n format=\"currency\"\n errorMessage={t('validations.amount')}\n />\n <DatePickerField\n name=\"dateSent\"\n label={t('dateLabel')}\n isRequired\n errorMessage={t('validations.date')}\n portalContainer={modalContainerRef?.current || undefined}\n />\n <TextInputField\n name=\"bankName\"\n label={t('bankNameLabel')}\n isRequired\n description={t('bankNameDescription')}\n placeholder={t('bankNamePlaceholder')}\n errorMessage={t('validations.bankName')}\n />\n <TextAreaField name=\"additionalNotes\" label={t('notesLabel')} rows={3} />\n </Flex>\n </HtmlForm>\n </FormProvider>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Button } = useComponentContext()\n const isMutating = useIsMutating({\n mutationKey: mutationKeyWireInRequestsSubmit(),\n })\n const isPending = isMutating > 0\n\n return (\n <Flex gap={12} justifyContent=\"space-evenly\">\n <FlexItem flexGrow={1}>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL)\n }}\n isDisabled={isPending}\n className={styles.button}\n >\n {t('cancelCta')}\n </Button>\n </FlexItem>\n <FlexItem flexGrow={1}>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={CONFIRM_WIRE_FORM_ID}\n isLoading={isPending}\n className={styles.button}\n >\n {t('submitCta')}\n </Button>\n </FlexItem>\n </Flex>\n )\n}\nConfirmWireDetailsForm.Footer = Footer\n"],"names":["ConfirmWireDetailsFormSchema","z","CONFIRM_WIRE_FORM_ID","transformFormDataToPayload","data","ConfirmWireDetailsForm","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","modalContainerRef","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","useTranslation","Heading","Text","useComponentContext","dateFormatter","useDateFormatter","useWireInRequestsGetSuspense","wireInRequest","payrollsData","usePayrollsListSuspense","payrollData","payroll","payPeriod","payPeriodRange","checkDate","formHandlers","useForm","zodResolver","submitWireInRequest","useWireInRequestsSubmitMutation","onSubmit","innerData","payload","response","payrollWireEvents","jsxs","Flex","FlexItem","Trans","FormProvider","HtmlForm","styles","NumberInputField","DatePickerField","TextInputField","TextAreaField","Footer","t","Button","isPending","useIsMutating","mutationKeyWireInRequestsSubmit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,IAA+BC,EAAE,OAAO;AAAA,EAC5C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,UAAUA,EAAE,KAAA;AAAA,EACZ,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,iBAAiBA,EAAE,OAAA,EAAS,SAAA;AAC9B,CAAC,GAIKC,IAAuB,6BAEvBC,KAA6B,CACjCC,OAEO;AAAA,EACL,YAAY,OAAOA,EAAK,UAAU;AAAA,EAClC,UAAUA,EAAK,SAAS,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,KAAK;AAAA,EACvD,UAAUA,EAAK;AAAA,EACf,iBAAiBA,EAAK,mBAAmB;AAAA;AAKtC,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,MAAMG,KAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA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IAAA,EAChB,CACF;AAAA,EAAA,GACF;AAEJ;AACA7C,GAAuB,SAASkD;"}
1
+ {"version":3,"file":"ConfirmWireDetailsForm.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport z from 'zod'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useIsMutating } from '@tanstack/react-query'\nimport {\n useWireInRequestsSubmitMutation,\n mutationKeyWireInRequestsSubmit,\n} from '@gusto/embedded-api/react-query/wireInRequestsSubmit'\nimport { useWireInRequestsGetSuspense } from '@gusto/embedded-api/react-query/wireInRequestsGet'\nimport type { PutWireInRequestsWireInRequestUuidRequest } from '@gusto/embedded-api/models/operations/putwireinrequestswireinrequestuuid'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api/react-query/payrollsList'\nimport styles from './ConfirmWireDetailsForm.module.scss'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex, FlexItem } from '@/components/Common/Flex/Flex'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport { DatePickerField, NumberInputField, TextInputField } from '@/components/Common'\nimport { TextAreaField } from '@/components/Common/Fields/TextAreaField'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface ConfirmWireDetailsFormProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {\n wireInId: string\n companyId: string\n modalContainerRef?: React.RefObject<HTMLDivElement | null>\n}\n\nconst ConfirmWireDetailsFormSchema = z.object({\n amountSent: z.number().positive(),\n dateSent: z.date(),\n bankName: z.string().min(1),\n additionalNotes: z.string().optional(),\n})\n\ntype ConfirmWireDetailsFormValues = z.infer<typeof ConfirmWireDetailsFormSchema>\n\nconst CONFIRM_WIRE_FORM_ID = 'confirm-wire-details-form'\n\nconst transformFormDataToPayload = (\n data: ConfirmWireDetailsFormValues,\n): PutWireInRequestsWireInRequestUuidRequest['wireInRequestUpdateRequestBody'] => {\n return {\n amountSent: String(data.amountSent),\n dateSent: data.dateSent.toISOString().split('T')[0] || '',\n bankName: data.bankName,\n additionalNotes: data.additionalNotes || undefined,\n }\n}\n\n/** @internal */\nexport function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n modalContainerRef,\n}: ConfirmWireDetailsFormProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsForm', dictionary)\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Heading, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const { data } = useWireInRequestsGetSuspense({\n wireInRequestUuid: wireInId,\n })\n const wireInRequest = data.wireInRequest\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const payrollData = payrollsData.payrollList?.find(\n payroll => payroll.payrollUuid === wireInRequest?.paymentUuid,\n )\n const payPeriod = payrollData?.payPeriod\n const payPeriodRange =\n payPeriod?.startDate && payPeriod.endDate\n ? dateFormatter.formatPayPeriodRange(payPeriod.startDate, payPeriod.endDate)\n : undefined\n\n const checkDate = payrollData\n ? dateFormatter.formatShortWithYear(payrollData.checkDate)\n : undefined\n\n const formHandlers = useForm<ConfirmWireDetailsFormValues>({\n resolver: zodResolver(ConfirmWireDetailsFormSchema),\n defaultValues: {\n bankName: '',\n },\n })\n\n const { mutateAsync: submitWireInRequest } = useWireInRequestsSubmitMutation()\n\n const onSubmit = async (data: ConfirmWireDetailsFormValues) => {\n await baseSubmitHandler(data, async innerData => {\n const payload = transformFormDataToPayload(innerData)\n const response = await submitWireInRequest({\n request: {\n wireInRequestUuid: wireInId,\n wireInRequestUpdateRequestBody: payload,\n },\n })\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_DONE, {\n wireInRequest: response.wireInRequest,\n confirmationAlert: {\n title: payPeriodRange\n ? t('confirmationAlert.title', { payrollRange: payPeriodRange })\n : t('confirmationAlert.emptyTitle'),\n content: checkDate ? (\n <Text>{t('confirmationAlert.content', { checkDate })}</Text>\n ) : undefined,\n },\n })\n })\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <FlexItem>\n <Heading as=\"h2\">\n <Trans i18nKey=\"title\" t={t} values={{ payrollRange: payPeriodRange }} />\n </Heading>\n <Text>{t('description')}</Text>\n </FlexItem>\n\n <FormProvider {...formHandlers}>\n <HtmlForm\n id={CONFIRM_WIRE_FORM_ID}\n onSubmit={formHandlers.handleSubmit(onSubmit)}\n className={styles.form}\n >\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"amountSent\"\n label={t('amountLabel')}\n isRequired\n format=\"currency\"\n errorMessage={t('validations.amount')}\n />\n <DatePickerField\n name=\"dateSent\"\n label={t('dateLabel')}\n isRequired\n errorMessage={t('validations.date')}\n portalContainer={modalContainerRef?.current || undefined}\n />\n <TextInputField\n name=\"bankName\"\n label={t('bankNameLabel')}\n isRequired\n description={t('bankNameDescription')}\n placeholder={t('bankNamePlaceholder')}\n errorMessage={t('validations.bankName')}\n />\n <TextAreaField name=\"additionalNotes\" label={t('notesLabel')} rows={3} />\n </Flex>\n </HtmlForm>\n </FormProvider>\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Button } = useComponentContext()\n const isMutating = useIsMutating({\n mutationKey: mutationKeyWireInRequestsSubmit(),\n })\n const isPending = isMutating > 0\n\n return (\n <Flex gap={12} justifyContent=\"space-evenly\">\n <FlexItem flexGrow={1}>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL)\n }}\n isDisabled={isPending}\n className={styles.button}\n >\n {t('cancelCta')}\n </Button>\n </FlexItem>\n <FlexItem flexGrow={1}>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form={CONFIRM_WIRE_FORM_ID}\n isLoading={isPending}\n className={styles.button}\n >\n {t('submitCta')}\n </Button>\n </FlexItem>\n </Flex>\n )\n}\nConfirmWireDetailsForm.Footer = Footer\n"],"names":["ConfirmWireDetailsFormSchema","z","CONFIRM_WIRE_FORM_ID","transformFormDataToPayload","data","ConfirmWireDetailsForm","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","modalContainerRef","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","useTranslation","Heading","Text","useComponentContext","dateFormatter","useDateFormatter","useWireInRequestsGetSuspense","wireInRequest","payrollsData","usePayrollsListSuspense","payrollData","payroll","payPeriod","payPeriodRange","checkDate","formHandlers","useForm","zodResolver","submitWireInRequest","useWireInRequestsSubmitMutation","onSubmit","innerData","payload","response","payrollWireEvents","jsxs","Flex","FlexItem","Trans","FormProvider","HtmlForm","styles","NumberInputField","DatePickerField","TextInputField","TextAreaField","Footer","t","Button","isPending","useIsMutating","mutationKeyWireInRequestsSubmit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,IAA+BC,EAAE,OAAO;AAAA,EAC5C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,UAAUA,EAAE,KAAA;AAAA,EACZ,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,iBAAiBA,EAAE,OAAA,EAAS,SAAA;AAC9B,CAAC,GAIKC,IAAuB,6BAEvBC,KAA6B,CACjCC,OAEO;AAAA,EACL,YAAY,OAAOA,EAAK,UAAU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zC,EAAQ2B,EAAkB,wBAAwB;AAAA,QACpD;AAAA,QACA,YAAYe;AAAA,QACZ,WAAWR,EAAO;AAAA,QAEjB,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA,GAElB;AAAA,IACA,gBAAA3C,EAACuC,GAAA,EAAS,UAAU,GAClB,UAAA,gBAAAvC;AAAA,MAACkD;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,MAAMvD;AAAA,QACN,WAAWwD;AAAA,QACX,WAAWR,EAAO;AAAA,QAEjB,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA,EAChB,CACF;AAAA,EAAA,GACF;AAEJ;AACA7C,GAAuB,SAASkD;"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
2
  import { useMemo as k } from "react";
3
3
  import { useTranslation as v } from "react-i18next";
4
- import { useWireInRequestsListSuspense as _ } from "@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsList";
5
- import { usePayrollsListSuspense as E } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsList";
4
+ import { useWireInRequestsListSuspense as _ } from "@gusto/embedded-api/react-query/wireInRequestsList";
5
+ import { usePayrollsListSuspense as E } from "@gusto/embedded-api/react-query/payrollsList";
6
6
  import u from "./WireInstructions.module.scss.js";
7
7
  import { BaseComponent as O } from "../../../Base/Base.js";
8
8
  import "../../../Base/useBase.js";
@@ -1 +1 @@
1
- {"version":3,"file":"WireInstructions.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/payrollsList'\nimport type { ConfirmWireDetailsContextInterface } from '../ConfirmWireDetailsComponents'\nimport styles from './WireInstructions.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useFlow } from '@/components/Flow/useFlow'\n\ninterface WireInstructionsProps extends BaseComponentInterface<'Payroll.WireInstructions'> {\n companyId: string\n wireInId?: string\n selectedWireInId?: string\n modalContainerRef?: React.RefObject<HTMLDivElement | null>\n}\n\ninterface WireInstructionFieldProps {\n label: string\n value: string\n onCopy?: () => void\n copyAriaLabel?: string\n showCopiedMessage?: boolean\n copiedMessage?: string\n}\n\nfunction useWireInstructionsState(companyId: string, selectedWireInId?: string) {\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n r => r.status === 'awaiting_funds',\n )\n\n const wireInInformation = activeWireInRequests.find(r => r.uuid === selectedWireInId)\n\n const payrolls = payrollsData.payrollList || []\n\n const activeWireInRequestsWithPayrolls = useMemo(\n () =>\n activeWireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n return {\n wireInRequest,\n payroll,\n paymentType: wireInRequest.paymentType,\n requestedAmount: wireInRequest.requestedAmount ?? '',\n }\n }),\n [activeWireInRequests, payrolls],\n )\n\n const selectedInstruction = useMemo(() => {\n if (!wireInInformation) return null\n\n const instruction = {\n id: wireInInformation.uuid || '',\n trackingCode: wireInInformation.uniqueTrackingCode || '',\n amount: parseFloat(wireInInformation.requestedAmount || '0'),\n bankName: wireInInformation.originationBank || '',\n bankAddress: wireInInformation.originationBankAddress || '',\n recipientName: wireInInformation.recipientName || '',\n recipientAddress: wireInInformation.recipientAddress || '',\n recipientAccountNumber: wireInInformation.recipientAccountNumber || '',\n recipientRoutingNumber: wireInInformation.recipientRoutingNumber || '',\n }\n return instruction\n }, [wireInInformation])\n\n return {\n selectedInstruction,\n activeWireInRequestsWithPayrolls,\n }\n}\n\nfunction WireInstructionField({ label, value }: WireInstructionFieldProps) {\n const { Text } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n <Text className={styles.fieldLabel}>{label}</Text>\n <Text className={styles.fieldValue}>{value}</Text>\n </Flex>\n )\n}\n\n/** @internal */\nexport function WireInstructions(props: WireInstructionsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n companyId,\n wireInId,\n selectedWireInId,\n dictionary,\n onEvent,\n modalContainerRef,\n}: WireInstructionsProps) => {\n useComponentDictionary('Payroll.WireInstructions', dictionary)\n useI18n('Payroll.WireInstructions')\n const { t } = useTranslation('Payroll.WireInstructions')\n const { Select, Card, Text, UnorderedList, Heading, Alert } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const formatCurrency = useNumberFormatter('currency')\n\n const { selectedInstruction, activeWireInRequestsWithPayrolls } = useWireInstructionsState(\n companyId,\n selectedWireInId,\n )\n\n const shouldShowDropdown = !wireInId && activeWireInRequestsWithPayrolls.length > 1\n\n const handleWireInSelection = (updatedSelectedWireInId: string) => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT, {\n selectedWireInId: updatedSelectedWireInId,\n })\n }\n\n if (activeWireInRequestsWithPayrolls.length === 0 || (selectedWireInId && !selectedInstruction)) {\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Text>{t('messages.noInstructions')}</Text>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <div>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text className={styles.subtitle}>{t('subtitle')}</Text>\n </div>\n\n {shouldShowDropdown && (\n <Select\n isRequired\n portalContainer={modalContainerRef?.current || undefined}\n label={t('selectLabel')}\n placeholder=\"\"\n value={selectedWireInId || ''}\n options={activeWireInRequestsWithPayrolls.map(\n ({ wireInRequest, payroll, paymentType, requestedAmount }) => {\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(\n payroll.payPeriod.startDate,\n payroll.payPeriod.endDate,\n )\n : ''\n\n return {\n label:\n paymentType === 'Payroll'\n ? payrollRange\n ? t('selectLabelPayroll', { payrollRange })\n : t('selectFallback')\n : paymentType === 'ContractorPaymentGroup'\n ? t('selectLabelContractorPaymentGroup', {\n requestedAmount: formatCurrency(Number(requestedAmount)),\n })\n : t('selectFallback'),\n value: wireInRequest.uuid || '',\n }\n },\n )}\n onChange={handleWireInSelection}\n />\n )}\n <Alert label={t('requirementsTitle')} disableScrollIntoView>\n <UnorderedList\n className={styles.requirementsList}\n items={[\n t('requirements.trackingCode'),\n t('requirements.amountMatch'),\n t('requirements.usBank'),\n t('requirements.authorized'),\n ]}\n />\n </Alert>\n {selectedInstruction && (\n <Flex flexDirection=\"column\" gap={16}>\n <Card className={styles.requirementsCard}>\n <WireInstructionField\n label={t('fields.trackingCode')}\n value={selectedInstruction.trackingCode}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.amount')}\n value={formatCurrency(selectedInstruction.amount)}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.bankName')}\n value={selectedInstruction.bankName}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.bankAddress')}\n value={selectedInstruction.bankAddress}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.recipientName')}\n value={selectedInstruction.recipientName}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.recipientAddress')}\n value={selectedInstruction.recipientAddress}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.accountNumber')}\n value={selectedInstruction.recipientAccountNumber}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.routingNumber')}\n value={selectedInstruction.recipientRoutingNumber}\n />\n </Card>\n </Flex>\n )}\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.WireInstructions')\n const { t } = useTranslation('Payroll.WireInstructions')\n const { Button } = useComponentContext()\n const { companyId, selectedWireInId } = useFlow<ConfirmWireDetailsContextInterface>()\n const { selectedInstruction } = useWireInstructionsState(companyId, selectedWireInId)\n\n const handleConfirm = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE, {\n selectedWireInId,\n })\n }\n\n return (\n <div className={styles.footer}>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_CANCEL)\n }}\n >\n {t('cta.close')}\n </Button>\n <Button variant=\"primary\" onClick={handleConfirm} isDisabled={!selectedInstruction}>\n {t('cta.confirm')}\n </Button>\n </div>\n )\n}\n\nWireInstructions.Footer = Footer\n"],"names":["useWireInstructionsState","companyId","selectedWireInId","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","r","wireInInformation","payrolls","activeWireInRequestsWithPayrolls","useMemo","wireInRequest","payroll","p","WireInstructionField","label","value","Text","useComponentContext","jsxs","Flex","jsx","styles","WireInstructions","props","BaseComponent","Root","wireInId","dictionary","onEvent","modalContainerRef","useComponentDictionary","useI18n","useTranslation","Select","Card","UnorderedList","Heading","Alert","dateFormatter","useDateFormatter","formatCurrency","useNumberFormatter","selectedInstruction","shouldShowDropdown","handleWireInSelection","updatedSelectedWireInId","payrollWireEvents","paymentType","requestedAmount","payrollRange","Footer","t","Button","useFlow","handleConfirm"],"mappings":";;;;;;;;;;;;;;;AAgCA,SAASA,EAAyBC,GAAmBC,GAA2B;AAC9E,QAAM,EAAE,MAAMC,EAAA,IAAuBC,EAA8B;AAAA,IACjE,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P;AAAA,QAAA;AAAA,UACC,OAAO,EAAE,sBAAsB;AAAA,UAC/B,OAAO6B,EAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAG5B,MAAA,EAAG;AAAA,MAEJ,gBAAAtB;AAAA,QAACP;AAAA,QAAA;AAAA,UACC,OAAO,EAAE,sBAAsB;AAAA,UAC/B,OAAO6B,EAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IAC7B,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ,GAEMQ,IAAS,CAAC,EAAE,SAAAtB,QAA4D;AAC5E,EAAAG,EAAQ,0BAA0B;AAClC,QAAM,EAAE,GAAAoB,EAAA,IAAMnB,EAAe,0BAA0B,GACjD,EAAE,QAAAoB,EAAA,IAAWnC,EAAA,GACb,EAAE,WAAAnB,GAAW,kBAAAC,EAAA,IAAqBsD,EAAA,GAClC,EAAE,qBAAAX,EAAA,IAAwB7C,EAAyBC,GAAWC,CAAgB,GAE9EuD,IAAgB,MAAM;AAC1B,IAAA1B,EAAQkB,EAAkB,gCAAgC;AAAA,MACxD,kBAAA/C;AAAA,IAAA,CACD;AAAA,EACH;AAEA,SACE,gBAAAmB,EAAC,OAAA,EAAI,WAAWG,EAAO,QACrB,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACgC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAxB,EAAQkB,EAAkB,gCAAgC;AAAA,QAC5D;AAAA,QAEC,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAEhB,gBAAA1B,EAACgC,GAAA,EAAO,SAAQ,WAAU,SAASE,GAAe,YAAY,CAACZ,GAC5D,UAAAS,EAAE,aAAa,EAAA,CAClB;AAAA,EAAA,GACF;AAEJ;AAEA7B,EAAiB,SAAS4B;"}
1
+ {"version":3,"file":"WireInstructions.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api/react-query/payrollsList'\nimport type { ConfirmWireDetailsContextInterface } from '../ConfirmWireDetailsComponents'\nimport styles from './WireInstructions.module.scss'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useFlow } from '@/components/Flow/useFlow'\n\ninterface WireInstructionsProps extends BaseComponentInterface<'Payroll.WireInstructions'> {\n companyId: string\n wireInId?: string\n selectedWireInId?: string\n modalContainerRef?: React.RefObject<HTMLDivElement | null>\n}\n\ninterface WireInstructionFieldProps {\n label: string\n value: string\n onCopy?: () => void\n copyAriaLabel?: string\n showCopiedMessage?: boolean\n copiedMessage?: string\n}\n\nfunction useWireInstructionsState(companyId: string, selectedWireInId?: string) {\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n r => r.status === 'awaiting_funds',\n )\n\n const wireInInformation = activeWireInRequests.find(r => r.uuid === selectedWireInId)\n\n const payrolls = payrollsData.payrollList || []\n\n const activeWireInRequestsWithPayrolls = useMemo(\n () =>\n activeWireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n return {\n wireInRequest,\n payroll,\n paymentType: wireInRequest.paymentType,\n requestedAmount: wireInRequest.requestedAmount ?? '',\n }\n }),\n [activeWireInRequests, payrolls],\n )\n\n const selectedInstruction = useMemo(() => {\n if (!wireInInformation) return null\n\n const instruction = {\n id: wireInInformation.uuid || '',\n trackingCode: wireInInformation.uniqueTrackingCode || '',\n amount: parseFloat(wireInInformation.requestedAmount || '0'),\n bankName: wireInInformation.originationBank || '',\n bankAddress: wireInInformation.originationBankAddress || '',\n recipientName: wireInInformation.recipientName || '',\n recipientAddress: wireInInformation.recipientAddress || '',\n recipientAccountNumber: wireInInformation.recipientAccountNumber || '',\n recipientRoutingNumber: wireInInformation.recipientRoutingNumber || '',\n }\n return instruction\n }, [wireInInformation])\n\n return {\n selectedInstruction,\n activeWireInRequestsWithPayrolls,\n }\n}\n\nfunction WireInstructionField({ label, value }: WireInstructionFieldProps) {\n const { Text } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n <Text className={styles.fieldLabel}>{label}</Text>\n <Text className={styles.fieldValue}>{value}</Text>\n </Flex>\n )\n}\n\n/** @internal */\nexport function WireInstructions(props: WireInstructionsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n companyId,\n wireInId,\n selectedWireInId,\n dictionary,\n onEvent,\n modalContainerRef,\n}: WireInstructionsProps) => {\n useComponentDictionary('Payroll.WireInstructions', dictionary)\n useI18n('Payroll.WireInstructions')\n const { t } = useTranslation('Payroll.WireInstructions')\n const { Select, Card, Text, UnorderedList, Heading, Alert } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const formatCurrency = useNumberFormatter('currency')\n\n const { selectedInstruction, activeWireInRequestsWithPayrolls } = useWireInstructionsState(\n companyId,\n selectedWireInId,\n )\n\n const shouldShowDropdown = !wireInId && activeWireInRequestsWithPayrolls.length > 1\n\n const handleWireInSelection = (updatedSelectedWireInId: string) => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT, {\n selectedWireInId: updatedSelectedWireInId,\n })\n }\n\n if (activeWireInRequestsWithPayrolls.length === 0 || (selectedWireInId && !selectedInstruction)) {\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <Text>{t('messages.noInstructions')}</Text>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <div>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text className={styles.subtitle}>{t('subtitle')}</Text>\n </div>\n\n {shouldShowDropdown && (\n <Select\n isRequired\n portalContainer={modalContainerRef?.current || undefined}\n label={t('selectLabel')}\n placeholder=\"\"\n value={selectedWireInId || ''}\n options={activeWireInRequestsWithPayrolls.map(\n ({ wireInRequest, payroll, paymentType, requestedAmount }) => {\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(\n payroll.payPeriod.startDate,\n payroll.payPeriod.endDate,\n )\n : ''\n\n return {\n label:\n paymentType === 'Payroll'\n ? payrollRange\n ? t('selectLabelPayroll', { payrollRange })\n : t('selectFallback')\n : paymentType === 'ContractorPaymentGroup'\n ? t('selectLabelContractorPaymentGroup', {\n requestedAmount: formatCurrency(Number(requestedAmount)),\n })\n : t('selectFallback'),\n value: wireInRequest.uuid || '',\n }\n },\n )}\n onChange={handleWireInSelection}\n />\n )}\n <Alert label={t('requirementsTitle')} disableScrollIntoView>\n <UnorderedList\n className={styles.requirementsList}\n items={[\n t('requirements.trackingCode'),\n t('requirements.amountMatch'),\n t('requirements.usBank'),\n t('requirements.authorized'),\n ]}\n />\n </Alert>\n {selectedInstruction && (\n <Flex flexDirection=\"column\" gap={16}>\n <Card className={styles.requirementsCard}>\n <WireInstructionField\n label={t('fields.trackingCode')}\n value={selectedInstruction.trackingCode}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.amount')}\n value={formatCurrency(selectedInstruction.amount)}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.bankName')}\n value={selectedInstruction.bankName}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.bankAddress')}\n value={selectedInstruction.bankAddress}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.recipientName')}\n value={selectedInstruction.recipientName}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.recipientAddress')}\n value={selectedInstruction.recipientAddress}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.accountNumber')}\n value={selectedInstruction.recipientAccountNumber}\n />\n\n <hr />\n\n <WireInstructionField\n label={t('fields.routingNumber')}\n value={selectedInstruction.recipientRoutingNumber}\n />\n </Card>\n </Flex>\n )}\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.WireInstructions')\n const { t } = useTranslation('Payroll.WireInstructions')\n const { Button } = useComponentContext()\n const { companyId, selectedWireInId } = useFlow<ConfirmWireDetailsContextInterface>()\n const { selectedInstruction } = useWireInstructionsState(companyId, selectedWireInId)\n\n const handleConfirm = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE, {\n selectedWireInId,\n })\n }\n\n return (\n <div className={styles.footer}>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_CANCEL)\n }}\n >\n {t('cta.close')}\n </Button>\n <Button variant=\"primary\" onClick={handleConfirm} isDisabled={!selectedInstruction}>\n {t('cta.confirm')}\n </Button>\n </div>\n )\n}\n\nWireInstructions.Footer = Footer\n"],"names":["useWireInstructionsState","companyId","selectedWireInId","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","r","wireInInformation","payrolls","activeWireInRequestsWithPayrolls","useMemo","wireInRequest","payroll","p","WireInstructionField","label","value","Text","useComponentContext","jsxs","Flex","jsx","styles","WireInstructions","props","BaseComponent","Root","wireInId","dictionary","onEvent","modalContainerRef","useComponentDictionary","useI18n","useTranslation","Select","Card","UnorderedList","Heading","Alert","dateFormatter","useDateFormatter","formatCurrency","useNumberFormatter","selectedInstruction","shouldShowDropdown","handleWireInSelection","updatedSelectedWireInId","payrollWireEvents","paymentType","requestedAmount","payrollRange","Footer","t","Button","useFlow","handleConfirm"],"mappings":";;;;;;;;;;;;;;;AAgCA,SAASA,EAAyBC,GAAmBC,GAA2B;AAC9E,QAAM,EAAE,MAAMC,EAAA,IAAuBC,EAA8B;AAAA,IACjE,aAAaH;AAAA,EAAA,CACd,GAEK,EAAE,MAAMI,EAAA,IAAiBC,EAAwB;AAAA,IACrD,WAAAL;AAAA,IACA,WAAW;AAAA,EAAA,CACZ,GAEKM,KAAwBJ,EAAmB,qBAAqB,CAAA,GAAI;AAAA,IACxE,CAAAK,MAAKA,EAAE,WAAW;AAAA,EAAA,GAGdC,IAAoBF,EAAqB,KAAK,CAAAC,MAAKA,EAAE,SAASN,CAAgB,GAE9EQ,IAAWL,EAAa,eAAe,CAAA,GAEvCM,IAAmCC;AAAA,IACvC,MACEL,EAAqB,IAAI,CAAAM,MAAiB;AACxC,YAAMC,IAAUJ,EAAS,KAAK,OAAKK,EAAE,gBAAgBF,EAAc,WAAW;AAC9E,aAAO;AAAA,QACL,eAAAA;AAAA,QACA,SAAAC;AAAA,QACA,aAAaD,EAAc;AAAA,QAC3B,iBAAiBA,EAAc,mBAAmB;AAAA,MAAA;AAAA,IAEtD,CAAC;AAAA,IACH,CAACN,GAAsBG,CAAQ;AAAA,EAAA;AAoBjC,SAAO;AAAA,IACL,qBAlB0BE,EAAQ,MAC7BH,IAEe;AAAA,MAClB,IAAIA,EAAkB,QAAQ;AAAA,MAC9B,cAAcA,EAAkB,sBAAsB;AAAA,MACtD,QAAQ,WAAWA,EAAkB,mBAAmB,GAAG;AAAA,MAC3D,UAAUA,EAAkB,mBAAmB;AAAA,MAC/C,aAAaA,EAAkB,0BAA0B;AAAA,MACzD,eAAeA,EAAkB,iBAAiB;AAAA,MAClD,kBAAkBA,EAAkB,oBAAoB;AAAA,MACxD,wBAAwBA,EAAkB,0BAA0B;AAAA,MACpE,wBAAwBA,EAAkB,0BAA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E,GAAe,YAAY,CAACZ,GAC5D,UAAAS,EAAE,aAAa,EAAA,CAClB;AAAA,EAAA,GACF;AAEJ;AAEA7B,EAAiB,SAAS4B;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { useMemo as d } from "react";
3
- import { usePayrollsGetSuspense as u } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsGet";
4
- import { PayrollExecutionFlow as p } from "../PayrollExecutionFlow/PayrollExecutionFlow.js";
3
+ import { usePayrollsGetSuspense as u } from "@gusto/embedded-api/react-query/payrollsGet";
4
+ import { PayrollExecutionInternalFlow as p } from "../PayrollExecutionFlow/PayrollExecutionFlow.js";
5
5
  import { DismissalPayPeriodSelection as y } from "./DismissalPayPeriodSelection/DismissalPayPeriodSelection.js";
6
6
  import { useFlow as a } from "../../Flow/useFlow.js";
7
7
  import { ensureRequired as s } from "../../../helpers/ensureRequired.js";
@@ -18,7 +18,7 @@ function C() {
18
18
  );
19
19
  }
20
20
  function w() {
21
- const { companyId: o, payrollUuid: e, onEvent: r, header: t } = a(), i = t?.type === "breadcrumbs" ? t.breadcrumbs?.payPeriodSelection?.[0] : void 0, m = d(() => i ? [i] : void 0, [i]), l = s(o), c = s(e);
21
+ const { companyId: o, payrollUuid: e, onEvent: r, header: i } = a(), t = i?.type === "breadcrumbs" ? i.breadcrumbs?.payPeriodSelection?.[0] : void 0, m = d(() => t ? [t] : void 0, [t]), l = s(o), c = s(e);
22
22
  return /* @__PURE__ */ n(P, { onEvent: r, children: /* @__PURE__ */ n(
23
23
  f,
24
24
  {
@@ -34,13 +34,13 @@ function f({
34
34
  payrollId: e,
35
35
  ...r
36
36
  }) {
37
- const { data: t } = u({ companyId: o, payrollId: e }), i = t.payrollShow?.payPeriod;
37
+ const { data: i } = u({ companyId: o, payrollId: e }), t = i.payrollShow?.payPeriod;
38
38
  return /* @__PURE__ */ n(
39
39
  p,
40
40
  {
41
41
  companyId: o,
42
42
  payrollId: e,
43
- initialPayPeriod: i,
43
+ initialPayPeriod: t,
44
44
  isDismissalPayroll: !0,
45
45
  ...r
46
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DismissalFlowComponents.js","sources":["../../../../src/components/Payroll/Dismissal/DismissalFlowComponents.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/payrollsGet'\nimport {\n PayrollExecutionFlow,\n type PayrollExecutionFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport { DismissalPayPeriodSelection } from './DismissalPayPeriodSelection/DismissalPayPeriodSelection'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\n/** @internal */\nexport interface DismissalFlowContextInterface extends FlowContextInterface {\n /** The associated company identifier. */\n companyId: string\n /** The terminated employee whose final payroll is being run. */\n employeeId?: string\n /** The dismissal payroll identifier, set once a pay period has been selected and the payroll created. */\n payrollUuid?: string\n}\n\n/**\n * Props for {@link DismissalFlow}.\n *\n * @public\n */\nexport interface DismissalFlowProps {\n /** The associated company identifier. */\n companyId: string\n /** The terminated employee whose final payroll is being run. */\n employeeId?: string\n /** Handler for events emitted by the flow. See {@link DismissalFlow} for the event table. */\n onEvent: OnEventType<EventType, unknown>\n /** Optional dismissal payroll identifier. When provided, the flow skips pay period selection and starts directly at payroll execution. */\n payrollId?: string\n}\n\n/** @internal */\nexport function DismissalPayPeriodSelectionContextual() {\n const { companyId, employeeId, onEvent } = useFlow<DismissalFlowContextInterface>()\n return (\n <DismissalPayPeriodSelection\n companyId={ensureRequired(companyId)}\n employeeId={employeeId}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function DismissalExecutionContextual() {\n const { companyId, payrollUuid, onEvent, header } = useFlow<DismissalFlowContextInterface>()\n\n const payPeriodSelectionBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.['payPeriodSelection']?.[0] : undefined\n const prefixBreadcrumbs = useMemo(() => {\n return payPeriodSelectionBreadcrumb ? [payPeriodSelectionBreadcrumb] : undefined\n }, [payPeriodSelectionBreadcrumb])\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n return (\n <BaseComponent onEvent={onEvent}>\n <DismissalExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n </BaseComponent>\n )\n}\n\ntype DismissalExecutionWithDataProps = Pick<\n PayrollExecutionFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs'\n>\n\nfunction DismissalExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: DismissalExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll\n {...rest}\n />\n )\n}\n"],"names":["DismissalPayPeriodSelectionContextual","companyId","employeeId","onEvent","useFlow","jsx","DismissalPayPeriodSelection","ensureRequired","DismissalExecutionContextual","payrollUuid","header","payPeriodSelectionBreadcrumb","prefixBreadcrumbs","useMemo","resolvedCompanyId","resolvedPayrollId","BaseComponent","DismissalExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionFlow"],"mappings":";;;;;;;;AAwCO,SAASA,IAAwC;AACtD,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAC3C,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeN,CAAS;AAAA,MACnC,YAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASK,IAA+B;AAC7C,QAAM,EAAE,WAAAP,GAAW,aAAAQ,GAAa,SAAAN,GAAS,QAAAO,EAAA,IAAWN,EAAA,GAE9CO,IACJD,GAAQ,SAAS,gBAAgBA,EAAO,aAAc,qBAAwB,CAAC,IAAI,QAC/EE,IAAoBC,EAAQ,MACzBF,IAA+B,CAACA,CAA4B,IAAI,QACtE,CAACA,CAA4B,CAAC,GAE3BG,IAAoBP,EAAeN,CAAS,GAC5Cc,IAAoBR,EAAeE,CAAW;AAEpD,SACE,gBAAAJ,EAACW,KAAc,SAAAb,GACb,UAAA,gBAAAE;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,MACX,WAAWC;AAAA,MACX,SAAAZ;AAAA,MACA,mBAAAS;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAOA,SAASK,EAA2B;AAAA,EAClC,WAAAhB;AAAA,EACA,WAAAiB;AAAA,EACA,GAAGC;AACL,GAAoC;AAClC,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAuB,EAAE,WAAApB,GAAW,WAAAiB,GAAW,GAC1DI,IAAmBF,EAAK,aAAa;AAE3C,SACE,gBAAAf;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,WAAAtB;AAAA,MACA,WAAAiB;AAAA,MACA,kBAAAI;AAAA,MACA,oBAAkB;AAAA,MACjB,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"DismissalFlowComponents.js","sources":["../../../../src/components/Payroll/Dismissal/DismissalFlowComponents.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport {\n PayrollExecutionInternalFlow,\n type PayrollExecutionInternalFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport { DismissalPayPeriodSelection } from './DismissalPayPeriodSelection/DismissalPayPeriodSelection'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\n/** @internal */\nexport interface DismissalFlowContextInterface extends FlowContextInterface {\n /** The associated company identifier. */\n companyId: string\n /** The terminated employee whose final payroll is being run. */\n employeeId?: string\n /** The dismissal payroll identifier, set once a pay period has been selected and the payroll created. */\n payrollUuid?: string\n}\n\n/**\n * Props for {@link DismissalFlow}.\n *\n * @public\n */\nexport interface DismissalFlowProps {\n /** The associated company identifier. */\n companyId: string\n /** The terminated employee whose final payroll is being run. */\n employeeId?: string\n /** Handler for events emitted by the flow. See {@link DismissalFlow} for the event table. */\n onEvent: OnEventType<EventType, unknown>\n /** Optional dismissal payroll identifier. When provided, the flow skips pay period selection and starts directly at payroll execution. */\n payrollId?: string\n}\n\n/** @internal */\nexport function DismissalPayPeriodSelectionContextual() {\n const { companyId, employeeId, onEvent } = useFlow<DismissalFlowContextInterface>()\n return (\n <DismissalPayPeriodSelection\n companyId={ensureRequired(companyId)}\n employeeId={employeeId}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function DismissalExecutionContextual() {\n const { companyId, payrollUuid, onEvent, header } = useFlow<DismissalFlowContextInterface>()\n\n const payPeriodSelectionBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.['payPeriodSelection']?.[0] : undefined\n const prefixBreadcrumbs = useMemo(() => {\n return payPeriodSelectionBreadcrumb ? [payPeriodSelectionBreadcrumb] : undefined\n }, [payPeriodSelectionBreadcrumb])\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n return (\n <BaseComponent onEvent={onEvent}>\n <DismissalExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n </BaseComponent>\n )\n}\n\ntype DismissalExecutionWithDataProps = Pick<\n PayrollExecutionInternalFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs'\n>\n\nfunction DismissalExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: DismissalExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionInternalFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll\n {...rest}\n />\n )\n}\n"],"names":["DismissalPayPeriodSelectionContextual","companyId","employeeId","onEvent","useFlow","jsx","DismissalPayPeriodSelection","ensureRequired","DismissalExecutionContextual","payrollUuid","header","payPeriodSelectionBreadcrumb","prefixBreadcrumbs","useMemo","resolvedCompanyId","resolvedPayrollId","BaseComponent","DismissalExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionInternalFlow"],"mappings":";;;;;;;;AAwCO,SAASA,IAAwC;AACtD,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAC3C,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeN,CAAS;AAAA,MACnC,YAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASK,IAA+B;AAC7C,QAAM,EAAE,WAAAP,GAAW,aAAAQ,GAAa,SAAAN,GAAS,QAAAO,EAAA,IAAWN,EAAA,GAE9CO,IACJD,GAAQ,SAAS,gBAAgBA,EAAO,aAAc,qBAAwB,CAAC,IAAI,QAC/EE,IAAoBC,EAAQ,MACzBF,IAA+B,CAACA,CAA4B,IAAI,QACtE,CAACA,CAA4B,CAAC,GAE3BG,IAAoBP,EAAeN,CAAS,GAC5Cc,IAAoBR,EAAeE,CAAW;AAEpD,SACE,gBAAAJ,EAACW,KAAc,SAAAb,GACb,UAAA,gBAAAE;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,MACX,WAAWC;AAAA,MACX,SAAAZ;AAAA,MACA,mBAAAS;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAOA,SAASK,EAA2B;AAAA,EAClC,WAAAhB;AAAA,EACA,WAAAiB;AAAA,EACA,GAAGC;AACL,GAAoC;AAClC,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAuB,EAAE,WAAApB,GAAW,WAAAiB,GAAW,GAC1DI,IAAmBF,EAAK,aAAa;AAE3C,SACE,gBAAAf;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,WAAAtB;AAAA,MACA,WAAAiB;AAAA,MACA,kBAAAI;AAAA,MACA,oBAAkB;AAAA,MACjB,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { useEffect as A, useMemo as y, useState as O } from "react";
3
- import { usePaySchedulesGetUnprocessedTerminationPeriodsSuspense as b } from "@gusto/embedded-api-v-2026-02-01/react-query/paySchedulesGetUnprocessedTerminationPeriods";
4
- import { usePayrollsCreateOffCycleMutation as g } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsCreateOffCycle";
5
- import { OffCycleReason as T } from "@gusto/embedded-api-v-2026-02-01/models/operations/postv1companiescompanyidpayrolls";
6
- import { RFCDate as D } from "@gusto/embedded-api-v-2026-02-01/types/rfcdate";
3
+ import { usePaySchedulesGetUnprocessedTerminationPeriodsSuspense as b } from "@gusto/embedded-api/react-query/paySchedulesGetUnprocessedTerminationPeriods";
4
+ import { usePayrollsCreateOffCycleMutation as g } from "@gusto/embedded-api/react-query/payrollsCreateOffCycle";
5
+ import { OffCycleReason as T } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
6
+ import { RFCDate as D } from "@gusto/embedded-api/types/rfcdate";
7
7
  import { useTranslation as K } from "react-i18next";
8
8
  import { DismissalPayPeriodSelectionPresentation as L } from "./DismissalPayPeriodSelectionPresentation.js";
9
9
  import { BaseComponent as M } from "../../../Base/Base.js";
@@ -1 +1 @@
1
- {"version":3,"file":"DismissalPayPeriodSelection.js","sources":["../../../../../src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react'\nimport { usePaySchedulesGetUnprocessedTerminationPeriodsSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/paySchedulesGetUnprocessedTerminationPeriods'\nimport { usePayrollsCreateOffCycleMutation } from '@gusto/embedded-api-v-2026-02-01/react-query/payrollsCreateOffCycle'\nimport type { UnprocessedTerminationPayPeriod } from '@gusto/embedded-api-v-2026-02-01/models/components/unprocessedterminationpayperiod'\nimport { OffCycleReason } from '@gusto/embedded-api-v-2026-02-01/models/operations/postv1companiescompanyidpayrolls'\nimport { RFCDate } from '@gusto/embedded-api-v-2026-02-01/types/rfcdate'\nimport { useTranslation } from 'react-i18next'\nimport { DismissalPayPeriodSelectionPresentation } from './DismissalPayPeriodSelectionPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { formatPayPeriodRange } from '@/helpers/dateFormatting'\nimport type { SelectOption } from '@/components/Common/UI/Select/SelectTypes'\n\n/**\n * Props for {@link DismissalPayPeriodSelection}.\n *\n * @public\n */\nexport interface DismissalPayPeriodSelectionProps extends BaseComponentInterface<'Payroll.Dismissal'> {\n /** Identifier of the company the dismissal payroll belongs to. */\n companyId: string\n /** Identifier of the terminated employee. When provided, the available pay periods are filtered to this employee. */\n employeeId?: string\n /** Identifier of an existing dismissal payroll. When provided alongside `employeeId`, pay period selection is skipped and the component immediately emits the selection event. */\n payrollId?: string\n}\n\n/**\n * Pay period selection step for the dismissal payroll workflow.\n *\n * Lists the terminated employee's unprocessed termination pay periods and, on submit, creates an off-cycle payroll with the \"Dismissed employee\" reason for the selected period. When only one pay period is available it is pre-selected. When both `payrollId` and `employeeId` are supplied the step is skipped and the selection event fires immediately with the existing payroll.\n *\n * @remarks\n * Events:\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `dismissal/payPeriod/selected` | Fired after a pay period is selected and the off-cycle payroll has been created, or immediately when `payrollId` is supplied. | `{ payrollUuid: string }` |\n *\n * @param props - See {@link DismissalPayPeriodSelectionProps}.\n * @returns The rendered pay period selection step, or nothing while auto-advancing past selection.\n * @public\n */\nexport function DismissalPayPeriodSelection(props: DismissalPayPeriodSelectionProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\ntype RequiredPayPeriod = UnprocessedTerminationPayPeriod &\n Required<Pick<UnprocessedTerminationPayPeriod, 'startDate' | 'endDate' | 'employeeUuid'>>\n\nconst payPeriodKey = (period: RequiredPayPeriod) => `${period.startDate}__${period.endDate}`\n\nfunction Root({ companyId, employeeId, payrollId, dictionary }: DismissalPayPeriodSelectionProps) {\n useComponentDictionary('Payroll.Dismissal', dictionary)\n useI18n('Payroll.Dismissal')\n const { t } = useTranslation('Payroll.Dismissal')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = usePaySchedulesGetUnprocessedTerminationPeriodsSuspense({ companyId })\n const { mutateAsync: createOffCyclePayroll, isPending } = usePayrollsCreateOffCycleMutation()\n\n const shouldAutoAdvance = Boolean(payrollId) && Boolean(employeeId)\n\n useEffect(() => {\n if (payrollId && employeeId) {\n onEvent(componentEvents.DISMISSAL_PAY_PERIOD_SELECTED, { payrollUuid: payrollId })\n }\n }, [payrollId, employeeId, onEvent])\n\n const employeePayPeriods: RequiredPayPeriod[] = useMemo(() => {\n const allPeriods = data.unprocessedTerminationPayPeriods ?? []\n return allPeriods\n .filter(period => !employeeId || period.employeeUuid === employeeId)\n .filter(\n (period): period is RequiredPayPeriod =>\n Boolean(period.startDate) && Boolean(period.endDate) && Boolean(period.employeeUuid),\n )\n }, [data, employeeId])\n\n const payPeriodOptions: SelectOption[] = useMemo(() => {\n return employeePayPeriods.map(period => {\n const dateRange = formatPayPeriodRange(period.startDate, period.endDate)\n const label = period.employeeName ? `${dateRange} (${period.employeeName})` : dateRange\n return {\n value: payPeriodKey(period),\n label,\n }\n })\n }, [employeePayPeriods])\n\n const initialSelection = payPeriodOptions.length === 1 ? payPeriodOptions[0]!.value : undefined\n const [selectedPeriodKey, setSelectedPeriodKey] = useState(initialSelection)\n\n const handleSubmit = async () => {\n await baseSubmitHandler({ selectedPeriodKey }, async () => {\n if (selectedPeriodKey === undefined) {\n throw new SDKInternalError(t('errors.noPayPeriodSelected'))\n }\n\n const period = employeePayPeriods.find(p => payPeriodKey(p) === selectedPeriodKey)\n if (!period) {\n throw new SDKInternalError(t('errors.invalidPayPeriod'))\n }\n\n const resolvedEmployeeId = employeeId ?? period.employeeUuid\n\n const response = await createOffCyclePayroll({\n request: {\n companyId,\n requestBody: {\n offCycle: true,\n offCycleReason: OffCycleReason.DismissedEmployee,\n startDate: new RFCDate(period.startDate),\n endDate: new RFCDate(period.endDate),\n employeeUuids: [resolvedEmployeeId],\n },\n },\n })\n\n const payrollUuid =\n response.payrollUnprocessed?.payrollUuid ?? response.payrollUnprocessed?.uuid\n\n if (!payrollUuid) {\n throw new SDKInternalError(t('errors.missingPayrollId'))\n }\n\n onEvent(componentEvents.DISMISSAL_PAY_PERIOD_SELECTED, { payrollUuid })\n })\n }\n\n if (shouldAutoAdvance) {\n return null\n }\n\n return (\n <DismissalPayPeriodSelectionPresentation\n payPeriodOptions={payPeriodOptions}\n selectedPeriodKey={selectedPeriodKey}\n onSelectPeriod={setSelectedPeriodKey}\n onSubmit={handleSubmit}\n isPending={isPending}\n />\n )\n}\n"],"names":["DismissalPayPeriodSelection","props","jsx","BaseComponent","Root","payPeriodKey","period","companyId","employeeId","payrollId","dictionary","useComponentDictionary","useI18n","t","useTranslation","onEvent","baseSubmitHandler","useBase","data","usePaySchedulesGetUnprocessedTerminationPeriodsSuspense","createOffCyclePayroll","isPending","usePayrollsCreateOffCycleMutation","shouldAutoAdvance","useEffect","componentEvents","employeePayPeriods","useMemo","payPeriodOptions","dateRange","formatPayPeriodRange","label","initialSelection","selectedPeriodKey","setSelectedPeriodKey","useState","handleSubmit","SDKInternalError","p","resolvedEmployeeId","response","OffCycleReason","RFCDate","payrollUuid","DismissalPayPeriodSelectionPresentation"],"mappings":";;;;;;;;;;;;;;AAgDO,SAASA,GAA4BC,GAAyC;AACnF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAKA,MAAMI,IAAe,CAACC,MAA8B,GAAGA,EAAO,SAAS,KAAKA,EAAO,OAAO;AAE1F,SAASF,EAAK,EAAE,WAAAG,GAAW,YAAAC,GAAY,WAAAC,GAAW,YAAAC,KAAgD;AAChG,EAAAC,EAAuB,qBAAqBD,CAAU,GACtDE,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAwD,EAAE,WAAAZ,GAAW,GAChF,EAAE,aAAaa,GAAuB,WAAAC,EAAA,IAAcC,EAAA,GAEpDC,IAAoB,EAAQd,KAAc,EAAQD;AAExD,EAAAgB,EAAU,MAAM;AACd,IAAIf,KAAaD,KACfO,EAAQU,EAAgB,+BAA+B,EAAE,aAAahB,GAAW;AAAA,EAErF,GAAG,CAACA,GAAWD,GAAYO,CAAO,CAAC;AAEnC,QAAMW,IAA0CC,EAAQ,OACnCT,EAAK,oCAAoC,CAAA,GAEzD,OAAO,CAAAZ,MAAU,CAACE,KAAcF,EAAO,iBAAiBE,CAAU,EAClE;AAAA,IACC,CAACF,MACC,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B,EAAE,yBAAyB,CAAC;AAGzD,MAAAE,EAAQU,EAAgB,+BAA+B,EAAE,aAAAkB,EAAA,CAAa;AAAA,IACxE,CAAC;AAAA,EACH;AAEA,SAAIpB,IACK,OAIP,gBAAArB;AAAA,IAAC0C;AAAA,IAAA;AAAA,MACC,kBAAAhB;AAAA,MACA,mBAAAK;AAAA,MACA,gBAAgBC;AAAA,MAChB,UAAUE;AAAA,MACV,WAAAf;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"DismissalPayPeriodSelection.js","sources":["../../../../../src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react'\nimport { usePaySchedulesGetUnprocessedTerminationPeriodsSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetUnprocessedTerminationPeriods'\nimport { usePayrollsCreateOffCycleMutation } from '@gusto/embedded-api/react-query/payrollsCreateOffCycle'\nimport type { UnprocessedTerminationPayPeriod } from '@gusto/embedded-api/models/components/unprocessedterminationpayperiod'\nimport { OffCycleReason } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { useTranslation } from 'react-i18next'\nimport { DismissalPayPeriodSelectionPresentation } from './DismissalPayPeriodSelectionPresentation'\nimport { BaseComponent } from '@/components/Base/Base'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { formatPayPeriodRange } from '@/helpers/dateFormatting'\nimport type { SelectOption } from '@/components/Common/UI/Select/SelectTypes'\n\n/**\n * Props for {@link DismissalPayPeriodSelection}.\n *\n * @public\n */\nexport interface DismissalPayPeriodSelectionProps extends BaseComponentInterface<'Payroll.Dismissal'> {\n /** Identifier of the company the dismissal payroll belongs to. */\n companyId: string\n /** Identifier of the terminated employee. When provided, the available pay periods are filtered to this employee. */\n employeeId?: string\n /** Identifier of an existing dismissal payroll. When provided alongside `employeeId`, pay period selection is skipped and the component immediately emits the selection event. */\n payrollId?: string\n}\n\n/**\n * Pay period selection step for the dismissal payroll workflow.\n *\n * Lists the terminated employee's unprocessed termination pay periods and, on submit, creates an off-cycle payroll with the \"Dismissed employee\" reason for the selected period. When only one pay period is available it is pre-selected. When both `payrollId` and `employeeId` are supplied the step is skipped and the selection event fires immediately with the existing payroll.\n *\n * @remarks\n * Events:\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `dismissal/payPeriod/selected` | Fired after a pay period is selected and the off-cycle payroll has been created, or immediately when `payrollId` is supplied. | `{ payrollUuid: string }` |\n *\n * @param props - See {@link DismissalPayPeriodSelectionProps}.\n * @returns The rendered pay period selection step, or nothing while auto-advancing past selection.\n * @public\n */\nexport function DismissalPayPeriodSelection(props: DismissalPayPeriodSelectionProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\ntype RequiredPayPeriod = UnprocessedTerminationPayPeriod &\n Required<Pick<UnprocessedTerminationPayPeriod, 'startDate' | 'endDate' | 'employeeUuid'>>\n\nconst payPeriodKey = (period: RequiredPayPeriod) => `${period.startDate}__${period.endDate}`\n\nfunction Root({ companyId, employeeId, payrollId, dictionary }: DismissalPayPeriodSelectionProps) {\n useComponentDictionary('Payroll.Dismissal', dictionary)\n useI18n('Payroll.Dismissal')\n const { t } = useTranslation('Payroll.Dismissal')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = usePaySchedulesGetUnprocessedTerminationPeriodsSuspense({ companyId })\n const { mutateAsync: createOffCyclePayroll, isPending } = usePayrollsCreateOffCycleMutation()\n\n const shouldAutoAdvance = Boolean(payrollId) && Boolean(employeeId)\n\n useEffect(() => {\n if (payrollId && employeeId) {\n onEvent(componentEvents.DISMISSAL_PAY_PERIOD_SELECTED, { payrollUuid: payrollId })\n }\n }, [payrollId, employeeId, onEvent])\n\n const employeePayPeriods: RequiredPayPeriod[] = useMemo(() => {\n const allPeriods = data.unprocessedTerminationPayPeriods ?? []\n return allPeriods\n .filter(period => !employeeId || period.employeeUuid === employeeId)\n .filter(\n (period): period is RequiredPayPeriod =>\n Boolean(period.startDate) && Boolean(period.endDate) && Boolean(period.employeeUuid),\n )\n }, [data, employeeId])\n\n const payPeriodOptions: SelectOption[] = useMemo(() => {\n return employeePayPeriods.map(period => {\n const dateRange = formatPayPeriodRange(period.startDate, period.endDate)\n const label = period.employeeName ? `${dateRange} (${period.employeeName})` : dateRange\n return {\n value: payPeriodKey(period),\n label,\n }\n })\n }, [employeePayPeriods])\n\n const initialSelection = payPeriodOptions.length === 1 ? payPeriodOptions[0]!.value : undefined\n const [selectedPeriodKey, setSelectedPeriodKey] = useState(initialSelection)\n\n const handleSubmit = async () => {\n await baseSubmitHandler({ selectedPeriodKey }, async () => {\n if (selectedPeriodKey === undefined) {\n throw new SDKInternalError(t('errors.noPayPeriodSelected'))\n }\n\n const period = employeePayPeriods.find(p => payPeriodKey(p) === selectedPeriodKey)\n if (!period) {\n throw new SDKInternalError(t('errors.invalidPayPeriod'))\n }\n\n const resolvedEmployeeId = employeeId ?? period.employeeUuid\n\n const response = await createOffCyclePayroll({\n request: {\n companyId,\n requestBody: {\n offCycle: true,\n offCycleReason: OffCycleReason.DismissedEmployee,\n startDate: new RFCDate(period.startDate),\n endDate: new RFCDate(period.endDate),\n employeeUuids: [resolvedEmployeeId],\n },\n },\n })\n\n const payrollUuid =\n response.payrollUnprocessed?.payrollUuid ?? response.payrollUnprocessed?.uuid\n\n if (!payrollUuid) {\n throw new SDKInternalError(t('errors.missingPayrollId'))\n }\n\n onEvent(componentEvents.DISMISSAL_PAY_PERIOD_SELECTED, { payrollUuid })\n })\n }\n\n if (shouldAutoAdvance) {\n return null\n }\n\n return (\n <DismissalPayPeriodSelectionPresentation\n payPeriodOptions={payPeriodOptions}\n selectedPeriodKey={selectedPeriodKey}\n onSelectPeriod={setSelectedPeriodKey}\n onSubmit={handleSubmit}\n isPending={isPending}\n />\n )\n}\n"],"names":["DismissalPayPeriodSelection","props","jsx","BaseComponent","Root","payPeriodKey","period","companyId","employeeId","payrollId","dictionary","useComponentDictionary","useI18n","t","useTranslation","onEvent","baseSubmitHandler","useBase","data","usePaySchedulesGetUnprocessedTerminationPeriodsSuspense","createOffCyclePayroll","isPending","usePayrollsCreateOffCycleMutation","shouldAutoAdvance","useEffect","componentEvents","employeePayPeriods","useMemo","payPeriodOptions","dateRange","formatPayPeriodRange","label","initialSelection","selectedPeriodKey","setSelectedPeriodKey","useState","handleSubmit","SDKInternalError","p","resolvedEmployeeId","response","OffCycleReason","RFCDate","payrollUuid","DismissalPayPeriodSelectionPresentation"],"mappings":";;;;;;;;;;;;;;AAgDO,SAASA,GAA4BC,GAAyC;AACnF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAKA,MAAMI,IAAe,CAACC,MAA8B,GAAGA,EAAO,SAAS,KAAKA,EAAO,OAAO;AAE1F,SAASF,EAAK,EAAE,WAAAG,GAAW,YAAAC,GAAY,WAAAC,GAAW,YAAAC,KAAgD;AAChG,EAAAC,EAAuB,qBAAqBD,CAAU,GACtDE,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAwD,EAAE,WAAAZ,GAAW,GAChF,EAAE,aAAaa,GAAuB,WAAAC,EAAA,IAAcC,EAAA,GAEpDC,IAAoB,EAAQd,KAAc,EAAQD;AAExD,EAAAgB,EAAU,MAAM;AACd,IAAIf,KAAaD,KACfO,EAAQU,EAAgB,+BAA+B,EAAE,aAAahB,GAAW;AAAA,EAErF,GAAG,CAACA,G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,OAAO;AAAA,YACnC,eAAe,CAACiC,CAAkB;AAAA,UAAA;AAAA,QACpC;AAAA,MACF,CACD,GAEKI,IACJH,EAAS,oBAAoB,eAAeA,EAAS,oBAAoB;AAE3E,UAAI,CAACG;AACH,cAAM,IAAIN,EAAiBxB,EAAE,yBAAyB,CAAC;AAGzD,MAAAE,EAAQU,EAAgB,+BAA+B,EAAE,aAAAkB,EAAA,CAAa;AAAA,IACxE,CAAC;AAAA,EACH;AAEA,SAAIpB,IACK,OAIP,gBAAArB;AAAA,IAAC0C;AAAA,IAAA;AAAA,MACC,kBAAAhB;AAAA,MACA,mBAAAK;AAAA,MACA,gBAAgBC;AAAA,MAChB,UAAUE;AAAA,MACV,WAAAf;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -11,19 +11,20 @@ import { useComponentContext as H } from "../../../contexts/ComponentAdapter/use
11
11
  import "react-error-boundary";
12
12
  import "@tanstack/react-query";
13
13
  import { useBase as L } from "../../Base/useBase.js";
14
- import "@gusto/embedded-api-v-2026-02-01/models/errors/apierror";
15
- import "@gusto/embedded-api-v-2026-02-01/models/errors/gustoembeddederror";
16
- import "@gusto/embedded-api-v-2026-02-01/models/errors/sdkvalidationerror";
17
- import "@gusto/embedded-api-v-2026-02-01/models/errors/unprocessableentityerror";
18
- import "@gusto/embedded-api-v-2026-02-01/models/errors/httpclienterrors";
14
+ import "@gusto/embedded-api/models/errors/apierror";
15
+ import "@gusto/embedded-api/models/errors/gustoembeddederror";
16
+ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
17
+ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
18
+ import "@gusto/embedded-api/models/errors/httpclienterrors";
19
19
  import { formatNumberAsCurrency as V } from "../../../helpers/formattedStrings.js";
20
20
  import "../../../shared/constants.js";
21
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
21
22
  import { useI18n as E } from "../../../i18n/I18n.js";
22
23
  import { NumberInputField as T } from "../../Common/Fields/NumberInputField/NumberInputField.js";
23
24
  const q = P.object({
24
25
  netPay: P.number().positive()
25
26
  });
26
- function pe({ isOpen: n, onCalculateGrossUp: w, onApply: A, onCancel: d }) {
27
+ function fe({ isOpen: n, onCalculateGrossUp: w, onApply: A, onCancel: d }) {
27
28
  E("Payroll.GrossUpModal");
28
29
  const { t: r } = k("Payroll.GrossUpModal"), { Modal: M, Heading: u, Text: p, Button: i, Alert: f } = H(), { baseSubmitHandler: y } = L(), N = R(null), [l, c] = o(null), [h, m] = o(null), [g, b] = o(!1), [x, v] = o(!1), s = U({
29
30
  resolver: z(q),
@@ -110,6 +111,6 @@ function pe({ isOpen: n, onCalculateGrossUp: w, onApply: A, onCancel: d }) {
110
111
  );
111
112
  }
112
113
  export {
113
- pe as GrossUpModal
114
+ fe as GrossUpModal
114
115
  };
115
116
  //# sourceMappingURL=GrossUpModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GrossUpModal.js","sources":["../../../../src/components/Payroll/GrossUpModal/GrossUpModal.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { GrossUpModalProps } from './GrossUpModalTypes'\nimport styles from './GrossUpModal.module.scss'\nimport { ActionsLayout, Flex, NumberInputField } from '@/components/Common'\nimport { useBase } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\nconst GrossUpFormSchema = z.object({\n netPay: z.number().positive(),\n})\n\ntype GrossUpFormValues = z.infer<typeof GrossUpFormSchema>\n\n/** @internal */\nexport function GrossUpModal({ isOpen, onCalculateGrossUp, onApply, onCancel }: GrossUpModalProps) {\n useI18n('Payroll.GrossUpModal')\n const { t } = useTranslation('Payroll.GrossUpModal')\n const { Modal, Heading, Text, Button, Alert } = useComponentContext()\n const { baseSubmitHandler } = useBase()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const [calculatedGrossUp, setCalculatedGrossUp] = useState<string | null>(null)\n const [errorMessage, setErrorMessage] = useState<string | null>(null)\n const [isCalculating, setIsCalculating] = useState(false)\n const [isApplying, setIsApplying] = useState(false)\n\n const formHandlers = useForm<GrossUpFormValues>({\n resolver: zodResolver(GrossUpFormSchema),\n defaultValues: { netPay: 0 },\n })\n\n useEffect(() => {\n if (!isOpen) {\n formHandlers.reset({ netPay: 0 })\n setCalculatedGrossUp(null)\n setErrorMessage(null)\n }\n }, [isOpen, formHandlers.reset])\n\n const handleCalculate = async (data: GrossUpFormValues) => {\n setErrorMessage(null)\n setCalculatedGrossUp(null)\n setIsCalculating(true)\n\n await baseSubmitHandler(null, async () => {\n try {\n const result = await onCalculateGrossUp(data.netPay)\n\n if (result) {\n setCalculatedGrossUp(result)\n } else {\n setErrorMessage(t('errorMessage'))\n }\n } finally {\n setIsCalculating(false)\n }\n })\n }\n\n const handleApply = async () => {\n if (calculatedGrossUp) {\n setIsApplying(true)\n await baseSubmitHandler(null, async () => {\n try {\n await onApply(calculatedGrossUp)\n } finally {\n setIsApplying(false)\n }\n })\n }\n }\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button\n variant=\"primary\"\n isDisabled={!calculatedGrossUp}\n onClick={handleApply}\n isLoading={isApplying}\n >\n {t('applyCta')}\n </Button>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('cancelCta')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.header}>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text variant=\"supporting\" as=\"p\">\n {t('description')}\n </Text>\n </div>\n\n <div className={styles.content}>\n {errorMessage && (\n <div className={styles.alert}>\n <Alert label={errorMessage} status=\"error\" disableScrollIntoView />\n </div>\n )}\n\n <div className={styles.alert}>\n <Alert label={t('warning')} status=\"warning\" disableScrollIntoView />\n </div>\n\n <Flex flexDirection=\"row\" gap={8}>\n <NumberInputField\n name=\"netPay\"\n label={t('netPayLabel')}\n format=\"currency\"\n errorMessage={t('validations.netPay')}\n min={0}\n isRequired\n />\n <Button\n variant=\"secondary\"\n className={styles.calculateButton}\n isDisabled={isCalculating}\n onClick={formHandlers.handleSubmit(handleCalculate)}\n >\n {isCalculating ? t('calculatingCta') : t('calculateCta')}\n </Button>\n </Flex>\n\n {calculatedGrossUp && (\n <>\n <div className={styles.result}>\n <Text size=\"sm\" variant=\"supporting\" weight=\"semibold\">\n {t('grossPayResult')}\n </Text>\n <Heading as=\"h3\">{formatNumberAsCurrency(parseFloat(calculatedGrossUp))}</Heading>\n </div>\n </>\n )}\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["GrossUpFormSchema","z","GrossUpModal","isOpen","onCalculateGrossUp","onApply","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","Alert","useComponentContext","baseSubmitHandler","useBase","modalContainerRef","useRef","calculatedGrossUp","setCalculatedGrossUp","useState","errorMessage","setErrorMessage","isCalculating","setIsCalculating","isApplying","setIsApplying","formHandlers","useForm","zodResolver","useEffect","handleCalculate","data","result","jsx","ActionsLayout","jsxs","FormProvider","styles","Flex","NumberInputField","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACjC,QAAQA,EAAE,OAAA,EAAS,SAAA;AACrB,CAAC;AAKM,SAASC,GAAa,EAAE,QAAAC,GAAQ,oBAAAC,GAAoB,SAAAC,GAAS,UAAAC,KAA+B;AACjG,EAAAC,EAAQ,sBAAsB;AAC9B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,OAAAC,GAAO,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,OAAAC,EAAA,IAAUC,EAAA,GAC1C,EAAE,mBA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AA;AAAA,YAEZ,gBAAA4B;AAAA,cAACvB;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,WAAW2B,EAAO;AAAA,gBAClB,YAAYf;AAAA,gBACZ,SAASI,EAAa,aAAaI,CAAe;AAAA,gBAEjD,UAAgBzB,EAAhBiB,IAAkB,mBAAsB,cAAN;AAAA,cAAoB;AAAA,YAAA;AAAA,UACzD,GACF;AAAA,UAECL,KACC,gBAAAgB,EAAAO,GAAA,EACE,UAAA,gBAAAL,EAAC,OAAA,EAAI,WAAWE,EAAO,QACrB,UAAA;AAAA,YAAA,gBAAAJ,EAACxB,GAAA,EAAK,MAAK,MAAK,SAAQ,cAAa,QAAO,YACzC,UAAAJ,EAAE,gBAAgB,EAAA,CACrB;AAAA,YACA,gBAAA4B,EAACzB,KAAQ,IAAG,MAAM,YAAuB,WAAWS,CAAiB,CAAC,EAAA,CAAE;AAAA,UAAA,EAAA,CAC1E,EAAA,CACF;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"GrossUpModal.js","sources":["../../../../src/components/Payroll/GrossUpModal/GrossUpModal.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { GrossUpModalProps } from './GrossUpModalTypes'\nimport styles from './GrossUpModal.module.scss'\nimport { ActionsLayout, Flex, NumberInputField } from '@/components/Common'\nimport { useBase } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\n\nconst GrossUpFormSchema = z.object({\n netPay: z.number().positive(),\n})\n\ntype GrossUpFormValues = z.infer<typeof GrossUpFormSchema>\n\n/** @internal */\nexport function GrossUpModal({ isOpen, onCalculateGrossUp, onApply, onCancel }: GrossUpModalProps) {\n useI18n('Payroll.GrossUpModal')\n const { t } = useTranslation('Payroll.GrossUpModal')\n const { Modal, Heading, Text, Button, Alert } = useComponentContext()\n const { baseSubmitHandler } = useBase()\n const modalContainerRef = useRef<HTMLDivElement>(null)\n\n const [calculatedGrossUp, setCalculatedGrossUp] = useState<string | null>(null)\n const [errorMessage, setErrorMessage] = useState<string | null>(null)\n const [isCalculating, setIsCalculating] = useState(false)\n const [isApplying, setIsApplying] = useState(false)\n\n const formHandlers = useForm<GrossUpFormValues>({\n resolver: zodResolver(GrossUpFormSchema),\n defaultValues: { netPay: 0 },\n })\n\n useEffect(() => {\n if (!isOpen) {\n formHandlers.reset({ netPay: 0 })\n setCalculatedGrossUp(null)\n setErrorMessage(null)\n }\n }, [isOpen, formHandlers.reset])\n\n const handleCalculate = async (data: GrossUpFormValues) => {\n setErrorMessage(null)\n setCalculatedGrossUp(null)\n setIsCalculating(true)\n\n await baseSubmitHandler(null, async () => {\n try {\n const result = await onCalculateGrossUp(data.netPay)\n\n if (result) {\n setCalculatedGrossUp(result)\n } else {\n setErrorMessage(t('errorMessage'))\n }\n } finally {\n setIsCalculating(false)\n }\n })\n }\n\n const handleApply = async () => {\n if (calculatedGrossUp) {\n setIsApplying(true)\n await baseSubmitHandler(null, async () => {\n try {\n await onApply(calculatedGrossUp)\n } finally {\n setIsApplying(false)\n }\n })\n }\n }\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onCancel}\n containerRef={modalContainerRef}\n footer={\n <ActionsLayout>\n <Button\n variant=\"primary\"\n isDisabled={!calculatedGrossUp}\n onClick={handleApply}\n isLoading={isApplying}\n >\n {t('applyCta')}\n </Button>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('cancelCta')}\n </Button>\n </ActionsLayout>\n }\n >\n <FormProvider {...formHandlers}>\n <div className={styles.header}>\n <Heading as=\"h2\" styledAs=\"h3\">\n {t('title')}\n </Heading>\n <Text variant=\"supporting\" as=\"p\">\n {t('description')}\n </Text>\n </div>\n\n <div className={styles.content}>\n {errorMessage && (\n <div className={styles.alert}>\n <Alert label={errorMessage} status=\"error\" disableScrollIntoView />\n </div>\n )}\n\n <div className={styles.alert}>\n <Alert label={t('warning')} status=\"warning\" disableScrollIntoView />\n </div>\n\n <Flex flexDirection=\"row\" gap={8}>\n <NumberInputField\n name=\"netPay\"\n label={t('netPayLabel')}\n format=\"currency\"\n errorMessage={t('validations.netPay')}\n min={0}\n isRequired\n />\n <Button\n variant=\"secondary\"\n className={styles.calculateButton}\n isDisabled={isCalculating}\n onClick={formHandlers.handleSubmit(handleCalculate)}\n >\n {isCalculating ? t('calculatingCta') : t('calculateCta')}\n </Button>\n </Flex>\n\n {calculatedGrossUp && (\n <>\n <div className={styles.result}>\n <Text size=\"sm\" variant=\"supporting\" weight=\"semibold\">\n {t('grossPayResult')}\n </Text>\n <Heading as=\"h3\">{formatNumberAsCurrency(parseFloat(calculatedGrossUp))}</Heading>\n </div>\n </>\n )}\n </div>\n </FormProvider>\n </Modal>\n )\n}\n"],"names":["GrossUpFormSchema","z","GrossUpModal","isOpen","onCalculateGrossUp","onApply","onCancel","useI18n","t","useTranslation","Modal","Heading","Text","Button","Alert","useComponentContext","baseSubmitHandler","useBase","modalContainerRef","useRef","calculatedGrossUp","setCalculatedGrossUp","useState","errorMessage","setErrorMessage","isCalculating","setIsCalculating","isApplying","setIsApplying","formHandlers","useForm","zodResolver","useEffect","handleCalculate","data","result","jsx","ActionsLayout","jsxs","FormProvider","styles","Flex","NumberInputField","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACjC,QAAQA,EAAE,OAAA,EAAS,SAAA;AACrB,CAAC;AAKM,SAASC,GAAa,EAAE,QAAAC,GAAQ,oBAAAC,GAAoB,SAAAC,GAAS,UAAAC,KAA+B;AACjG,EAAAC,EAAQ,sBAAsB;AAC9B,QAAM,EAAE,GAAAC,EAAA,IA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AAOlC,EAAE,aAAa;AAAA,gBACtB,QAAO;AAAA,gBACP,cAAcA,EAAE,oBAAoB;AAAA,gBACpC,KAAK;AAAA,gBACL,YAAU;AAAA,cAAA;AAAA,YAAA;AAAA,YAEZ,gBAAA4B;AAAA,cAACvB;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,WAAW2B,EAAO;AAAA,gBAClB,YAAYf;AAAA,gBACZ,SAASI,EAAa,aAAaI,CAAe;AAAA,gBAEjD,UAAgBzB,EAAhBiB,IAAkB,mBAAsB,cAAN;AAAA,cAAoB;AAAA,YAAA;AAAA,UACzD,GACF;AAAA,UAECL,KACC,gBAAAgB,EAAAO,GAAA,EACE,UAAA,gBAAAL,EAAC,OAAA,EAAI,WAAWE,EAAO,QACrB,UAAA;AAAA,YAAA,gBAAAJ,EAACxB,GAAA,EAAK,MAAK,MAAK,SAAQ,cAAa,QAAO,YACzC,UAAAJ,EAAE,gBAAgB,EAAA,CACrB;AAAA,YACA,gBAAA4B,EAACzB,KAAQ,IAAG,MAAM,YAAuB,WAAWS,CAAiB,CAAC,EAAA,CAAE;AAAA,UAAA,EAAA,CAC1E,EAAA,CACF;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -5,7 +5,7 @@ import { EventType } from '../../../shared/constants';
5
5
  /**
6
6
  * Flow context shared across the off-cycle payroll flow steps.
7
7
  *
8
- * @public
8
+ * @internal
9
9
  */
10
10
  export interface OffCycleFlowContextInterface extends FlowContextInterface {
11
11
  /** The associated company identifier. */
@@ -1,7 +1,7 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import { useMemo as y } from "react";
3
- import { usePayrollsGetSuspense as p } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsGet";
4
- import { PayrollExecutionFlow as u } from "../PayrollExecutionFlow/PayrollExecutionFlow.js";
3
+ import { usePayrollsGetSuspense as p } from "@gusto/embedded-api/react-query/payrollsGet";
4
+ import { PayrollExecutionInternalFlow as u } from "../PayrollExecutionFlow/PayrollExecutionFlow.js";
5
5
  import { isDismissalPayroll as d } from "../helpers.js";
6
6
  import { useFlow as s } from "../../Flow/useFlow.js";
7
7
  import { ensureRequired as a } from "../../../helpers/ensureRequired.js";
@@ -9,7 +9,7 @@ import { BaseComponent as C } from "../../Base/Base.js";
9
9
  import { OffCycleCreation as P } from "../OffCycleCreation/OffCycleCreation.js";
10
10
  function D() {
11
11
  const { companyId: o, payrollType: r, onEvent: e } = s();
12
- return /* @__PURE__ */ i(
12
+ return /* @__PURE__ */ l(
13
13
  P,
14
14
  {
15
15
  companyId: a(o),
@@ -19,11 +19,11 @@ function D() {
19
19
  );
20
20
  }
21
21
  function S() {
22
- const { companyId: o, payrollUuid: r, onEvent: e, withReimbursements: t, header: n } = s(), m = a(o), c = a(r), l = n?.type === "breadcrumbs" ? n.breadcrumbs?.createOffCyclePayroll?.[0] : void 0, f = y(
23
- () => l ? [l] : void 0,
24
- [l]
22
+ const { companyId: o, payrollUuid: r, onEvent: e, withReimbursements: t, header: n } = s(), m = a(o), c = a(r), i = n?.type === "breadcrumbs" ? n.breadcrumbs?.createOffCyclePayroll?.[0] : void 0, f = y(
23
+ () => i ? [i] : void 0,
24
+ [i]
25
25
  );
26
- return /* @__PURE__ */ i(C, { onEvent: e, children: /* @__PURE__ */ i(
26
+ return /* @__PURE__ */ l(C, { onEvent: e, children: /* @__PURE__ */ l(
27
27
  x,
28
28
  {
29
29
  companyId: m,
@@ -40,7 +40,7 @@ function x({
40
40
  ...e
41
41
  }) {
42
42
  const { data: t } = p({ companyId: o, payrollId: r }), n = t.payrollShow?.payPeriod;
43
- return /* @__PURE__ */ i(
43
+ return /* @__PURE__ */ l(
44
44
  u,
45
45
  {
46
46
  companyId: o,
@@ -1 +1 @@
1
- {"version":3,"file":"OffCycleFlowComponents.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlowComponents.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api-v-2026-02-01/react-query/payrollsGet'\nimport { OffCycleCreation } from '../OffCycleCreation'\nimport {\n PayrollExecutionFlow,\n type PayrollExecutionFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport type { OffCycleReason } from '../OffCycleReasonSelection'\nimport { isDismissalPayroll } from '../helpers'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\n/**\n * Flow context shared across the off-cycle payroll flow steps.\n *\n * @public\n */\nexport interface OffCycleFlowContextInterface extends FlowContextInterface {\n /** The associated company identifier. */\n companyId: string\n /** Identifier of the off-cycle payroll created during the flow; set once creation completes. */\n payrollUuid?: string\n /** Pre-selected off-cycle reason (bonus or correction). */\n payrollType?: OffCycleReason\n /** Whether to show reimbursement fields throughout the execution steps. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/**\n * Props for {@link OffCycleFlow}.\n *\n * @public\n */\nexport interface OffCycleFlowProps {\n /** The associated company identifier. */\n companyId: string\n /** Optional pre-selected off-cycle reason. When provided, the creation form starts with this reason selected. */\n payrollType?: OffCycleReason\n /** Callback invoked when the flow emits an event. See the events table on {@link OffCycleFlow}. */\n onEvent: OnEventType<EventType, unknown>\n /** Optional flag to show/hide reimbursement fields throughout the flow. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/** @internal */\nexport function OffCycleCreationContextual() {\n const { companyId, payrollType, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return (\n <OffCycleCreation\n companyId={ensureRequired(companyId)}\n payrollType={payrollType}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function OffCycleExecutionContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, header } =\n useFlow<OffCycleFlowContextInterface>()\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n const offCycleRootBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.['createOffCyclePayroll']?.[0] : undefined\n const prefixBreadcrumbs = useMemo(\n () => (offCycleRootBreadcrumb ? [offCycleRootBreadcrumb] : undefined),\n [offCycleRootBreadcrumb],\n )\n\n return (\n <BaseComponent onEvent={onEvent}>\n <OffCycleExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n withReimbursements={withReimbursements}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n </BaseComponent>\n )\n}\n\ntype OffCycleExecutionWithDataProps = Pick<\n PayrollExecutionFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs' | 'withReimbursements'\n>\n\nfunction OffCycleExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: OffCycleExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll={isDismissalPayroll(data.payrollShow?.offCycleReason)}\n {...rest}\n />\n )\n}\n"],"names":["OffCycleCreationContextual","companyId","payrollType","onEvent","useFlow","jsx","OffCycleCreation","ensureRequired","OffCycleExecutionContextual","payrollUuid","withReimbursements","header","resolvedCompanyId","resolvedPayrollId","offCycleRootBreadcrumb","prefixBreadcrumbs","useMemo","BaseComponent","OffCycleExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionFlow","isDismissalPayroll"],"mappings":";;;;;;;;;AAgDO,SAASA,IAA6B;AAC3C,QAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,EAAA,IAAYC,EAAA;AAC5C,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeN,CAAS;AAAA,MACnC,aAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASK,IAA8B;AAC5C,QAAM,EAAE,WAAAP,GAAW,aAAAQ,GAAa,SAAAN,GAAS,oBAAAO,GAAoB,QAAAC,EAAA,IAC3DP,EAAA,GAEIQ,IAAoBL,EAAeN,CAAS,GAC5CY,IAAoBN,EAAeE,CAAW,GAE9CK,IACJH,GAAQ,SAAS,gBAAgBA,EAAO,aAAc,wBAA2B,CAAC,IAAI,QAClFI,IAAoBC;AAAA,IACxB,MAAOF,IAAyB,CAACA,CAAsB,IAAI;AAAA,IAC3D,CAACA,CAAsB;AAAA,EAAA;AAGzB,SACE,gBAAAT,EAACY,KAAc,SAAAd,GACb,UAAA,gBAAAE;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,WAAWN;AAAA,MACX,WAAWC;AAAA,MACX,SAAAV;AAAA,MACA,oBAAAO;AAAA,MACA,mBAAAK;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAOA,SAASG,EAA0B;AAAA,EACjC,WAAAjB;AAAA,EACA,WAAAkB;AAAA,EACA,GAAGC;AACL,GAAmC;AACjC,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAuB,EAAE,WAAArB,GAAW,WAAAkB,GAAW,GAC1DI,IAAmBF,EAAK,aAAa;AAE3C,SACE,gBAAAhB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,WAAAvB;AAAA,MACA,WAAAkB;AAAA,MACA,kBAAAI;AAAA,MACA,oBAAoBE,EAAmBJ,EAAK,aAAa,cAAc;AAAA,MACtE,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"OffCycleFlowComponents.js","sources":["../../../../src/components/Payroll/OffCycle/OffCycleFlowComponents.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { usePayrollsGetSuspense } from '@gusto/embedded-api/react-query/payrollsGet'\nimport { OffCycleCreation } from '../OffCycleCreation'\nimport {\n PayrollExecutionInternalFlow,\n type PayrollExecutionInternalFlowProps,\n} from '../PayrollExecutionFlow/PayrollExecutionFlow'\nimport type { OffCycleReason } from '../OffCycleReasonSelection'\nimport { isDismissalPayroll } from '../helpers'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport type { EventType } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { BaseComponent } from '@/components/Base/Base'\n\n/**\n * Flow context shared across the off-cycle payroll flow steps.\n *\n * @internal\n */\nexport interface OffCycleFlowContextInterface extends FlowContextInterface {\n /** The associated company identifier. */\n companyId: string\n /** Identifier of the off-cycle payroll created during the flow; set once creation completes. */\n payrollUuid?: string\n /** Pre-selected off-cycle reason (bonus or correction). */\n payrollType?: OffCycleReason\n /** Whether to show reimbursement fields throughout the execution steps. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/**\n * Props for {@link OffCycleFlow}.\n *\n * @public\n */\nexport interface OffCycleFlowProps {\n /** The associated company identifier. */\n companyId: string\n /** Optional pre-selected off-cycle reason. When provided, the creation form starts with this reason selected. */\n payrollType?: OffCycleReason\n /** Callback invoked when the flow emits an event. See the events table on {@link OffCycleFlow}. */\n onEvent: OnEventType<EventType, unknown>\n /** Optional flag to show/hide reimbursement fields throughout the flow. Defaults to true. */\n withReimbursements?: boolean\n}\n\n/** @internal */\nexport function OffCycleCreationContextual() {\n const { companyId, payrollType, onEvent } = useFlow<OffCycleFlowContextInterface>()\n return (\n <OffCycleCreation\n companyId={ensureRequired(companyId)}\n payrollType={payrollType}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function OffCycleExecutionContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, header } =\n useFlow<OffCycleFlowContextInterface>()\n\n const resolvedCompanyId = ensureRequired(companyId)\n const resolvedPayrollId = ensureRequired(payrollUuid)\n\n const offCycleRootBreadcrumb =\n header?.type === 'breadcrumbs' ? header.breadcrumbs?.['createOffCyclePayroll']?.[0] : undefined\n const prefixBreadcrumbs = useMemo(\n () => (offCycleRootBreadcrumb ? [offCycleRootBreadcrumb] : undefined),\n [offCycleRootBreadcrumb],\n )\n\n return (\n <BaseComponent onEvent={onEvent}>\n <OffCycleExecutionWithData\n companyId={resolvedCompanyId}\n payrollId={resolvedPayrollId}\n onEvent={onEvent}\n withReimbursements={withReimbursements}\n prefixBreadcrumbs={prefixBreadcrumbs}\n />\n </BaseComponent>\n )\n}\n\ntype OffCycleExecutionWithDataProps = Pick<\n PayrollExecutionInternalFlowProps,\n 'companyId' | 'payrollId' | 'onEvent' | 'prefixBreadcrumbs' | 'withReimbursements'\n>\n\nfunction OffCycleExecutionWithData({\n companyId,\n payrollId,\n ...rest\n}: OffCycleExecutionWithDataProps) {\n const { data } = usePayrollsGetSuspense({ companyId, payrollId })\n const initialPayPeriod = data.payrollShow?.payPeriod\n\n return (\n <PayrollExecutionInternalFlow\n companyId={companyId}\n payrollId={payrollId}\n initialPayPeriod={initialPayPeriod}\n isDismissalPayroll={isDismissalPayroll(data.payrollShow?.offCycleReason)}\n {...rest}\n />\n )\n}\n"],"names":["OffCycleCreationContextual","companyId","payrollType","onEvent","useFlow","jsx","OffCycleCreation","ensureRequired","OffCycleExecutionContextual","payrollUuid","withReimbursements","header","resolvedCompanyId","resolvedPayrollId","offCycleRootBreadcrumb","prefixBreadcrumbs","useMemo","BaseComponent","OffCycleExecutionWithData","payrollId","rest","data","usePayrollsGetSuspense","initialPayPeriod","PayrollExecutionInternalFlow","isDismissalPayroll"],"mappings":";;;;;;;;;AAgDO,SAASA,IAA6B;AAC3C,QAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,EAAA,IAAYC,EAAA;AAC5C,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAeN,CAAS;AAAA,MACnC,aAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASK,IAA8B;AAC5C,QAAM,EAAE,WAAAP,GAAW,aAAAQ,GAAa,SAAAN,GAAS,oBAAAO,GAAoB,QAAAC,EAAA,IAC3DP,EAAA,GAEIQ,IAAoBL,EAAeN,CAAS,GAC5CY,IAAoBN,EAAeE,CAAW,GAE9CK,IACJH,GAAQ,SAAS,gBAAgBA,EAAO,aAAc,wBAA2B,CAAC,IAAI,QAClFI,IAAoBC;AAAA,IACxB,MAAOF,IAAyB,CAACA,CAAsB,IAAI;AAAA,IAC3D,CAACA,CAAsB;AAAA,EAAA;AAGzB,SACE,gBAAAT,EAACY,KAAc,SAAAd,GACb,UAAA,gBAAAE;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,WAAWN;AAAA,MACX,WAAWC;AAAA,MACX,SAAAV;AAAA,MACA,oBAAAO;AAAA,MACA,mBAAAK;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAOA,SAASG,EAA0B;AAAA,EACjC,WAAAjB;AAAA,EACA,WAAAkB;AAAA,EACA,GAAGC;AACL,GAAmC;AACjC,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAuB,EAAE,WAAArB,GAAW,WAAAkB,GAAW,GAC1DI,IAAmBF,EAAK,aAAa;AAE3C,SACE,gBAAAhB;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,WAAAvB;AAAA,MACA,WAAAkB;AAAA,MACA,kBAAAI;AAAA,MACA,oBAAoBE,EAAmBJ,EAAK,aAAa,cAAc;AAAA,MACtE,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -1,2 +1,2 @@
1
1
  export { OffCycleFlow } from './OffCycleFlow';
2
- export type { OffCycleFlowContextInterface, OffCycleFlowProps } from './OffCycleFlowComponents';
2
+ export type { OffCycleFlowProps } from './OffCycleFlowComponents';
@@ -4,10 +4,10 @@ import { useForm as H, FormProvider as K } from "react-hook-form";
4
4
  import { zodResolver as Z } from "@hookform/resolvers/zod";
5
5
  import { z as n } from "zod";
6
6
  import { useTranslation as b } from "react-i18next";
7
- import { usePayrollsCreateOffCycleMutation as G } from "@gusto/embedded-api-v-2026-02-01/react-query/payrollsCreateOffCycle";
8
- import { WithholdingPayPeriod as J, OffCycleReason as x } from "@gusto/embedded-api-v-2026-02-01/models/operations/postv1companiescompanyidpayrolls";
9
- import { RFCDate as g } from "@gusto/embedded-api-v-2026-02-01/types/rfcdate";
10
- import { useEmployeesListSuspense as Q } from "@gusto/embedded-api-v-2026-02-01/react-query/employeesList";
7
+ import { usePayrollsCreateOffCycleMutation as G } from "@gusto/embedded-api/react-query/payrollsCreateOffCycle";
8
+ import { WithholdingPayPeriod as J, OffCycleReason as x } from "@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls";
9
+ import { RFCDate as g } from "@gusto/embedded-api/types/rfcdate";
10
+ import { useEmployeesListSuspense as Q } from "@gusto/embedded-api/react-query/employeesList";
11
11
  import { createOffCyclePayPeriodDateFormSchema as X } from "../OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js";
12
12
  import { useOffCyclePayPeriodDateValidation as $ } from "../OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js";
13
13
  import { OffCycleCreationPresentation as ee } from "./OffCycleCreationPresentation.js";