@gusto/embedded-react-sdk 0.48.2 → 0.48.3

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 (371) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +33 -2
  3. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  4. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.d.ts +1 -0
  5. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  6. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.d.ts +1 -0
  7. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  8. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +23 -2
  9. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  10. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -0
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +1 -0
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +2 -2
  15. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +10 -1
  16. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -5
  17. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/Head.d.ts +1 -0
  19. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.d.ts +1 -0
  21. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  22. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +24 -2
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +3 -0
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +2 -2
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +6 -0
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -5
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/SignatoryForm.d.ts +1 -0
  31. package/dist/components/Company/AssignSignatory/SignatoryForm.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/TitleSelect.d.ts +1 -1
  33. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/index.d.ts +2 -5
  35. package/dist/components/Company/AssignSignatory/useAssignSignatory.d.ts +9 -0
  36. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -7
  37. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  38. package/dist/components/Company/BankAccount/BankAccount.d.ts +26 -0
  39. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  40. package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +8 -0
  41. package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
  42. package/dist/components/Company/BankAccount/BankAccountForm/Actions.d.ts +1 -0
  43. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  44. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +1 -0
  45. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +3 -0
  47. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  48. package/dist/components/Company/BankAccount/BankAccountForm/Head.d.ts +1 -0
  49. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -5
  51. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountList/AccountView.d.ts +1 -0
  53. package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountList/Actions.d.ts +1 -0
  55. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +1 -0
  57. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountList/Head.d.ts +1 -0
  59. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  60. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.d.ts +1 -0
  61. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  62. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +1 -0
  63. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  64. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +3 -0
  65. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  66. package/dist/components/Company/BankAccount/BankAccountVerify/Head.d.ts +1 -0
  67. package/dist/components/Company/BankAccount/BankAccountVerify/Head.js.map +1 -1
  68. package/dist/components/Company/BankAccount/stateMachine.d.ts +1 -0
  69. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  70. package/dist/components/Company/DocumentSigner/DocumentList/Actions.d.ts +1 -0
  71. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  72. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +21 -0
  73. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  74. package/dist/components/Company/DocumentSigner/DocumentList/Head.d.ts +1 -0
  75. package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -1
  76. package/dist/components/Company/DocumentSigner/DocumentList/List.d.ts +1 -0
  77. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
  78. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.d.ts +1 -0
  79. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
  80. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -5
  81. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +37 -0
  83. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  84. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +31 -2
  85. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  86. package/dist/components/Company/DocumentSigner/assignSignatoryState.d.ts +1 -0
  87. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
  88. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +4 -0
  89. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  90. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +41 -0
  91. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -1
  92. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +40 -10
  93. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -1
  94. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +111 -0
  95. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
  96. package/dist/components/Company/DocumentSigner/stateMachine.d.ts +1 -0
  97. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  98. package/dist/components/Company/DocumentSigner/useDocumentSigner.d.ts +1 -0
  99. package/dist/components/Company/FederalTaxes/Actions.d.ts +1 -0
  100. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  101. package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +13 -0
  102. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  103. package/dist/components/Company/FederalTaxes/Form.d.ts +1 -0
  104. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  105. package/dist/components/Company/FederalTaxes/Head.d.ts +1 -0
  106. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  107. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +3 -0
  108. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -10
  109. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  110. package/dist/components/Company/Industry/Actions.d.ts +1 -0
  111. package/dist/components/Company/Industry/Actions.js.map +1 -1
  112. package/dist/components/Company/Industry/Context.js +7 -8
  113. package/dist/components/Company/Industry/Context.js.map +1 -1
  114. package/dist/components/Company/Industry/Edit.d.ts +3 -0
  115. package/dist/components/Company/Industry/Edit.js.map +1 -1
  116. package/dist/components/Company/Industry/Head.d.ts +1 -0
  117. package/dist/components/Company/Industry/Head.js.map +1 -1
  118. package/dist/components/Company/Industry/Industry.d.ts +21 -0
  119. package/dist/components/Company/Industry/Industry.js.map +1 -1
  120. package/dist/components/Company/Industry/IndustrySelect.d.ts +1 -0
  121. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  122. package/dist/components/Company/Industry/index.d.ts +1 -1
  123. package/dist/components/Company/Locations/LocationForm/Actions.d.ts +1 -0
  124. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  125. package/dist/components/Company/Locations/LocationForm/Form.d.ts +3 -0
  126. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  127. package/dist/components/Company/Locations/LocationForm/Head.d.ts +1 -0
  128. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  129. package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +16 -0
  130. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  131. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -5
  132. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  133. package/dist/components/Company/Locations/Locations.d.ts +26 -0
  134. package/dist/components/Company/Locations/Locations.js.map +1 -1
  135. package/dist/components/Company/Locations/LocationsList/Actions.d.ts +1 -0
  136. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  137. package/dist/components/Company/Locations/LocationsList/Head.d.ts +1 -0
  138. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  139. package/dist/components/Company/Locations/LocationsList/List.d.ts +1 -1
  140. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  141. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +23 -2
  142. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  143. package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -1
  144. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -5
  145. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  146. package/dist/components/Company/Locations/locationsStateMachine.d.ts +4 -0
  147. package/dist/components/Company/Locations/locationsStateMachine.js.map +1 -1
  148. package/dist/components/Company/Locations/stateMachine.d.ts +1 -1
  149. package/dist/components/Company/Locations/stateMachine.js +0 -1
  150. package/dist/components/Company/Locations/stateMachine.js.map +1 -1
  151. package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +25 -0
  152. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  153. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +19 -1
  154. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  155. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
  156. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  157. package/dist/components/Company/OnboardingOverview/Completed.d.ts +1 -0
  158. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  159. package/dist/components/Company/OnboardingOverview/MissingRequirements.d.ts +1 -0
  160. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  161. package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +18 -0
  162. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  163. package/dist/components/Company/OnboardingOverview/context.js +4 -5
  164. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  165. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +36 -3
  166. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  167. package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +3 -0
  168. package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -1
  169. package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +1 -0
  170. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  171. package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +1 -0
  172. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  173. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +1 -0
  174. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
  175. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +136 -0
  176. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
  177. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -1
  178. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +48 -26
  179. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
  180. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +134 -0
  181. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  182. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +25 -0
  183. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  184. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +6 -0
  185. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  186. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.d.ts +1 -0
  187. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  188. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -3
  189. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +16 -18
  190. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  191. package/dist/components/Company/StateTaxes/StateTaxesForm/Head.d.ts +1 -0
  192. package/dist/components/Company/StateTaxes/StateTaxesForm/Head.js.map +1 -1
  193. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +31 -0
  194. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  195. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -5
  196. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  197. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
  198. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -1
  199. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.d.ts +1 -0
  200. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  201. package/dist/components/Company/StateTaxes/StateTaxesList/Head.d.ts +1 -0
  202. package/dist/components/Company/StateTaxes/StateTaxesList/Head.js.map +1 -1
  203. package/dist/components/Company/StateTaxes/StateTaxesList/List.d.ts +1 -0
  204. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  205. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +16 -0
  206. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  207. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -5
  208. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  209. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +1 -0
  210. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  211. package/dist/components/Company/exports/companyOnboarding.d.ts +7 -6
  212. package/dist/components/Company/exports/companyOnboarding.js +18 -16
  213. package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
  214. package/dist/components/Company/index.d.ts +1 -17
  215. package/dist/components/Contractor/Address/Actions.d.ts +1 -0
  216. package/dist/components/Contractor/Address/Actions.js.map +1 -1
  217. package/dist/components/Contractor/Address/Address.d.ts +36 -1
  218. package/dist/components/Contractor/Address/Address.js.map +1 -1
  219. package/dist/components/Contractor/Address/Form.d.ts +1 -0
  220. package/dist/components/Contractor/Address/Form.js.map +1 -1
  221. package/dist/components/Contractor/Address/Head.d.ts +1 -0
  222. package/dist/components/Contractor/Address/Head.js.map +1 -1
  223. package/dist/components/Contractor/Address/index.d.ts +1 -1
  224. package/dist/components/Contractor/Address/useAddress.d.ts +8 -1
  225. package/dist/components/Contractor/Address/useAddress.js +6 -7
  226. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  227. package/dist/components/Contractor/ContractorList/index.d.ts +22 -9
  228. package/dist/components/Contractor/ContractorList/index.js +1 -3
  229. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  230. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -5
  231. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  232. package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +33 -9
  233. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  234. package/dist/components/Contractor/NewHireReport/types.d.ts +7 -0
  235. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +58 -0
  236. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  237. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +28 -2
  238. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  239. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
  240. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  241. package/dist/components/Contractor/PaymentMethod/BankAccountForm.d.ts +1 -0
  242. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  243. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +33 -16
  244. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  245. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +1 -9
  246. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +11 -15
  247. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  248. package/dist/components/Contractor/PaymentMethod/types.d.ts +7 -0
  249. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +40 -3
  250. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +1 -2
  251. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  252. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -0
  253. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  254. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +4 -18
  255. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +0 -1
  256. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -1
  257. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +1 -0
  258. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  259. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +1 -0
  260. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  261. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -0
  262. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
  263. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +1 -0
  264. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  265. package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -0
  266. package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
  267. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +40 -0
  268. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
  269. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +13 -0
  270. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  271. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +2 -0
  272. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  273. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +30 -3
  274. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -2
  275. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  276. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +1 -0
  277. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  278. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +15 -3
  279. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +1 -2
  280. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  281. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +1 -0
  282. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  283. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +25 -2
  284. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  285. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +1 -0
  286. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  287. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +1 -2
  288. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +28 -3
  289. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +1 -2
  290. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  291. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -0
  292. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  293. package/dist/components/Contractor/Payments/types.d.ts +8 -4
  294. package/dist/components/Contractor/Profile/ContractorProfile.d.ts +30 -6
  295. package/dist/components/Contractor/Profile/ContractorProfile.js +5 -9
  296. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  297. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +2 -0
  298. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  299. package/dist/components/Contractor/Profile/index.d.ts +1 -2
  300. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +16 -2
  301. package/dist/components/Contractor/Profile/useContractorProfile.js +28 -26
  302. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  303. package/dist/components/Contractor/Submit/Submit.d.ts +21 -1
  304. package/dist/components/Contractor/Submit/Submit.js +1 -2
  305. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  306. package/dist/components/Contractor/Submit/SubmitDone.d.ts +1 -0
  307. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  308. package/dist/components/Contractor/exports/contractorManagement.d.ts +6 -6
  309. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +9 -4
  310. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +29 -61
  311. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +19 -23
  312. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +5 -0
  313. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  314. package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -3
  315. package/dist/components/Employee/Deductions/onboarding/Deductions.js +21 -26
  316. package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
  317. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js +55 -50
  318. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
  319. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +0 -4
  320. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js +33 -43
  321. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
  322. package/dist/components/Employee/Deductions/onboarding/stateMachine.d.ts +0 -1
  323. package/dist/components/Employee/Deductions/onboarding/stateMachine.js +36 -60
  324. package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
  325. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +63 -61
  326. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
  327. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +1 -18
  328. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -25
  329. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +4 -5
  330. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  331. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -4
  332. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -48
  333. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +22 -14
  334. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  335. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +3 -20
  336. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +3 -15
  337. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +3 -12
  338. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +2 -11
  339. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +3 -22
  340. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +3 -17
  341. package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.d.ts +3 -10
  342. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
  343. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  344. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -18
  345. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +144 -131
  346. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  347. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
  348. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +167 -167
  349. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  350. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -35
  351. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  352. package/dist/components/Payroll/usePreparedPayrollData.js +3 -4
  353. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  354. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -2
  355. package/dist/index.d.ts +2 -2
  356. package/dist/index.js +90 -82
  357. package/dist/index.js.map +1 -1
  358. package/dist/partner-hook-utils/form/buildFormSchema.d.ts +27 -4
  359. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  360. package/dist/shared/constants.d.ts +0 -4
  361. package/dist/shared/constants.js +0 -2
  362. package/dist/shared/constants.js.map +1 -1
  363. package/dist/style.css +1 -1
  364. package/docs/reference/endpoint-inventory.json +11 -4
  365. package/package.json +6 -6
  366. package/dist/components/Contractor/index.d.ts +0 -14
  367. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.d.ts +0 -8
  368. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.js +0 -44
  369. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.js.map +0 -1
  370. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.module.scss.js +0 -12
  371. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.module.scss.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ /** @internal */
