@gusto/embedded-react-sdk 0.48.2 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (839) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +8 -8
  3. package/dist/components/Base/Base.d.ts +11 -3
  4. package/dist/components/Base/Base.js.map +1 -1
  5. package/dist/components/Base/index.d.ts +1 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +21 -21
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +16 -15
  9. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  10. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +1 -0
  11. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  12. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
  13. package/dist/components/Common/PaginationControl/PaginationControl.js +9 -8
  14. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  15. package/dist/components/Common/TaxInputs/TaxInputs.js +104 -102
  16. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  17. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  18. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  19. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  20. package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
  21. package/dist/components/Common/UI/NumberInput/NumberInput.d.ts +1 -1
  22. package/dist/components/Common/UI/NumberInput/NumberInput.js +87 -80
  23. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  24. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +4 -0
  25. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  26. package/dist/components/Common/UI/Select/Select.js +28 -28
  27. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  28. package/dist/components/Common/UI/Select/SelectTypes.d.ts +3 -2
  29. package/dist/components/Common/UI/Tabs/Tabs.js +9 -8
  30. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +34 -2
  32. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.d.ts +1 -0
  34. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.d.ts +1 -0
  36. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +25 -4
  38. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -0
  40. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +1 -0
  42. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +2 -2
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +10 -1
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/Head.d.ts +1 -0
  48. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.d.ts +1 -0
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +27 -4
  52. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +3 -0
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +2 -2
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +6 -0
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
  58. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/SignatoryForm.d.ts +1 -0
  60. package/dist/components/Company/AssignSignatory/SignatoryForm.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/TitleSelect.d.ts +1 -1
  62. package/dist/components/Company/AssignSignatory/TitleSelect.js +9 -8
  63. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  64. package/dist/components/Company/AssignSignatory/index.d.ts +2 -5
  65. package/dist/components/Company/AssignSignatory/useAssignSignatory.d.ts +9 -0
  66. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
  67. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccount.d.ts +27 -0
  69. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  70. package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +8 -0
  71. package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
  72. package/dist/components/Company/BankAccount/BankAccountForm/Actions.d.ts +1 -0
  73. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +4 -3
  75. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +3 -0
  77. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  78. package/dist/components/Company/BankAccount/BankAccountForm/Head.d.ts +1 -0
  79. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  80. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
  81. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  82. package/dist/components/Company/BankAccount/BankAccountList/AccountView.d.ts +1 -0
  83. package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
  84. package/dist/components/Company/BankAccount/BankAccountList/Actions.d.ts +1 -0
  85. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  86. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +4 -3
  87. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  88. package/dist/components/Company/BankAccount/BankAccountList/Head.d.ts +1 -0
  89. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  90. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.d.ts +1 -0
  91. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  92. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +4 -3
  93. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  94. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +3 -0
  95. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  96. package/dist/components/Company/BankAccount/BankAccountVerify/Head.d.ts +1 -0
  97. package/dist/components/Company/BankAccount/BankAccountVerify/Head.js.map +1 -1
  98. package/dist/components/Company/BankAccount/stateMachine.d.ts +1 -0
  99. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  100. package/dist/components/Company/DocumentSigner/DocumentList/Actions.d.ts +1 -0
  101. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  102. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +34 -2
  103. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  104. package/dist/components/Company/DocumentSigner/DocumentList/Head.d.ts +1 -0
  105. package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -1
  106. package/dist/components/Company/DocumentSigner/DocumentList/List.d.ts +1 -0
  107. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
  108. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.d.ts +1 -0
  109. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
  110. package/dist/components/Company/DocumentSigner/DocumentList/index.d.ts +1 -1
  111. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  112. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  113. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +38 -0
  114. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  115. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +32 -2
  116. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  117. package/dist/components/Company/DocumentSigner/assignSignatoryState.d.ts +1 -0
  118. package/dist/components/Company/DocumentSigner/assignSignatoryState.js +4 -6
  119. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
  120. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +4 -0
  121. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  122. package/dist/components/Company/DocumentSigner/index.d.ts +1 -1
  123. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +41 -0
  124. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -1
  125. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +40 -10
  126. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -1
  127. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +111 -0
  128. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
  129. package/dist/components/Company/DocumentSigner/stateMachine.d.ts +1 -0
  130. package/dist/components/Company/DocumentSigner/stateMachine.js +12 -18
  131. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  132. package/dist/components/Company/DocumentSigner/useDocumentSigner.d.ts +1 -0
  133. package/dist/components/Company/FederalTaxes/Actions.d.ts +1 -0
  134. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  135. package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +26 -4
  136. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  137. package/dist/components/Company/FederalTaxes/Form.d.ts +1 -0
  138. package/dist/components/Company/FederalTaxes/Form.js +23 -21
  139. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  140. package/dist/components/Company/FederalTaxes/Head.d.ts +1 -0
  141. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  142. package/dist/components/Company/FederalTaxes/index.d.ts +2 -0
  143. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +12 -5
  144. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
  145. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  146. package/dist/components/Company/Industry/Actions.d.ts +1 -0
  147. package/dist/components/Company/Industry/Actions.js.map +1 -1
  148. package/dist/components/Company/Industry/Context.js +6 -8
  149. package/dist/components/Company/Industry/Context.js.map +1 -1
  150. package/dist/components/Company/Industry/Edit.d.ts +3 -0
  151. package/dist/components/Company/Industry/Edit.js.map +1 -1
  152. package/dist/components/Company/Industry/Head.d.ts +1 -0
  153. package/dist/components/Company/Industry/Head.js.map +1 -1
  154. package/dist/components/Company/Industry/Industry.d.ts +23 -4
  155. package/dist/components/Company/Industry/Industry.js.map +1 -1
  156. package/dist/components/Company/Industry/IndustrySelect.d.ts +1 -0
  157. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  158. package/dist/components/Company/Industry/index.d.ts +1 -1
  159. package/dist/components/Company/Locations/LocationForm/Actions.d.ts +1 -0
  160. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  161. package/dist/components/Company/Locations/LocationForm/Form.d.ts +3 -0
  162. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  163. package/dist/components/Company/Locations/LocationForm/Head.d.ts +1 -0
  164. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  165. package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +27 -4
  166. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  167. package/dist/components/Company/Locations/LocationForm/index.d.ts +1 -0
  168. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
  169. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  170. package/dist/components/Company/Locations/Locations.d.ts +27 -0
  171. package/dist/components/Company/Locations/Locations.js.map +1 -1
  172. package/dist/components/Company/Locations/LocationsList/Actions.d.ts +1 -0
  173. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  174. package/dist/components/Company/Locations/LocationsList/Head.d.ts +1 -0
  175. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  176. package/dist/components/Company/Locations/LocationsList/List.d.ts +1 -1
  177. package/dist/components/Company/Locations/LocationsList/List.js +20 -20
  178. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  179. package/dist/components/Company/Locations/LocationsList/List.module.scss.js +1 -1
  180. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +24 -2
  181. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  182. package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -1
  183. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
  184. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  185. package/dist/components/Company/Locations/locationsStateMachine.d.ts +4 -0
  186. package/dist/components/Company/Locations/locationsStateMachine.js.map +1 -1
  187. package/dist/components/Company/Locations/stateMachine.d.ts +1 -1
  188. package/dist/components/Company/Locations/stateMachine.js +4 -7
  189. package/dist/components/Company/Locations/stateMachine.js.map +1 -1
  190. package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +62 -0
  191. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  192. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +30 -1
  193. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +30 -23
  194. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  195. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
  196. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  197. package/dist/components/Company/OnboardingOverview/Completed.d.ts +1 -0
  198. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  199. package/dist/components/Company/OnboardingOverview/MissingRequirements.d.ts +1 -0
  200. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  201. package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +28 -4
  202. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  203. package/dist/components/Company/OnboardingOverview/context.js +3 -5
  204. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  205. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +39 -5
  206. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  207. package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +3 -0
  208. package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -1
  209. package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +1 -0
  210. package/dist/components/Company/PaySchedule/PayScheduleForm.js +6 -4
  211. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  212. package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +1 -0
  213. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  214. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +1 -0
  215. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +10 -14
  216. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
  217. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +136 -0
  218. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
  219. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -1
  220. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +48 -26
  221. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
  222. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +134 -0
  223. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  224. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +26 -0
  225. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  226. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +6 -0
  227. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  228. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.d.ts +1 -0
  229. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  230. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -3
  231. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +30 -28
  232. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  233. package/dist/components/Company/StateTaxes/StateTaxesForm/Head.d.ts +1 -0
  234. package/dist/components/Company/StateTaxes/StateTaxesForm/Head.js.map +1 -1
  235. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +42 -4
  236. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +55 -54
  237. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  238. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +10 -0
  239. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js +11 -0
  240. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -0
  241. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.test.d.ts +1 -0
  242. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
  243. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  244. package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +1 -1
  245. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
  246. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +2 -3
  247. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -1
  248. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.d.ts +1 -0
  249. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  250. package/dist/components/Company/StateTaxes/StateTaxesList/Head.d.ts +1 -0
  251. package/dist/components/Company/StateTaxes/StateTaxesList/Head.js.map +1 -1
  252. package/dist/components/Company/StateTaxes/StateTaxesList/List.d.ts +1 -0
  253. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  254. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +23 -2
  255. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  256. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
  257. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  258. package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +1 -1
  259. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +1 -0
  260. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +5 -7
  261. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  262. package/dist/components/Company/exports/companyOnboarding.d.ts +18 -17
  263. package/dist/components/Company/exports/companyOnboarding.js +18 -16
  264. package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
  265. package/dist/components/Company/index.d.ts +1 -17
  266. package/dist/components/Contractor/Address/Address.d.ts +48 -7
  267. package/dist/components/Contractor/Address/Address.js +83 -64
  268. package/dist/components/Contractor/Address/Address.js.map +1 -1
  269. package/dist/components/Contractor/Address/Address.module.scss.js +8 -0
  270. package/dist/components/Contractor/Address/Address.module.scss.js.map +1 -0
  271. package/dist/components/Contractor/Address/index.d.ts +2 -1
  272. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +59 -0
  273. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js +32 -0
  274. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js.map +1 -0
  275. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +111 -0
  276. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js +26 -0
  277. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js.map +1 -0
  278. package/dist/components/Contractor/Address/shared/useContractorAddressForm/index.d.ts +6 -0
  279. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +112 -0
  280. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +133 -0
  281. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -0
  282. package/dist/components/Contractor/Address/types.d.ts +8 -0
  283. package/dist/components/Contractor/ContractorList/index.d.ts +25 -12
  284. package/dist/components/Contractor/ContractorList/index.js +1 -3
  285. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  286. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -5
  287. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  288. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.d.ts +29 -0
  289. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +71 -0
  290. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -0
  291. package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +3 -0
  292. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/index.d.ts +2 -0
  293. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +59 -0
  294. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +20 -0
  295. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -0
  296. package/dist/components/Contractor/Landing/Landing.d.ts +19 -0
  297. package/dist/components/Contractor/Landing/Landing.js +73 -0
  298. package/dist/components/Contractor/Landing/Landing.js.map +1 -0
  299. package/dist/components/Contractor/Landing/index.d.ts +2 -0
  300. package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +34 -9
  301. package/dist/components/Contractor/NewHireReport/NewHireReport.js +7 -7
  302. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  303. package/dist/components/Contractor/NewHireReport/types.d.ts +7 -0
  304. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +70 -0
  305. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  306. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +30 -4
  307. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  308. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +1 -0
  309. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  310. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.d.ts +23 -0
  311. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +36 -0
  312. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -0
  313. package/dist/components/Contractor/OnboardingSummary/index.d.ts +2 -0
  314. package/dist/components/Contractor/PaymentMethod/BankAccountForm.d.ts +1 -0
  315. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  316. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +33 -16
  317. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  318. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +1 -9
  319. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +11 -15
  320. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  321. package/dist/components/Contractor/PaymentMethod/types.d.ts +7 -0
  322. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +50 -3
  323. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +1 -2
  324. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  325. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -0
  326. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +59 -53
  327. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  328. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +4 -18
  329. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +0 -1
  330. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -1
  331. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +1 -0
  332. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +70 -91
  333. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  334. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +1 -0
  335. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  336. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -0
  337. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
  338. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +1 -0
  339. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +62 -56
  340. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  341. package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -0
  342. package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
  343. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +49 -0
  344. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
  345. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +14 -1
  346. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  347. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +2 -0
  348. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  349. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +37 -3
  350. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -2
  351. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  352. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +1 -0
  353. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +54 -51
  354. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  355. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +15 -3
  356. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +1 -2
  357. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  358. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +1 -0
  359. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +20 -22
  360. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  361. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +33 -2
  362. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  363. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +1 -0
  364. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +109 -102
  365. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  366. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +1 -2
  367. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +28 -3
  368. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +1 -2
  369. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  370. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -0
  371. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +86 -65
  372. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  373. package/dist/components/Contractor/Payments/types.d.ts +8 -4
  374. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.d.ts +8 -0
  375. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +79 -0
  376. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -0
  377. package/dist/components/Contractor/Profile/ContractorProfile.d.ts +74 -8
  378. package/dist/components/Contractor/Profile/ContractorProfile.js +205 -35
  379. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  380. package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js +8 -0
  381. package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js.map +1 -0
  382. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.d.ts +8 -0
  383. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +96 -0
  384. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -0
  385. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.d.ts +22 -0
  386. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +40 -0
  387. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -0
  388. package/dist/components/Contractor/Profile/index.d.ts +1 -2
  389. package/dist/components/Contractor/Profile/shared/index.d.ts +2 -0
  390. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +125 -0
  391. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +73 -0
  392. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -0
  393. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.test.d.ts +1 -0
  394. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +312 -0
  395. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +87 -0
  396. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js.map +1 -0
  397. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/index.d.ts +6 -0
  398. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +151 -0
  399. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +188 -0
  400. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -0
  401. package/dist/components/Contractor/Submit/Submit.d.ts +24 -4
  402. package/dist/components/Contractor/Submit/Submit.js +1 -2
  403. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  404. package/dist/components/Contractor/Submit/SubmitDone.d.ts +1 -0
  405. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  406. package/dist/components/Contractor/exports/contractorManagement.d.ts +6 -6
  407. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +12 -4
  408. package/dist/components/Contractor/exports/contractorOnboarding.js +14 -8
  409. package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -1
  410. package/dist/components/Employee/Compensation/management/Compensation.d.ts +4 -7
  411. package/dist/components/Employee/Compensation/management/Compensation.js +1 -5
  412. package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
  413. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -0
  414. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
  415. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -0
  416. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
  417. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -0
  418. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
  419. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -0
  420. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  421. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +13 -10
  422. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  423. package/dist/components/Employee/Compensation/management/compensationStateMachine.js +23 -31
  424. package/dist/components/Employee/Compensation/management/compensationStateMachine.js.map +1 -1
  425. package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +1 -0
  426. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  427. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +1 -0
  428. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  429. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +3 -3
  430. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
  431. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js +20 -28
  432. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -1
  433. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +13 -10
  434. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  435. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +29 -61
  436. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  437. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +19 -23
  438. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +5 -0
  439. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  440. package/dist/components/Employee/Dashboard/Dashboard.d.ts +29 -4
  441. package/dist/components/Employee/Dashboard/Dashboard.js +1 -4
  442. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  443. package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +20 -14
  444. package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
  445. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +78 -108
  446. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  447. package/dist/components/Employee/Deductions/management/Deductions.d.ts +4 -7
  448. package/dist/components/Employee/Deductions/management/Deductions.js +1 -5
  449. package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
  450. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.d.ts +1 -0
  451. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
  452. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts +4 -3
  453. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +1 -4
  454. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
  455. package/dist/components/Employee/Deductions/management/deductionsStateMachine.js +17 -23
  456. package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
  457. package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +2 -3
  458. package/dist/components/Employee/Deductions/onboarding/Deductions.js +21 -26
  459. package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
  460. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js +55 -50
  461. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
  462. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +0 -4
  463. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js +33 -43
  464. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
  465. package/dist/components/Employee/Deductions/onboarding/stateMachine.d.ts +0 -1
  466. package/dist/components/Employee/Deductions/onboarding/stateMachine.js +51 -85
  467. package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
  468. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +40 -37
  469. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  470. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +64 -61
  471. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
  472. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +1 -18
  473. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  474. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -25
  475. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  476. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +19 -4
  477. package/dist/components/Employee/Documents/management/DocumentManager.js +4 -1
  478. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  479. package/dist/components/Employee/Documents/management/Documents.d.ts +4 -7
  480. package/dist/components/Employee/Documents/management/Documents.js +1 -5
  481. package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
  482. package/dist/components/Employee/Documents/management/documentsStateMachine.js +5 -7
  483. package/dist/components/Employee/Documents/management/documentsStateMachine.js.map +1 -1
  484. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +2 -1
  485. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  486. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  487. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  488. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +8 -1
  489. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  490. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +1 -0
  491. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  492. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +3 -2
  493. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  494. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.d.ts +1 -4
  495. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  496. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -4
  497. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +3 -2
  498. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  499. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -48
  500. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +22 -14
  501. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  502. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.d.ts +5 -8
  503. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  504. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.d.ts +18 -3
  505. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +21 -18
  506. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
  507. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +2 -1
  508. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +47 -46
  509. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  510. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  511. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +8 -2
  512. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
  513. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +1 -1
  514. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -1
  515. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +5 -7
  516. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -1
  517. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +4 -7
  518. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +1 -5
  519. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
  520. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +4 -5
  521. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +1 -4
  522. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  523. package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js +14 -20
  524. package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js.map +1 -1
  525. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +4 -3
  526. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +1 -4
  527. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  528. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  529. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +3 -20
  530. package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +7 -11
  531. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +1 -5
  532. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  533. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.d.ts +1 -0
  534. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
  535. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.d.ts +7 -9
  536. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +1 -4
  537. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
  538. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +2 -0
  539. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  540. package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js +8 -12
  541. package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js.map +1 -1
  542. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  543. package/dist/components/Employee/Landing/Landing.d.ts +10 -4
  544. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  545. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +19 -5
  546. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
  547. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -0
  548. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
  549. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
  550. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +32 -12
  551. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +19 -17
  552. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  553. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +23 -16
  554. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  555. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +11 -15
  556. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  557. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +10 -4
  558. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  559. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +3 -7
  560. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +1 -5
  561. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
  562. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.d.ts +1 -0
  563. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
  564. package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.d.ts +1 -0
  565. package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.js.map +1 -1
  566. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -1
  567. package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.d.ts +1 -0
  568. package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.js.map +1 -1
  569. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +15 -21
  570. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -1
  571. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +4 -7
  572. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +1 -5
  573. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
  574. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +24 -36
  575. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -1
  576. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +3 -15
  577. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +3 -12
  578. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
  579. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +2 -11
  580. package/dist/components/Employee/Profile/management/Profile.d.ts +5 -8
  581. package/dist/components/Employee/Profile/management/Profile.js +1 -5
  582. package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
  583. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.d.ts +1 -0
  584. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
  585. package/dist/components/Employee/Profile/management/ProfileEditForm.d.ts +5 -6
  586. package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -4
  587. package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
  588. package/dist/components/Employee/Profile/management/profileStateMachine.js +14 -20
  589. package/dist/components/Employee/Profile/management/profileStateMachine.js.map +1 -1
  590. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +55 -54
  591. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  592. package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js +3 -5
  593. package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js.map +1 -1
  594. package/dist/components/Employee/Profile/onboarding/Profile.d.ts +11 -12
  595. package/dist/components/Employee/Profile/onboarding/Profile.js +1 -5
  596. package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
  597. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +3 -22
  598. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
  599. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +3 -17
  600. package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.d.ts +3 -10
  601. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
  602. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  603. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +19 -5
  604. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  605. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +12 -18
  606. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
  607. package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +4 -9
  608. package/dist/components/Employee/StateTaxes/management/StateTaxes.js +1 -5
  609. package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
  610. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.d.ts +1 -0
  611. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  612. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.d.ts +5 -8
  613. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +1 -4
  614. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
  615. package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js +14 -20
  616. package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js.map +1 -1
  617. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +5 -8
  618. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +1 -4
  619. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
  620. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +29 -29
  621. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -1
  622. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +1 -1
  623. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  624. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -0
  625. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  626. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +16 -5
  627. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
  628. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -1
  629. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  630. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +5 -7
  631. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
  632. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -0
  633. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
  634. package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +7 -11
  635. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +1 -5
  636. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  637. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.d.ts +1 -0
  638. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
  639. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.d.ts +7 -9
  640. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +1 -4
  641. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
  642. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +97 -95
  643. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  644. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  645. package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js +8 -12
  646. package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js.map +1 -1
  647. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
  648. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  649. package/dist/components/Flow/Flow.js +1 -1
  650. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +1 -0
  651. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  652. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +1 -0
  653. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  654. package/dist/components/InformationRequests/InformationRequests.d.ts +26 -1
  655. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  656. package/dist/components/InformationRequests/informationRequestsStateMachine.js +10 -14
  657. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
  658. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +3 -4
  659. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +2 -11
  660. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  661. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +0 -1
  662. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +1 -0
  663. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  664. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +11 -17
  665. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
  666. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +1 -3
  667. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +25 -1
  668. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  669. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +1 -0
  670. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  671. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +18 -4
  672. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  673. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +1 -1
  674. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  675. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -0
  676. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  677. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +1 -0
  678. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  679. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +21 -20
  680. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  681. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -1
  682. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  683. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +2 -2
  684. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  685. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -18
  686. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +28 -3
  687. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  688. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -46
  689. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  690. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +25 -24
  691. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  692. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +13 -3
  693. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  694. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +2 -2
  695. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  696. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +34 -44
  697. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  698. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +1 -0
  699. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  700. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +12 -2
  701. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  702. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +8 -10
  703. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  704. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +2 -1
  705. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  706. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -0
  707. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +149 -136
  708. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  709. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
  710. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +167 -167
  711. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  712. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +42 -39
  713. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  714. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +2 -1
  715. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +5 -9
  716. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  717. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +0 -1
  718. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  719. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +0 -1
  720. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  721. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +10 -14
  722. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
  723. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +27 -1
  724. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  725. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +1 -1
  726. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  727. package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
  728. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  729. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +2 -2
  730. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  731. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +2 -1
  732. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  733. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +1 -1
  734. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  735. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +2 -2
  736. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  737. package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +1 -1
  738. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  739. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +2 -1
  740. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  741. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +1 -0
  742. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  743. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +28 -1
  744. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
  745. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  746. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  747. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -2
  748. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +128 -174
  749. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  750. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
  751. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  752. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +9 -7
  753. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  754. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +2 -1
  755. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  756. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +2 -1
  757. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -1
  758. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +2 -2
  759. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -1
  760. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +2 -2
  761. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -1
  762. package/dist/components/index.d.ts +9 -0
  763. package/dist/contexts/ThemeProvider/types.d.ts +19 -0
  764. package/dist/i18n/I18n.js +5 -2
  765. package/dist/i18n/I18n.js.map +1 -1
  766. package/dist/i18n/en/Company.AssignSignatory.json.js +1 -1
  767. package/dist/i18n/en/Company.FederalTaxes.json.js +27 -23
  768. package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
  769. package/dist/i18n/en/Company.PaySchedule.json.js +1 -1
  770. package/dist/i18n/en/Contractor.Address.json.js +13 -13
  771. package/dist/i18n/en/Contractor.DocumentsList.json.js +28 -0
  772. package/dist/i18n/en/Contractor.DocumentsList.json.js.map +1 -0
  773. package/dist/i18n/en/Contractor.Landing.json.js +18 -0
  774. package/dist/i18n/en/Contractor.Landing.json.js.map +1 -0
  775. package/dist/i18n/en/Contractor.NewHireReport.json.js +12 -10
  776. package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
  777. package/dist/i18n/en/Contractor.OnboardingSummary.json.js +12 -0
  778. package/dist/i18n/en/Contractor.OnboardingSummary.json.js.map +1 -0
  779. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +13 -13
  780. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +10 -6
  781. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -1
  782. package/dist/i18n/en/Contractor.Profile.json.js +8 -6
  783. package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
  784. package/dist/i18n/en/Employee.Compensation.json.js +56 -50
  785. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  786. package/dist/i18n/en/Employee.DeductionsForm.json.js +8 -8
  787. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +1 -1
  788. package/dist/i18n/en/Employee.Management.Compensation.json.js +48 -42
  789. package/dist/i18n/en/Employee.Management.Compensation.json.js.map +1 -1
  790. package/dist/i18n/en/Employee.Management.HomeAddress.json.js +1 -1
  791. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +1 -1
  792. package/dist/i18n/en/Payroll.PayrollOverview.json.js +40 -38
  793. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  794. package/dist/i18n/en/common.json.d.ts +1 -0
  795. package/dist/i18n/en/common.json.js +34 -32
  796. package/dist/i18n/en/common.json.js.map +1 -1
  797. package/dist/index.d.ts +19 -3
  798. package/dist/index.js +246 -204
  799. package/dist/index.js.map +1 -1
  800. package/dist/models/external.d.ts +293 -0
  801. package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js +3 -3
  802. package/dist/partner-hook-utils/form/buildFormSchema.d.ts +41 -5
  803. package/dist/partner-hook-utils/form/buildFormSchema.js +41 -40
  804. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  805. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  806. package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
  807. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  808. package/dist/shared/constants.d.ts +10 -5
  809. package/dist/shared/constants.js +9 -7
  810. package/dist/shared/constants.js.map +1 -1
  811. package/dist/style.css +1 -1
  812. package/dist/types/Helpers.d.ts +19 -2
  813. package/dist/types/i18next.d.ts +66 -5
  814. package/docs/{reference → appendix}/endpoint-inventory.json +38 -4
  815. package/package.json +25 -26
  816. package/dist/components/Contractor/Address/Actions.d.ts +0 -1
  817. package/dist/components/Contractor/Address/Actions.js +0 -13
  818. package/dist/components/Contractor/Address/Actions.js.map +0 -1
  819. package/dist/components/Contractor/Address/Form.d.ts +0 -1
  820. package/dist/components/Contractor/Address/Form.js +0 -51
  821. package/dist/components/Contractor/Address/Form.js.map +0 -1
  822. package/dist/components/Contractor/Address/Head.d.ts +0 -1
  823. package/dist/components/Contractor/Address/Head.js +0 -17
  824. package/dist/components/Contractor/Address/Head.js.map +0 -1
  825. package/dist/components/Contractor/Address/useAddress.d.ts +0 -21
  826. package/dist/components/Contractor/Address/useAddress.js +0 -32
  827. package/dist/components/Contractor/Address/useAddress.js.map +0 -1
  828. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +0 -7
  829. package/dist/components/Contractor/Profile/ContractorProfileForm.js +0 -143
  830. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +0 -1
  831. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +0 -191
  832. package/dist/components/Contractor/Profile/useContractorProfile.js +0 -235
  833. package/dist/components/Contractor/Profile/useContractorProfile.js.map +0 -1
  834. package/dist/components/Contractor/index.d.ts +0 -14
  835. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.d.ts +0 -8
  836. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.js +0 -44
  837. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.js.map +0 -1
  838. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.module.scss.js +0 -12
  839. package/dist/components/Employee/Deductions/onboarding/IncludeDeductions/IncludeDeductions.module.scss.js.map +0 -1