1
2
  export declare const onboardingMachine: {
2
3
  overview: import('robot3').MachineState<any>;
3
4
  locations: import('robot3').MachineState<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"onboardingStateMachine.js","sources":["../../../../src/components/Company/OnboardingFlow/onboardingStateMachine.ts"],"sourcesContent":["import { transition, reduce, state } from 'robot3'\nimport {\n BankAccountContextual,\n DocumentSignerContextual,\n EmployeesContextual,\n FederalTaxesContextual,\n IndustryContextual,\n LocationsContextual,\n OnboardingOverviewContextual,\n PayScheduleContextual,\n StateTaxesContextual,\n type OnboardingFlowContextInterface,\n} from './OnboardingFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineTransition } from '@/types/Helpers'\nimport type { FlowHeaderConfig } from '@/components/Flow/useFlow'\n\nconst TOTAL_STEPS = 8\n\nconst progressHeader = (currentStep: number): FlowHeaderConfig => ({\n type: 'progress',\n currentStep,\n totalSteps: TOTAL_STEPS,\n})\n\nconst createReducer = (props: Partial<OnboardingFlowContextInterface>) => {\n return (ctx: OnboardingFlowContextInterface): OnboardingFlowContextInterface => ({\n ...ctx,\n ...props,\n })\n}\n\nexport const onboardingMachine = {\n overview: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_OVERVIEW_CONTINUE,\n 'locations',\n reduce(\n createReducer({\n component: LocationsContextual,\n header: progressHeader(1),\n }),\n ),\n ),\n transition(componentEvents.COMPANY_OVERVIEW_DONE, 'final'),\n ),\n locations: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_LOCATION_DONE,\n 'federalTaxes',\n reduce(createReducer({ component: FederalTaxesContextual, header: progressHeader(2) })),\n ),\n ),\n federalTaxes: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_FEDERAL_TAXES_DONE,\n 'industry',\n reduce(createReducer({ component: IndustryContextual, header: progressHeader(3) })),\n ),\n ),\n industry: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_INDUSTRY_SELECTED,\n 'bankAccount',\n reduce(createReducer({ component: BankAccountContextual, header: progressHeader(4) })),\n ),\n ),\n bankAccount: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_BANK_ACCOUNT_DONE,\n 'employees',\n reduce(createReducer({ component: EmployeesContextual, header: progressHeader(5) })),\n ),\n ),\n employees: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_ONBOARDING_DONE,\n 'payschedule',\n reduce(createReducer({ component: PayScheduleContextual, header: progressHeader(6) })),\n ),\n ),\n payschedule: state<MachineTransition>(\n transition(\n componentEvents.PAY_SCHEDULE_DONE,\n 'stateTaxes',\n reduce(createReducer({ component: StateTaxesContextual, header: progressHeader(7) })),\n ),\n ),\n stateTaxes: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_STATE_TAX_DONE,\n 'documents',\n reduce(createReducer({ component: DocumentSignerContextual, header: progressHeader(8) })),\n ),\n ),\n documents: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_FORMS_DONE,\n 'overview',\n reduce(\n createReducer({\n component: OnboardingOverviewContextual,\n header: null,\n }),\n ),\n ),\n ),\n\n final: state<MachineTransition>(),\n}\n"],"names":["TOTAL_STEPS","progressHeader","currentStep","createReducer","props","ctx","onboardingMachine","state","transition","componentEvents","reduce","LocationsContextual","FederalTaxesContextual","IndustryContextual","BankAccountContextual","EmployeesContextual","PayScheduleContextual","StateTaxesContextual","DocumentSignerContextual","OnboardingOverviewContextual"],"mappings":";;;AAiBA,MAAMA,IAAc,GAEdC,IAAiB,CAACC,OAA2C;AAAA,EACjE,MAAM;AAAA,EACN,aAAAA;AAAA,EACA,YAAYF;AACd,IAEMG,IAAgB,CAACC,MACd,CAACC,OAAyE;AAAA,EAC/E,GAAGA;AAAA,EACH,GAAGD;AAAA,IAIME,IAAoB;AAAA,EAC/B,UAAUC;AAAA,IACRC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWQ;AAAA,UACX,QAAQV,EAAe,CAAC;AAAA,QAAA,CACzB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFO,EAAWC,EAAgB,uBAAuB,OAAO;AAAA,EAAA;AAAA,EAE3D,WAAWF;AAAA,IACTC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWS,GAAwB,QAAQX,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACxF;AAAA,EAEF,cAAcM;AAAA,IACZC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWU,GAAoB,QAAQZ,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACpF;AAAA,EAEF,UAAUM;AAAA,IACRC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWW,GAAuB,QAAQb,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACvF;AAAA,EAEF,aAAaM;AAAA,IACXC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWY,GAAqB,QAAQd,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACrF;AAAA,EAEF,WAAWM;AAAA,IACTC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWa,GAAuB,QAAQf,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACvF;AAAA,EAEF,aAAaM;AAAA,IACXC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWc,GAAsB,QAAQhB,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACtF;AAAA,EAEF,YAAYM;AAAA,IACVC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWe,GAA0B,QAAQjB,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EAC1F;AAAA,EAEF,WAAWM;AAAA,IACTC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWgB;AAAA,UACX,QAAQ;AAAA,QAAA,CACT;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAAA,EAGF,OAAOZ,EAAA;AACT;"}