@@ -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 {};
@@ -6,9 +6,9 @@ import m from "./PayScheduleForm.module.scss.js";
6
6
  import { BaseBoundaries as R, BaseLayout as p } from "../../Base/Base.js";
7
7
  import "../../Base/useBase.js";
8
8
  import { SDKFormProvider as A } from "../../../partner-hook-utils/form/SDKFormProvider.js";
9
- import { Form as M } from "../../Common/Form/Form.js";
9
+ import { Form as q } from "../../Common/Form/Form.js";
10
10
  import { Flex as y } from "../../Common/Flex/Flex.js";
11
- import { Grid as q } from "../../Common/Grid/Grid.js";
11
+ import { Grid as M } from "../../Common/Grid/Grid.js";
12
12
  import { ActionsLayout as L } from "../../Common/ActionsLayout/ActionsLayout.js";
13
13
  import { useComponentContext as O } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
14
  import { useDateFormatter as x } from "../../../hooks/useDateFormatter.js";
@@ -35,11 +35,11 @@ function F({ onEvent: d, ...h }) {
35
35
  "1st15th": e("frequencyOptions.15thAndLast"),
36
36
  custom: e("frequencyOptions.custom")
37
37
  };
38
- return /* @__PURE__ */ a(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ a(A, { formHookResult: r, children: /* @__PURE__ */ a(M, { onSubmit: () => {
38
+ return /* @__PURE__ */ a(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ a(A, { formHookResult: r, children: /* @__PURE__ */ a(q, { onSubmit: () => {
39
39
  D();
40
40
  }, children: /* @__PURE__ */ s(y, { flexDirection: "column", children: [
41
41
  /* @__PURE__ */ a(y, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ a("header", { children: /* @__PURE__ */ a(n.Heading, { as: "h2", children: r.status.mode === "create" ? e("headings.addPaySchedule") : e("headings.editPaySchedule") }) }) }),
42
- /* @__PURE__ */ a("div", { className: m.payScheduleContainer, children: /* @__PURE__ */ s(q, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
42
+ /* @__PURE__ */ a("div", { className: m.payScheduleContainer, children: /* @__PURE__ */ s(M, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
43
43
  /* @__PURE__ */ a("div", { className: m.payScheduleForm, children: /* @__PURE__ */ s(y, { flexDirection: "column", children: [
44
44
  /* @__PURE__ */ a(
45
45
  i.CustomName,
@@ -52,6 +52,7 @@ function F({ onEvent: d, ...h }) {
52
52
  i.Frequency,
53
53
  {
54
54
  label: e("labels.frequency"),
55
+ placeholder: e("labels.frequencyPlaceholder"),
55
56
  getOptionLabel: (t) => b[t],
56
57
  validationMessages: { REQUIRED: e("validations.frequency") }
57
58
  }
@@ -109,6 +110,7 @@ function F({ onEvent: d, ...h }) {
109
110
  n.Select,
110
111
  {
111
112
  label: e("labels.preview"),
113
+ placeholder: "",
112
114
  isRequired: !0,
113
115
  options: l.map((t, c) => ({
114
116
  value: String(c),
@@ -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,IAAC,OAAOL,EAAY,cAAc,QAAQ;AAGxE,QAAMM,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMP,EAAY,QAAQ,SAAA;AACzC,IAAIO,KACFlB;AAAA,MACEkB,EAAO,SAAS,WACZC,EAAgB,uBAChBA,EAAgB;AAAA,MACpB,EAAE,aAAaD,EAAO,KAAA;AAAA,IAAK;AAAA,EAGjC,GAEM,EAAE,QAAAE,MAAWT,EAAY,MACzB,EAAE,kBAAAU,GAAkB,mBAAAC,EAAA,IAAsBX,EAAY,MACtDY,IAAmBZ,EAAY,KAAK,kBAEpCa,IAAwD;AAAA,IAC5D,cAAcnB,EAAE,uBAAuB;AAAA,IACvC,oBAAoBA,EAAE,4BAA4B;AAAA,IAClD,mBAAmBA,EAAE,2BAA2B;AAAA,IAChD,SAASA,EAAE,qBAAqB;AAAA,EAAA,GAG5BoB,IAA8C;AAAA,IAClD,WAAWpB,EAAE,8BAA8B;AAAA,IAC3C,QAAQA,EAAE,yBAAyB;AAAA,EAAA;AAGrC,SACE,gBAAAH,EAACc,KAAW,OAAOL,EAAY,cA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EAAW;AAAA,QAAX;AAAA,UACC,QAAO;AAAA,UACP,OAAOF,EAAE,sBAAsB,sBAAsB;AAAA,UAErD,UAAA,gBAAAH,EAACK,EAAW,MAAX,EACE,UAAAF;AAAA,YACC;AAAA,YACA;AAAA,UAAA,EACF,CACF;AAAA,QAAA;AAAA,MAAA,GAEJ,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,sBACCgC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAnC;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAP,EAAQmB,EAAgB,MAAM;AAAA,UAChC;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAjB,EAACK,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAY,OAAO,WAC5D,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 placeholder={t('labels.frequencyPlaceholder')}\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 placeholder=\"\"\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,6BAAQK,GAAA,EAAW,WAAS,IAAC,OAAOL,EAAY,cAAc,QAAQ;AAGxE,QAAMM,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMP,EAAY,QAAQ,SAAA;AACzC,IAAIO,KACFlB;AAAA,MACEkB,EAAO,SAAS,WACZC,EAAgB,uBAChBA,EAAgB;AAAA,MACpB,EAAE,aAAaD,EAAO,KAAA;AAAA,IAAK;AAAA,EAGjC,GAEM,EAAE,QAAAE,MAAWT,EAAY,MACzB,EAAE,kBAAAU,GAAkB,mBAAAC,EAAA,IAAsBX,EAAY,MACtDY,IAAmBZ,EAAY,KAAK,kBAEpCa,IAAwD;AAAA,IAC5D,cAAcnB,EAAE,uBAAuB;AAAA,IACvC,oBAAoBA,EAAE,4BAA4B;AAAA,IAClD,mBAAmBA,EAAE,2BAA2B;AAAA,IAChD,SAASA,EAAE,qBAAqB;AAAA,EAAA,GAG5BoB,IAA8C;AAAA,IAClD,WAAWpB,EAAE,8BAA8B;AAAA,IAC3C,QAAQA,EAAE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,UAzBKQ;AAAA,QAAA;AAAA,MA0BP,GACF,IAEA,gBAAAX,EAAC,OAAA,EAAI,WAAW4B,EAAM,mBACpB,UAAA,gBAAA5B;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,QAAO;AAAA,UACP,OAAOF,EAAE,sBAAsB,sBAAsB;AAAA,UAErD,UAAA,gBAAAH,EAACK,EAAW,MAAX,EACE,UAAAF;AAAA,YACC;AAAA,YACA;AAAA,UAAA,EACF,CACF;AAAA,QAAA;AAAA,MAAA,GAEJ,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,sBACCgC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAnC;AAAA,QAACK,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,YAAAP,EAAQmB,EAAgB,MAAM;AAAA,UAChC;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MAAA;AAAA,MAErB,gBAAAjB,EAACK,EAAW,QAAX,EAAkB,MAAK,UAAS,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,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AAX;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","sty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,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,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,24 +1,20 @@
1
1
  import { state as o, transition as e, reduce as l } from "robot3";
2
2
  import { PayScheduleFormContextual as S, PayScheduleListContextual as E } from "./PayScheduleComponents.js";
3
3
  import { componentEvents as d } from "../../../shared/constants.js";
4
- const c = l(
5
- (t) => ({
6
- ...t,
7
- component: E,
8
- payScheduleId: void 0
9
- })
10
- ), a = {
4
+ const c = l((t) => ({
5
+ ...t,
6
+ component: E,
7
+ payScheduleId: void 0
8
+ })), a = {
11
9
  listSchedules: o(
12
10
  e(
13
11
  d.PAY_SCHEDULE_CREATE,
14
12
  "addSchedule",
15
- l(
16
- (t) => ({
17
- ...t,
18
- component: S,
19
- payScheduleId: void 0
20
- })
21
- )
13
+ l((t) => ({
14
+ ...t,
15
+ component: S,
16
+ payScheduleId: void 0
17
+ }))
22
18
  ),
23
19
  e(
24
20
  d.PAY_SCHEDULE_UPDATE,
@@ -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((ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleListContextual as ComponentType,\n payScheduleId: undefined,\n}))\n\n/** @internal */\nexport const payScheduleStateMachine = {\n listSchedules: state<MachineTransition>(\n transition(\n componentEvents.PAY_SCHEDULE_CREATE,\n 'addSchedule',\n reduce((ctx: PayScheduleContextInterface): PayScheduleContextInterface => ({\n ...ctx,\n component: PayScheduleFormContextual as ComponentType,\n payScheduleId: undefined,\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,EAAO,CAACC,OAAmE;AAAA,EACxF,GAAGA;AAAA,EACH,WAAWC;AAAA,EACX,eAAe;AACjB,EAAE,GAGWC,IAA0B;AAAA,EACrC,eAAeC;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAN,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,WAAWM;AAAA,QACX,eAAe;AAAA,MAAA,EACf;AAAA,IAAA;AAAA,IAEJF;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;
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/fields.tsx"],"sourcesContent":["import type { PayScheduleErrorCodes, PayScheduleFrequency } from './payScheduleSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { RadioGroupHookFieldProps } from '@/partner-hook-utils/form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '@/partner-hook-utils/form/fields/DatePickerHookField'\nimport type { NumberInputHookFieldProps } from '@/partner-hook-utils/form/fields/NumberInputHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n RadioGroupHookField,\n DatePickerHookField,\n NumberInputHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\nexport type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED\nexport type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE']\n\nexport type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function CustomNameField(props: CustomNameFieldProps) {\n return <TextInputHookField {...props} name=\"customName\" />\n}\n\nexport type FrequencyFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PayScheduleFrequency>\n>\n\nexport function FrequencyField(props: FrequencyFieldProps) {\n return <SelectHookField {...props} name=\"frequency\" />\n}\n\nexport type CustomTwicePerMonthFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>\n\nexport function CustomTwicePerMonthField(props: CustomTwicePerMonthFieldProps) {\n return <RadioGroupHookField {...props} name=\"customTwicePerMonth\" />\n}\n\nexport type AnchorPayDateFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>\n\nexport function AnchorPayDateField(props: AnchorPayDateFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorPayDate\" />\n}\n\nexport type AnchorEndOfPayPeriodFieldProps = HookFieldProps<\n DatePickerHookFieldProps<RequiredValidation>\n>\n\nexport function AnchorEndOfPayPeriodField(props: AnchorEndOfPayPeriodFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorEndOfPayPeriod\" />\n}\n\nexport type Day1FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\nexport function Day1Field(props: Day1FieldProps) {\n return <NumberInputHookField {...props} name=\"day1\" min={1} max={31} />\n}\n\nexport type Day2FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\nexport function Day2Field(props: Day2FieldProps) {\n return <NumberInputHookField {...props} name=\"day2\" min={1} max={31} />\n}\n"],"names":["CustomNameField","props","jsx","TextInputHookField","FrequencyField","SelectHookField","CustomTwicePerMonthField","RadioGroupHookField","AnchorPayDateField","DatePickerHookField","AnchorEndOfPayPeriodField","Day1Field","NumberInputHookField","Day2Field"],"mappings":";;;;;;AAoBO,SAASA,EAAgBC,GAA6B;AAC3D,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,cAAa;AAC1D;AAMO,SAASG,EAAeH,GAA4B;AACzD,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,aAAY;AACtD;AAIO,SAASK,EAAyBL,GAAsC;AAC7E,SAAO,gBAAAC,EAACK,GAAA,EAAqB,GAAGN,GAAO,MAAK,uBAAsB;AACpE;AAIO,SAASO,EAAmBP,GAAgC;AACjE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,iBAAgB;AAC9D;AAMO,SAASS,EAA0BT,GAAuC;AAC/E,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,wBAAuB;AACrE;AAIO,SAASU,EAAUV,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;AAIO,SAASY,EAAUZ,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;"}
1
+ {"version":3,"file":"fields.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/fields.tsx"],"sourcesContent":["import type { PayScheduleErrorCodes, PayScheduleFrequency } from './payScheduleSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { RadioGroupHookFieldProps } from '@/partner-hook-utils/form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '@/partner-hook-utils/form/fields/DatePickerHookField'\nimport type { NumberInputHookFieldProps } from '@/partner-hook-utils/form/fields/NumberInputHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n RadioGroupHookField,\n DatePickerHookField,\n NumberInputHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\n\n/**\n * The required-field error code produced by {@link usePayScheduleForm} fields that only emit `REQUIRED`.\n *\n * @remarks\n * Used as the `validationMessages` key for the custom name, frequency, anchor\n * pay date, and anchor end-of-pay-period fields. See {@link PayScheduleErrorCodes}.\n *\n * @public\n */\nexport type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED\n\n/**\n * Validation error codes emitted by the `day1` and `day2` fields of {@link usePayScheduleForm}.\n *\n * @remarks\n * Use these as keys in `validationMessages` on `Fields.Day1` and `Fields.Day2`.\n * See {@link PayScheduleErrorCodes}.\n *\n * @public\n */\nexport type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE']\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.CustomName` component.\n *\n * @public\n */\nexport type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\n/**\n * Text input bound to the `customName` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.CustomName`. Always required.\n *\n * @param props - {@link CustomNameFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered text input bound to `customName`.\n * @public\n */\nexport function CustomNameField(props: CustomNameFieldProps) {\n return <TextInputHookField {...props} name=\"customName\" />\n}\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.Frequency` component.\n *\n * @public\n */\nexport type FrequencyFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PayScheduleFrequency>\n>\n\n/**\n * Select dropdown bound to the `frequency` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Frequency`. Always required.\n * Options are `'Every week'`, `'Every other week'`, `'Twice per month'`, and\n * `'Monthly'`. Pass `getOptionLabel` to customize how options are displayed.\n *\n * @param props - {@link FrequencyFieldProps} — accepts the standard hook field props plus `getOptionLabel`.\n * @returns The rendered select bound to `frequency`.\n * @public\n */\nexport function FrequencyField(props: FrequencyFieldProps) {\n return <SelectHookField {...props} name=\"frequency\" />\n}\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.CustomTwicePerMonth` component.\n *\n * @public\n */\nexport type CustomTwicePerMonthFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>\n\n/**\n * Radio group bound to the `customTwicePerMonth` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.CustomTwicePerMonth`. Only present\n * when the selected frequency is `'Twice per month'`; otherwise the entry on\n * `Fields` is `undefined`. Options are `'1st15th'` (15th and last day of the\n * month) and `'custom'` (manual day entry via `Day1` and `Day2`).\n *\n * @param props - {@link CustomTwicePerMonthFieldProps} — accepts the standard hook field props.\n * @returns The rendered radio group bound to `customTwicePerMonth`.\n * @public\n */\nexport function CustomTwicePerMonthField(props: CustomTwicePerMonthFieldProps) {\n return <RadioGroupHookField {...props} name=\"customTwicePerMonth\" />\n}\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.AnchorPayDate` component.\n *\n * @public\n */\nexport type AnchorPayDateFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>\n\n/**\n * Date picker bound to the `anchorPayDate` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.AnchorPayDate`. Always required.\n * Represents the date of the first paycheck under this schedule.\n *\n * @param props - {@link AnchorPayDateFieldProps} — accepts the standard hook field props.\n * @returns The rendered date picker bound to `anchorPayDate`.\n * @public\n */\nexport function AnchorPayDateField(props: AnchorPayDateFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorPayDate\" />\n}\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.AnchorEndOfPayPeriod` component.\n *\n * @public\n */\nexport type AnchorEndOfPayPeriodFieldProps = HookFieldProps<\n DatePickerHookFieldProps<RequiredValidation>\n>\n\n/**\n * Date picker bound to the `anchorEndOfPayPeriod` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.AnchorEndOfPayPeriod`. Always\n * required. Represents the end date of the first pay period and is used to\n * calculate future pay periods. May be the same date as the first pay date.\n *\n * @param props - {@link AnchorEndOfPayPeriodFieldProps} — accepts the standard hook field props.\n * @returns The rendered date picker bound to `anchorEndOfPayPeriod`.\n * @public\n */\nexport function AnchorEndOfPayPeriodField(props: AnchorEndOfPayPeriodFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorEndOfPayPeriod\" />\n}\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.Day1` component.\n *\n * @public\n */\nexport type Day1FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\n/**\n * Number input bound to the `day1` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Day1`. Only present when the\n * frequency is `'Monthly'`, or when the frequency is `'Twice per month'` and\n * `customTwicePerMonth` is `'custom'`; otherwise the entry on `Fields` is\n * `undefined`. Accepts integers in the range 1–31.\n *\n * @param props - {@link Day1FieldProps} — accepts the standard hook field props.\n * @returns The rendered number input bound to `day1`.\n * @public\n */\nexport function Day1Field(props: Day1FieldProps) {\n return <NumberInputHookField {...props} name=\"day1\" min={1} max={31} />\n}\n\n/**\n * Props accepted by {@link usePayScheduleForm}'s `Fields.Day2` component.\n *\n * @public\n */\nexport type Day2FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\n/**\n * Number input bound to the `day2` field of {@link usePayScheduleForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Day2`. Only present when the\n * frequency is `'Twice per month'` and `customTwicePerMonth` is `'custom'`;\n * otherwise the entry on `Fields` is `undefined`. Accepts integers in the range 1–31.\n *\n * @param props - {@link Day2FieldProps} — accepts the standard hook field props.\n * @returns The rendered number input bound to `day2`.\n * @public\n */\nexport function Day2Field(props: Day2FieldProps) {\n return <NumberInputHookField {...props} name=\"day2\" min={1} max={31} />\n}\n"],"names":["CustomNameField","props","jsx","TextInputHookField","FrequencyField","SelectHookField","CustomTwicePerMonthField","RadioGroupHookField","AnchorPayDateField","DatePickerHookField","AnchorEndOfPayPeriodField","Day1Field","NumberInputHookField","Day2Field"],"mappings":";;;;;;AAsDO,SAASA,EAAgBC,GAA6B;AAC3D,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,cAAa;AAC1D;AAuBO,SAASG,EAAeH,GAA4B;AACzD,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,aAAY;AACtD;AAsBO,SAASK,EAAyBL,GAAsC;AAC7E,SAAO,gBAAAC,EAACK,GAAA,EAAqB,GAAGN,GAAO,MAAK,uBAAsB;AACpE;AAoBO,SAASO,EAAmBP,GAAgC;AACjE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,iBAAgB;AAC9D;AAuBO,SAASS,EAA0BT,GAAuC;AAC/E,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,wBAAuB;AACrE;AAsBO,SAASU,EAAUV,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;AAqBO,SAASY,EAAUZ,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;"}
@@ -1,5 +1,6 @@
1
1
  import "./types/i18next.d.ts"
2
2
  export { usePayScheduleForm } from './usePayScheduleForm';
3
- export type { PayScheduleOptionalFieldsToRequire, UsePayScheduleFormProps, UsePayScheduleFormResult, UsePayScheduleFormReady, PayScheduleFieldsMetadata, PayScheduleFormFields, } from './usePayScheduleForm';
3
+ export type { PayScheduleOptionalFieldsToRequire, UsePayScheduleFormProps, UsePayScheduleFormResult, UsePayScheduleFormReady, PayScheduleFieldsMetadata, PayScheduleFormFields, PayScheduleFields, } from './usePayScheduleForm';
4
4
  export { createPayScheduleSchema, PayScheduleErrorCodes, type PayScheduleErrorCode, type PayScheduleFormData, type PayScheduleFormOutputs, type PayScheduleField, type PayScheduleFrequency, } from './payScheduleSchema';
5
5
  export type { RequiredValidation as PayScheduleRequiredValidation, DayValidation, CustomNameFieldProps, FrequencyFieldProps, CustomTwicePerMonthFieldProps, AnchorPayDateFieldProps, AnchorEndOfPayPeriodFieldProps, Day1FieldProps, Day2FieldProps, } from './fields';
6
+ export { CustomNameField, FrequencyField, CustomTwicePerMonthField, AnchorPayDateField, AnchorEndOfPayPeriodField, Day1Field, Day2Field, } from './fields';
@@ -1,43 +1,65 @@
1
1
  import { z } from 'zod';
2
2
  import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
3
+ /**
4
+ * Validation error codes emitted by {@link usePayScheduleForm} fields.
5
+ *
6
+ * @remarks
7
+ * Use these as `validationMessages` keys on the corresponding `Fields.*` components.
8
+ *
9
+ * @public
10
+ */
3
11
  export declare const PayScheduleErrorCodes: {
4
12
  readonly REQUIRED: "REQUIRED";
5
13
  readonly DAY_RANGE: "DAY_RANGE";
6
14
  };
15
+ /**
16
+ * Union of validation error code strings emitted by the pay schedule form.
17
+ *
18
+ * @public
19
+ */
7
20
  export type PayScheduleErrorCode = (typeof PayScheduleErrorCodes)[keyof typeof PayScheduleErrorCodes];
8
- declare const FREQUENCY_VALUES: readonly ["Every week", "Every other week", "Twice per month", "Monthly"];
9
- export type PayScheduleFrequency = (typeof FREQUENCY_VALUES)[number];
10
- declare const fieldValidators: {
11
- customName: z.ZodString;
12
- frequency: z.ZodEnum<{
13
- "Every week": "Every week";
14
- "Every other week": "Every other week";
15
- "Twice per month": "Twice per month";
16
- Monthly: "Monthly";
17
- }>;
18
- customTwicePerMonth: z.ZodString;
19
- anchorPayDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
20
- anchorEndOfPayPeriod: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
21
- day1: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
22
- day2: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
23
- };
24
- export type PayScheduleField = keyof typeof fieldValidators;
25
- export type PayScheduleFormData = {
26
- [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
27
- };
21
+ /**
22
+ * Pay schedule frequency values accepted by {@link usePayScheduleForm}.
23
+ *
24
+ * @public
25
+ */
26
+ export type PayScheduleFrequency = "Every week" | "Every other week" | "Twice per month" | "Monthly";
27
+ /**
28
+ * Union of field names managed by the pay schedule form.
29
+ *
30
+ * @public
31
+ */
32
+ export type PayScheduleField = "customName" | "frequency" | "customTwicePerMonth" | "anchorPayDate" | "anchorEndOfPayPeriod" | "day1" | "day2";
33
+ /**
34
+ * Shape of the values managed by the pay schedule form.
35
+ *
36
+ * @public
37
+ */
38
+ export type PayScheduleFormData = { customName: string; frequency: "Every week" | "Every other week" | "Twice per month" | "Monthly"; customTwicePerMonth: string; anchorPayDate: string | null; anchorEndOfPayPeriod: string | null; day1: number; day2: number; };
39
+ /**
40
+ * Shape of the validated values produced by the pay schedule form on submit.
41
+ *
42
+ * @public
43
+ */
28
44
  export type PayScheduleFormOutputs = PayScheduleFormData;
29
45
  declare function needsDay1(data: PayScheduleFormData): boolean;
30
46
  declare function needsDay2(data: PayScheduleFormData): boolean;
31
- declare const requiredFieldsConfig: {
32
- customTwicePerMonth: "never";
33
- day1: typeof needsDay1;
34
- day2: typeof needsDay2;
35
- };
36
- export type PayScheduleOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
47
+ /**
48
+ * Configuration for promoting optional pay schedule fields to required in a given mode.
49
+ *
50
+ * @remarks
51
+ * Only fields that are optional by default can be promoted. Currently
52
+ * `customTwicePerMonth` is the only configurable field.
53
+ *
54
+ * @public
55
+ */
56
+ export type PayScheduleOptionalFieldsToRequire = { create?: "customTwicePerMonth"[] | undefined; update?: "customTwicePerMonth"[] | undefined; };
57
+ /** @internal */
37
58
  interface PayScheduleSchemaOptions {
38
59
  mode?: 'create' | 'update';
39
60
  optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire;
40
61
  }
62
+ /** @internal */
41
63
  export declare function createPayScheduleSchema(options?: PayScheduleSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
42
64
  customName: z.ZodString;
43
65
  frequency: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"payScheduleSchema.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceNaN, coerceToISODate } from '@/partner-hook-utils/form/preprocessors'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const PayScheduleErrorCodes = {\n REQUIRED: 'REQUIRED',\n DAY_RANGE: 'DAY_RANGE',\n} as const\n\nexport type PayScheduleErrorCode =\n (typeof PayScheduleErrorCodes)[keyof typeof PayScheduleErrorCodes]\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst FREQUENCY_VALUES = ['Every week', 'Every other week', 'Twice per month', 'Monthly'] as const\nexport type PayScheduleFrequency = (typeof FREQUENCY_VALUES)[number]\n\nconst fieldValidators = {\n customName: z.string(),\n frequency: z.enum(FREQUENCY_VALUES),\n customTwicePerMonth: z.string(),\n anchorPayDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n anchorEndOfPayPeriod: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n day1: z.preprocess(coerceNaN(0), z.number()),\n day2: z.preprocess(coerceNaN(0), z.number()),\n}\n\nexport type PayScheduleField = keyof typeof fieldValidators\n\nexport type PayScheduleFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type PayScheduleFormOutputs = PayScheduleFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\nfunction needsDay1(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Monthly' || (freq === 'Twice per month' && custom === 'custom')\n}\n\nfunction needsDay2(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Twice per month' && custom === 'custom'\n}\n\nconst requiredFieldsConfig = {\n customTwicePerMonth: 'never',\n day1: needsDay1,\n day2: needsDay2,\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * coerceNaN(0) maps empty inputs to 0, which `isEmpty` does not catch\n * (it only recognizes undefined/null/blank-string). This superRefine\n * enforces the 1–31 range when the field is applicable, which also\n * rejects the 0 sentinel from empty inputs.\n */\nfunction validateDayRanges(data: PayScheduleFormData, ctx: z.RefinementCtx) {\n if (needsDay1(data) && (data.day1 < 1 || data.day1 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day1'],\n message: data.day1 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n if (needsDay2(data) && (data.day2 < 1 || data.day2 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day2'],\n message: data.day2 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n}\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\nexport type PayScheduleOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\ninterface PayScheduleSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire\n}\n\nexport function createPayScheduleSchema(options: PayScheduleSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: PayScheduleErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n superRefine: validateDayRanges,\n })\n}\n"],"names":["PayScheduleErrorCodes","FREQUENCY_VALUES","fieldValidators","z","coerceToISODate","coerceNaN","needsDay1","data","freq","custom","needsDay2","requiredFieldsConfig","validateDayRanges","ctx","createPayScheduleSchema","options","mode","optionalFieldsToRequire","buildFormSchema"],"mappings":";;;AAUO,MAAMA,IAAwB;AAAA,EACnC,UAAU;AAAA,EACV,WAAW;AACb,GAOMC,IAAmB,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,GAGlFC,IAAkB;AAAA,EACtB,YAAYC,EAAE,OAAA;AAAA,EACd,WAAWA,EAAE,KAAKF,CAAgB;AAAA,EAClC,qBAAqBE,EAAE,OAAA;AAAA,EACvB,eAAeA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EACpE,sBAAsBA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EAC3E,MAAMA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAAA,EAC3C,MAAMA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAC7C;AAWA,SAASG,EAAUC,GAAoC;AACrD,QAAMC,IAAOD,EAAK,WACZE,IAASF,EAAK;AACpB,SAAOC,MAAS,aAAcA,MAAS,qBAAqBC,MAAW;AACzE;AAEA,SAASC,EAAUH,GAAoC;AACrD,QAAMC,IAAOD,EAAK,WACZE,IAASF,EAAK;AACpB,SAAOC,MAAS,qBAAqBC,MAAW;AAClD;AAEA,MAAME,IAAuB;AAAA,EAC3B,qBAAqB;AAAA,EACrB,MAAML;AAAA,EACN,MAAMI;AACR;AAQA,SAASE,EAAkBL,GAA2BM,GAAsB;AAC1E,EAAIP,EAAUC,CAAI,MAAMA,EAAK,OAAO,KAAKA,EAAK,OAAO,OACnDM,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASI,EAAK,OAAO,IAAIP,EAAsB,WAAWA,EAAsB;AAAA,EAAA,CACjF,GAECU,EAAUH,CAAI,MAAMA,EAAK,OAAO,KAAKA,EAAK,OAAO,OACnDM,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASI,EAAK,OAAO,IAAIP,EAAsB,WAAWA,EAAsB;AAAA,EAAA,CACjF;AAEL;AAaO,SAASc,EAAwBC,IAAoC,IAAI;AAC9E,QAAM,EAAE,MAAAC,IAAO,UAAU,yBAAAC,EAAA,IAA4BF;AAErD,SAAOG,EAAgBhB,GAAiB;AAAA,IACtC,sBAAAS;AAAA,IACA,mBAAmBX,EAAsB;AAAA,IACzC,MAAAgB;AAAA,IACA,yBAAAC;AAAA,IACA,aAAaL;AAAA,EAAA,CACd;AACH;"}
1
+ {"version":3,"file":"payScheduleSchema.js","sources":["../../../../../../src/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceNaN, coerceToISODate } from '@/partner-hook-utils/form/preprocessors'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\n/**\n * Validation error codes emitted by {@link usePayScheduleForm} fields.\n *\n * @remarks\n * Use these as `validationMessages` keys on the corresponding `Fields.*` components.\n *\n * @public\n */\nexport const PayScheduleErrorCodes = {\n REQUIRED: 'REQUIRED',\n DAY_RANGE: 'DAY_RANGE',\n} as const\n\n/**\n * Union of validation error code strings emitted by the pay schedule form.\n *\n * @public\n */\nexport type PayScheduleErrorCode =\n (typeof PayScheduleErrorCodes)[keyof typeof PayScheduleErrorCodes]\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst FREQUENCY_VALUES = ['Every week', 'Every other week', 'Twice per month', 'Monthly'] as const\n/**\n * Pay schedule frequency values accepted by {@link usePayScheduleForm}.\n *\n * @public\n */\nexport type PayScheduleFrequency = (typeof FREQUENCY_VALUES)[number]\n\nconst fieldValidators = {\n customName: z.string(),\n frequency: z.enum(FREQUENCY_VALUES),\n customTwicePerMonth: z.string(),\n anchorPayDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n anchorEndOfPayPeriod: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n day1: z.preprocess(coerceNaN(0), z.number()),\n day2: z.preprocess(coerceNaN(0), z.number()),\n}\n\n/**\n * Union of field names managed by the pay schedule form.\n *\n * @public\n */\nexport type PayScheduleField = keyof typeof fieldValidators\n\n/**\n * Shape of the values managed by the pay schedule form.\n *\n * @public\n */\nexport type PayScheduleFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n/**\n * Shape of the validated values produced by the pay schedule form on submit.\n *\n * @public\n */\nexport type PayScheduleFormOutputs = PayScheduleFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\nfunction needsDay1(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Monthly' || (freq === 'Twice per month' && custom === 'custom')\n}\n\nfunction needsDay2(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Twice per month' && custom === 'custom'\n}\n\nconst requiredFieldsConfig = {\n customTwicePerMonth: 'never',\n day1: needsDay1,\n day2: needsDay2,\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * coerceNaN(0) maps empty inputs to 0, which `isEmpty` does not catch\n * (it only recognizes undefined/null/blank-string). This superRefine\n * enforces the 1–31 range when the field is applicable, which also\n * rejects the 0 sentinel from empty inputs.\n */\nfunction validateDayRanges(data: PayScheduleFormData, ctx: z.RefinementCtx) {\n if (needsDay1(data) && (data.day1 < 1 || data.day1 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day1'],\n message: data.day1 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n if (needsDay2(data) && (data.day2 < 1 || data.day2 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day2'],\n message: data.day2 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n}\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\n/**\n * Configuration for promoting optional pay schedule fields to required in a given mode.\n *\n * @remarks\n * Only fields that are optional by default can be promoted. Currently\n * `customTwicePerMonth` is the only configurable field.\n *\n * @public\n */\nexport type PayScheduleOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\n/** @internal */\ninterface PayScheduleSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire\n}\n\n/** @internal */\nexport function createPayScheduleSchema(options: PayScheduleSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: PayScheduleErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n superRefine: validateDayRanges,\n })\n}\n"],"names":["PayScheduleErrorCodes","FREQUENCY_VALUES","fieldValidators","z","coerceToISODate","coerceNaN","needsDay1","data","freq","custom","needsDay2","requiredFieldsConfig","validateDayRanges","ctx","createPayScheduleSchema","options","mode","optionalFieldsToRequire","buildFormSchema"],"mappings":";;;AAkBO,MAAMA,IAAwB;AAAA,EACnC,UAAU;AAAA,EACV,WAAW;AACb,GAYMC,IAAmB,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,GAQlFC,IAAkB;AAAA,EACtB,YAAYC,EAAE,OAAA;AAAA,EACd,WAAWA,EAAE,KAAKF,CAAgB;AAAA,EAClC,qBAAqBE,EAAE,OAAA;AAAA,EACvB,eAAeA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EACpE,sBAAsBA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EAC3E,MAAMA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAAA,EAC3C,MAAMA,EAAE,WAAWE,EAAU,CAAC,GAAGF,EAAE,QAAQ;AAC7C;AA0BA,SAASG,EAAUC,GAAoC;AACrD,QAAMC,IAAOD,EAAK,WACZE,IAASF,EAAK;AACpB,SAAOC,MAAS,aAAcA,MAAS,qBAAqBC,MAAW;AACzE;AAEA,SAASC,EAAUH,GAAoC;AACrD,QAAMC,IAAOD,EAAK,WACZE,IAASF,EAAK;AACpB,SAAOC,MAAS,qBAAqBC,MAAW;AAClD;AAEA,MAAME,IAAuB;AAAA,EAC3B,qBAAqB;AAAA,EACrB,MAAML;AAAA,EACN,MAAMI;AACR;AAQA,SAASE,EAAkBL,GAA2BM,GAAsB;AAC1E,EAAIP,EAAUC,CAAI,MAAMA,EAAK,OAAO,KAAKA,EAAK,OAAO,OACnDM,EAAI,SAAS;AA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