1
+ {"version":3,"file":"onboardingStateMachine.js","sources":["../../../../src/components/Company/OnboardingFlow/onboardingStateMachine.ts"],"sourcesContent":["import { transition, reduce, state } from 'robot3'\nimport {\n BankAccountContextual,\n DocumentSignerContextual,\n EmployeesContextual,\n FederalTaxesContextual,\n IndustryContextual,\n LocationsContextual,\n OnboardingOverviewContextual,\n PayScheduleContextual,\n StateTaxesContextual,\n type OnboardingFlowContextInterface,\n} from './OnboardingFlowComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineTransition } from '@/types/Helpers'\nimport type { FlowHeaderConfig } from '@/components/Flow/useFlow'\n\nconst TOTAL_STEPS = 8\n\nconst progressHeader = (currentStep: number): FlowHeaderConfig => ({\n type: 'progress',\n currentStep,\n totalSteps: TOTAL_STEPS,\n})\n\nconst createReducer = (props: Partial<OnboardingFlowContextInterface>) => {\n return (ctx: OnboardingFlowContextInterface): OnboardingFlowContextInterface => ({\n ...ctx,\n ...props,\n })\n}\n\n/** @internal */\nexport const onboardingMachine = {\n overview: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_OVERVIEW_CONTINUE,\n 'locations',\n reduce(\n createReducer({\n component: LocationsContextual,\n header: progressHeader(1),\n }),\n ),\n ),\n transition(componentEvents.COMPANY_OVERVIEW_DONE, 'final'),\n ),\n locations: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_LOCATION_DONE,\n 'federalTaxes',\n reduce(createReducer({ component: FederalTaxesContextual, header: progressHeader(2) })),\n ),\n ),\n federalTaxes: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_FEDERAL_TAXES_DONE,\n 'industry',\n reduce(createReducer({ component: IndustryContextual, header: progressHeader(3) })),\n ),\n ),\n industry: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_INDUSTRY_SELECTED,\n 'bankAccount',\n reduce(createReducer({ component: BankAccountContextual, header: progressHeader(4) })),\n ),\n ),\n bankAccount: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_BANK_ACCOUNT_DONE,\n 'employees',\n reduce(createReducer({ component: EmployeesContextual, header: progressHeader(5) })),\n ),\n ),\n employees: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_ONBOARDING_DONE,\n 'payschedule',\n reduce(createReducer({ component: PayScheduleContextual, header: progressHeader(6) })),\n ),\n ),\n payschedule: state<MachineTransition>(\n transition(\n componentEvents.PAY_SCHEDULE_DONE,\n 'stateTaxes',\n reduce(createReducer({ component: StateTaxesContextual, header: progressHeader(7) })),\n ),\n ),\n stateTaxes: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_STATE_TAX_DONE,\n 'documents',\n reduce(createReducer({ component: DocumentSignerContextual, header: progressHeader(8) })),\n ),\n ),\n documents: state<MachineTransition>(\n transition(\n componentEvents.COMPANY_FORMS_DONE,\n 'overview',\n reduce(\n createReducer({\n component: OnboardingOverviewContextual,\n header: null,\n }),\n ),\n ),\n ),\n\n final: state<MachineTransition>(),\n}\n"],"names":["TOTAL_STEPS","progressHeader","currentStep","createReducer","props","ctx","onboardingMachine","state","transition","componentEvents","reduce","LocationsContextual","FederalTaxesContextual","IndustryContextual","BankAccountContextual","EmployeesContextual","PayScheduleContextual","StateTaxesContextual","DocumentSignerContextual","OnboardingOverviewContextual"],"mappings":";;;AAiBA,MAAMA,IAAc,GAEdC,IAAiB,CAACC,OAA2C;AAAA,EACjE,MAAM;AAAA,EACN,aAAAA;AAAA,EACA,YAAYF;AACd,IAEMG,IAAgB,CAACC,MACd,CAACC,OAAyE;AAAA,EAC/E,GAAGA;AAAA,EACH,GAAGD;AAAA,IAKME,IAAoB;AAAA,EAC/B,UAAUC;AAAA,IACRC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWQ;AAAA,UACX,QAAQV,EAAe,CAAC;AAAA,QAAA,CACzB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFO,EAAWC,EAAgB,uBAAuB,OAAO;AAAA,EAAA;AAAA,EAE3D,WAAWF;AAAA,IACTC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAOP,EAAc,EAAE,WAAWS,GAAwB,QAAQX,EAAe,CAAC,GAAG,CAAC;AAAA,IAAA;AAAA,EACxF;AAAA,EAEF,cAAcM;AAAA,IACZC;AAAA,MACEC,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+1 @@
1
- {"version":3,"file":"Completed.js","sources":["../../../../src/components/Company/OnboardingOverview/Completed.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Completed = () => {\n const Components = useComponentContext()\n const { onboardingCompleted, handleDone } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n if (!onboardingCompleted) {\n return null\n }\n return (\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('onboardingCompletedTitle')}\n </Components.Heading>\n <p>{t('onboardingCompletedDescription')}</p>\n <Components.Button variant=\"secondary\" onClick={handleDone}>\n {t('onboardingCompletedCta')}\n </Components.Button>\n </Flex>\n )\n}\n"],"names":["Completed","Components","useComponentContext","onboardingCompleted","handleDone","useOnboardingOverview","t","useTranslation","Flex","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAY,MAAM;AAC7B,QAAMC,IAAaC,EAAA,GACb,EAAE,qBAAAC,GAAqB,YAAAC,EAAA,IAAeC,EAAA,GACtC,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AACzD,SAAKJ,sBAIFK,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAK,EAAE,0BAA0B,EAAA,CAC/B;AAAA,IACA,gBAAAG,EAAC,KAAA,EAAG,UAAAH,EAAE,gCAAgC,EAAA,CAAE;AAAA,IACxC,gBAAAG,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASG,GAC7C,UAAAE,EAAE,wBAAwB,EAAA,CAC7B;AAAA,EAAA,GACF,IAXO;AAaX;"}
1
+ {"version":3,"file":"Completed.js","sources":["../../../../src/components/Company/OnboardingOverview/Completed.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport const Completed = () => {\n const Components = useComponentContext()\n const { onboardingCompleted, handleDone } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n if (!onboardingCompleted) {\n return null\n }\n return (\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('onboardingCompletedTitle')}\n </Components.Heading>\n <p>{t('onboardingCompletedDescription')}</p>\n <Components.Button variant=\"secondary\" onClick={handleDone}>\n {t('onboardingCompletedCta')}\n </Components.Button>\n </Flex>\n )\n}\n"],"names":["Completed","Components","useComponentContext","onboardingCompleted","handleDone","useOnboardingOverview","t","useTranslation","Flex","jsx"],"mappings":";;;;;;AAMO,MAAMA,IAAY,MAAM;AAC7B,QAAMC,IAAaC,EAAA,GACb,EAAE,qBAAAC,GAAqB,YAAAC,EAAA,IAAeC,EAAA,GACtC,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AACzD,SAAKJ,sBAIFK,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAK,EAAE,0BAA0B,EAAA,CAC/B;AAAA,IACA,gBAAAG,EAAC,KAAA,EAAG,UAAAH,EAAE,gCAAgC,EAAA,CAAE;AAAA,IACxC,gBAAAG,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASG,GAC7C,UAAAE,EAAE,wBAAwB,EAAA,CAC7B;AAAA,EAAA,GACF,IAXO;AAaX;"}
@@ -1 +1,2 @@
1
+ /** @internal */
1
2
  export declare const MissingRequirements: () => import("react").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"MissingRequirements.js","sources":["../../../../src/components/Company/OnboardingOverview/MissingRequirements.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { RequirementsList } from '@/components/Common/RequirementsList/RequirementsList'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\n\nexport const MissingRequirements = () => {\n const Components = useComponentContext()\n const { onboardingSteps, onboardingCompleted, handleContinue } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n\n if (onboardingCompleted) {\n return null\n }\n\n const isInitialSetup = !onboardingSteps?.some(step => step.required && step.completed)\n\n return (\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleContinue}>\n {t(isInitialSetup ? 'initialSetupCta' : 'missingRequirementsCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex flexDirection=\"column\" alignItems=\"flex-start\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t(isInitialSetup ? 'initialSetupTitle' : 'missingRequirementsTitle')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n {t(isInitialSetup ? 'initialSetupDescription' : 'missingRequirementsDescription')}\n </Components.Text>\n </Flex>\n {onboardingSteps && (\n <RequirementsList\n requirements={onboardingSteps.map(step => ({\n completed: step.completed!,\n title: t(`stepTitles.${step.id!}`),\n description: t(`stepDescriptions.${step.id!}`),\n }))}\n />\n )}\n </Flex>\n </Components.Box>\n )\n}\n"],"names":["MissingRequirements","Components","useComponentContext","onboardingSteps","onboardingCompleted","handleContinue","useOnboardingOverview","useTranslation","isInitialSetup","step","jsx","ActionsLayout","jsxs","ArrowRightIcon","Flex","RequirementsList"],"mappings":";;;;;;;;;AAOO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,iBAAAC,GAAiB,q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verview/MissingRequirements.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { RequirementsList } from '@/components/Common/RequirementsList/RequirementsList'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport ArrowRightIcon from '@/assets/icons/icon-arrow-right.svg?react'\n\n/** @internal */\nexport const MissingRequirements = () => {\n const Components = useComponentContext()\n const { onboardingSteps, onboardingCompleted, handleContinue } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n\n if (onboardingCompleted) {\n return null\n }\n\n const isInitialSetup = !onboardingSteps?.some(step => step.required && step.completed)\n\n return (\n <Components.Box\n footer={\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleContinue}>\n {t(isInitialSetup ? 'initialSetupCta' : 'missingRequirementsCta')}\n <ArrowRightIcon aria-hidden />\n </Components.Button>\n </ActionsLayout>\n }\n >\n <Flex flexDirection=\"column\" alignItems=\"flex-start\" gap={32}>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">\n {t(isInitialSetup ? 'initialSetupTitle' : 'missingRequirementsTitle')}\n </Components.Heading>\n <Components.Text variant=\"supporting\">\n {t(isInitialSetup ? 'initialSetupDescription' : 'missingRequirementsDescription')}\n </Components.Text>\n </Flex>\n {onboardingSteps && (\n <RequirementsList\n requirements={onboardingSteps.map(step => ({\n completed: step.completed!,\n title: t(`stepTitles.${step.id!}`),\n description: t(`stepDescriptions.${step.id!}`),\n }))}\n />\n )}\n </Flex>\n </Components.Box>\n )\n}\n"],"names":["MissingRequirements","Components","useComponentContext","onboardingSteps","onboardingCompleted","handleContinue","useOnboardingOverview","useTranslation","isInitialSetup","step","jsx","ActionsLayout","jsxs","ArrowRightIcon","Flex","RequirementsList"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,iBAAAC,GAAiB,qB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2
2
  interface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {
3
3
  companyId: string;
4
4
  }
5
+ /**
6
+ * Displays the company's overall onboarding status, showing completed steps alongside any remaining requirements.
7
+ *
8
+ * @remarks
9
+ * Renders as the landing or summary screen of a company onboarding flow. When `onboardingCompleted`
10
+ * is true, a completion message and "done" action are shown; otherwise a checklist of outstanding
11
+ * steps is rendered with a continue action. Provide `children` to override the default layout while
12
+ * still consuming the onboarding status via context.
13
+ *
14
+ * | Event | Description | Data |
15
+ * | ----- | ----------- | ---- |
16
+ * | `company/overview/continue` | Fired when the user chooses to continue to the next outstanding onboarding requirement | — |
17
+ * | `company/overview/done` | Fired when the user signals they are done with the overview screen, typically after onboarding ends | — |
18
+ *
19
+ * @param props - Component props including the target `companyId` and standard base/common component options.
20
+ * @returns The rendered onboarding overview section.
21
+ * @public
22
+ */
5
23
  export declare function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface): import("react").JSX.Element;
6
24
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingOverview.js","sources":["../../../../src/components/Company/OnboardingOverview/OnboardingOverview.tsx"],"sourcesContent":["import { useCompaniesGetOnboardingStatusSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/companiesGetOnboardingStatus'\nimport { OnboardingOverviewProvider } from './context'\nimport { MissingRequirements } from './MissingRequirements'\nimport { Completed } from './Completed'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {\n companyId: string\n}\n\nexport function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface) {\n useI18n('Company.OnboardingOverview')\n useComponentDictionary('Company.OnboardingOverview', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, className, children }: OnboardingOverviewProps) => {\n const { onEvent } = useBase()\n\n const { data } = useCompaniesGetOnboardingStatusSuspense({ companyUuid: companyId })\n const { onboardingCompleted, onboardingSteps } = data.companyOnboardingStatus!\n\n const handleDone = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_DONE)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_CONTINUE)\n }\n\n return (\n <section className={className}>\n <OnboardingOverviewProvider\n value={{\n onboardingCompleted,\n onboardingSteps,\n handleDone,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Completed />\n <MissingRequirements />\n </>\n )}\n </Flex>\n </OnboardingOverviewProvider>\n </section>\n )\n}\n"],"names":["OnboardingOverview","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","companyId","className","children","onEvent","useBase","data","useCompaniesGetOnboardingStatusSuspense","onboardingCompleted","onboardingSteps","OnboardingOverviewProvider","componentEvents","Flex","jsxs","Fragment","Completed","MissingRequirements"],"mappings":";;;;;;;;;;;;;AAmBO,SAASA,EAAmBC,GAAyD;AAC1F,SAAAC,EAAQ,4BAA4B,GACpCC,EAAuB,8BAA8BF,EAAM,UAAU,GAEnE,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,QAAwC;AAC5E,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,EAAA,IAASC,EAAwC,EAAE,aAAaN,GAAW,GAC7E,EAAE,qBAAAO,GAAqB,iBAAAC,EAAA,IAAoBH,EAAK;AAStD,SACE,gBAAAR,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,qBAAAF;AAAA,QACA,iBAAAC;AAAA,QACA,YAbW,MAAM;AACvB,UAAAL,EAAQO,EAAgB,qBAAqB;AAAA,QAC/C;AAAA,QAYQ,gBAXe,MAAM;AAC3B,UAAAP,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAb,EAACc,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,KAGC,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhB,EAACiB,GAAA,EAAU;AAAA,0BACVC,GAAA,CAAA,CAAoB;AAAA,MAAA,EAAA,CACvB,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"OnboardingOverview.js","sources":["../../../../src/components/Company/OnboardingOverview/OnboardingOverview.tsx"],"sourcesContent":["import { useCompaniesGetOnboardingStatusSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/companiesGetOnboardingStatus'\nimport { OnboardingOverviewProvider } from './context'\nimport { MissingRequirements } from './MissingRequirements'\nimport { Completed } from './Completed'\nimport {\n BaseComponent,\n useBase,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface OnboardingOverviewProps extends CommonComponentInterface<'Company.OnboardingOverview'> {\n companyId: string\n}\n\n/**\n * Displays the company's overall onboarding status, showing completed steps alongside any remaining requirements.\n *\n * @remarks\n * Renders as the landing or summary screen of a company onboarding flow. When `onboardingCompleted`\n * is true, a completion message and \"done\" action are shown; otherwise a checklist of outstanding\n * steps is rendered with a continue action. Provide `children` to override the default layout while\n * still consuming the onboarding status via context.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `company/overview/continue` | Fired when the user chooses to continue to the next outstanding onboarding requirement | — |\n * | `company/overview/done` | Fired when the user signals they are done with the overview screen, typically after onboarding ends | — |\n *\n * @param props - Component props including the target `companyId` and standard base/common component options.\n * @returns The rendered onboarding overview section.\n * @public\n */\nexport function OnboardingOverview(props: OnboardingOverviewProps & BaseComponentInterface) {\n useI18n('Company.OnboardingOverview')\n useComponentDictionary('Company.OnboardingOverview', props.dictionary)\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, className, children }: OnboardingOverviewProps) => {\n const { onEvent } = useBase()\n\n const { data } = useCompaniesGetOnboardingStatusSuspense({ companyUuid: companyId })\n const { onboardingCompleted, onboardingSteps } = data.companyOnboardingStatus!\n\n const handleDone = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_DONE)\n }\n const handleContinue = () => {\n onEvent(componentEvents.COMPANY_OVERVIEW_CONTINUE)\n }\n\n return (\n <section className={className}>\n <OnboardingOverviewProvider\n value={{\n onboardingCompleted,\n onboardingSteps,\n handleDone,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Completed />\n <MissingRequirements />\n </>\n )}\n </Flex>\n </OnboardingOverviewProvider>\n </section>\n )\n}\n"],"names":["OnboardingOverview","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","companyId","className","children","onEvent","useBase","data","useCompaniesGetOnboardingStatusSuspense","onboardingCompleted","onboardingSteps","OnboardingOverviewProvider","componentEvents","Flex","jsxs","Fragment","Completed","MissingRequirements"],"mappings":";;;;;;;;;;;;;AAqCO,SAASA,EAAmBC,GAAyD;AAC1F,SAAAC,EAAQ,4BAA4B,GACpCC,EAAuB,8BAA8BF,EAAM,UAAU,GAEnE,gBAAAG,EAACC,GAAA,EAAe,GAAGJ,GACjB,UAAA,gBAAAG,EAACE,KAAM,GAAGL,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMK,IAAO,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,QAAwC;AAC5E,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,EAAA,IAASC,EAAwC,EAAE,aAAaN,GAAW,GAC7E,EAAE,qBAAAO,GAAqB,iBAAAC,EAAA,IAAoBH,EAAK;AAStD,SACE,gBAAAR,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,qBAAAF;AAAA,QACA,iBAAAC;AAAA,QACA,YAbW,MAAM;AACvB,UAAAL,EAAQO,EAAgB,qBAAqB;AAAA,QAC/C;AAAA,QAYQ,gBAXe,MAAM;AAC3B,UAAAP,EAAQO,EAAgB,yBAAyB;AAAA,QACnD;AAAA,MASQ;AAAA,MAGF,UAAA,gBAAAb,EAACc,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,KAGC,gBAAAU,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhB,EAACiB,GAAA,EAAU;AAAA,0BACVC,GAAA,CAAA,CAAoB;AAAA,MAAA,EAAA,CACvB,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -9,14 +9,13 @@ import "@gusto/embedded-api-v-2025-11-15/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api-v-2025-11-15/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api-v-2025-11-15/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api-v-2025-11-15/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../shared/constants.js";
15
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
17
- const [c, s] = o("OnboardingOverviewContext");
16
+ const [C, c] = o("OnboardingOverviewContext");
18
17
  export {
19
- s as OnboardingOverviewProvider,
20
- c as useOnboardingOverview
18
+ c as OnboardingOverviewProvider,
19
+ C as useOnboardingOverview
21
20
  };
22
21
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api-v-2025-11-15/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api-v-2025-11-15/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
@@ -1,13 +1,46 @@
1
1
  import { PayScheduleFormData } from './shared/usePayScheduleForm/payScheduleSchema';
2
2
  import { BaseComponentInterface, CommonComponentInterface } from '../../Base';
3
3
  import { RequireAtLeastOne } from '../../../types/Helpers';
4
- type PayScheduleDefaultFields = {
4
+ /**
5
+ * The full set of fields that may be pre-filled on the {@link PaySchedule} create form.
6
+ *
7
+ * @public
8
+ */
9
+ export type PayScheduleDefaultFields = {
5
10
  [K in keyof Pick<PayScheduleFormData, 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'>]: NonNullable<PayScheduleFormData[K]>;
6
11
  };
12
+ /**
13
+ * Default values for the {@link PaySchedule} form fields. Server data for an existing pay schedule
14
+ * takes precedence over these defaults when editing.
15
+ *
16
+ * @public
17
+ */
7
18
  export type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>;
8
- interface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {
19
+ /**
20
+ * Props for the {@link PaySchedule} component.
21
+ *
22
+ * @public
23
+ */
24
+ export interface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {
25
+ /** Identifier of the company whose pay schedules are managed. */
9
26
  companyId: string;
27
+ /** Default values used to pre-fill the create form. Ignored fields not listed in {@link PayScheduleDefaultValues}. */
10
28
  defaultValues?: PayScheduleDefaultValues;
11
29
  }
30
+ /**
31
+ * Manages a company's pay schedules, including listing existing schedules and creating or editing one.
32
+ *
33
+ * @remarks
34
+ * Renders the schedule list when at least one pay schedule exists and the create form otherwise.
35
+ * Emits the following events through `onEvent`:
36
+ *
37
+ * | Event | Description | Data |
38
+ * | ----- | ----------- | ---- |
39
+ * | `paySchedule/created` | A new pay schedule was created | The created pay schedule entity |
40
+ * | `paySchedule/updated` | An existing pay schedule was updated | The updated pay schedule entity |
41
+ *
42
+ * @param props - {@link PayScheduleProps} plus the standard base component props.
43
+ * @returns The pay schedule list or form depending on whether any schedules exist.
44
+ * @public
45
+ */
12
46
  export declare const PaySchedule: ({ companyId, defaultValues, dictionary, ...props }: PayScheduleProps & BaseComponentInterface) => import("react").JSX.Element;
13
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/paySchedulesGetAll'\nimport { payScheduleStateMachine } from './payScheduleStateMachine'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport type { PayScheduleFormData } from './shared/usePayScheduleForm/payScheduleSchema'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype PayScheduleDefaultFields = {\n [K in keyof Pick<\n PayScheduleFormData,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >]: NonNullable<PayScheduleFormData[K]>\n}\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, defaultValues }: PayScheduleProps) {\n const { onEvent } = useBase()\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const hasSchedules = (paySchedules.payScheduleShowResponse?.length ?? 0) > 0\n const initialState = hasSchedules ? 'listSchedules' : 'addSchedule'\n const initialComponent = hasSchedules ? PayScheduleListContextual : PayScheduleFormContextual\n\n const machine = useMemo(\n () =>\n createMachine(\n initialState,\n payScheduleStateMachine,\n (initialContext: PayScheduleContextInterface) => ({\n ...initialContext,\n component: initialComponent,\n companyId,\n defaultValues,\n }),\n ),\n [companyId, defaultValues, initialState, initialComponent],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","onEvent","useBase","paySchedules","usePaySchedulesGetAllSuspense","hasSchedules","initialState","initialComponent","PayScheduleListContextual","PayScheduleFormContextual","machine","useMemo","createMachine","payScheduleStateMachine","initialContext","Flow"],"mappings":";;;;;;;;;;AA4BO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,EAAQ,qBAAqB,GAC7BC,EAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,KAAe,GAAGJ,GACjB,4BAACK,GAAA,EAAK,WAAAR,GAAsB,eAAAC,GAA8B,EAAA,CAC5D;AAIJ,SAASO,EAAK,EAAE,WAAAR,GAAW,eAAAC,KAAmC;AAC5D,QAAM,EAAE,SAAAQ,EAAA,IAAYC,EAAA,GACd,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAZ,GAAW,GAEpEa,KAAgBF,EAAa,yBAAyB,UAAU,KAAK,GACrEG,IAAeD,IAAe,kBAAkB,eAChDE,IAAmBF,IAAeG,IAA4BC,GAE9DC,IAAUC;AAAA,IACd,MACEC;AAAA,MACEN;AAAA,MACAO;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWP;AAAA,QACX,WAAAf;AAAA,QACA,eAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACD,GAAWC,GAAea,GAAcC,CAAgB;AAAA,EAAA;AAG3D,SAAO,gBAAAT,EAACiB,GAAA,EAAK,SAAAL,GAAkB,SAAAT,EAAA,CAAkB;AACnD;"}
1
+ {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/paySchedulesGetAll'\nimport { payScheduleStateMachine } from './payScheduleStateMachine'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport type { PayScheduleFormData } from './shared/usePayScheduleForm/payScheduleSchema'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * The full set of fields that may be pre-filled on the {@link PaySchedule} create form.\n *\n * @public\n */\nexport type PayScheduleDefaultFields = {\n [K in keyof Pick<\n PayScheduleFormData,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >]: NonNullable<PayScheduleFormData[K]>\n}\n\n/**\n * Default values for the {@link PaySchedule} form fields. Server data for an existing pay schedule\n * takes precedence over these defaults when editing.\n *\n * @public\n */\nexport type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>\n\n/**\n * Props for the {@link PaySchedule} component.\n *\n * @public\n */\nexport interface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n /** Identifier of the company whose pay schedules are managed. */\n companyId: string\n /** Default values used to pre-fill the create form. Ignored fields not listed in {@link PayScheduleDefaultValues}. */\n defaultValues?: PayScheduleDefaultValues\n}\n\n/**\n * Manages a company's pay schedules, including listing existing schedules and creating or editing one.\n *\n * @remarks\n * Renders the schedule list when at least one pay schedule exists and the create form otherwise.\n * Emits the following events through `onEvent`:\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `paySchedule/created` | A new pay schedule was created | The created pay schedule entity |\n * | `paySchedule/updated` | An existing pay schedule was updated | The updated pay schedule entity |\n *\n * @param props - {@link PayScheduleProps} plus the standard base component props.\n * @returns The pay schedule list or form depending on whether any schedules exist.\n * @public\n */\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, defaultValues }: PayScheduleProps) {\n const { onEvent } = useBase()\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const hasSchedules = (paySchedules.payScheduleShowResponse?.length ?? 0) > 0\n const initialState = hasSchedules ? 'listSchedules' : 'addSchedule'\n const initialComponent = hasSchedules ? PayScheduleListContextual : PayScheduleFormContextual\n\n const machine = useMemo(\n () =>\n createMachine(\n initialState,\n payScheduleStateMachine,\n (initialContext: PayScheduleContextInterface) => ({\n ...initialContext,\n component: initialComponent,\n companyId,\n defaultValues,\n }),\n ),\n [companyId, defaultValues, initialState, initialComponent],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","onEvent","useBase","paySchedules","usePaySchedulesGetAllSuspense","hasSchedules","initialState","initialComponent","PayScheduleListContextual","PayScheduleFormContextual","machine","useMemo","createMachine","payScheduleStateMachine","initialContext","Flow"],"mappings":";;;;;;;;;;AA8DO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,EAAQ,qBAAqB,GAC7BC,EAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,KAAe,GAAGJ,GACjB,4BAACK,GAAA,EAAK,WAAAR,GAAsB,eAAAC,GAA8B,EAAA,CAC5D;AAIJ,SAASO,EAAK,EAAE,WAAAR,GAAW,eAAAC,KAAmC;AAC5D,QAAM,EAAE,SAAAQ,EAAA,IAAYC,EAAA,GACd,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAZ,GAAW,GAEpEa,KAAgBF,EAAa,yBAAyB,UAAU,KAAK,GACrEG,IAAeD,IAAe,kBAAkB,eAChDE,IAAmBF,IAAeG,IAA4BC,GAE9DC,IAAUC;AAAA,IACd,MACEC;AAAA,MACEN;AAAA,MACAO;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWP;AAAA,QACX,WAAAf;AAAA,QACA,eAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACD,GAAWC,GAAea,GAAcC,CAAgB;AAAA,EAAA;AAG3D,SAAO,gBAAAT,EAACiB,GAAA,EAAK,SAAAL,GAAkB,SAAAT,EAAA,CAAkB;AACnD;"}
@@ -1,10 +1,13 @@
1
1
  import { PayScheduleDefaultValues } from './PaySchedule';
2
2
  import { FlowContextInterface } from '../../Flow/useFlow';
3
+ /** @internal */
3
4
  export interface PayScheduleContextInterface extends FlowContextInterface {
4
5
  companyId: string;
5
6
  payScheduleId?: string;
6
7
  defaultValues?: PayScheduleDefaultValues;
7
8
  component: React.ComponentType | null;
8
9
  }
10
+ /** @internal */
9
11
  export declare function PayScheduleListContextual(): import("react").JSX.Element;
12
+ /** @internal */
10
13
  export declare function PayScheduleFormContextual(): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"PayScheduleComponents.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleComponents.tsx"],"sourcesContent":["import type { PayScheduleDefaultValues } from './PaySchedule'\nimport { PayScheduleList } from './PayScheduleList'\nimport { PayScheduleForm } from './PayScheduleForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport interface PayScheduleContextInterface extends FlowContextInterface {\n companyId: string\n payScheduleId?: string\n defaultValues?: PayScheduleDefaultValues\n component: React.ComponentType | null\n}\n\nexport function PayScheduleListContextual() {\n const { companyId, onEvent } = useFlow<PayScheduleContextInterface>()\n return <PayScheduleList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\nexport function PayScheduleFormContextual() {\n const { companyId, payScheduleId, defaultValues, onEvent } =\n useFlow<PayScheduleContextInterface>()\n\n return (\n <PayScheduleForm\n companyId={ensureRequired(companyId)}\n payScheduleId={payScheduleId}\n defaultValues={defaultValues}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PayScheduleListContextual","companyId","onEvent","useFlow","PayScheduleList","ensureRequired","PayScheduleFormContextual","payScheduleId","defaultValues","jsx","PayScheduleForm"],"mappings":";;;;;AAaO,SAASA,IAA4B;AAC1C,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAgB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAClF;AAEO,SAASK,IAA4B;AAC1C,QAAM,EAAE,WAAAL,GAAW,eAAAM,GAAe,eAAAC,GAAe,SAAAN,EAAA,IAC/CC,EAAA;AAEF,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWL,EAAeJ,CAAS;AAAA,MACnC,eAAAM;AAAA,MACA,eAAAC;AAAA,MACA,SAAAN;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"PayScheduleComponents.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleComponents.tsx"],"sourcesContent":["import type { PayScheduleDefaultValues } from './PaySchedule'\nimport { PayScheduleList } from './PayScheduleList'\nimport { PayScheduleForm } from './PayScheduleForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/** @internal */\nexport interface PayScheduleContextInterface extends FlowContextInterface {\n companyId: string\n payScheduleId?: string\n defaultValues?: PayScheduleDefaultValues\n component: React.ComponentType | null\n}\n\n/** @internal */\nexport function PayScheduleListContextual() {\n const { companyId, onEvent } = useFlow<PayScheduleContextInterface>()\n return <PayScheduleList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\n/** @internal */\nexport function PayScheduleFormContextual() {\n const { companyId, payScheduleId, defaultValues, onEvent } =\n useFlow<PayScheduleContextInterface>()\n\n return (\n <PayScheduleForm\n companyId={ensureRequired(companyId)}\n payScheduleId={payScheduleId}\n defaultValues={defaultValues}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PayScheduleListContextual","companyId","onEvent","useFlow","PayScheduleList","ensureRequired","PayScheduleFormContextual","payScheduleId","defaultValues","jsx","PayScheduleForm"],"mappings":";;;;;AAeO,SAASA,IAA4B;AAC1C,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAgB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAClF;AAGO,SAASK,IAA4B;AAC1C,QAAM,EAAE,WAAAL,GAAW,eAAAM,GAAe,eAAAC,GAAe,SAAAN,EAAA,IAC/CC,EAAA;AAEF,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWL,EAAeJ,CAAS;AAAA,MACnC,eAAAM;AAAA,MACA,eAAAC;AAAA,MACA,SAAAN;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -4,5 +4,6 @@ import { OnEventType } from '../../Base/useBase';
4
4
  interface PayScheduleFormProps extends UsePayScheduleFormProps {
5
5
  onEvent: OnEventType<EventType, unknown>;
6
6
  }
7
+ /** @internal */
7
8
  export declare function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps): import("react").JSX.Element;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PayScheduleForm.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { usePayScheduleForm } from './shared/usePayScheduleForm'\nimport type { UsePayScheduleFormProps, PayScheduleFrequency } from './shared/usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleFormProps extends UsePayScheduleFormProps {\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"Company.PayScheduleForm\">\n <PayScheduleFormRoot onEvent={onEvent} {...hookProps} />\n </BaseBoundaries>\n )\n}\n\nfunction PayScheduleFormRoot({ onEvent, ...hookProps }: PayScheduleFormProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n { paySchedule: result.data },\n )\n }\n }\n\n const { Fields } = paySchedule.form\n const { paymentSpeedDays, payPreviewLoading } = paySchedule.data\n const payPeriodPreview = paySchedule.data.payPeriodPreview\n\n const frequencyLabels: Record<PayScheduleFrequency, string> = {\n 'Every week': t('frequencies.everyWeek'),\n 'Every other week': t('frequencies.everyOtherWeek'),\n 'Twice per month': t('frequencies.twicePerMonth'),\n Monthly: t('frequencies.monthly'),\n }\n\n const twicePerMonthLabels: Record<string, string> = {\n '1st15th': t('frequencyOptions.15thAndLast'),\n custom: t('frequencyOptions.custom'),\n }\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create'\n ? t('headings.addPaySchedule')\n : t('headings.editPaySchedule')}\n </Components.Heading>\n </header>\n </Flex>\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <Fields.CustomName\n label={t('labels.name')}\n validationMessages={{ REQUIRED: t('validations.name') }}\n />\n <Fields.Frequency\n label={t('labels.frequency')}\n getOptionLabel={(entry: PayScheduleFrequency) => frequencyLabels[entry]}\n validationMessages={{ REQUIRED: t('validations.frequency') }}\n />\n {Fields.CustomTwicePerMonth && (\n <Fields.CustomTwicePerMonth\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n getOptionLabel={(entry: string) => twicePerMonthLabels[entry] ?? entry}\n />\n )}\n <Fields.AnchorPayDate\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n validationMessages={{ REQUIRED: t('validations.firstPayDate') }}\n minDate={new Date()}\n />\n <Fields.AnchorEndOfPayPeriod\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n validationMessages={{ REQUIRED: t('validations.firstPayPeriodEndDate') }}\n />\n {Fields.Day1 && (\n <Fields.Day1\n label={t('labels.firstPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.firstPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n {Fields.Day2 && (\n <Fields.Day2\n label={t('labels.lastPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.lastPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(\n payPeriodPreview[selectedPayPeriodIndex].startDate.toString(),\n ),\n end: new Date(\n payPeriodPreview[selectedPayPeriodIndex].endDate.toString(),\n ),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].checkDate.toString(),\n ),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].runPayrollBy.toString(),\n ),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["PayScheduleForm","onEvent","hookProps","jsx","BaseBoundaries","PayScheduleFormRoot","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","handleSubmit","result","componentEvents","Fields","paymentSpeedDays","payPreviewLoading","payPeriodPreview","frequencyLabels","twicePerMonthLabels","SDKFormProvider","Form","jsxs","Flex","style","Grid","entry","period","index","value","numericValue","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;AAkBO,SAASA,EAAgB,EAAE,SAAAC,GAAS,GAAGC,KAAmC;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,2BAC5B,4BAACC,GAAA,EAAoB,SAAAJ,GAAmB,GAAGC,EAAA,CAAW,EAAA,CACxD;AAEJ;AAEA,SAASG,EAAoB,EAAE,SAAAJ,GAAS,GAAGC,KAAmC;AAC5E,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAcC,EAAmBX,CAAS,GAC1C,CAACY,GAAwBC,CAAyB,IAAIC,EAAS,CAAC;AAEtE,MAAIJ,EAAY;AACd,6BAAQK,GAAA,EAAW,WAAS,IA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D,UAAAN,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"PayScheduleForm.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { usePayScheduleForm } from './shared/usePayScheduleForm'\nimport type { UsePayScheduleFormProps, PayScheduleFrequency } from './shared/usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleFormProps extends UsePayScheduleFormProps {\n onEvent: OnEventType<EventType, unknown>\n}\n\n/** @internal */\nexport function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"Company.PayScheduleForm\">\n <PayScheduleFormRoot onEvent={onEvent} {...hookProps} />\n </BaseBoundaries>\n )\n}\n\nfunction PayScheduleFormRoot({ onEvent, ...hookProps }: PayScheduleFormProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n { paySchedule: result.data },\n )\n }\n }\n\n const { Fields } = paySchedule.form\n const { paymentSpeedDays, payPreviewLoading } = paySchedule.data\n const payPeriodPreview = paySchedule.data.payPeriodPreview\n\n const frequencyLabels: Record<PayScheduleFrequency, string> = {\n 'Every week': t('frequencies.everyWeek'),\n 'Every other week': t('frequencies.everyOtherWeek'),\n 'Twice per month': t('frequencies.twicePerMonth'),\n Monthly: t('frequencies.monthly'),\n }\n\n const twicePerMonthLabels: Record<string, string> = {\n '1st15th': t('frequencyOptions.15thAndLast'),\n custom: t('frequencyOptions.custom'),\n }\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create'\n ? t('headings.addPaySchedule')\n : t('headings.editPaySchedule')}\n </Components.Heading>\n </header>\n </Flex>\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <Fields.CustomName\n label={t('labels.name')}\n validationMessages={{ REQUIRED: t('validations.name') }}\n />\n <Fields.Frequency\n label={t('labels.frequency')}\n getOptionLabel={(entry: PayScheduleFrequency) => frequencyLabels[entry]}\n validationMessages={{ REQUIRED: t('validations.frequency') }}\n />\n {Fields.CustomTwicePerMonth && (\n <Fields.CustomTwicePerMonth\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n getOptionLabel={(entry: string) => twicePerMonthLabels[entry] ?? entry}\n />\n )}\n <Fields.AnchorPayDate\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n validationMessages={{ REQUIRED: t('validations.firstPayDate') }}\n minDate={new Date()}\n />\n <Fields.AnchorEndOfPayPeriod\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n validationMessages={{ REQUIRED: t('validations.firstPayPeriodEndDate') }}\n />\n {Fields.Day1 && (\n <Fields.Day1\n label={t('labels.firstPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.firstPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n {Fields.Day2 && (\n <Fields.Day2\n label={t('labels.lastPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('validations.lastPayDayOfTheMonth'),\n DAY_RANGE: t('validations.dayRange'),\n }}\n />\n )}\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(\n payPeriodPreview[selectedPayPeriodIndex].startDate.toString(),\n ),\n end: new Date(\n payPeriodPreview[selectedPayPeriodIndex].endDate.toString(),\n ),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].checkDate.toString(),\n ),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].runPayrollBy.toString(),\n ),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["PayScheduleForm","onEvent","hookProps","jsx","BaseBoundaries","PayScheduleFormRoot","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","handleSubmit","result","componentEvents","Fields","paymentSpeedDays","payPreviewLoading","payPeriodPreview","frequencyLabels","twicePerMonthLabels","SDKFormProvider","Form","jsxs","Flex","style","Grid","entry","period","index","value","numericValue","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;AAmBO,SAASA,EAAgB,EAAE,SAAAC,GAAS,GAAGC,KAAmC;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,2BAC5B,4BAACC,GAAA,EAAoB,SAAAJ,GAAmB,GAAGC,EAAA,CAAW,EAAA,CACxD;AAEJ;AAEA,SAASG,EAAoB,EAAE,SAAAJ,GAAS,GAAGC,KAAmC;AAC5E,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAcC,EAAmBX,CAAS,GAC1C,CAACY,GAAwBC,CAAyB,IAAIC,EAAS,CAAC;AAEtE,MAAIJ,EAAY;AACd,6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AS,WAAWI,EAAY,OAAO,WAC5D,UAAAN,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -4,5 +4,6 @@ interface PayScheduleListProps {
4
4
  companyId: string;
5
5
  onEvent: OnEventType<EventType, unknown>;
6
6
  }
7
+ /** @internal */
7
8
  export declare function PayScheduleList({ companyId, onEvent }: PayScheduleListProps): import("react").JSX.Element;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PayScheduleList.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleList.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/paySchedulesGetAll'\nimport styles from './PayScheduleList.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden, ActionsLayout } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleListProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleList({ companyId, onEvent }: PayScheduleListProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const dataViewProps = useDataView({\n data: paySchedules.payScheduleShowResponse || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection=\"column\" gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n onEvent(componentEvents.PAY_SCHEDULE_UPDATE, { uuid: schedule.uuid })\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n ),\n })\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4} alignItems=\"stretch\">\n <header>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n <Trans\n i18nKey=\"listDescription\"\n t={t}\n components={{ ScheduleLink: <Components.Link /> }}\n />\n </Components.Text>\n <Components.Text variant=\"supporting\">\n <Trans\n i18nKey=\"listDescription2\"\n t={t}\n components={{ PaymentLawLink: <Components.Link /> }}\n />\n </Components.Text>\n </Flex>\n </header>\n </Flex>\n <DataView label={t('payScheduleListLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.PAY_SCHEDULE_CREATE)\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["PayScheduleList","companyId","onEvent","useTranslation","Components","useComponentContext","paySchedules","usePaySchedulesGetAllSuspense","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","componentEvents","PencilSvg","Trans","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;AAeO,SAASA,EAAgB,EAAE,WAAAC,GAAW,SAAAC,KAAiC;AAC5E,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAN,GAAW,GAEpEO,IAAgBC,EAAY;AAAA,IAChC,MAAMH,EAAa,2BAA2B,CAAA;AAAA,IAC9C,SAAS;AAAA,MACP;AAAA,QACE,OAAO,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAI,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAAI,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,SACrB,UAAA;AAAA,YAAA,gBAAAH,EAAC,SAAK,UAAAF,EAAA,CAAY;AAAA,YACjBD,KAAW,gBAAAG,EAAC,OAAA,EAAK,UAAAD,EAAA,CAAiB;AAAA,UAAA,EAAA,CACrC,EAAA,CACF;AAAA,QAEJ;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAA,EAAE,wBAAwB,GAAE;AAAA,QACpD,KAAK;AAAA,QACL,QAAQ,CAAAR,MACN,gBAAAI,EAAC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U,EAACV,EAAW,MAAX,EAAgB,SAAQ,cACvB,UAAA,gBAAAU;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,SAAQ;AAAA,UACR;AAAA,UACA,YAAY,EAAE,kCAAiBlB,EAAW,MAAX,CAAA,CAAgB,EAAA;AAAA,QAAG;AAAA,MAAA,EACpD,CACF;AAAA,IAAA,EAAA,CACF,GACF,GACF;AAAA,sBACCmB,GAAA,EAAS,OAAO,EAAE,sBAAsB,GAAI,GAAGf,GAAe;AAAA,sBAC9DgB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAV;AAAA,QAACV,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQkB,EAAgB,mBAAmB;AAAA,UAC7C;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAAA;AAAA,MAE/B,gBAAAN;AAAA,QAACV,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAF,EAAQkB,EAAgB,iBAAiB;AAAA,UAC3C;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"PayScheduleList.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleList.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api-v-2025-11-15/react-query/paySchedulesGetAll'\nimport styles from './PayScheduleList.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden, ActionsLayout } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleListProps {\n companyId: string\n onEvent: OnEventType<EventType, unknown>\n}\n\n/** @internal */\nexport function PayScheduleList({ companyId, onEvent }: PayScheduleListProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const dataViewProps = useDataView({\n data: paySchedules.payScheduleShowResponse || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection=\"column\" gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n onEvent(componentEvents.PAY_SCHEDULE_UPDATE, { uuid: schedule.uuid })\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n ),\n })\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4} alignItems=\"stretch\">\n <header>\n <Flex flexDirection=\"column\" gap={4}>\n <Components.Heading as=\"h2\">{t('headings.pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n <Trans\n i18nKey=\"listDescription\"\n t={t}\n components={{ ScheduleLink: <Components.Link /> }}\n />\n </Components.Text>\n <Components.Text variant=\"supporting\">\n <Trans\n i18nKey=\"listDescription2\"\n t={t}\n components={{ PaymentLawLink: <Components.Link /> }}\n />\n </Components.Text>\n </Flex>\n </header>\n </Flex>\n <DataView label={t('payScheduleListLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.PAY_SCHEDULE_CREATE)\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["PayScheduleList","companyId","onEvent","useTranslation","Components","useComponentContext","paySchedules","usePaySchedulesGetAllSuspense","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","componentEvents","PencilSvg","Trans","DataView","ActionsLayout"],"mappings":";;;;;;;;;;;;;AAgBO,SAASA,EAAgB,EAAE,WAAAC,GAAW,SAAAC,KAAiC;AAC5E,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GAEb,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAN,GAAW,GAEpEO,IAAgBC,EAAY;AAAA,IAChC,MAAMH,EAAa,2BAA2B,CAAA;AAAA,IAC9C,SAAS;AAAA,MACP;AAAA,QACE,OAAO,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAI,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB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J;"}
@@ -1,3 +1,4 @@
1
+ /** @internal */
1
2
  export declare const payScheduleStateMachine: {
2
3
  listSchedules: import('robot3').MachineState<any>;
3
4
  addSchedule: import('robot3').MachineState<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"payScheduleStateMachine.js","sources":["../../../../src/components/Company/PaySchedule/payScheduleStateMachine.ts"],"sourcesContent":["import { reduce, state, state as final, transition } from 'robot3'\nimport type { ComponentType } from 'react'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.PAY_SCHEDULE_UPDATE]: { uuid: string }\n [componentEvents.PAY_SCHEDULE_CREATED]: undefined\n [componentEvents.PAY_SCHEDULE_UPDATED]: undefined\n}\n\nconst toList = reduce(\n (ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleListContextual as ComponentType,\n payScheduleId: undefined,\n }),\n)\n\nexport const payScheduleStateMachine = {\n listSchedules: state<MachineTransition>(\n transition(\n componentEvents.PAY_SCHEDULE_CREATE,\n 'addSchedule',\n reduce(\n (ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.PAY_SCHEDULE_UPDATE,\n 'editSchedule',\n reduce(\n (\n ctx: PayScheduleContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.PAY_SCHEDULE_UPDATE>,\n ): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: ev.payload.uuid,\n }),\n ),\n ),\n transition(componentEvents.PAY_SCHEDULE_DONE, 'done'),\n ),\n addSchedule: state<MachineTransition>(\n transition(componentEvents.PAY_SCHEDULE_CREATED, 'listSchedules', toList),\n transition(componentEvents.CANCEL, 'listSchedules', toList),\n ),\n editSchedule: state<MachineTransition>(\n transition(componentEvents.PAY_SCHEDULE_UPDATED, 'listSchedules', toList),\n transition(componentEvents.CANCEL, 'listSchedules', toList),\n ),\n done: final(),\n}\n"],"names":["toList","reduce","ctx","PayScheduleListContextual","payScheduleStateMachine","state","transition","componentEvents","PayScheduleFormContextual","ev","final"],"mappings":";;;AAaA,MAAMA,IAASC;AAAA,EACb,CAACC,OAAmE;AAAA,IAClE,GAAGA;AAAA,IACH,WAAWC;AAAA,IACX,eAAe;AAAA,EAAA;AAEnB,GAEaC,IAA0B;AAAA,EACrC,eAAeC;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN;AAAA,QACE,CAACC,OAAmE;AAAA,UAClE,GAAGA;AAAA,UACH,WAAWM;AAAA,UACX,eAAe;AAAA,QAAA;AAAA,MACjB;AAAA,IACF;AAAA,IAEFF;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN;AAAA,QACE,CACEC,GACAO,OACiC;AAAA,UACjC,GAAGP;AAAA,UACH,WAAWM;AAAA,UACX,eAAeC,EAAG,QAAQ;AAAA,QAAA;AAAA,MAC5B;AAAA,IACF;AAAA,IAEFH,EAAWC,EAAgB,mBAAmB,MAAM;AAAA,EAAA;AAAA,EAEtD,aAAaF;AAAA,IACXC,EAAWC,EAAgB,sBAAsB,iBAAiBP,CAAM;AAAA,IACxEM,EAAWC,EAAgB,QAAQ,iBAAiBP,CAAM;AAAA,EAAA;AAAA,EAE5D,cAAcK;AAAA,IACZC,EAAWC,EAAgB,sBAAsB,iBAAiBP,CAAM;AAAA,IACxEM,EAAWC,EAAgB,QAAQ,iBAAiBP,CAAM;AAAA,EAAA;AAAA,EAE5D,MAAMU,EAAA;AACR;"}
1
+ {"version":3,"file":"payScheduleStateMachine.js","sources":["../../../../src/components/Company/PaySchedule/payScheduleStateMachine.ts"],"sourcesContent":["import { reduce, state, state as final, transition } from 'robot3'\nimport type { ComponentType } from 'react'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\ntype EventPayloads = {\n [componentEvents.PAY_SCHEDULE_UPDATE]: { uuid: string }\n [componentEvents.PAY_SCHEDULE_CREATED]: undefined\n [componentEvents.PAY_SCHEDULE_UPDATED]: undefined\n}\n\nconst toList = reduce(\n (ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleListContextual as ComponentType,\n payScheduleId: undefined,\n }),\n)\n\n/** @internal */\nexport const payScheduleStateMachine = {\n listSchedules: state<MachineTransition>(\n transition(\n componentEvents.PAY_SCHEDULE_CREATE,\n 'addSchedule',\n reduce(\n (ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: undefined,\n }),\n ),\n ),\n transition(\n componentEvents.PAY_SCHEDULE_UPDATE,\n 'editSchedule',\n reduce(\n (\n ctx: PayScheduleContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.PAY_SCHEDULE_UPDATE>,\n ): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: ev.payload.uuid,\n }),\n ),\n ),\n transition(componentEvents.PAY_SCHEDULE_DONE, 'done'),\n ),\n addSchedule: state<MachineTransition>(\n transition(componentEvents.PAY_SCHEDULE_CREATED, 'listSchedules', toList),\n transition(componentEvents.CANCEL, 'listSchedules', toList),\n ),\n editSchedule: state<MachineTransition>(\n transition(componentEvents.PAY_SCHEDULE_UPDATED, 'listSchedules', toList),\n transition(componentEvents.CANCEL, 'listSchedules', toList),\n ),\n done: final(),\n}\n"],"names":["toList","reduce","ctx","PayScheduleListContextual","payScheduleStateMachine","state","transition","componentEvents","PayScheduleFormContextual","ev","final"],"mappings":";;;AAaA,MAAMA,IAASC;AAAA,EACb,CAACC,OAAmE;AAAA,IAClE,GAAGA;AAAA,IACH,WAAWC;AAAA,IACX,eAAe;AAAA,EAAA;AAEnB,GAGaC,IAA0B;AAAA,EACrC,eAAeC;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN;AAAA,QACE,CAACC,OAAmE;AAAA,UAClE,GAAGA;AAAA,UACH,WAAWM;AAAA,UACX,eAAe;AAAA,QAAA;AAAA,MACjB;AAAA,IACF;AAAA,IAEFF;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN;AAAA,QACE,CACEC,GACAO,OACiC;AAAA,UACjC,GAAGP;AAAA,UACH,WAAWM;AAAA,UACX,eAAeC,EAAG,QAAQ;AAAA,QAAA;AAAA,MAC5B;AAAA,IACF;AAAA,IAEFH,EAAWC,EAAgB,mBAAmB,MAAM;AAAA,EAAA;AAAA,EAEtD,aAAaF;AAAA,IACXC,EAAWC,EAAgB,sBAAsB,iBAAiBP,CAAM;AAAA,IACxEM,EAAWC,EAAgB,QAAQ,iBAAiBP,CAAM;AAAA,EAAA;AAAA,EAE5D,cAAcK;AAAA,IACZC,EAAWC,EAAgB,sBAAsB,iBAAiBP,CAAM;AAAA,IACxEM,EAAWC,EAAgB,QAAQ,iBAAiBP,CAAM;AAAA,EAAA;AAAA,EAE5D,MAAMU,EAAA;AACR;"}
@@ -5,19 +5,155 @@ import { RadioGroupHookFieldProps } from '../../../../../partner-hook-utils/form
5
5
  import { DatePickerHookFieldProps } from '../../../../../partner-hook-utils/form/fields/DatePickerHookField';
6
6
  import { NumberInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/NumberInputHookField';
7
7
  import { HookFieldProps } from '../../../../../partner-hook-utils/types';
8
+ /**
9
+ * The required-field error code produced by {@link usePayScheduleForm} fields that only emit `REQUIRED`.
10
+ *
11
+ * @remarks
12
+ * Used as the `validationMessages` key for the custom name, frequency, anchor
13
+ * pay date, and anchor end-of-pay-period fields. See {@link PayScheduleErrorCodes}.
14
+ *
15
+ * @public
16
+ */
8
17
  export type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED;
18
+ /**
19
+ * Validation error codes emitted by the `day1` and `day2` fields of {@link usePayScheduleForm}.
20
+ *
21
+ * @remarks
22
+ * Use these as keys in `validationMessages` on `Fields.Day1` and `Fields.Day2`.
23
+ * See {@link PayScheduleErrorCodes}.
24
+ *
25
+ * @public
26
+ */
9
27
  export type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE'];
28
+ /**
29
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.CustomName` component.
30
+ *
31
+ * @public
32
+ */
10
33
  export type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
34
+ /**
35
+ * Text input bound to the `customName` field of {@link usePayScheduleForm}.
36
+ *
37
+ * @remarks
38
+ * Available on the hook result as `form.Fields.CustomName`. Always required.
39
+ *
40
+ * @param props - {@link CustomNameFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
41
+ * @returns The rendered text input bound to `customName`.
42
+ * @public
43
+ */
11
44
  export declare function CustomNameField(props: CustomNameFieldProps): import("react").JSX.Element;
45
+ /**
46
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.Frequency` component.
47
+ *
48
+ * @public
49
+ */
12
50
  export type FrequencyFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, PayScheduleFrequency>>;
51
+ /**
52
+ * Select dropdown bound to the `frequency` field of {@link usePayScheduleForm}.
53
+ *
54
+ * @remarks
55
+ * Available on the hook result as `form.Fields.Frequency`. Always required.
56
+ * Options are `'Every week'`, `'Every other week'`, `'Twice per month'`, and
57
+ * `'Monthly'`. Pass `getOptionLabel` to customize how options are displayed.
58
+ *
59
+ * @param props - {@link FrequencyFieldProps} — accepts the standard hook field props plus `getOptionLabel`.
60
+ * @returns The rendered select bound to `frequency`.
61
+ * @public
62
+ */
13
63
  export declare function FrequencyField(props: FrequencyFieldProps): import("react").JSX.Element;
64
+ /**
65
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.CustomTwicePerMonth` component.
66
+ *
67
+ * @public
68
+ */
14
69
  export type CustomTwicePerMonthFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>;
70
+ /**
71
+ * Radio group bound to the `customTwicePerMonth` field of {@link usePayScheduleForm}.
72
+ *
73
+ * @remarks
74
+ * Available on the hook result as `form.Fields.CustomTwicePerMonth`. Only present
75
+ * when the selected frequency is `'Twice per month'`; otherwise the entry on
76
+ * `Fields` is `undefined`. Options are `'1st15th'` (15th and last day of the
77
+ * month) and `'custom'` (manual day entry via `Day1` and `Day2`).
78
+ *
79
+ * @param props - {@link CustomTwicePerMonthFieldProps} — accepts the standard hook field props.
80
+ * @returns The rendered radio group bound to `customTwicePerMonth`.
81
+ * @public
82
+ */
15
83
  export declare function CustomTwicePerMonthField(props: CustomTwicePerMonthFieldProps): import("react").JSX.Element;
84
+ /**
85
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.AnchorPayDate` component.
86
+ *
87
+ * @public
88
+ */
16
89
  export type AnchorPayDateFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>;
90
+ /**
91
+ * Date picker bound to the `anchorPayDate` field of {@link usePayScheduleForm}.
92
+ *
93
+ * @remarks
94
+ * Available on the hook result as `form.Fields.AnchorPayDate`. Always required.
95
+ * Represents the date of the first paycheck under this schedule.
96
+ *
97
+ * @param props - {@link AnchorPayDateFieldProps} — accepts the standard hook field props.
98
+ * @returns The rendered date picker bound to `anchorPayDate`.
99
+ * @public
100
+ */
17
101
  export declare function AnchorPayDateField(props: AnchorPayDateFieldProps): import("react").JSX.Element;
102
+ /**
103
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.AnchorEndOfPayPeriod` component.
104
+ *
105
+ * @public
106
+ */
18
107
  export type AnchorEndOfPayPeriodFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>;
108
+ /**
109
+ * Date picker bound to the `anchorEndOfPayPeriod` field of {@link usePayScheduleForm}.
110
+ *
111
+ * @remarks
112
+ * Available on the hook result as `form.Fields.AnchorEndOfPayPeriod`. Always
113
+ * required. Represents the end date of the first pay period and is used to
114
+ * calculate future pay periods. May be the same date as the first pay date.
115
+ *
116
+ * @param props - {@link AnchorEndOfPayPeriodFieldProps} — accepts the standard hook field props.
117
+ * @returns The rendered date picker bound to `anchorEndOfPayPeriod`.
118
+ * @public
119
+ */
19
120
  export declare function AnchorEndOfPayPeriodField(props: AnchorEndOfPayPeriodFieldProps): import("react").JSX.Element;
121
+ /**
122
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.Day1` component.
123
+ *
124
+ * @public
125
+ */
20
126
  export type Day1FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>;
127
+ /**
128
+ * Number input bound to the `day1` field of {@link usePayScheduleForm}.
129
+ *
130
+ * @remarks
131
+ * Available on the hook result as `form.Fields.Day1`. Only present when the
132
+ * frequency is `'Monthly'`, or when the frequency is `'Twice per month'` and
133
+ * `customTwicePerMonth` is `'custom'`; otherwise the entry on `Fields` is
134
+ * `undefined`. Accepts integers in the range 1–31.
135
+ *
136
+ * @param props - {@link Day1FieldProps} — accepts the standard hook field props.
137
+ * @returns The rendered number input bound to `day1`.
138
+ * @public
139
+ */
21
140
  export declare function Day1Field(props: Day1FieldProps): import("react").JSX.Element;
141
+ /**
142
+ * Props accepted by {@link usePayScheduleForm}'s `Fields.Day2` component.
143
+ *
144
+ * @public
145
+ */
22
146
  export type Day2FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>;
147
+ /**
148
+ * Number input bound to the `day2` field of {@link usePayScheduleForm}.
149
+ *
150
+ * @remarks
151
+ * Available on the hook result as `form.Fields.Day2`. Only present when the
152
+ * frequency is `'Twice per month'` and `customTwicePerMonth` is `'custom'`;
153
+ * otherwise the entry on `Fields` is `undefined`. Accepts integers in the range 1–31.
154
+ *
155
+ * @param props - {@link Day2FieldProps} — accepts the standard hook field props.
156
+ * @returns The rendered number input bound to `day2`.
157
+ * @public
158
+ */
23
159
  export declare function Day2Field(props: Day2FieldProps): import("react").JSX.Element;