@gusto/embedded-react-sdk 0.49.0 → 0.51.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 (1013) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +0 -8
  3. package/dist/components/Base/createCompoundContext.d.ts +1 -1
  4. package/dist/components/Base/createCompoundContext.js.map +1 -1
  5. package/dist/components/Base/index.d.ts +0 -1
  6. package/dist/components/Base/useBase.d.ts +1 -0
  7. package/dist/components/Base/useBase.js.map +1 -1
  8. package/dist/components/Base/useBaseSubmit.js +4 -4
  9. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  10. package/dist/components/Common/ActionsLayout/index.d.ts +0 -1
  11. package/dist/components/Common/DataView/DataCards/index.d.ts +0 -1
  12. package/dist/components/Common/DataView/index.d.ts +0 -1
  13. package/dist/components/Common/DetailViewLayout/index.d.ts +0 -1
  14. package/dist/components/Common/DocumentList/index.d.ts +0 -1
  15. package/dist/components/Common/DocumentViewer/index.d.ts +0 -1
  16. package/dist/components/Common/FieldCaption/index.d.ts +0 -1
  17. package/dist/components/Common/FieldDescription/index.d.ts +0 -1
  18. package/dist/components/Common/FieldErrorMessage/index.d.ts +0 -1
  19. package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +1 -0
  20. package/dist/components/Common/FieldLayout/index.d.ts +0 -1
  21. package/dist/components/Common/Fields/CheckboxField/index.d.ts +0 -1
  22. package/dist/components/Common/Fields/CheckboxGroupField/index.d.ts +0 -1
  23. package/dist/components/Common/Fields/ComboBoxField/index.d.ts +0 -1
  24. package/dist/components/Common/Fields/DatePickerField/index.d.ts +0 -1
  25. package/dist/components/Common/Fields/FileInputField/index.d.ts +0 -1
  26. package/dist/components/Common/Fields/MultiSelectComboBoxField/index.d.ts +0 -1
  27. package/dist/components/Common/Fields/NumberInputField/index.d.ts +0 -1
  28. package/dist/components/Common/Fields/RadioGroupField/index.d.ts +0 -1
  29. package/dist/components/Common/Fields/SelectField/index.d.ts +0 -1
  30. package/dist/components/Common/Fields/SwitchField/index.d.ts +0 -1
  31. package/dist/components/Common/Fields/TextAreaField/index.d.ts +0 -1
  32. package/dist/components/Common/Fields/TextInputField/index.d.ts +0 -1
  33. package/dist/components/Common/Fieldset/index.d.ts +0 -1
  34. package/dist/components/Common/Flex/index.d.ts +0 -1
  35. package/dist/components/Common/FlowBreadcrumbs/index.d.ts +0 -1
  36. package/dist/components/Common/Form/index.d.ts +0 -1
  37. package/dist/components/Common/HamburgerMenu/index.d.ts +0 -1
  38. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes.d.ts +1 -0
  39. package/dist/components/Common/HorizontalFieldLayout/index.d.ts +0 -1
  40. package/dist/components/Common/InlineSpinner/index.d.ts +0 -1
  41. package/dist/components/Common/OnboardingStatusBadge/index.d.ts +2 -3
  42. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  43. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +2 -2
  44. package/dist/components/Common/PaginationControl/index.d.ts +0 -1
  45. package/dist/components/Common/PayrollLoading/PayrollLoadingTypes.d.ts +1 -1
  46. package/dist/components/Common/PayrollLoading/index.d.ts +0 -1
  47. package/dist/components/Common/ReorderableList/index.d.ts +0 -1
  48. package/dist/components/Common/TaxInputs/TaxInputs.d.ts +2 -2
  49. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  50. package/dist/components/Common/TaxInputs/index.d.ts +0 -1
  51. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +1 -1
  52. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  53. package/dist/components/Common/UI/Badge/Badge.module.scss.js +5 -5
  54. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +1 -1
  55. package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
  56. package/dist/components/Common/UI/Banner/BannerTypes.d.ts +1 -1
  57. package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
  58. package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -1
  59. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +1 -1
  60. package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -1
  61. package/dist/components/Common/UI/BoxHeader/index.d.ts +0 -1
  62. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  63. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -2
  64. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
  65. package/dist/components/Common/UI/Breadcrumbs/index.d.ts +0 -1
  66. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +2 -2
  67. package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
  68. package/dist/components/Common/UI/Button/index.d.ts +0 -1
  69. package/dist/components/Common/UI/CalendarPreview/CalendarLegend.d.ts +1 -1
  70. package/dist/components/Common/UI/CalendarPreview/CalendarLegend.js.map +1 -1
  71. package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +1 -1
  72. package/dist/components/Common/UI/CalendarPreview/index.d.ts +0 -1
  73. package/dist/components/Common/UI/Card/CardTypes.d.ts +1 -1
  74. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +1 -1
  75. package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
  76. package/dist/components/Common/UI/Checkbox/index.d.ts +0 -1
  77. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +2 -2
  78. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
  79. package/dist/components/Common/UI/CheckboxGroup/index.d.ts +0 -1
  80. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
  81. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +1 -1
  82. package/dist/components/Common/UI/DatePicker/index.d.ts +0 -1
  83. package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +2 -2
  84. package/dist/components/Common/UI/DateRangePicker/index.d.ts +0 -1
  85. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +2 -2
  86. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
  87. package/dist/components/Common/UI/DescriptionList/index.d.ts +0 -1
  88. package/dist/components/Common/UI/Dialog/DialogTypes.d.ts +1 -1
  89. package/dist/components/Common/UI/Dialog/DialogTypes.js.map +1 -1
  90. package/dist/components/Common/UI/Dialog/index.d.ts +0 -1
  91. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  92. package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +1 -1
  93. package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -1
  94. package/dist/components/Common/UI/FileInput/index.d.ts +0 -1
  95. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
  96. package/dist/components/Common/UI/Heading/index.d.ts +0 -1
  97. package/dist/components/Common/UI/Input/index.d.ts +0 -1
  98. package/dist/components/Common/UI/Link/LinkTypes.d.ts +1 -1
  99. package/dist/components/Common/UI/Link/index.d.ts +0 -1
  100. package/dist/components/Common/UI/List/ListTypes.d.ts +3 -3
  101. package/dist/components/Common/UI/List/index.d.ts +0 -1
  102. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +1 -1
  103. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
  104. package/dist/components/Common/UI/LoadingSpinner/index.d.ts +0 -1
  105. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +2 -2
  106. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  107. package/dist/components/Common/UI/Menu/index.d.ts +0 -1
  108. package/dist/components/Common/UI/Modal/ModalTypes.d.ts +1 -1
  109. package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -1
  110. package/dist/components/Common/UI/Modal/index.d.ts +0 -1
  111. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +2 -2
  112. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +1 -1
  113. package/dist/components/Common/UI/NumberInput/index.d.ts +0 -1
  114. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  115. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +1 -1
  116. package/dist/components/Common/UI/ProgressBar/index.d.ts +0 -1
  117. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +1 -1
  118. package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
  119. package/dist/components/Common/UI/Radio/index.d.ts +0 -1
  120. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +2 -2
  121. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  122. package/dist/components/Common/UI/RadioGroup/index.d.ts +0 -1
  123. package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
  124. package/dist/components/Common/UI/Select/index.d.ts +0 -1
  125. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +1 -1
  126. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
  127. package/dist/components/Common/UI/Switch/index.d.ts +0 -1
  128. package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -3
  129. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  130. package/dist/components/Common/UI/Table/index.d.ts +0 -1
  131. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +2 -2
  132. package/dist/components/Common/UI/Tabs/index.d.ts +0 -1
  133. package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
  134. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
  135. package/dist/components/Common/UI/Text/index.d.ts +0 -1
  136. package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +1 -1
  137. package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -1
  138. package/dist/components/Common/UI/TextArea/index.d.ts +0 -1
  139. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  140. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  141. package/dist/components/Common/UI/TextInput/index.d.ts +0 -1
  142. package/dist/components/Common/VisuallyHidden/index.d.ts +0 -1
  143. package/dist/components/Common/index.d.ts +0 -1
  144. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +5 -5
  145. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  146. package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +0 -1
  147. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.d.ts +1 -1
  148. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -5
  149. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  150. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -3
  151. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  152. package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +0 -1
  153. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.d.ts +1 -1
  154. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -5
  155. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  156. package/dist/components/Company/AssignSignatory/index.d.ts +0 -1
  157. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -5
  158. package/dist/components/Company/BankAccount/BankAccount.d.ts +5 -5
  159. package/dist/components/Company/BankAccount/BankAccount.js +1 -1
  160. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  161. package/dist/components/Company/BankAccount/BankAccountComponents.d.ts +1 -1
  162. package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
  163. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +1 -1
  164. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  165. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -5
  166. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +1 -1
  167. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  168. package/dist/components/Company/BankAccount/BankAccountList/context.d.ts +1 -1
  169. package/dist/components/Company/BankAccount/BankAccountList/context.js.map +1 -1
  170. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +1 -1
  171. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  172. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  173. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  174. package/dist/components/Company/DocumentSigner/DocumentList/index.d.ts +0 -1
  175. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.d.ts +2 -2
  176. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -5
  177. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  178. package/dist/components/Company/DocumentSigner/DocumentSigner.js +1 -1
  179. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  180. package/dist/components/Company/DocumentSigner/SignatureForm/index.d.ts +0 -1
  181. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.d.ts +2 -2
  182. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  183. package/dist/components/Company/DocumentSigner/index.d.ts +0 -1
  184. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.d.ts +2 -22
  185. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  186. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -1
  187. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/index.d.ts +1 -2
  188. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +2 -5
  189. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -1
  190. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +10 -9
  191. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +41 -38
  192. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
  193. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  194. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  195. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  196. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  197. package/dist/components/Company/FederalTaxes/index.d.ts +0 -1
  198. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +1 -1
  199. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -6
  200. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  201. package/dist/components/Company/Industry/Context.js +5 -5
  202. package/dist/components/Company/Industry/Industry.js +2 -2
  203. package/dist/components/Company/Industry/Industry.js.map +1 -1
  204. package/dist/components/Company/Industry/index.d.ts +0 -1
  205. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -4
  206. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  207. package/dist/components/Company/Locations/LocationForm/index.d.ts +0 -1
  208. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -5
  209. package/dist/components/Company/Locations/LocationsList/LocationsList.js +1 -1
  210. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  211. package/dist/components/Company/Locations/LocationsList/index.d.ts +0 -1
  212. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -1
  213. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -5
  214. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  215. package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +1 -1
  216. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  217. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +25 -25
  218. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  219. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +1 -1
  220. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  221. package/dist/components/Company/OnboardingOverview/context.d.ts +1 -1
  222. package/dist/components/Company/OnboardingOverview/context.js +5 -5
  223. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  224. package/dist/components/Company/PaySchedule/PaySchedule.js +1 -1
  225. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  226. package/dist/components/Company/PaySchedule/PayScheduleList.js +1 -1
  227. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  228. package/dist/components/Company/PaySchedule/index.d.ts +0 -1
  229. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +7 -83
  230. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  231. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
  232. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/index.d.ts +2 -4
  233. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -8
  234. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
  235. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +22 -27
  236. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +93 -90
  237. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  238. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +2 -2
  239. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  240. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +1 -1
  241. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -1
  242. package/dist/components/Company/StateTaxes/StateTaxesForm/context.d.ts +1 -1
  243. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -5
  244. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  245. package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +0 -1
  246. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +1 -1
  247. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  248. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +1 -1
  249. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  250. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -1
  251. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -5
  252. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  253. package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +0 -1
  254. package/dist/components/Company/index.d.ts +0 -1
  255. package/dist/components/Contractor/Address/Address.js +39 -39
  256. package/dist/components/Contractor/Address/Address.js.map +1 -1
  257. package/dist/components/Contractor/Address/index.d.ts +0 -1
  258. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -6
  259. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js.map +1 -1
  260. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +5 -52
  261. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js.map +1 -1
  262. package/dist/components/Contractor/Address/shared/useContractorAddressForm/index.d.ts +2 -4
  263. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +63 -24
  264. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +102 -98
  265. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
  266. package/dist/components/Contractor/ContractorList/index.d.ts +0 -1
  267. package/dist/components/Contractor/ContractorList/index.js +1 -1
  268. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  269. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +1 -1
  270. package/dist/components/Contractor/ContractorList/useContractorList.js +1 -1
  271. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  272. package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.d.ts +41 -0
  273. package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.js +32 -0
  274. package/dist/components/Contractor/Documents/DocumentSigner/DocumentSigner.js.map +1 -0
  275. package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.d.ts +22 -0
  276. package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js +25 -0
  277. package/dist/components/Contractor/Documents/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  278. package/dist/components/Contractor/Documents/DocumentSigner/index.d.ts +1 -0
  279. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.d.ts +6 -0
  280. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js +44 -0
  281. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js.map +1 -0
  282. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
  283. package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +0 -1
  284. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/index.d.ts +0 -1
  285. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +2 -1
  286. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +1 -1
  287. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -1
  288. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.d.ts +30 -0
  289. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +280 -0
  290. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -0
  291. package/dist/components/Contractor/Documents/SignatureForm/index.d.ts +2 -0
  292. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +175 -0
  293. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.js +110 -0
  294. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.js.map +1 -0
  295. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.test.d.ts +1 -0
  296. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.d.ts +259 -0
  297. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js +85 -0
  298. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js.map +1 -0
  299. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/index.d.ts +5 -0
  300. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +129 -0
  301. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js +182 -0
  302. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.js.map +1 -0
  303. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +223 -0
  304. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js +162 -0
  305. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.js.map +1 -0
  306. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.test.d.ts +1 -0
  307. package/dist/components/Contractor/Landing/Landing.js +2 -2
  308. package/dist/components/Contractor/Landing/Landing.js.map +1 -1
  309. package/dist/components/Contractor/Landing/index.d.ts +0 -1
  310. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -2
  311. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  312. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +3 -3
  313. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  314. package/dist/components/Contractor/OnboardingSummary/index.d.ts +0 -1
  315. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +5 -5
  316. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +106 -107
  317. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  318. package/dist/components/Contractor/PaymentMethod/PaymentMethod.module.scss.js +8 -0
  319. package/dist/components/Contractor/PaymentMethod/PaymentMethod.module.scss.js.map +1 -0
  320. package/dist/components/Contractor/PaymentMethod/shared/index.d.ts +1 -0
  321. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.d.ts +57 -0
  322. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +22 -0
  323. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js.map +1 -0
  324. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/index.d.ts +4 -0
  325. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.d.ts +128 -0
  326. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js +113 -0
  327. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountForm.js.map +1 -0
  328. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +85 -0
  329. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.js +42 -0
  330. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.js.map +1 -0
  331. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +60 -0
  332. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js +21 -0
  333. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -0
  334. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.d.ts +11 -0
  335. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.js +9 -0
  336. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/fields.js.map +1 -0
  337. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/index.d.ts +4 -0
  338. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +118 -0
  339. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js +94 -0
  340. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.js.map +1 -0
  341. package/dist/components/Contractor/PaymentMethod/types.d.ts +0 -5
  342. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +5 -5
  343. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  344. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -2
  345. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  346. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -2
  347. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  348. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +1 -1
  349. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -1
  350. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +4 -4
  351. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  352. package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +1 -1
  353. package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -1
  354. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +2 -2
  355. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
  356. package/dist/components/Contractor/Payments/PaymentFlow/index.d.ts +0 -1
  357. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  358. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +3 -3
  359. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  360. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +2 -2
  361. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  362. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +4 -4
  363. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  364. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +3 -3
  365. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  366. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +3 -3
  367. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  368. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -3
  369. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  370. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +0 -1
  371. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +3 -3
  372. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  373. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +1 -1
  374. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  375. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +1 -1
  376. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -1
  377. package/dist/components/Contractor/Profile/index.d.ts +0 -1
  378. package/dist/components/Contractor/Profile/shared/index.d.ts +0 -1
  379. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +3 -7
  380. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +9 -9
  381. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
  382. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +14 -163
  383. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
  384. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js.map +1 -1
  385. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/index.d.ts +2 -4
  386. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +76 -28
  387. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +142 -128
  388. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
  389. package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +30 -0
  390. package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js +57 -0
  391. package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -0
  392. package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +45 -0
  393. package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.js +30 -0
  394. package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -0
  395. package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.d.ts +8 -0
  396. package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.js +59 -0
  397. package/dist/components/Contractor/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -0
  398. package/dist/components/Contractor/Submit/Submit.js +3 -3
  399. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  400. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +3 -0
  401. package/dist/components/Contractor/exports/contractorOnboarding.js +20 -14
  402. package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -1
  403. package/dist/components/Employee/Compensation/index.d.ts +0 -1
  404. package/dist/components/Employee/Compensation/management/Compensation.d.ts +1 -1
  405. package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
  406. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -1
  407. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
  408. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -1
  409. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
  410. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/index.d.ts +0 -1
  411. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -1
  412. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js +1 -1
  413. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
  414. package/dist/components/Employee/Compensation/management/CompensationCard/index.d.ts +0 -1
  415. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -1
  416. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js +1 -1
  417. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  418. package/dist/components/Employee/Compensation/management/CompensationEditForm/index.d.ts +0 -1
  419. package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js +1 -1
  420. package/dist/components/Employee/Compensation/management/CompensationEditJobForm/CompensationEditJobForm.js.map +1 -1
  421. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  422. package/dist/components/Employee/Compensation/management/index.d.ts +0 -1
  423. package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +3 -3
  424. package/dist/components/Employee/Compensation/onboarding/Compensation.js +1 -1
  425. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  426. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.d.ts +2 -2
  427. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -1
  428. package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +0 -1
  429. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +20 -1
  430. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +2 -2
  431. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
  432. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.d.ts +1 -1
  433. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
  434. package/dist/components/Employee/Compensation/onboarding/JobsList/index.d.ts +0 -1
  435. package/dist/components/Employee/Compensation/onboarding/index.d.ts +0 -1
  436. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  437. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +1 -1
  438. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -1
  439. package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.d.ts +2 -2
  440. package/dist/components/Employee/Compensation/shared/getPendingCompensationChanges.js.map +1 -1
  441. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +3 -11
  442. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  443. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +10 -109
  444. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  445. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  446. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +1 -3
  447. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -21
  448. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +191 -177
  449. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  450. package/dist/components/Employee/Compensation/shared/useCompensationManagement/index.d.ts +0 -1
  451. package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.d.ts +1 -1
  452. package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +4 -4
  453. package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
  454. package/dist/components/Employee/Compensation/shared/useJobForm/fields.d.ts +5 -66
  455. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  456. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js.map +1 -1
  457. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +1 -3
  458. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +2 -10
  459. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  460. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +20 -17
  461. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +121 -112
  462. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  463. package/dist/components/Employee/Dashboard/Dashboard.js +1 -1
  464. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  465. package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +2 -2
  466. package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
  467. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  468. package/dist/components/Employee/Dashboard/index.d.ts +0 -1
  469. package/dist/components/Employee/Deductions/index.d.ts +0 -1
  470. package/dist/components/Employee/Deductions/management/Deductions.d.ts +1 -1
  471. package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
  472. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
  473. package/dist/components/Employee/Deductions/management/DeductionsCard/index.d.ts +0 -1
  474. package/dist/components/Employee/Deductions/management/DeductionsEditForm/index.d.ts +0 -1
  475. package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
  476. package/dist/components/Employee/Deductions/management/index.d.ts +0 -1
  477. package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -1
  478. package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
  479. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.d.ts +1 -1
  480. package/dist/components/Employee/Deductions/onboarding/DeductionsList/DeductionsList.js.map +1 -1
  481. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.d.ts +1 -1
  482. package/dist/components/Employee/Deductions/onboarding/deductionsContextualComponents.js.map +1 -1
  483. package/dist/components/Employee/Deductions/onboarding/index.d.ts +0 -1
  484. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.d.ts +1 -1
  485. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  486. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.d.ts +1 -1
  487. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
  488. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.d.ts +1 -1
  489. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
  490. package/dist/components/Employee/Deductions/shared/DeductionsForm/index.d.ts +0 -1
  491. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +1 -1
  492. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -1
  493. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +1 -1
  494. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -1
  495. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +3 -7
  496. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +1 -1
  497. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
  498. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +9 -97
  499. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  500. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -1
  501. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +1 -3
  502. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +26 -23
  503. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +119 -106
  504. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  505. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -5
  506. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +1 -1
  507. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -1
  508. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +8 -86
  509. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  510. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -1
  511. package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +1 -3
  512. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +20 -19
  513. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +129 -120
  514. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  515. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +1 -1
  516. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +2 -2
  517. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -1
  518. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +1 -1
  519. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -1
  520. package/dist/components/Employee/Documents/management/DocumentManager.js +2 -2
  521. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  522. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
  523. package/dist/components/Employee/Documents/management/DocumentsCard/index.d.ts +0 -1
  524. package/dist/components/Employee/Documents/management/index.d.ts +0 -1
  525. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +1 -1
  526. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  527. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/index.d.ts +0 -1
  528. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.d.ts +1 -1
  529. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -5
  530. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  531. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +2 -2
  532. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  533. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +3 -3
  534. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  535. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +1 -1
  536. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  537. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +1 -1
  538. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
  539. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/index.d.ts +0 -1
  540. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +1 -1
  541. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  542. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/index.d.ts +0 -1
  543. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.d.ts +1 -1
  544. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  545. package/dist/components/Employee/Documents/onboarding/DocumentSigner/index.d.ts +0 -1
  546. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +2 -2
  547. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  548. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/index.d.ts +0 -1
  549. package/dist/components/Employee/Documents/shared/SignatureForm/index.d.ts +0 -1
  550. package/dist/components/Employee/Documents/shared/useDocumentsList/index.d.ts +0 -1
  551. package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.d.ts +1 -1
  552. package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js +1 -1
  553. package/dist/components/Employee/Documents/shared/useDocumentsList/useDocumentsList.js.map +1 -1
  554. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.d.ts +39 -287
  555. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  556. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -1
  557. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/index.d.ts +2 -4
  558. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -6
  559. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
  560. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +75 -25
  561. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js +91 -90
  562. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  563. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
  564. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +1 -1
  565. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  566. package/dist/components/Employee/EmployeeList/shared/index.d.ts +0 -1
  567. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.d.ts +3 -3
  568. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +3 -3
  569. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  570. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +3 -3
  571. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
  572. package/dist/components/Employee/EmployeeListFlow/index.d.ts +0 -1
  573. package/dist/components/Employee/FederalTaxes/index.d.ts +0 -1
  574. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +1 -1
  575. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
  576. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/index.d.ts +0 -1
  577. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +1 -1
  578. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  579. package/dist/components/Employee/FederalTaxes/management/index.d.ts +0 -1
  580. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +1 -1
  581. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  582. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  583. package/dist/components/Employee/FederalTaxes/shared/index.d.ts +0 -1
  584. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -5
  585. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +1 -1
  586. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -1
  587. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +6 -73
  588. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  589. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js.map +1 -1
  590. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/index.d.ts +2 -4
  591. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +20 -30
  592. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +78 -69
  593. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -1
  594. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/index.d.ts +0 -1
  595. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.d.ts +1 -1
  596. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js +1 -1
  597. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesSummary/useFederalTaxesSummary.js.map +1 -1
  598. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/index.d.ts +0 -1
  599. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
  600. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +1 -1
  601. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  602. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +1 -1
  603. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -1
  604. package/dist/components/Employee/HomeAddress/management/index.d.ts +0 -1
  605. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +1 -1
  606. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +3 -3
  607. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  608. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/index.d.ts +0 -1
  609. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.d.ts +1 -1
  610. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js +1 -1
  611. package/dist/components/Employee/HomeAddress/shared/useHomeAddressSummary/useHomeAddressSummary.js.map +1 -1
  612. package/dist/components/Employee/Landing/Landing.js +2 -2
  613. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  614. package/dist/components/Employee/Landing/index.d.ts +0 -1
  615. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +3 -3
  616. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
  617. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -1
  618. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
  619. package/dist/components/Employee/OnboardingExecutionFlow/index.d.ts +0 -1
  620. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +4 -4
  621. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  622. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +78 -53
  623. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  624. package/dist/components/Employee/OnboardingSummary/index.d.ts +0 -1
  625. package/dist/components/Employee/PaymentMethod/index.d.ts +0 -1
  626. package/dist/components/Employee/PaymentMethod/management/index.d.ts +0 -1
  627. package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +0 -1
  628. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
  629. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
  630. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/index.d.ts +0 -1
  631. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.d.ts +1 -1
  632. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
  633. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/index.d.ts +0 -1
  634. package/dist/components/Employee/PaymentMethod/shared/index.d.ts +0 -1
  635. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +4 -45
  636. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  637. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -1
  638. package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +2 -3
  639. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +15 -13
  640. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +71 -66
  641. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -1
  642. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +3 -6
  643. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +7 -6
  644. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -1
  645. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +1 -12
  646. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -1
  647. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +2 -3
  648. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +9 -7
  649. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +56 -49
  650. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -1
  651. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +2 -5
  652. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -1
  653. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +2 -2
  654. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +4 -4
  655. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -1
  656. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +1 -2
  657. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  658. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +21 -7
  659. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +3 -3
  660. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -1
  661. package/dist/components/Employee/Paystubs/management/PaystubsCard/index.d.ts +0 -1
  662. package/dist/components/Employee/Paystubs/management/index.d.ts +0 -1
  663. package/dist/components/Employee/Paystubs/shared/usePaystubsList/index.d.ts +0 -1
  664. package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.d.ts +1 -1
  665. package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js +3 -3
  666. package/dist/components/Employee/Paystubs/shared/usePaystubsList/usePaystubsList.js.map +1 -1
  667. package/dist/components/Employee/Profile/management/ProfileCard/index.d.ts +0 -1
  668. package/dist/components/Employee/Profile/management/ProfileEditForm.js +24 -25
  669. package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
  670. package/dist/components/Employee/Profile/management/index.d.ts +0 -1
  671. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +31 -32
  672. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  673. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
  674. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -1
  675. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +4 -9
  676. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js +19 -29
  677. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
  678. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.d.ts +12 -92
  679. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  680. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
  681. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/index.d.ts +1 -4
  682. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +25 -31
  683. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +91 -80
  684. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  685. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/index.d.ts +0 -1
  686. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.d.ts +1 -1
  687. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js +1 -1
  688. package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js.map +1 -1
  689. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +7 -77
  690. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  691. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -1
  692. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +2 -5
  693. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
  694. package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +2 -4
  695. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +1 -1
  696. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -1
  697. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +57 -26
  698. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +64 -61
  699. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  700. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.d.ts +3 -25
  701. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  702. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -1
  703. package/dist/components/Employee/Profile/shared/useWorkAddressForm/index.d.ts +2 -4
  704. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +1 -1
  705. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -1
  706. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +43 -17
  707. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +68 -63
  708. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  709. package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.d.ts +2 -5
  710. package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -1
  711. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
  712. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  713. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +3 -3
  714. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  715. package/dist/components/Employee/StateTaxes/index.d.ts +0 -1
  716. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  717. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/index.d.ts +0 -1
  718. package/dist/components/Employee/StateTaxes/management/index.d.ts +0 -1
  719. package/dist/components/Employee/StateTaxes/onboarding/index.d.ts +0 -1
  720. package/dist/components/Employee/StateTaxes/shared/index.d.ts +0 -1
  721. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +1 -1
  722. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +1 -1
  723. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +1 -1
  724. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -1
  725. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  726. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +1 -1
  727. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -1
  728. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +36 -18
  729. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +115 -15
  730. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -1
  731. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +2 -3
  732. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +14 -12
  733. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +3 -6
  734. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  735. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/index.d.ts +0 -1
  736. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.d.ts +1 -1
  737. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js +1 -1
  738. package/dist/components/Employee/StateTaxes/shared/useStateTaxesSummary/useStateTaxesSummary.js.map +1 -1
  739. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -1
  740. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +9 -9
  741. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  742. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +1 -1
  743. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  744. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +6 -2
  745. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
  746. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -1
  747. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +4 -4
  748. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
  749. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/index.d.ts +0 -1
  750. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
  751. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +1 -1
  752. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  753. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +2 -2
  754. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -1
  755. package/dist/components/Employee/WorkAddress/management/index.d.ts +0 -1
  756. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +1 -1
  757. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +3 -3
  758. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  759. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/index.d.ts +0 -1
  760. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.d.ts +1 -1
  761. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js +1 -1
  762. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
  763. package/dist/components/Employee/index.d.ts +0 -1
  764. package/dist/components/Flow/Flow.js +1 -1
  765. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +4 -4
  766. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  767. package/dist/components/InformationRequests/InformationRequestForm/index.d.ts +0 -1
  768. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +2 -2
  769. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  770. package/dist/components/InformationRequests/InformationRequestList/index.d.ts +0 -1
  771. package/dist/components/InformationRequests/InformationRequests.d.ts +3 -3
  772. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  773. package/dist/components/InformationRequests/index.d.ts +0 -1
  774. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +1 -1
  775. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  776. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +2 -2
  777. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  778. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/index.d.ts +0 -1
  779. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +3 -3
  780. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  781. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/index.d.ts +0 -1
  782. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +2 -2
  783. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  784. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/index.d.ts +0 -1
  785. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +0 -1
  786. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +4 -0
  787. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  788. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +1 -1
  789. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  790. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +4 -4
  791. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  792. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +0 -1
  793. package/dist/components/Payroll/Dismissal/index.d.ts +0 -1
  794. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +5 -5
  795. package/dist/components/Payroll/GrossUpModal/index.d.ts +0 -1
  796. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +1 -1
  797. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  798. package/dist/components/Payroll/OffCycle/index.d.ts +0 -1
  799. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +4 -4
  800. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  801. package/dist/components/Payroll/OffCycleCreation/index.d.ts +0 -1
  802. package/dist/components/Payroll/OffCycleDeductionsSetting/index.d.ts +0 -1
  803. package/dist/components/Payroll/OffCyclePayPeriodDateForm/index.d.ts +0 -1
  804. package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +0 -1
  805. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +1 -1
  806. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  807. package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +0 -1
  808. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +1 -1
  809. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js +1 -1
  810. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
  811. package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +0 -1
  812. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +4 -4
  813. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  814. package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
  815. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +2 -2
  816. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  817. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +7 -7
  818. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  819. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -5
  820. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  821. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +4 -4
  822. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +5 -5
  823. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  824. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +3 -3
  825. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  826. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -4
  827. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +1 -1
  828. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  829. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +2 -2
  830. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  831. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +1 -1
  832. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  833. package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +0 -1
  834. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  835. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +1 -1
  836. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  837. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -1
  838. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  839. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +2 -2
  840. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
  841. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  842. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +4 -4
  843. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  844. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
  845. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  846. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +2 -2
  847. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  848. package/dist/components/Payroll/PayrollList/PayrollList.js +8 -8
  849. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  850. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -3
  851. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
  852. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  853. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +7 -7
  854. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  855. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -4
  856. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  857. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
  858. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  859. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +1 -1
  860. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  861. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +0 -1
  862. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +1 -1
  863. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  864. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -1
  865. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  866. package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +0 -1
  867. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +1 -1
  868. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +2 -2
  869. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
  870. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
  871. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  872. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/index.d.ts +0 -1
  873. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +2 -2
  874. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  875. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/index.d.ts +0 -1
  876. package/dist/components/Payroll/RecoveryCases/index.d.ts +0 -1
  877. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +5 -1
  878. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  879. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +1 -1
  880. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  881. package/dist/components/Payroll/Transition/index.d.ts +0 -1
  882. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +4 -4
  883. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  884. package/dist/components/Payroll/TransitionCreation/index.d.ts +0 -1
  885. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +3 -3
  886. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  887. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
  888. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  889. package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +0 -1
  890. package/dist/components/Payroll/helpers.d.ts +6 -6
  891. package/dist/components/Payroll/helpers.js +1 -1
  892. package/dist/components/Payroll/helpers.js.map +1 -1
  893. package/dist/components/Payroll/index.d.ts +0 -1
  894. package/dist/components/Payroll/payrollTypes.js +1 -1
  895. package/dist/components/Payroll/payrollTypes.js.map +1 -1
  896. package/dist/components/Payroll/usePreparedPayrollData.d.ts +3 -4
  897. package/dist/components/Payroll/usePreparedPayrollData.js +7 -7
  898. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  899. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.d.ts +1 -1
  900. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +3 -3
  901. package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
  902. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +3 -3
  903. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  904. package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +0 -1
  905. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +3 -3
  906. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  907. package/dist/components/TimeOff/PolicyList/PolicyList.js +6 -6
  908. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  909. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +4 -4
  910. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  911. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +1 -1
  912. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  913. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +1 -4
  914. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
  915. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -1
  916. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -1
  917. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +4 -4
  918. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  919. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -1
  920. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +2 -2
  921. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  922. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -1
  923. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +5 -5
  924. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  925. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +3 -3
  926. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  927. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +6 -6
  928. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  929. package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +0 -1
  930. package/dist/components/TimeOff/index.d.ts +0 -1
  931. package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +0 -1
  932. package/dist/components/index.d.ts +32 -2
  933. package/dist/contexts/ApiProvider/ApiProvider.d.ts +3 -3
  934. package/dist/contexts/ApiProvider/ApiProvider.js +3 -3
  935. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  936. package/dist/contexts/ApiProvider/apiVersionHook.js +1 -1
  937. package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -1
  938. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +1 -1
  939. package/dist/contexts/ApiProvider/createSdkQueryClient.js +2 -2
  940. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -1
  941. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +1 -0
  942. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  943. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -2
  944. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  945. package/dist/contexts/GustoProvider/index.d.ts +0 -1
  946. package/dist/contexts/LocaleProvider/index.d.ts +0 -1
  947. package/dist/contexts/ObservabilityProvider/index.d.ts +0 -1
  948. package/dist/contexts/ThemeProvider/index.d.ts +0 -1
  949. package/dist/contexts/ThemeProvider/theme.js +1 -1
  950. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  951. package/dist/contexts/index.d.ts +0 -1
  952. package/dist/helpers/apiErrorToList.d.ts +1 -1
  953. package/dist/helpers/apiErrorToList.js.map +1 -1
  954. package/dist/helpers/formattedStrings.d.ts +2 -2
  955. package/dist/helpers/formattedStrings.js.map +1 -1
  956. package/dist/helpers/validations.d.ts +20 -0
  957. package/dist/helpers/validations.js +6 -3
  958. package/dist/helpers/validations.js.map +1 -1
  959. package/dist/hooks/useCompanyPaymentSpeed.d.ts +1 -1
  960. package/dist/hooks/useCompanyPaymentSpeed.js +1 -1
  961. package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -1
  962. package/dist/i18n/I18n.d.ts +3 -2
  963. package/dist/i18n/I18n.js +1 -0
  964. package/dist/i18n/I18n.js.map +1 -1
  965. package/dist/i18n/en/Contractor.Address.json.js +10 -8
  966. package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
  967. package/dist/i18n/en/Contractor.PaymentMethod.json.js +3 -1
  968. package/dist/i18n/en/Contractor.PaymentMethod.json.js.map +1 -1
  969. package/dist/i18n/en/Contractor.SignatureForm.json.js +38 -0
  970. package/dist/i18n/en/Contractor.SignatureForm.json.js.map +1 -0
  971. package/dist/i18n/index.d.ts +0 -1
  972. package/dist/i18n/types.d.ts +7470 -0
  973. package/dist/index.d.ts +46 -42
  974. package/dist/index.js +145 -267
  975. package/dist/index.js.map +1 -1
  976. package/dist/models/external.d.ts +214 -194
  977. package/dist/partner-hook-utils/composeErrorHandler.d.ts +2 -2
  978. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
  979. package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js +3 -3
  980. package/dist/partner-hook-utils/form/buildFormSchema.d.ts +19 -9
  981. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  982. package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +1 -1
  983. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  984. package/dist/partner-hook-utils/form/fields/index.d.ts +0 -1
  985. package/dist/partner-hook-utils/form/index.d.ts +0 -4
  986. package/dist/partner-hook-utils/form/withFlags.d.ts +18 -0
  987. package/dist/partner-hook-utils/form/withFlags.js +7 -0
  988. package/dist/partner-hook-utils/form/withFlags.js.map +1 -0
  989. package/dist/partner-hook-utils/index.d.ts +0 -1
  990. package/dist/partner-hook-utils/types.d.ts +6 -3
  991. package/dist/shared/constants.d.ts +18 -4
  992. package/dist/shared/constants.js +3 -2
  993. package/dist/shared/constants.js.map +1 -1
  994. package/dist/style.css +1 -1
  995. package/dist/types/Helpers.d.ts +21 -8
  996. package/dist/types/hooks.d.ts +2 -2
  997. package/dist/types/sdkError.js +16 -9
  998. package/dist/types/sdkError.js.map +1 -1
  999. package/docs/{appendix → guides}/endpoint-inventory.json +29 -0
  1000. package/package.json +14 -14
  1001. package/dist/assets/icons/unchecked_circular.svg.js +0 -10
  1002. package/dist/assets/icons/unchecked_circular.svg.js.map +0 -1
  1003. package/dist/components/Contractor/PaymentMethod/BankAccountForm.d.ts +0 -3
  1004. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +0 -56
  1005. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +0 -1
  1006. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +0 -2
  1007. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +0 -33
  1008. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +0 -1
  1009. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +0 -16
  1010. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js.map +0 -1
  1011. package/dist/partner-hook-utils/form/useFieldErrorMessage.js +0 -20
  1012. package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +0 -1
  1013. package/dist/types/i18next.d.ts +0 -4075
@@ -1 +1 @@
1
- {"version":3,"file":"useCompensationForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type {\n Compensation,\n PaymentUnit,\n} from '@gusto/embedded-api-v-2025-11-15/models/components/compensation'\nimport type { Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2025-11-15/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2025-11-15/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api-v-2025-11-15/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsCreateCompensationMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsCreateCompensation'\nimport { useJobsAndCompensationsUpdateCompensationMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsUpdateCompensation'\nimport { useLocationsGetMinimumWages } from '@gusto/embedded-api-v-2025-11-15/react-query/locationsGetMinimumWages'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api-v-2025-11-15/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeesGet } from '@gusto/embedded-api-v-2025-11-15/react-query/employeesGet'\nimport {\n createCompensationSchema,\n type CompensationOptionalFieldsToRequire,\n type CompensationFormData,\n type CompensationFormOutputs,\n} from './compensationSchema'\nimport {\n TitleField,\n FlsaStatusField,\n RateField,\n PaymentUnitField,\n AdjustForMinimumWageField,\n MinimumWageIdField,\n EffectiveDateField,\n} from './fields'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { FlsaStatus, PAY_PERIODS, TIP_CREDITS_UNSUPPORTED_STATES } from '@/shared/constants'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { addDays, formatDateToStringDate } from '@/helpers/dateFormatting'\n\n/**\n * Optional values supplied to {@link useCompensationForm}'s `actions.onSubmit` at submit time.\n *\n * @remarks\n * Use these to override hook-construction props when an ID isn't known at\n * mount — most commonly the **onboarding stub-fill** chain, where `useJobForm`\n * creates the parent job and returns the auto-created stub compensation, and\n * the IDs and version are threaded into this hook's `onSubmit` to PUT the\n * stub.\n *\n * @public\n */\nexport interface CompensationSubmitOptions {\n /** Override jobId — required when creating a compensation if not configured at hook construction (e.g. when the parent job was just created in the same submit chain). */\n jobId?: string\n /** Override compensationId — when present, forces update (PUT) routing regardless of hook construction. */\n compensationId?: string\n /**\n * Compensation version for optimistic locking on PUT. Required when forcing\n * update routing post-create (e.g. updating the auto-created stub returned\n * from `POST /v1/employees/:id/jobs`). When omitted, the hook reads the\n * version from its cached `currentCompensation`.\n */\n compensationVersion?: string\n /**\n * Supply `effectiveDate` at submit time. When `withEffectiveDateField`\n * is `true`, this overrides the form's value. When `withEffectiveDateField`\n * is `false`, this is the only way to put `effective_date` on the wire —\n * the form value is not read in that mode (matching the options-only\n * convention of `useWorkAddressForm` / `useHomeAddressForm` / `useJobForm`).\n */\n effectiveDate?: string\n}\n\n/**\n * Configuration options for {@link useCompensationForm}.\n *\n * @remarks\n * Presence or absence of `compensationId` selects the API verb — see the\n * `compensationId` field description. `employeeId` is optional so the hook\n * can be composed alongside an employee-creation step. `jobId` is optional in\n * update mode (derived from the loaded compensation) and required in create\n * mode (scopes the POST); supply it at submit time via\n * {@link CompensationSubmitOptions.jobId} when the parent job is created in\n * the same submit chain.\n *\n * @public\n */\nexport interface UseCompensationFormProps {\n /** UUID of the employee whose compensation is being created or edited. Drives data fetching for derived helpers (jobs list, work address, minimum wages). May be omitted when composing alongside an employee-creation step. */\n employeeId?: string\n /** The parent job's UUID. Required in create mode (scopes `POST /v1/jobs/:jobId/compensations`). Optional in update mode — the parent job is derived from the loaded compensation. */\n jobId?: string\n /** Present → update mode (PUT /v1/compensations/:id). Omitted → create mode (POST /v1/jobs/:jobId/compensations). */\n compensationId?: string\n /** Override fields that are optional on a given mode to be required. See {@link CompensationOptionalFieldsToRequire}. */\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n /** Pre-fill form values. Server data takes precedence on update mode. */\n defaultValues?: Partial<CompensationFormData>\n /** Passed through to react-hook-form. Defaults to `'onSubmit'`. */\n validationMode?: UseFormProps['mode']\n /** Auto-focus the first invalid field on submit. Set to `false` when using `composeSubmitHandler` so submit-time focus is coordinated across multiple forms. Defaults to `true`. */\n shouldFocusError?: boolean\n /**\n * When `false`, hides `Fields.EffectiveDate` (becomes `undefined`) and\n * removes `effectiveDate` from schema validation. In this mode the hook\n * does not read any form value at submit time — `effective_date` is\n * omitted from the request body unless explicitly supplied via\n * {@link CompensationSubmitOptions.effectiveDate}. This matches the\n * options-only convention of other form hooks, and means the\n * `willDeleteSecondaryJobs` carve-out's form-state side effects do not\n * leak onto the wire (there is no field to render them in anyway).\n * Defaults to `true`.\n */\n withEffectiveDateField?: boolean\n}\n\n/**\n * Pre-bound field components exposed on `useCompensationForm().form.Fields`.\n *\n * @remarks\n * Each property is either the field component or `undefined`. A field is\n * `undefined` when conditions for rendering it aren't met — see each member\n * for its visibility rule. Always null-check conditional fields (e.g.\n * `{Fields.FlsaStatus && <Fields.FlsaStatus ... />}`) before rendering.\n *\n * @public\n */\nexport interface CompensationFormFields {\n /** Title text input. Always available. Optional in both modes unless `optionalFieldsToRequire` requires it. */\n Title: typeof TitleField\n /** FLSA classification select. `undefined` when the status is not user-editable (e.g. secondary jobs that must match the primary). */\n FlsaStatus: typeof FlsaStatusField | undefined\n /** Compensation amount input. `undefined` for commission-only FLSA statuses, which don't accept a partner-supplied rate. */\n Rate: typeof RateField | undefined\n /** Payment unit select. `undefined` for commission-only FLSA statuses (the hook forces `paymentUnit=Year`). */\n PaymentUnit: typeof PaymentUnitField | undefined\n /** Minimum-wage adjustment checkbox. `undefined` unless `flsaStatus === Nonexempt`, the employee's work location has minimum wages, and the state supports tip credits. */\n AdjustForMinimumWage: typeof AdjustForMinimumWageField | undefined\n /** Minimum-wage selection. `undefined` unless `Fields.AdjustForMinimumWage` is rendered and checked. */\n MinimumWageId: typeof MinimumWageIdField | undefined\n /** Effective-date picker. `undefined` when `withEffectiveDateField: false`; supply the value via `CompensationSubmitOptions.effectiveDate` in that mode. */\n EffectiveDate: typeof EffectiveDateField | undefined\n}\n\n/**\n * Ready-state shape returned by {@link useCompensationForm} once data has loaded.\n *\n * @remarks\n * Discriminated by `isLoading: false`. Extends {@link BaseFormHookReady} with\n * the compensation-specific `data`, `status`, `actions`, and `form.Fields`\n * shape. Static, entity-derived values live under `data.*`; reactive values\n * that flip with form input live under `status.*`.\n *\n * @public\n */\nexport interface UseCompensationFormReady extends BaseFormHookReady<\n FieldsMetadata,\n CompensationFormData,\n CompensationFormFields\n> {\n /** Compensation-specific data payload: the loaded compensation, the parent job, available minimum wages, and effective-date bounds. */\n data: {\n /** The compensation row loaded for update; `null` in create mode. */\n compensation: Compensation | null\n /** The parent job. In update mode it's derived from the loaded compensation; in create mode it's looked up by `jobId`. `null` if neither resolves. */\n currentJob: Job | null\n /** Minimum wages available at the employee's active work location. Empty when no location is set or no minimums are defined. */\n minimumWages: MinimumWage[]\n /** Lower bound for `effectiveDate` (typically the parent job's hire date). */\n minimumEffectiveDate: string | null\n /** Upper bound for `effectiveDate` — the next scheduled future compensation's effective date, when one exists. */\n maximumEffectiveDate: string | null\n /** True when at least one future-dated compensation already exists for this job. */\n hasPendingFutureCompensation: boolean\n }\n /** Submission state and reactive flags derived from current form input. `isPending` is `true` while a create/update mutation is in flight; `mode` reflects whether the next submit will create or update; the `show*Alert` flags drive FLSA-specific inline warnings. */\n status: {\n /** `true` while a create or update mutation is in flight. */\n isPending: boolean\n /** Reflects whether the next submit will POST a new compensation or PUT an existing one. */\n mode: 'create' | 'update'\n /**\n * True when submitting the form right now would delete the employee's\n * secondary jobs server-side (the \"carve-out\" branch). Reactive:\n * derived from the current `flsaStatus` form value, the loaded\n * compensation, and the other-jobs count, so this flips as you change\n * inputs.\n *\n * Conditions: update mode, the loaded compensation is Nonexempt, the\n * form's `flsaStatus` has been changed to a non-Nonexempt value, and\n * the employee has at least one secondary job.\n *\n * While this flag is true the hook also takes the `effectiveDate`\n * field over: it forces the form value to today (so submits route\n * through a PUT that immediately deletes secondaries) and exposes\n * `fieldsMetadata.effectiveDate.isDisabled = true` so `Fields.EffectiveDate`\n * renders as disabled. On revert (FLSA back to Nonexempt) the prior\n * `effectiveDate` is restored. Render an inline warning keyed off\n * this flag — no separate confirmation step is needed.\n */\n willDeleteSecondaryJobs: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_EXEMPT`\n * (Commission Only/No Overtime). Render the federal-minimum-pay\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionFederalMinimumPayAlert: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_NONEXEMPT`\n * (Commission Only/Eligible for overtime). Render the local-minimum-wage\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionMinimumWageAlert: boolean\n /**\n * True when the current `flsaStatus` is `OWNER` (Owner's draw). Render\n * an informational alert noting that the IRS requires S-corp owners to\n * pay themselves a reasonable salary for similar work before taking\n * distributions.\n */\n showOwnerSalaryAlert: boolean\n }\n /** Submit actions exposed by the hook. */\n actions: {\n /** Validates the form, runs the appropriate create/update mutation, and resolves to a {@link HookSubmitResult} containing the saved compensation. Resolves to `undefined` on validation failure or mutation error. Accepts {@link CompensationSubmitOptions} for threading IDs/version into the onboarding stub-fill chain. */\n onSubmit: (\n options?: CompensationSubmitOptions,\n ) => Promise<HookSubmitResult<Compensation> | undefined>\n }\n}\n\nfunction resolveCompAndJob(\n jobs: Job[] | undefined,\n compensationId: string | undefined,\n jobId: string | undefined,\n): { compensation: Compensation | null; job: Job | null } {\n if (!jobs) return { compensation: null, job: null }\n if (compensationId) {\n for (const job of jobs) {\n const compensation = job.compensations?.find(c => c.uuid === compensationId)\n if (compensation) return { compensation, job }\n }\n // If the comp isn't in any job's compensations list, still try to resolve\n // the job by jobId so callers can check job metadata (e.g. job.primary).\n const fallbackJob = jobId ? (jobs.find(j => j.uuid === jobId) ?? null) : null\n return { compensation: null, job: fallbackJob }\n }\n if (jobId) return { compensation: null, job: jobs.find(j => j.uuid === jobId) ?? null }\n return { compensation: null, job: null }\n}\n\nfunction findPrimaryFlsaStatus(jobs: Job[] | undefined): FlsaStatusType | null {\n if (!jobs) return null\n for (const job of jobs) {\n if (!job.primary) continue\n const compensation = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n if (compensation?.flsaStatus) return compensation.flsaStatus\n }\n return null\n}\n\nfunction findFutureCompensations(job: Job | null): Compensation[] {\n if (!job?.compensations) return []\n const today = todayISO()\n return job.compensations.filter(c => c.effectiveDate !== undefined && c.effectiveDate > today)\n}\n\nfunction earliestEffectiveDate(comps: Compensation[]): string | null {\n if (comps.length === 0) return null\n return comps.reduce<string | null>((min, c) => {\n const d = c.effectiveDate\n if (!d) return min\n if (!min || d < min) return d\n return min\n }, null)\n}\n\nconst flsaStatusEntries: FlsaStatusType[] = [\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n]\n\nconst flsaOptions = flsaStatusEntries.map(status => ({ value: status, label: status }))\n\nconst paymentUnitEntries: PaymentUnit[] = [\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n]\n\nconst paymentUnitOptions = paymentUnitEntries.map(unit => ({ value: unit, label: unit }))\n\nfunction todayISO(): string {\n return new Date().toISOString().split('T')[0]!\n}\n\n/**\n * Headless hook for creating or updating a compensation row on a job — FLSA classification, pay rate, payment unit, effective date, and optional minimum-wage adjustment.\n *\n * @remarks\n * Companion hook to `useJobForm`. Jobs and their compensations are separate\n * entities in the Gusto API and this hook focuses exclusively on the\n * compensation side. Presence of `compensationId` selects the verb:\n *\n * | Hook config / submit options | Mode | API call |\n * | ---------------------------- | ---- | -------- |\n * | `{ jobId, compensationId }` | update | `PUT /v1/compensations/:compensationId` (with `version`) |\n * | `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:jobId/compensations` |\n * | `{ employeeId }` + submit `{ jobId, compensationId, compensationVersion }` | update | `PUT /v1/compensations/:compensationId` (with the supplied `version`) |\n * | `{ employeeId }` + submit `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:options.jobId/compensations` |\n *\n * Use the submit-options form for the **onboarding stub-fill** chain: after\n * `useJobForm.actions.onSubmit()` creates a job, capture the auto-created\n * compensation's UUID and version from the response, and pass them as\n * `{ jobId, compensationId, compensationVersion }` to this hook's `onSubmit`\n * to PUT the stub.\n *\n * The hook exposes several derived helpers for driving UX — static\n * entity-derived values under `data.*` (effective-date bounds, pending\n * future compensations) and reactive flags under `status.*` (the\n * `willDeleteSecondaryJobs` carve-out, plus FLSA-specific alerts for\n * commission-only and owner classifications). When\n * `willDeleteSecondaryJobs` is `true` in update mode, the hook also locks\n * the `effectiveDate` field (forces to today, renders disabled) until the\n * FLSA selection is reverted.\n *\n * @param input - {@link UseCompensationFormProps} — `employeeId`, `jobId`, `compensationId` (toggle create/update), required-field overrides, default values, and which fields the hook renders.\n * @returns A {@link HookLoadingResult} while data is loading, or a {@link UseCompensationFormReady} once ready.\n * @public\n *\n * @example\n * ```tsx\n * import { useCompensationForm, SDKFormProvider } from '@gusto/embedded-react-sdk'\n *\n * function CompensationForm({ employeeId, jobId }: { employeeId: string; jobId: string }) {\n * const comp = useCompensationForm({ employeeId, jobId })\n * if (comp.isLoading) return null\n *\n * const { Fields } = comp.form\n * return (\n * <form onSubmit={e => { e.preventDefault(); comp.actions.onSubmit() }}>\n * <SDKFormProvider formHookResult={comp}>\n * {Fields.FlsaStatus && <Fields.FlsaStatus label=\"Employee type\" />}\n * <Fields.Rate label=\"Compensation amount\" />\n * <Fields.PaymentUnit label=\"Payment unit\" />\n * {Fields.EffectiveDate && <Fields.EffectiveDate label=\"Effective date\" />}\n * </SDKFormProvider>\n * {comp.status.willDeleteSecondaryJobs && (\n * <p>Saving will remove this employee's secondary jobs.</p>\n * )}\n * <button type=\"submit\" disabled={comp.status.isPending}>Save</button>\n * </form>\n * )\n * }\n * ```\n */\nexport function useCompensationForm({\n employeeId,\n jobId,\n compensationId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n withEffectiveDateField = true,\n}: UseCompensationFormProps): HookLoadingResult | UseCompensationFormReady {\n const jobsQuery = useJobsAndCompensationsGetJobs(\n {\n employeeId: employeeId ?? '',\n // Fetch all effective-dated compensations when editing an existing one so\n // resolveCompAndJob can find the target comp (future-dated comps are\n // omitted from the default response, which only returns the current comp).\n include: compensationId\n ? GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations\n : undefined,\n },\n { enabled: !!employeeId },\n )\n const addressesQuery = useEmployeeAddressesGetWorkAddresses(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n const employeeQuery = useEmployeesGet({ employeeId: employeeId ?? '' }, { enabled: !!employeeId })\n\n const employeeJobs = jobsQuery.data?.jobs\n const workAddresses = addressesQuery.data?.employeeWorkAddressesList\n const currentWorkAddress = workAddresses?.find(address => address.active)\n const locationUuid = currentWorkAddress?.locationUuid\n const employee = employeeQuery.data?.employee\n\n const minWagesQuery = useLocationsGetMinimumWages(\n { locationUuid: locationUuid ?? '' },\n { enabled: !!locationUuid },\n )\n\n const minimumWages = minWagesQuery.data?.minimumWageList ?? []\n\n const { compensation: currentCompensation, job: currentJob } = resolveCompAndJob(\n employeeJobs,\n compensationId,\n jobId,\n )\n\n const otherJobsCount =\n employeeJobs && currentJob ? employeeJobs.filter(j => j.uuid !== currentJob.uuid).length : 0\n\n // Snapshot — written exactly once, on the first render where `employeeJobs`\n // is defined (i.e., the initial `getJobs` query has resolved) — capturing\n // whether the employee already had a primary job at that moment.\n //\n // Used to ignore the API-generated stub primary (FLSA Nonexempt, rate \"0.00\")\n // that briefly appears between the chained job POST and comp PUT during\n // onboarding: `getJobs` invalidates between the two mutations and\n // momentarily includes the stub, which would otherwise flip\n // `isAddingSecondaryJob` to true and hide `Fields.FlsaStatus` mid-submit.\n //\n // In steady-state flows (edit primary, edit secondary, add secondary), the\n // real primary already exists when the query first resolves, so the snapshot\n // is `true` and live `employeeJobs` continues to drive `primaryFlsaStatus`.\n // Recovery for the rare case where a partner mounts before any jobs exist\n // and a primary is created externally mid-form is to remount the hook\n // (e.g., via a `key` change).\n const hadPrimaryAtMountRef = useRef<boolean | null>(null)\n if (hadPrimaryAtMountRef.current === null && employeeJobs !== undefined) {\n hadPrimaryAtMountRef.current = employeeJobs.some(job => job.primary)\n }\n const hadPrimaryAtMount = hadPrimaryAtMountRef.current === true\n\n // FLSA status of the employee's primary job's current compensation, when one\n // exists. Used as a fallback default when adding a *secondary* job/comp so the\n // multi-job classification stays consistent with the primary by default — the\n // user can still override it (when allowed). Null when there was no primary\n // job at the moment the hook first observed `employeeJobs`, or when the\n // primary has no current compensation yet.\n const primaryFlsaStatus = hadPrimaryAtMount ? findPrimaryFlsaStatus(employeeJobs) : null\n\n const hireDate =\n currentJob?.hireDate ??\n // Secondary jobs being created (CompensationAddAnotherJobForm) have no hireDate until the\n // job POST completes. Fall back to the primary job's hireDate so the schema\n // can enforce EFFECTIVE_DATE_BEFORE_HIRE during that window.\n employeeJobs?.find(j => j.primary)?.hireDate ??\n null\n\n // In update mode, exclude the compensation being edited so it doesn't\n // bound `maximumEffectiveDate` to its own current date — that would prevent\n // the user from pushing the pending effective date further out.\n const futureCompensations = findFutureCompensations(currentJob).filter(\n c => c.uuid !== compensationId,\n )\n const hasPendingFutureCompensation = futureCompensations.length > 0\n const maximumEffectiveDate = earliestEffectiveDate(futureCompensations)\n\n const isCreateMode = !compensationId\n const mode = isCreateMode ? 'create' : 'update'\n // Adding a secondary job (the employee already has a primary). The Gusto API\n // only allows secondaries when the primary's current FLSA is Nonexempt, and\n // the secondary itself must match — so the FLSA field is not user-editable\n // in this branch. We force the form value to the primary's FLSA below and\n // hide `Fields.FlsaStatus`.\n // True when adding a brand-new secondary job (not when scheduling a future\n // comp for the primary). The distinction matters: for the primary's future\n // comp, FLSA should be editable; for a secondary, it must match the primary.\n const isAddingSecondaryJob =\n isCreateMode && primaryFlsaStatus === FlsaStatus.NONEXEMPT && currentJob?.primary !== true\n\n // Derive the effective-date floor internally so consumers don't need to wire\n // it up. Rules by mode and job type:\n // create (any job): tomorrow — new comp must be future-dated\n // update, primary: undefined — the carve-out (willDeleteSecondaryJobs) can\n // force effectiveDate to today on a disabled field; enforcing a floor here\n // would produce a spurious EFFECTIVE_DATE_BEFORE_MIN on submit.\n // update, secondary: tomorrow — must be in the future\n // The hire-date lower bound is handled separately in the schema via the\n // `hireDate` option (→ EFFECTIVE_DATE_BEFORE_HIRE), which fires alongside\n // this check so each violation gets its own error message.\n const internalMinEffectiveDate = useMemo(() => {\n if (!withEffectiveDateField) return undefined\n if (!isCreateMode && currentJob?.primary === true) return undefined\n\n return formatDateToStringDate(addDays(new Date(), 1)) ?? undefined\n }, [isCreateMode, currentJob?.primary, withEffectiveDateField])\n\n const [schema, metadataConfig] = useMemo(\n () =>\n createCompensationSchema({\n mode,\n optionalFieldsToRequire,\n hireDate,\n minEffectiveDate: internalMinEffectiveDate,\n withEffectiveDateField,\n }),\n [mode, optionalFieldsToRequire, hireDate, internalMinEffectiveDate, withEffectiveDateField],\n )\n\n const state = currentWorkAddress?.state\n\n // `flsaStatus` is intentionally allowed to be undefined so the field renders\n // an empty placeholder when nothing is provided — partners can choose to\n // seed it via `defaultValues.flsaStatus`. When a `compensation` is loaded we\n // seed from it; for a brand-new secondary job we inherit from the primary's\n // current compensation so multi-job classification stays consistent. The\n // schema enforces requiredness on submit in `create` mode (see\n // `requiredFieldsConfig` in compensationSchema.ts).\n //\n // `title` lives on compensation in the API — `job.title` is a denormalized\n // snapshot of the primary comp's title that can lag behind comp-level edits\n // on secondaries. Seed directly from the loaded compensation so editing in\n // place can't silently re-introduce a stale title from the job record.\n const resolvedDefaults: CompensationFormData = useMemo(\n () => ({\n title: currentCompensation?.title ?? partnerDefaults?.title ?? '',\n // When adding a secondary, the FLSA must match the primary's — force it\n // here (overriding any partner default) so the form submits the right\n // value even though `Fields.FlsaStatus` is hidden.\n flsaStatus: isAddingSecondaryJob\n ? primaryFlsaStatus\n : (currentCompensation?.flsaStatus ??\n partnerDefaults?.flsaStatus ??\n primaryFlsaStatus ??\n undefined),\n rate: Number(currentCompensation?.rate ?? partnerDefaults?.rate ?? 0),\n adjustForMinimumWage:\n currentCompensation?.adjustForMinimumWage ?? partnerDefaults?.adjustForMinimumWage ?? false,\n minimumWageId:\n currentCompensation?.minimumWages?.[0]?.uuid ?? partnerDefaults?.minimumWageId ?? '',\n paymentUnit:\n currentCompensation?.paymentUnit ?? partnerDefaults?.paymentUnit ?? PAY_PERIODS.HOUR,\n effectiveDate: currentCompensation?.effectiveDate ?? partnerDefaults?.effectiveDate ?? null,\n }),\n [currentCompensation, currentJob, partnerDefaults, primaryFlsaStatus, isAddingSecondaryJob],\n )\n\n const formMethods = useForm<CompensationFormData, unknown, CompensationFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const { control, getValues, setValue, clearErrors } = formMethods\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedAdjustForMinimumWage = useWatch({\n control,\n name: 'adjustForMinimumWage',\n })\n\n // Validation rules for `paymentUnit` and `rate` are FLSA-driven, so any\n // prior error on those fields is stale once FLSA changes. RHF doesn't clear\n // them on its own (`setValue` without `shouldValidate` skips the resolver,\n // and reValidate is per-field) — clear eagerly and let the next blur/submit\n // re-establish the error if it still applies.\n useEffect(() => {\n clearErrors(['paymentUnit', 'rate'])\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n setValue('paymentUnit', PAY_PERIODS.PAYCHECK)\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n setValue('paymentUnit', PAY_PERIODS.YEAR)\n setValue('rate', 0)\n } else {\n setValue('paymentUnit', resolvedDefaults.paymentUnit)\n }\n }, [watchedFlsaStatus, setValue, clearErrors, resolvedDefaults.paymentUnit])\n\n // The FLSA status that represents the employee's current classification.\n // In update mode this is the compensation being edited. In create mode\n // `currentCompensation` is null, so fall back to the job's active\n // compensation (identified by currentCompensationUuid) — this lets the\n // secondary-job warning fire even when scheduling a future-dated change.\n const currentJobActiveComp = currentJob\n ? currentJob.compensations?.find(c => c.uuid === currentJob.currentCompensationUuid)\n : undefined\n const effectiveBaseFlsaStatus =\n currentCompensation?.flsaStatus ?? currentJobActiveComp?.flsaStatus ?? null\n\n // True when the user is changing FLSA away from Nonexempt on a job that has\n // secondary jobs — those secondaries will be deleted by the API when the\n // new classification takes effect (immediately in update mode, at the chosen\n // effective date in create mode). Drives the warning and, in update mode\n // only, the effectiveDate-lock side effect below.\n const willDeleteSecondaryJobs =\n effectiveBaseFlsaStatus === FlsaStatus.NONEXEMPT &&\n watchedFlsaStatus !== undefined &&\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT &&\n otherJobsCount > 0\n\n // Carve-out UX — update mode only: while willDeleteSecondaryJobs is active\n // the server deletes secondaries immediately on PUT. Mirror this by forcing\n // `effectiveDate` to today and disabling the field. In create mode the\n // deletion happens at the chosen future date, so we show the warning but\n // leave the date field editable.\n const carveOutActiveRef = useRef(false)\n const priorEffectiveDateRef = useRef<string | null>(null)\n useEffect(() => {\n if (!isCreateMode && willDeleteSecondaryJobs && !carveOutActiveRef.current) {\n priorEffectiveDateRef.current = getValues('effectiveDate') ?? null\n setValue('effectiveDate', todayISO(), { shouldDirty: true, shouldValidate: false })\n carveOutActiveRef.current = true\n } else if (!isCreateMode && !willDeleteSecondaryJobs && carveOutActiveRef.current) {\n setValue('effectiveDate', priorEffectiveDateRef.current ?? null, {\n shouldDirty: true,\n shouldValidate: false,\n })\n priorEffectiveDateRef.current = null\n carveOutActiveRef.current = false\n }\n }, [isCreateMode, willDeleteSecondaryJobs, getValues, setValue])\n\n const updateCompensationMutation = useJobsAndCompensationsUpdateCompensationMutation()\n const createCompensationMutation = useJobsAndCompensationsCreateCompensationMutation()\n\n const isPending = updateCompensationMutation.isPending || createCompensationMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('CompensationForm')\n\n const queriesForErrors = employeeId\n ? [jobsQuery, addressesQuery, employeeQuery, minWagesQuery]\n : []\n const errorHandling = composeErrorHandler(queriesForErrors, { submitError, setSubmitError })\n\n const isCommissionOnly =\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n const isOwner = watchedFlsaStatus === FlsaStatus.OWNER\n\n // Hide `Fields.FlsaStatus` when the user has no meaningful choice:\n // - update mode editing a secondary whose comp is already Nonexempt\n // (must keep matching the primary), and\n // - create mode while adding a secondary (must inherit primary's FLSA).\n // The first job's create flow and primary-job edits keep the field exposed.\n const isFlsaSelectionEnabled =\n !isAddingSecondaryJob &&\n (watchedFlsaStatus !== FlsaStatus.NONEXEMPT || currentJob?.primary === true || isCreateMode)\n\n const isAdjustMinimumWageEnabled =\n watchedFlsaStatus === FlsaStatus.NONEXEMPT &&\n minimumWages.length > 0 &&\n state !== undefined &&\n !TIP_CREDITS_UNSUPPORTED_STATES.includes(state)\n\n // Min-wage adjustment is only valid for Nonexempt FLSA (and a state that\n // allows tip credit). When the gate flips off — typically because the user\n // changed FLSA away from Nonexempt — `Fields.AdjustForMinimumWage` and\n // `Fields.MinimumWageId` stop rendering, but the underlying form values\n // persist in react-hook-form state. That would leak an\n // `adjust_for_minimum_wage: true` + `minimum_wages: [...]` body on submit\n // (server rejects with \"Minimum wage adjustments only valid for\n // flsa_status: Nonexempt\"). Reset both values to safe defaults so the\n // submitted payload always matches what the user can actually see.\n useEffect(() => {\n if (isAdjustMinimumWageEnabled) return\n if (getValues('adjustForMinimumWage')) {\n setValue('adjustForMinimumWage', false, { shouldDirty: true, shouldValidate: false })\n }\n if (getValues('minimumWageId')) {\n setValue('minimumWageId', '', { shouldDirty: true, shouldValidate: false })\n }\n // Both fields stop rendering once the gate closes — clear errors so a\n // stale one doesn't silently fail the next submit with no visible UI to fix.\n clearErrors(['adjustForMinimumWage', 'minimumWageId'])\n }, [isAdjustMinimumWageEnabled, getValues, setValue, clearErrors])\n\n const minimumWageOptions = minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${wage.wage} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const effectiveDateMinDate = useMemo(\n () =>\n [internalMinEffectiveDate, hireDate]\n .filter((d): d is string => !!d)\n .reduce<string | null>((max, d) => (!max || d > max ? d : max), null),\n [internalMinEffectiveDate, hireDate],\n )\n const fieldsMetadata = {\n title: baseMetadata.title,\n effectiveDate: {\n ...baseMetadata.effectiveDate,\n isDisabled: willDeleteSecondaryJobs && !isCreateMode,\n minDate: effectiveDateMinDate,\n maxDate: maximumEffectiveDate,\n },\n flsaStatus: withOptions<FlsaStatusType>(\n baseMetadata.flsaStatus,\n flsaOptions,\n flsaStatusEntries,\n ),\n rate: { ...baseMetadata.rate, isDisabled: isCommissionOnly },\n paymentUnit: withOptions<PaymentUnit>(\n { ...baseMetadata.paymentUnit, isDisabled: isOwner || isCommissionOnly },\n paymentUnitOptions,\n paymentUnitEntries,\n ),\n adjustForMinimumWage: {\n ...baseMetadata.adjustForMinimumWage,\n isDisabled: !isAdjustMinimumWageEnabled,\n },\n minimumWageId: withOptions<MinimumWage>(\n baseMetadata.minimumWageId,\n minimumWageOptions,\n minimumWages,\n ),\n }\n\n const onSubmit = async (\n options?: CompensationSubmitOptions,\n ): Promise<HookSubmitResult<Compensation> | undefined> => {\n let submitResult: HookSubmitResult<Compensation> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: CompensationFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const resolvedJobId = options?.jobId ?? jobId\n const resolvedCompensationId = options?.compensationId ?? compensationId\n const resolvedMode = resolvedCompensationId ? 'update' : 'create'\n\n // When the field is rendered, the validated payload value wins\n // unless an explicit submit-time override is supplied. When the\n // field is hidden (`withEffectiveDateField: false`) we are\n // strictly options-only — matching `useWorkAddressForm` and the\n // hidden-field behavior of `useHomeAddressForm` / `useJobForm`.\n // The carve-out's form-state side effect (force value to today)\n // is therefore inert in the hidden-field path; partners who\n // need a specific date there must supply it via\n // `CompensationSubmitOptions.effectiveDate`.\n const resolvedEffectiveDate = withEffectiveDateField\n ? (options?.effectiveDate ?? payload.effectiveDate ?? undefined)\n : (options?.effectiveDate ?? undefined)\n\n const requestBodyBase = {\n rate: String(payload.rate),\n paymentUnit: payload.paymentUnit,\n flsaStatus: payload.flsaStatus,\n effectiveDate: resolvedEffectiveDate,\n title: payload.title || undefined,\n adjustForMinimumWage: payload.adjustForMinimumWage,\n minimumWages: payload.adjustForMinimumWage ? [{ uuid: payload.minimumWageId }] : [],\n }\n\n let result: Compensation | undefined\n\n if (resolvedMode === 'create') {\n if (!resolvedJobId) {\n throw new SDKInternalError(\n 'jobId is required to create a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n // Schema's `requiredFieldsConfig` guarantees `flsaStatus` is set\n // on create-mode submit; the runtime guard appeases the API\n // request-body type (which requires a non-undefined value on\n // POST, vs. the optional PUT body).\n if (!payload.flsaStatus) {\n throw new SDKInternalError('flsaStatus is required to create a compensation.')\n }\n const createResponse = await createCompensationMutation.mutateAsync({\n request: {\n jobId: resolvedJobId,\n compensationsRequestBody: { ...requestBodyBase, flsaStatus: payload.flsaStatus },\n },\n })\n result = createResponse.compensation\n if (!result) throw new SDKInternalError('Compensation creation failed')\n } else {\n if (!resolvedCompensationId) {\n throw new SDKInternalError(\n 'compensationId is required to update a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n const resolvedVersion =\n options?.compensationVersion ?? (currentCompensation?.version as string | undefined)\n if (!resolvedVersion) {\n throw new SDKInternalError(\n 'compensation version is required to update a compensation. Pass it via submit options when threading post-create, or ensure the compensation is loaded.',\n )\n }\n const updateResponse = await updateCompensationMutation.mutateAsync({\n request: {\n compensationId: resolvedCompensationId,\n compensationsUpdateRequestBody: {\n version: resolvedVersion,\n ...requestBodyBase,\n },\n },\n })\n result = updateResponse.compensation\n if (!result) throw new SDKInternalError('Compensation update failed')\n }\n\n submitResult = { mode: resolvedMode, data: result }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = employeeId\n ? jobsQuery.isLoading ||\n addressesQuery.isLoading ||\n employeeQuery.isLoading ||\n minWagesQuery.isLoading\n : false\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n if (isDataLoading || (employeeId && (!employeeJobs || !employee))) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n compensation: currentCompensation,\n currentJob,\n minimumWages,\n minimumEffectiveDate: effectiveDateMinDate,\n maximumEffectiveDate,\n hasPendingFutureCompensation,\n },\n status: {\n isPending,\n mode,\n willDeleteSecondaryJobs,\n showCommissionFederalMinimumPayAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT,\n showCommissionMinimumWageAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n showOwnerSalaryAlert: watchedFlsaStatus === FlsaStatus.OWNER,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Title: TitleField,\n FlsaStatus: isFlsaSelectionEnabled ? FlsaStatusField : undefined,\n Rate: isCommissionOnly ? undefined : RateField,\n PaymentUnit: isCommissionOnly ? undefined : PaymentUnitField,\n AdjustForMinimumWage: isAdjustMinimumWageEnabled ? AdjustForMinimumWageField : undefined,\n MinimumWageId:\n isAdjustMinimumWageEnabled && watchedAdjustForMinimumWage\n ? MinimumWageIdField\n : undefined,\n EffectiveDate: withEffectiveDateField ? EffectiveDateField : undefined,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\n/**\n * Discriminated union returned by {@link useCompensationForm} — either the loading state or the ready state.\n *\n * @remarks\n * Use this type when threading the hook result through helpers (e.g.\n * presentational components). Discriminate on `isLoading` to narrow to\n * {@link UseCompensationFormReady}.\n *\n * @public\n */\nexport type UseCompensationFormResult = HookLoadingResult | UseCompensationFormReady\n\n/**\n * Metadata for each {@link useCompensationForm} field, exposed on `form.fieldsMetadata`.\n *\n * @remarks\n * Includes per-field `isDisabled`, `isRequired`, and the dynamic option list\n * for select fields (`flsaStatus`, `paymentUnit`, `minimumWageId`).\n * `effectiveDate` additionally carries `minDate` / `maxDate` derived from\n * the parent job's hire date and any pending future compensation.\n *\n * @public\n */\nexport type CompensationFieldsMetadata = UseCompensationFormReady['form']['fieldsMetadata']\n"],"names":["resolveCompAndJob","jobs","compensationId","jobId","job","compensation","c","j","findPrimaryFlsaStatus","findFutureCompensations","today","todayISO","earliestEffectiveDate","comps","min","d","flsaStatusEntries","FlsaStatus","flsaOptions","status","paymentUnitEntries","PAY_PERIODS","paymentUnitOptions","unit","useCompensationForm","employeeId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","withEffectiveDateField","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","addressesQuery","useEmployeeAddressesGetWorkAddresses","employeeQuery","useEmployeesGet","employeeJobs","currentWorkAddress","address","locationUuid","employee","minWagesQuery","useLocationsGetMinimumWages","minimumWages","currentCompensation","currentJob","otherJobsCount","hadPrimaryAtMountRef","useRef","primaryFlsaStatus","hireDate","futureCompensations","hasPendingFutureCompensation","maximumEffectiveDate","isCreateMode","mode","isAddingSecondaryJob","internalMinEffectiveDate","useMemo","formatDateToStringDate","addDays","schema","metadataConfig","createCompensationSchema","state","resolvedDefaults","formMethods","useForm","zodResolver","control","getValues","setValue","clearErrors","watchedFlsaStatus","useWatch","watchedAdjustForMinimumWage","useEffect","currentJobActiveComp","willDeleteSecondaryJobs","carveOutActiveRef","priorEffectiveDateRef","updateCompensationMutation","useJobsAndCompensationsUpdateCompensationMutation","createCompensationMutation","useJobsAndCompensationsCreateCompensationMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isCommissionOnly","isOwner","isFlsaSelectionEnabled","isAdjustMinimumWageEnabled","TIP_CREDITS_UNSUPPORTED_STATES","minimumWageOptions","wage","baseMetadata","useDeriveFieldsMetadata","effectiveDateMinDate","max","fieldsMetadata","withOptions","onSubmit","options","submitResult","resolve","data","payload","resolvedJobId","resolvedCompensationId","resolvedMode","resolvedEffectiveDate","requestBodyBase","result","SDKInternalError","resolvedVersion","isDataLoading","hookFormInternals","useHookFormInternals","TitleField","FlsaStatusField","RateField","PaymentUnitField","AdjustForMinimumWageField","MinimumWageIdField","EffectiveDateField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoPA,SAASA,GACPC,GACAC,GACAC,GACwD;AACxD,MAAI,CAACF,EAAM,QAAO,EAAE,cAAc,MAAM,KAAK,KAAA;AAC7C,MAAIC,GAAgB;AAClB,eAAWE,KAAOH,GAAM;AACtB,YAAMI,IAAeD,EAAI,eAAe,KAAK,CAAAE,MAAKA,EAAE,SAASJ,CAAc;AAC3E,UAAIG,EAAc,QAAO,EAAE,cAAAA,GAAc,KAAAD,EAAA;AAAA,IAC3C;AAIA,WAAO,EAAE,cAAc,MAAM,KADTD,IAASF,EAAK,KAAK,OAAKM,EAAE,SAASJ,CAAK,KAAK,OAAQ,KACvC;AAAA,EACpC;AACA,SAAIA,IAAc,EAAE,cAAc,MAAM,KAAKF,EAAK,KAAK,CAAAM,MAAKA,EAAE,SAASJ,CAAK,KAAK,KAAA,IAC1E,EAAE,cAAc,MAAM,KAAK,KAAA;AACpC;AAEA,SAASK,GAAsBP,GAAgD;AAC7E,MAAI,CAACA,EA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
1
+ {"version":3,"file":"useCompensationForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef } from 'react'\nimport type { ComponentType } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type {\n Compensation,\n PaymentUnit,\n} from '@gusto/embedded-api-v-2026-02-01/models/components/compensation'\nimport type { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2026-02-01/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2026-02-01/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api-v-2026-02-01/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsCreateCompensationMutation } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsCreateCompensation'\nimport { useJobsAndCompensationsUpdateCompensationMutation } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsUpdateCompensation'\nimport { useLocationsGetMinimumWages } from '@gusto/embedded-api-v-2026-02-01/react-query/locationsGetMinimumWages'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api-v-2026-02-01/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeesGet } from '@gusto/embedded-api-v-2026-02-01/react-query/employeesGet'\nimport {\n createCompensationSchema,\n type CompensationOptionalFieldsToRequire,\n type CompensationFormData,\n type CompensationFormOutputs,\n} from './compensationSchema'\nimport {\n TitleField,\n FlsaStatusField,\n RateField,\n PaymentUnitField,\n AdjustForMinimumWageField,\n MinimumWageIdField,\n EffectiveDateField,\n} from './fields'\nimport type {\n TitleFieldProps,\n FlsaStatusFieldProps,\n RateFieldProps,\n PaymentUnitFieldProps,\n AdjustForMinimumWageFieldProps,\n MinimumWageIdFieldProps,\n EffectiveDateFieldProps,\n} from './fields'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { withFlags } from '@/partner-hook-utils/form/withFlags'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { useHookFormInternals } from '@/partner-hook-utils/form/useHookFormInternals'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldMetadata,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { FlsaStatus, PAY_PERIODS, TIP_CREDITS_UNSUPPORTED_STATES } from '@/shared/constants'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { addDays, formatDateToStringDate } from '@/helpers/dateFormatting'\n\n/**\n * Optional values supplied to {@link useCompensationForm}'s `actions.onSubmit` at submit time.\n *\n * @remarks\n * Use these to override hook-construction props when an ID isn't known at\n * mount — most commonly the **onboarding stub-fill** chain, where `useJobForm`\n * creates the parent job and returns the auto-created stub compensation, and\n * the IDs and version are threaded into this hook's `onSubmit` to PUT the\n * stub.\n *\n * @public\n */\nexport interface CompensationSubmitOptions {\n /** Override jobId — required when creating a compensation if not configured at hook construction (e.g. when the parent job was just created in the same submit chain). */\n jobId?: string\n /** Override compensationId — when present, forces update (PUT) routing regardless of hook construction. */\n compensationId?: string\n /**\n * Compensation version for optimistic locking on PUT. Required when forcing\n * update routing post-create (e.g. updating the auto-created stub returned\n * from `POST /v1/employees/:id/jobs`). When omitted, the hook reads the\n * version from its cached `currentCompensation`.\n */\n compensationVersion?: string\n /**\n * Supply `effectiveDate` at submit time. When `withEffectiveDateField`\n * is `true`, this overrides the form's value. When `withEffectiveDateField`\n * is `false`, this is the only way to put `effective_date` on the wire —\n * the form value is not read in that mode (matching the options-only\n * convention of `useWorkAddressForm` / `useHomeAddressForm` / `useJobForm`).\n */\n effectiveDate?: string\n}\n\n/**\n * Configuration options for {@link useCompensationForm}.\n *\n * @remarks\n * Presence or absence of `compensationId` selects the API verb — see the\n * `compensationId` field description. `employeeId` is optional so the hook\n * can be composed alongside an employee-creation step. `jobId` is optional in\n * update mode (derived from the loaded compensation) and required in create\n * mode (scopes the POST); supply it at submit time via\n * {@link CompensationSubmitOptions.jobId} when the parent job is created in\n * the same submit chain.\n *\n * @public\n */\nexport interface UseCompensationFormProps {\n /** UUID of the employee whose compensation is being created or edited. Drives data fetching for derived helpers (jobs list, work address, minimum wages). May be omitted when composing alongside an employee-creation step. */\n employeeId?: string\n /** The parent job's UUID. Required in create mode (scopes `POST /v1/jobs/:jobId/compensations`). Optional in update mode — the parent job is derived from the loaded compensation. */\n jobId?: string\n /** Present → update mode (PUT /v1/compensations/:id). Omitted → create mode (POST /v1/jobs/:jobId/compensations). */\n compensationId?: string\n /** Override fields that are optional on a given mode to be required. See {@link CompensationOptionalFieldsToRequire}. */\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n /** Pre-fill form values. Server data takes precedence on update mode. */\n defaultValues?: Partial<CompensationFormData>\n /** Passed through to react-hook-form. Defaults to `'onSubmit'`. */\n validationMode?: UseFormProps['mode']\n /** Auto-focus the first invalid field on submit. Set to `false` when using `composeSubmitHandler` so submit-time focus is coordinated across multiple forms. Defaults to `true`. */\n shouldFocusError?: boolean\n /**\n * When `false`, hides `Fields.EffectiveDate` (becomes `undefined`) and\n * removes `effectiveDate` from schema validation. In this mode the hook\n * does not read any form value at submit time — `effective_date` is\n * omitted from the request body unless explicitly supplied via\n * {@link CompensationSubmitOptions.effectiveDate}. This matches the\n * options-only convention of other form hooks, and means the\n * `willDeleteSecondaryJobs` carve-out's form-state side effects do not\n * leak onto the wire (there is no field to render them in anyway).\n * Defaults to `true`.\n */\n withEffectiveDateField?: boolean\n}\n\n/**\n * Pre-bound field components exposed on `useCompensationForm().form.Fields`.\n *\n * @remarks\n * Each property is either the field component or `undefined`. A field is\n * `undefined` when conditions for rendering it aren't met — see each member\n * for its visibility rule. Always null-check conditional fields (e.g.\n * `{Fields.FlsaStatus && <Fields.FlsaStatus ... />}`) before rendering.\n *\n * @public\n */\nexport interface CompensationFormFields {\n /** Bound to `title`. Title text input. Always available. Optional in both modes unless `optionalFieldsToRequire` requires it. */\n Title: ComponentType<TitleFieldProps>\n /** Bound to `flsaStatus`. FLSA classification select. `undefined` when the status is not user-editable (e.g. secondary jobs that must match the primary). */\n FlsaStatus: ComponentType<FlsaStatusFieldProps> | undefined\n /** Bound to `rate`. Compensation amount input. `undefined` for commission-only FLSA statuses, which don't accept a partner-supplied rate. */\n Rate: ComponentType<RateFieldProps> | undefined\n /** Bound to `paymentUnit`. Payment unit select. `undefined` for commission-only FLSA statuses (the hook forces `paymentUnit=Year`). */\n PaymentUnit: ComponentType<PaymentUnitFieldProps> | undefined\n /** Bound to `adjustForMinimumWage`. Minimum-wage adjustment checkbox. `undefined` unless `flsaStatus === Nonexempt`, the employee's work location has minimum wages, and the state supports tip credits. */\n AdjustForMinimumWage: ComponentType<AdjustForMinimumWageFieldProps> | undefined\n /** Bound to `minimumWageId`. Minimum-wage selection. `undefined` unless `Fields.AdjustForMinimumWage` is rendered and checked. */\n MinimumWageId: ComponentType<MinimumWageIdFieldProps> | undefined\n /** Bound to `effectiveDate`. Effective-date picker. `undefined` when `withEffectiveDateField: false`; supply the value via `CompensationSubmitOptions.effectiveDate` in that mode. */\n EffectiveDate: ComponentType<EffectiveDateFieldProps> | undefined\n}\n\n/**\n * Ready-state shape returned by {@link useCompensationForm} once data has loaded.\n *\n * @remarks\n * Discriminated by `isLoading: false`. Extends {@link BaseFormHookReady} with\n * the compensation-specific `data`, `status`, `actions`, and `form.Fields`\n * shape. Static, entity-derived values live under `data.*`; reactive values\n * that flip with form input live under `status.*`.\n *\n * @public\n */\nexport interface UseCompensationFormReady extends BaseFormHookReady<\n CompensationFieldsMetadata,\n CompensationFormData,\n CompensationFormFields\n> {\n /** Compensation-specific data payload: the loaded compensation, the parent job, available minimum wages, and effective-date bounds. */\n data: {\n /** The compensation row loaded for update; `null` in create mode. */\n compensation: Compensation | null\n /** The parent job. In update mode it's derived from the loaded compensation; in create mode it's looked up by `jobId`. `null` if neither resolves. */\n currentJob: Job | null\n /** Minimum wages available at the employee's active work location. Empty when no location is set or no minimums are defined. */\n minimumWages: MinimumWage[]\n /** Lower bound for `effectiveDate` (typically the parent job's hire date). */\n minimumEffectiveDate: string | null\n /** Upper bound for `effectiveDate` — the next scheduled future compensation's effective date, when one exists. */\n maximumEffectiveDate: string | null\n /** True when at least one future-dated compensation already exists for this job. */\n hasPendingFutureCompensation: boolean\n }\n /** Submission state and reactive flags derived from current form input. `isPending` is `true` while a create/update mutation is in flight; `mode` reflects whether the next submit will create or update; the `show*Alert` flags drive FLSA-specific inline warnings. */\n status: {\n /** `true` while a create or update mutation is in flight. */\n isPending: boolean\n /** Reflects whether the next submit will POST a new compensation or PUT an existing one. */\n mode: 'create' | 'update'\n /**\n * True when submitting the form right now would delete the employee's\n * secondary jobs server-side (the \"carve-out\" branch). Reactive:\n * derived from the current `flsaStatus` form value, the loaded\n * compensation, and the other-jobs count, so this flips as you change\n * inputs.\n *\n * Conditions: update mode, the loaded compensation is Nonexempt, the\n * form's `flsaStatus` has been changed to a non-Nonexempt value, and\n * the employee has at least one secondary job.\n *\n * While this flag is true the hook also takes the `effectiveDate`\n * field over: it forces the form value to today (so submits route\n * through a PUT that immediately deletes secondaries) and exposes\n * `fieldsMetadata.effectiveDate.isDisabled = true` so `Fields.EffectiveDate`\n * renders as disabled. On revert (FLSA back to Nonexempt) the prior\n * `effectiveDate` is restored. Render an inline warning keyed off\n * this flag — no separate confirmation step is needed.\n */\n willDeleteSecondaryJobs: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_EXEMPT`\n * (Commission Only/No Overtime). Render the federal-minimum-pay\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionFederalMinimumPayAlert: boolean\n /**\n * True when the current `flsaStatus` is `COMMISSION_ONLY_NONEXEMPT`\n * (Commission Only/Eligible for overtime). Render the local-minimum-wage\n * warning alert when this flag is true. While this flag is true,\n * `Fields.Rate` and `Fields.PaymentUnit` are also `undefined` (the\n * hook forces `rate=0`, `paymentUnit=YEAR` on the form values).\n */\n showCommissionMinimumWageAlert: boolean\n /**\n * True when the current `flsaStatus` is `OWNER` (Owner's draw). Render\n * an informational alert noting that the IRS requires S-corp owners to\n * pay themselves a reasonable salary for similar work before taking\n * distributions.\n */\n showOwnerSalaryAlert: boolean\n }\n /** Submit actions exposed by the hook. */\n actions: {\n /** Validates the form, runs the appropriate create/update mutation, and resolves to a {@link HookSubmitResult} containing the saved compensation. Resolves to `undefined` on validation failure or mutation error. Accepts {@link CompensationSubmitOptions} for threading IDs/version into the onboarding stub-fill chain. */\n onSubmit: (\n options?: CompensationSubmitOptions,\n ) => Promise<HookSubmitResult<Compensation> | undefined>\n }\n}\n\nfunction resolveCompAndJob(\n jobs: Job[] | undefined,\n compensationId: string | undefined,\n jobId: string | undefined,\n): { compensation: Compensation | null; job: Job | null } {\n if (!jobs) return { compensation: null, job: null }\n if (compensationId) {\n for (const job of jobs) {\n const compensation = job.compensations?.find(c => c.uuid === compensationId)\n if (compensation) return { compensation, job }\n }\n // If the comp isn't in any job's compensations list, still try to resolve\n // the job by jobId so callers can check job metadata (e.g. job.primary).\n const fallbackJob = jobId ? (jobs.find(j => j.uuid === jobId) ?? null) : null\n return { compensation: null, job: fallbackJob }\n }\n if (jobId) return { compensation: null, job: jobs.find(j => j.uuid === jobId) ?? null }\n return { compensation: null, job: null }\n}\n\nfunction findPrimaryFlsaStatus(jobs: Job[] | undefined): FlsaStatusType | null {\n if (!jobs) return null\n for (const job of jobs) {\n if (!job.primary) continue\n const compensation = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n if (compensation?.flsaStatus) return compensation.flsaStatus\n }\n return null\n}\n\nfunction findFutureCompensations(job: Job | null): Compensation[] {\n if (!job?.compensations) return []\n const today = todayISO()\n return job.compensations.filter(c => c.effectiveDate !== undefined && c.effectiveDate > today)\n}\n\nfunction earliestEffectiveDate(comps: Compensation[]): string | null {\n if (comps.length === 0) return null\n return comps.reduce<string | null>((min, c) => {\n const d = c.effectiveDate\n if (!d) return min\n if (!min || d < min) return d\n return min\n }, null)\n}\n\nconst flsaStatusEntries: FlsaStatusType[] = [\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n]\n\nconst flsaOptions = flsaStatusEntries.map(status => ({ value: status, label: status }))\n\nconst paymentUnitEntries: PaymentUnit[] = [\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n]\n\nconst paymentUnitOptions = paymentUnitEntries.map(unit => ({ value: unit, label: unit }))\n\nfunction todayISO(): string {\n return new Date().toISOString().split('T')[0]!\n}\n\n/** @internal */\nfunction buildCompensationFieldsMetadata(\n base: Record<keyof CompensationFormData, FieldMetadata>,\n {\n willDeleteSecondaryJobs,\n isCreateMode,\n isCommissionOnly,\n isOwner,\n isAdjustMinimumWageEnabled,\n effectiveDateMinDate,\n maximumEffectiveDate,\n minimumWageOptions,\n minimumWages,\n }: {\n willDeleteSecondaryJobs: boolean\n isCreateMode: boolean\n isCommissionOnly: boolean\n isOwner: boolean\n isAdjustMinimumWageEnabled: boolean\n effectiveDateMinDate: string | null\n maximumEffectiveDate: string | null\n minimumWageOptions: { value: string; label: string }[]\n minimumWages: MinimumWage[]\n },\n) {\n return {\n title: base.title,\n effectiveDate: withFlags(base.effectiveDate, {\n isDisabled: willDeleteSecondaryJobs && !isCreateMode,\n minDate: effectiveDateMinDate,\n maxDate: maximumEffectiveDate,\n }),\n flsaStatus: withOptions<FlsaStatusType>(base.flsaStatus, flsaOptions, flsaStatusEntries),\n rate: withFlags(base.rate, { isDisabled: isCommissionOnly }),\n paymentUnit: withOptions<PaymentUnit>(\n withFlags(base.paymentUnit, { isDisabled: isOwner || isCommissionOnly }),\n paymentUnitOptions,\n paymentUnitEntries,\n ),\n adjustForMinimumWage: withFlags(base.adjustForMinimumWage, {\n isDisabled: !isAdjustMinimumWageEnabled,\n }),\n minimumWageId: withOptions<MinimumWage>(base.minimumWageId, minimumWageOptions, minimumWages),\n } satisfies FieldsMetadata\n}\n\n/**\n * Headless hook for creating or updating a compensation row on a job — FLSA classification, pay rate, payment unit, effective date, and optional minimum-wage adjustment.\n *\n * @remarks\n * Companion hook to `useJobForm`. Jobs and their compensations are separate\n * entities in the Gusto API and this hook focuses exclusively on the\n * compensation side. Presence of `compensationId` selects the verb:\n *\n * | Hook config / submit options | Mode | API call |\n * | ---------------------------- | ---- | -------- |\n * | `{ jobId, compensationId }` | update | `PUT /v1/compensations/:compensationId` (with `version`) |\n * | `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:jobId/compensations` |\n * | `{ employeeId }` + submit `{ jobId, compensationId, compensationVersion }` | update | `PUT /v1/compensations/:compensationId` (with the supplied `version`) |\n * | `{ employeeId }` + submit `{ jobId }` (no `compensationId`) | create | `POST /v1/jobs/:options.jobId/compensations` |\n *\n * Use the submit-options form for the **onboarding stub-fill** chain: after\n * `useJobForm.actions.onSubmit()` creates a job, capture the auto-created\n * compensation's UUID and version from the response, and pass them as\n * `{ jobId, compensationId, compensationVersion }` to this hook's `onSubmit`\n * to PUT the stub.\n *\n * The hook exposes several derived helpers for driving UX — static\n * entity-derived values under `data.*` (effective-date bounds, pending\n * future compensations) and reactive flags under `status.*` (the\n * `willDeleteSecondaryJobs` carve-out, plus FLSA-specific alerts for\n * commission-only and owner classifications). When\n * `willDeleteSecondaryJobs` is `true` in update mode, the hook also locks\n * the `effectiveDate` field (forces to today, renders disabled) until the\n * FLSA selection is reverted.\n *\n * @param input - {@link UseCompensationFormProps} — `employeeId`, `jobId`, `compensationId` (toggle create/update), required-field overrides, default values, and which fields the hook renders.\n * @returns A {@link HookLoadingResult} while data is loading, or a {@link UseCompensationFormReady} once ready.\n * @public\n *\n * @example\n * ```tsx\n * import { useCompensationForm, SDKFormProvider } from '@gusto/embedded-react-sdk'\n *\n * function CompensationForm({ employeeId, jobId }: { employeeId: string; jobId: string }) {\n * const comp = useCompensationForm({ employeeId, jobId })\n * if (comp.isLoading) return null\n *\n * const { Fields } = comp.form\n * return (\n * <form onSubmit={e => { e.preventDefault(); comp.actions.onSubmit() }}>\n * <SDKFormProvider formHookResult={comp}>\n * {Fields.FlsaStatus && <Fields.FlsaStatus label=\"Employee type\" />}\n * <Fields.Rate label=\"Compensation amount\" />\n * <Fields.PaymentUnit label=\"Payment unit\" />\n * {Fields.EffectiveDate && <Fields.EffectiveDate label=\"Effective date\" />}\n * </SDKFormProvider>\n * {comp.status.willDeleteSecondaryJobs && (\n * <p>Saving will remove this employee's secondary jobs.</p>\n * )}\n * <button type=\"submit\" disabled={comp.status.isPending}>Save</button>\n * </form>\n * )\n * }\n * ```\n */\nexport function useCompensationForm({\n employeeId,\n jobId,\n compensationId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n withEffectiveDateField = true,\n}: UseCompensationFormProps): HookLoadingResult | UseCompensationFormReady {\n const jobsQuery = useJobsAndCompensationsGetJobs(\n {\n employeeId: employeeId ?? '',\n // Fetch all effective-dated compensations when editing an existing one so\n // resolveCompAndJob can find the target comp (future-dated comps are\n // omitted from the default response, which only returns the current comp).\n include: compensationId\n ? GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations\n : undefined,\n },\n { enabled: !!employeeId },\n )\n const addressesQuery = useEmployeeAddressesGetWorkAddresses(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n const employeeQuery = useEmployeesGet({ employeeId: employeeId ?? '' }, { enabled: !!employeeId })\n\n const employeeJobs = jobsQuery.data?.jobs\n const workAddresses = addressesQuery.data?.employeeWorkAddressesList\n const currentWorkAddress = workAddresses?.find(address => address.active)\n const locationUuid = currentWorkAddress?.locationUuid\n const employee = employeeQuery.data?.employee\n\n const minWagesQuery = useLocationsGetMinimumWages(\n { locationUuid: locationUuid ?? '' },\n { enabled: !!locationUuid },\n )\n\n const minimumWages = minWagesQuery.data?.minimumWageList ?? []\n\n const { compensation: currentCompensation, job: currentJob } = resolveCompAndJob(\n employeeJobs,\n compensationId,\n jobId,\n )\n\n const otherJobsCount =\n employeeJobs && currentJob ? employeeJobs.filter(j => j.uuid !== currentJob.uuid).length : 0\n\n // Snapshot — written exactly once, on the first render where `employeeJobs`\n // is defined (i.e., the initial `getJobs` query has resolved) — capturing\n // whether the employee already had a primary job at that moment.\n //\n // Used to ignore the API-generated stub primary (FLSA Nonexempt, rate \"0.00\")\n // that briefly appears between the chained job POST and comp PUT during\n // onboarding: `getJobs` invalidates between the two mutations and\n // momentarily includes the stub, which would otherwise flip\n // `isAddingSecondaryJob` to true and hide `Fields.FlsaStatus` mid-submit.\n //\n // In steady-state flows (edit primary, edit secondary, add secondary), the\n // real primary already exists when the query first resolves, so the snapshot\n // is `true` and live `employeeJobs` continues to drive `primaryFlsaStatus`.\n // Recovery for the rare case where a partner mounts before any jobs exist\n // and a primary is created externally mid-form is to remount the hook\n // (e.g., via a `key` change).\n const hadPrimaryAtMountRef = useRef<boolean | null>(null)\n if (hadPrimaryAtMountRef.current === null && employeeJobs !== undefined) {\n hadPrimaryAtMountRef.current = employeeJobs.some(job => job.primary)\n }\n const hadPrimaryAtMount = hadPrimaryAtMountRef.current === true\n\n // FLSA status of the employee's primary job's current compensation, when one\n // exists. Used as a fallback default when adding a *secondary* job/comp so the\n // multi-job classification stays consistent with the primary by default — the\n // user can still override it (when allowed). Null when there was no primary\n // job at the moment the hook first observed `employeeJobs`, or when the\n // primary has no current compensation yet.\n const primaryFlsaStatus = hadPrimaryAtMount ? findPrimaryFlsaStatus(employeeJobs) : null\n\n const hireDate =\n currentJob?.hireDate ??\n // Secondary jobs being created (CompensationAddAnotherJobForm) have no hireDate until the\n // job POST completes. Fall back to the primary job's hireDate so the schema\n // can enforce EFFECTIVE_DATE_BEFORE_HIRE during that window.\n employeeJobs?.find(j => j.primary)?.hireDate ??\n null\n\n // In update mode, exclude the compensation being edited so it doesn't\n // bound `maximumEffectiveDate` to its own current date — that would prevent\n // the user from pushing the pending effective date further out.\n const futureCompensations = findFutureCompensations(currentJob).filter(\n c => c.uuid !== compensationId,\n )\n const hasPendingFutureCompensation = futureCompensations.length > 0\n const maximumEffectiveDate = earliestEffectiveDate(futureCompensations)\n\n const isCreateMode = !compensationId\n const mode = isCreateMode ? 'create' : 'update'\n // Adding a secondary job (the employee already has a primary). The Gusto API\n // only allows secondaries when the primary's current FLSA is Nonexempt, and\n // the secondary itself must match — so the FLSA field is not user-editable\n // in this branch. We force the form value to the primary's FLSA below and\n // hide `Fields.FlsaStatus`.\n // True when adding a brand-new secondary job (not when scheduling a future\n // comp for the primary). The distinction matters: for the primary's future\n // comp, FLSA should be editable; for a secondary, it must match the primary.\n const isAddingSecondaryJob =\n isCreateMode && primaryFlsaStatus === FlsaStatus.NONEXEMPT && currentJob?.primary !== true\n\n // Derive the effective-date floor internally so consumers don't need to wire\n // it up. Rules by mode and job type:\n // create (any job): tomorrow — new comp must be future-dated\n // update, primary: undefined — the carve-out (willDeleteSecondaryJobs) can\n // force effectiveDate to today on a disabled field; enforcing a floor here\n // would produce a spurious EFFECTIVE_DATE_BEFORE_MIN on submit.\n // update, secondary: tomorrow — must be in the future\n // The hire-date lower bound is handled separately in the schema via the\n // `hireDate` option (→ EFFECTIVE_DATE_BEFORE_HIRE), which fires alongside\n // this check so each violation gets its own error message.\n const internalMinEffectiveDate = useMemo(() => {\n if (!withEffectiveDateField) return undefined\n if (!isCreateMode && currentJob?.primary === true) return undefined\n\n return formatDateToStringDate(addDays(new Date(), 1)) ?? undefined\n }, [isCreateMode, currentJob?.primary, withEffectiveDateField])\n\n const [schema, metadataConfig] = useMemo(\n () =>\n createCompensationSchema({\n mode,\n optionalFieldsToRequire,\n hireDate,\n minEffectiveDate: internalMinEffectiveDate,\n withEffectiveDateField,\n }),\n [mode, optionalFieldsToRequire, hireDate, internalMinEffectiveDate, withEffectiveDateField],\n )\n\n const state = currentWorkAddress?.state\n\n // `flsaStatus` is intentionally allowed to be undefined so the field renders\n // an empty placeholder when nothing is provided — partners can choose to\n // seed it via `defaultValues.flsaStatus`. When a `compensation` is loaded we\n // seed from it; for a brand-new secondary job we inherit from the primary's\n // current compensation so multi-job classification stays consistent. The\n // schema enforces requiredness on submit in `create` mode (see\n // `requiredFieldsConfig` in compensationSchema.ts).\n //\n // `title` lives on compensation in the API — `job.title` is a denormalized\n // snapshot of the primary comp's title that can lag behind comp-level edits\n // on secondaries. Seed directly from the loaded compensation so editing in\n // place can't silently re-introduce a stale title from the job record.\n const resolvedDefaults: CompensationFormData = useMemo(\n () => ({\n title: currentCompensation?.title ?? partnerDefaults?.title ?? '',\n // When adding a secondary, the FLSA must match the primary's — force it\n // here (overriding any partner default) so the form submits the right\n // value even though `Fields.FlsaStatus` is hidden.\n flsaStatus: isAddingSecondaryJob\n ? primaryFlsaStatus\n : (currentCompensation?.flsaStatus ??\n partnerDefaults?.flsaStatus ??\n primaryFlsaStatus ??\n undefined),\n rate: Number(currentCompensation?.rate ?? partnerDefaults?.rate ?? 0),\n adjustForMinimumWage:\n currentCompensation?.adjustForMinimumWage ?? partnerDefaults?.adjustForMinimumWage ?? false,\n minimumWageId:\n currentCompensation?.minimumWages?.[0]?.uuid ?? partnerDefaults?.minimumWageId ?? '',\n paymentUnit:\n currentCompensation?.paymentUnit ?? partnerDefaults?.paymentUnit ?? PAY_PERIODS.HOUR,\n effectiveDate: currentCompensation?.effectiveDate ?? partnerDefaults?.effectiveDate ?? null,\n }),\n [currentCompensation, currentJob, partnerDefaults, primaryFlsaStatus, isAddingSecondaryJob],\n )\n\n const formMethods = useForm<CompensationFormData, unknown, CompensationFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const { control, getValues, setValue, clearErrors } = formMethods\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedAdjustForMinimumWage = useWatch({\n control,\n name: 'adjustForMinimumWage',\n })\n\n // Validation rules for `paymentUnit` and `rate` are FLSA-driven, so any\n // prior error on those fields is stale once FLSA changes. RHF doesn't clear\n // them on its own (`setValue` without `shouldValidate` skips the resolver,\n // and reValidate is per-field) — clear eagerly and let the next blur/submit\n // re-establish the error if it still applies.\n useEffect(() => {\n clearErrors(['paymentUnit', 'rate'])\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n setValue('paymentUnit', PAY_PERIODS.PAYCHECK)\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n setValue('paymentUnit', PAY_PERIODS.YEAR)\n setValue('rate', 0)\n } else {\n setValue('paymentUnit', resolvedDefaults.paymentUnit)\n }\n }, [watchedFlsaStatus, setValue, clearErrors, resolvedDefaults.paymentUnit])\n\n // The FLSA status that represents the employee's current classification.\n // In update mode this is the compensation being edited. In create mode\n // `currentCompensation` is null, so fall back to the job's active\n // compensation (identified by currentCompensationUuid) — this lets the\n // secondary-job warning fire even when scheduling a future-dated change.\n const currentJobActiveComp = currentJob\n ? currentJob.compensations?.find(c => c.uuid === currentJob.currentCompensationUuid)\n : undefined\n const effectiveBaseFlsaStatus =\n currentCompensation?.flsaStatus ?? currentJobActiveComp?.flsaStatus ?? null\n\n // True when the user is changing FLSA away from Nonexempt on a job that has\n // secondary jobs — those secondaries will be deleted by the API when the\n // new classification takes effect (immediately in update mode, at the chosen\n // effective date in create mode). Drives the warning and, in update mode\n // only, the effectiveDate-lock side effect below.\n const willDeleteSecondaryJobs =\n effectiveBaseFlsaStatus === FlsaStatus.NONEXEMPT &&\n watchedFlsaStatus !== undefined &&\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT &&\n otherJobsCount > 0\n\n // Carve-out UX — update mode only: while willDeleteSecondaryJobs is active\n // the server deletes secondaries immediately on PUT. Mirror this by forcing\n // `effectiveDate` to today and disabling the field. In create mode the\n // deletion happens at the chosen future date, so we show the warning but\n // leave the date field editable.\n const carveOutActiveRef = useRef(false)\n const priorEffectiveDateRef = useRef<string | null>(null)\n useEffect(() => {\n if (!isCreateMode && willDeleteSecondaryJobs && !carveOutActiveRef.current) {\n priorEffectiveDateRef.current = getValues('effectiveDate') ?? null\n setValue('effectiveDate', todayISO(), { shouldDirty: true, shouldValidate: false })\n carveOutActiveRef.current = true\n } else if (!isCreateMode && !willDeleteSecondaryJobs && carveOutActiveRef.current) {\n setValue('effectiveDate', priorEffectiveDateRef.current ?? null, {\n shouldDirty: true,\n shouldValidate: false,\n })\n priorEffectiveDateRef.current = null\n carveOutActiveRef.current = false\n }\n }, [isCreateMode, willDeleteSecondaryJobs, getValues, setValue])\n\n const updateCompensationMutation = useJobsAndCompensationsUpdateCompensationMutation()\n const createCompensationMutation = useJobsAndCompensationsCreateCompensationMutation()\n\n const isPending = updateCompensationMutation.isPending || createCompensationMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('CompensationForm')\n\n const queriesForErrors = employeeId\n ? [jobsQuery, addressesQuery, employeeQuery, minWagesQuery]\n : []\n const errorHandling = composeErrorHandler(queriesForErrors, { submitError, setSubmitError })\n\n const isCommissionOnly =\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n const isOwner = watchedFlsaStatus === FlsaStatus.OWNER\n\n // Hide `Fields.FlsaStatus` when the user has no meaningful choice:\n // - update mode editing a secondary whose comp is already Nonexempt\n // (must keep matching the primary), and\n // - create mode while adding a secondary (must inherit primary's FLSA).\n // The first job's create flow and primary-job edits keep the field exposed.\n const isFlsaSelectionEnabled =\n !isAddingSecondaryJob &&\n (watchedFlsaStatus !== FlsaStatus.NONEXEMPT || currentJob?.primary === true || isCreateMode)\n\n const isAdjustMinimumWageEnabled =\n watchedFlsaStatus === FlsaStatus.NONEXEMPT &&\n minimumWages.length > 0 &&\n state !== undefined &&\n !TIP_CREDITS_UNSUPPORTED_STATES.includes(state)\n\n // Min-wage adjustment is only valid for Nonexempt FLSA (and a state that\n // allows tip credit). When the gate flips off — typically because the user\n // changed FLSA away from Nonexempt — `Fields.AdjustForMinimumWage` and\n // `Fields.MinimumWageId` stop rendering, but the underlying form values\n // persist in react-hook-form state. That would leak an\n // `adjust_for_minimum_wage: true` + `minimum_wages: [...]` body on submit\n // (server rejects with \"Minimum wage adjustments only valid for\n // flsa_status: Nonexempt\"). Reset both values to safe defaults so the\n // submitted payload always matches what the user can actually see.\n useEffect(() => {\n if (isAdjustMinimumWageEnabled) return\n if (getValues('adjustForMinimumWage')) {\n setValue('adjustForMinimumWage', false, { shouldDirty: true, shouldValidate: false })\n }\n if (getValues('minimumWageId')) {\n setValue('minimumWageId', '', { shouldDirty: true, shouldValidate: false })\n }\n // Both fields stop rendering once the gate closes — clear errors so a\n // stale one doesn't silently fail the next submit with no visible UI to fix.\n clearErrors(['adjustForMinimumWage', 'minimumWageId'])\n }, [isAdjustMinimumWageEnabled, getValues, setValue, clearErrors])\n\n const minimumWageOptions = minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${wage.wage} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const effectiveDateMinDate = useMemo(\n () =>\n [internalMinEffectiveDate, hireDate]\n .filter((d): d is string => !!d)\n .reduce<string | null>((max, d) => (!max || d > max ? d : max), null),\n [internalMinEffectiveDate, hireDate],\n )\n const fieldsMetadata = buildCompensationFieldsMetadata(baseMetadata, {\n willDeleteSecondaryJobs,\n isCreateMode,\n isCommissionOnly,\n isOwner,\n isAdjustMinimumWageEnabled,\n effectiveDateMinDate,\n maximumEffectiveDate,\n minimumWageOptions,\n minimumWages,\n })\n\n const onSubmit = async (\n options?: CompensationSubmitOptions,\n ): Promise<HookSubmitResult<Compensation> | undefined> => {\n let submitResult: HookSubmitResult<Compensation> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: CompensationFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const resolvedJobId = options?.jobId ?? jobId\n const resolvedCompensationId = options?.compensationId ?? compensationId\n const resolvedMode = resolvedCompensationId ? 'update' : 'create'\n\n // When the field is rendered, the validated payload value wins\n // unless an explicit submit-time override is supplied. When the\n // field is hidden (`withEffectiveDateField: false`) we are\n // strictly options-only — matching `useWorkAddressForm` and the\n // hidden-field behavior of `useHomeAddressForm` / `useJobForm`.\n // The carve-out's form-state side effect (force value to today)\n // is therefore inert in the hidden-field path; partners who\n // need a specific date there must supply it via\n // `CompensationSubmitOptions.effectiveDate`.\n const resolvedEffectiveDate = withEffectiveDateField\n ? (options?.effectiveDate ?? payload.effectiveDate ?? undefined)\n : (options?.effectiveDate ?? undefined)\n\n const requestBodyBase = {\n rate: String(payload.rate),\n paymentUnit: payload.paymentUnit,\n flsaStatus: payload.flsaStatus,\n effectiveDate: resolvedEffectiveDate,\n title: payload.title || undefined,\n adjustForMinimumWage: payload.adjustForMinimumWage,\n minimumWages: payload.adjustForMinimumWage ? [{ uuid: payload.minimumWageId }] : [],\n }\n\n let result: Compensation | undefined\n\n if (resolvedMode === 'create') {\n if (!resolvedJobId) {\n throw new SDKInternalError(\n 'jobId is required to create a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n // Schema's `requiredFieldsConfig` guarantees `flsaStatus` is set\n // on create-mode submit; the runtime guard appeases the API\n // request-body type (which requires a non-undefined value on\n // POST, vs. the optional PUT body).\n if (!payload.flsaStatus) {\n throw new SDKInternalError('flsaStatus is required to create a compensation.')\n }\n const createResponse = await createCompensationMutation.mutateAsync({\n request: {\n jobId: resolvedJobId,\n compensationsRequestBody: { ...requestBodyBase, flsaStatus: payload.flsaStatus },\n },\n })\n result = createResponse.compensation\n if (!result) throw new SDKInternalError('Compensation creation failed')\n } else {\n if (!resolvedCompensationId) {\n throw new SDKInternalError(\n 'compensationId is required to update a compensation. Pass it as a hook prop or via submit options.',\n )\n }\n const resolvedVersion =\n options?.compensationVersion ?? (currentCompensation?.version as string | undefined)\n if (!resolvedVersion) {\n throw new SDKInternalError(\n 'compensation version is required to update a compensation. Pass it via submit options when threading post-create, or ensure the compensation is loaded.',\n )\n }\n const updateResponse = await updateCompensationMutation.mutateAsync({\n request: {\n compensationId: resolvedCompensationId,\n compensationsUpdateRequestBody: {\n version: resolvedVersion,\n ...requestBodyBase,\n },\n },\n })\n result = updateResponse.compensation\n if (!result) throw new SDKInternalError('Compensation update failed')\n }\n\n submitResult = { mode: resolvedMode, data: result }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = employeeId\n ? jobsQuery.isLoading ||\n addressesQuery.isLoading ||\n employeeQuery.isLoading ||\n minWagesQuery.isLoading\n : false\n\n const hookFormInternals = useHookFormInternals(formMethods)\n\n if (isDataLoading || (employeeId && (!employeeJobs || !employee))) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n compensation: currentCompensation,\n currentJob,\n minimumWages,\n minimumEffectiveDate: effectiveDateMinDate,\n maximumEffectiveDate,\n hasPendingFutureCompensation,\n },\n status: {\n isPending,\n mode,\n willDeleteSecondaryJobs,\n showCommissionFederalMinimumPayAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT,\n showCommissionMinimumWageAlert: watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n showOwnerSalaryAlert: watchedFlsaStatus === FlsaStatus.OWNER,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Title: TitleField,\n FlsaStatus: isFlsaSelectionEnabled ? FlsaStatusField : undefined,\n Rate: isCommissionOnly ? undefined : RateField,\n PaymentUnit: isCommissionOnly ? undefined : PaymentUnitField,\n AdjustForMinimumWage: isAdjustMinimumWageEnabled ? AdjustForMinimumWageField : undefined,\n MinimumWageId:\n isAdjustMinimumWageEnabled && watchedAdjustForMinimumWage\n ? MinimumWageIdField\n : undefined,\n EffectiveDate: withEffectiveDateField ? EffectiveDateField : undefined,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\n/**\n * Discriminated union returned by {@link useCompensationForm} — either the loading state or the ready state.\n *\n * @remarks\n * Use this type when threading the hook result through helpers (e.g.\n * presentational components). Discriminate on `isLoading` to narrow to\n * {@link UseCompensationFormReady}.\n *\n * @public\n */\nexport type UseCompensationFormResult = HookLoadingResult | UseCompensationFormReady\n\n/**\n * Metadata for each {@link useCompensationForm} field, exposed on `form.fieldsMetadata`.\n *\n * @remarks\n * Includes per-field `isDisabled`, `isRequired`, and the dynamic option list\n * for select fields (`flsaStatus`, `paymentUnit`, `minimumWageId`).\n * `effectiveDate` additionally carries `minDate` / `maxDate` derived from\n * the parent job's hire date and any pending future compensation.\n *\n * @public\n */\nexport type CompensationFieldsMetadata = ReturnType<typeof buildCompensationFieldsMetadata>\n"],"names":["resolveCompAndJob","jobs","compensationId","jobId","job","compensation","c","j","findPrimaryFlsaStatus","findFutureCompensations","today","todayISO","earliestEffectiveDate","comps","min","d","flsaStatusEntries","FlsaStatus","flsaOptions","status","paymentUnitEntries","PAY_PERIODS","paymentUnitOptions","unit","buildCompensationFieldsMetadata","base","willDeleteSecondaryJobs","isCreateMode","isCommissionOnly","isOwner","isAdjustMinimumWageEnabled","effectiveDateMinDate","maximumEffectiveDate","minimumWageOptions","minimumWages","withFlags","withOptions","useCompensationForm","employeeId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","withEffectiveDateField","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","addressesQuery","useEmployeeAddressesGetWorkAddresses","employeeQuery","useEmployeesGet","employeeJobs","currentWorkAddress","address","locationUuid","employee","minWagesQuery","useLocationsGetMinimumWages","currentCompensation","currentJob","otherJobsCount","hadPrimaryAtMountRef","useRef","primaryFlsaStatus","hireDate","futureCompensations","hasPendingFutureCompensation","mode","isAddingSecondaryJob","internalMinEffectiveDate","useMemo","formatDateToStringDate","addDays","schema","metadataConfig","createCompensationSchema","state","resolvedDefaults","formMethods","useForm","zodResolver","control","getValues","setValue","clearErrors","watchedFlsaStatus","useWatch","watchedAdjustForMinimumWage","useEffect","currentJobActiveComp","carveOutActiveRef","priorEffectiveDateRef","updateCompensationMutation","useJobsAndCompensationsUpdateCompensationMutation","createCompensationMutation","useJobsAndCompensationsCreateCompensationMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isFlsaSelectionEnabled","TIP_CREDITS_UNSUPPORTED_STATES","wage","baseMetadata","useDeriveFieldsMetadata","max","fieldsMetadata","onSubmit","options","submitResult","resolve","data","payload","resolvedJobId","resolvedCompensationId","resolvedMode","resolvedEffectiveDate","requestBodyBase","result","SDKInternalError","resolvedVersion","isDataLoading","hookFormInternals","useHookFormInternals","TitleField","FlsaStatusField","RateField","PaymentUnitField","AdjustForMinimumWageField","MinimumWageIdField","EffectiveDateField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgQA,SAASA,GACPC,GACAC,GACAC,GACwD;AACxD,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E,KAAoBC,GAAqBhD,CAAW;AAE1D,SAAI8C,MAAkBtF,MAAe,CAACa,KAAgB,CAACI,MAC9C,EAAE,WAAW,IAAe,eAAA8C,GAAA,IAG9B;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,cAAc3C;AAAA,MACd,YAAAC;AAAA,MACA,cAAAzB;AAAA,MACA,sBAAsBH;AAAA,MACtB,sBAAAC;AAAA,MACA,8BAAAkC;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAA8B;AAAA,MACA,MAAA7B;AAAA,MACA,yBAAAzC;AAAA,MACA,sCAAsC2D,MAAsBpE,EAAW;AAAA,MACvE,gCAAgCoE,MAAsBpE,EAAW;AAAA,MACjE,sBAAsBoE,MAAsBpE,EAAW;AAAA,IAAA;AAAA,IAEzD,SAAS,EAAE,UAAA6F,GAAA;AAAA,IACX,eAAAT;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,OAAO0B;AAAA,QACP,YAAYxB,KAAyByB,KAAkB;AAAA,QACvD,MAAMpG,IAAmB,SAAYqG;AAAA,QACrC,aAAarG,IAAmB,SAAYsG;AAAA,QAC5C,sBAAsBpG,IAA6BqG,KAA4B;AAAA,QAC/E,eACErG,KAA8ByD,KAC1B6C,KACA;AAAA,QACN,eAAezF,IAAyB0F,KAAqB;AAAA,MAAA;AAAA,MAE/D,gBAAAxB;AAAA,MACA,mBAAAgB;AAAA,MACA,yBAAyBS,GAA8BxD,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
@@ -1,3 +1,2 @@
1
- import "./types/i18next.d.ts"
2
1
  export { useCompensationManagement } from './useCompensationManagement';
3
2
  export type { UseCompensationManagementReady } from './useCompensationManagement';
@@ -1,4 +1,4 @@
1
- import { Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job';
1
+ import { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job';
2
2
  import { PendingCompensationChange } from '../getPendingCompensationChanges';
3
3
  import { BaseHookReady, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
4
4
  /**
@@ -1,8 +1,8 @@
1
1
  import { useMemo as o, useCallback as P } from "react";
2
- import { useEmployeesGet as J } from "@gusto/embedded-api-v-2025-11-15/react-query/employeesGet";
3
- import { useJobsAndCompensationsGetJobs as M } from "@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs";
4
- import { GetV1EmployeesEmployeeIdJobsQueryParamInclude as F } from "@gusto/embedded-api-v-2025-11-15/models/operations/getv1employeesemployeeidjobs";
5
- import { useJobsAndCompensationsDeleteCompensationMutation as I } from "@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsDeleteCompensation";
2
+ import { useEmployeesGet as J } from "@gusto/embedded-api-v-2026-02-01/react-query/employeesGet";
3
+ import { useJobsAndCompensationsGetJobs as M } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs";
4
+ import { GetV1EmployeesEmployeeIdJobsQueryParamInclude as F } from "@gusto/embedded-api-v-2026-02-01/models/operations/getv1employeesemployeeidjobs";
5
+ import { useJobsAndCompensationsDeleteCompensationMutation as I } from "@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsDeleteCompensation";
6
6
  import { getPendingCompensationChanges as S } from "../getPendingCompensationChanges.js";
7
7
  import { derivePrimaryFlsaStatus as j } from "../derivePrimaryFlsaStatus.js";
8
8
  import { useBaseSubmit as A } from "../../../../Base/useBaseSubmit.js";
@@ -1 +1 @@
1
- {"version":3,"file":"useCompensationManagement.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useEmployeesGet } from '@gusto/embedded-api-v-2025-11-15/react-query/employeesGet'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api-v-2025-11-15/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsDeleteCompensationMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsDeleteCompensation'\nimport type { Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job'\nimport {\n getPendingCompensationChanges,\n type PendingCompensationChange,\n} from '../getPendingCompensationChanges'\nimport { derivePrimaryFlsaStatus } from '@/components/Employee/Compensation/shared/derivePrimaryFlsaStatus'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady, HookLoadingResult, HookSubmitResult } from '@/partner-hook-utils/types'\n\n/**\n * Props for {@link useCompensationManagement}.\n *\n * @public\n */\nexport interface UseCompensationManagementProps {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Ready state of {@link useCompensationManagement}.\n *\n * @public\n */\nexport interface UseCompensationManagementReady extends BaseHookReady<\n {\n jobs: Job[]\n primaryJob?: Job\n primaryFlsaStatus?: string\n hasMultipleJobs: boolean\n pendingChanges: PendingCompensationChange[]\n /** First name from the shared employee fetch; useful for cosmetic copy\n * in alerts (e.g. \"Heads up, Jane has pending changes\"). Optional\n * because the employee record can omit it. */\n employeeFirstName?: string\n },\n {\n isPending: boolean\n cancellingCompensationUuid: string | null\n }\n> {\n /** Actions available when the hook has loaded. */\n actions: {\n cancelPendingChange: (\n pendingChange: PendingCompensationChange,\n ) => Promise<HookSubmitResult<unknown> | undefined>\n }\n}\n\n/**\n * Return type of {@link useCompensationManagement}.\n *\n * @public\n */\nexport type UseCompensationManagementResult = HookLoadingResult | UseCompensationManagementReady\n\n/**\n * Non-Suspense queries powering the standalone Compensation management card.\n * Returns jobs + pending-changes + the employee's first name (for cosmetic\n * alert copy) along with a cancel-pending-change action.\n *\n * @public\n */\nexport function useCompensationManagement({\n employeeId,\n}: UseCompensationManagementProps): UseCompensationManagementResult {\n // staleTime: Infinity on dashboard reads — the SDK QueryClient already\n // invalidates all queries on any mutation success, so post-write\n // freshness is preserved. Without this, every subscriber re-mount\n // (e.g. tab navigation) would fire a redundant background refetch.\n //\n // GET /v1/employees/:id/jobs?include=all_compensations returns all effective-\n // dated compensations (current + future) with compensation.title on each,\n // which is required for pending-change detection. Without the include param,\n // only the current compensation is returned.\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId, include: GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations },\n { staleTime: Infinity },\n )\n // Employee query is a lightweight secondary fetch for cosmetic data only\n // (first name used in alert copy). Jobs / compensation data comes from jobsQuery.\n const employeeQuery = useEmployeesGet({ employeeId }, { staleTime: Infinity })\n const cancelCompensationMutation = useJobsAndCompensationsDeleteCompensationMutation()\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('Employee.Management.Compensation')\n\n const employee = employeeQuery.data?.employee\n\n const jobs = useMemo(() => jobsQuery.data?.jobs ?? [], [jobsQuery.data?.jobs])\n const primaryJob = useMemo(() => jobs.find(job => job.primary === true), [jobs])\n const primaryFlsaStatus = useMemo(() => derivePrimaryFlsaStatus(jobs), [jobs])\n const hasMultipleJobs = jobs.length > 1\n\n const pendingChanges = useMemo(() => getPendingCompensationChanges(jobs), [jobs])\n\n const cancellingCompensationUuid = cancelCompensationMutation.isPending\n ? cancelCompensationMutation.variables.request.compensationId\n : null\n\n const cancelPendingChange = useCallback(\n async (\n pendingChange: PendingCompensationChange,\n ): Promise<HookSubmitResult<unknown> | undefined> => {\n let submitResult: HookSubmitResult<unknown> | undefined\n await baseSubmitHandler(pendingChange, async ({ compensationUuid }) => {\n const data = await cancelCompensationMutation.mutateAsync({\n request: { compensationId: compensationUuid },\n })\n submitResult = { mode: 'update', data }\n })\n return submitResult\n },\n [baseSubmitHandler, cancelCompensationMutation],\n )\n\n const isPending =\n jobsQuery.isFetching || employeeQuery.isFetching || cancelCompensationMutation.isPending\n\n const errorHandling = composeErrorHandler([jobsQuery, employeeQuery], {\n submitError,\n setSubmitError,\n })\n\n // The card depends on the jobs fetch (jobs, pending changes, FLSA status).\n // The employee fetch is cosmetic (first name for alert copy) and is not\n // gated on here so the card can render as soon as jobs resolve.\n if (jobsQuery.isLoading) {\n return { isLoading: true, errorHandling }\n }\n\n return {\n isLoading: false,\n data: {\n jobs,\n primaryJob,\n primaryFlsaStatus,\n hasMultipleJobs,\n pendingChanges,\n employeeFirstName: employee?.firstName ?? undefined,\n },\n status: {\n isPending,\n cancellingCompensationUuid,\n },\n actions: {\n cancelPendingChange,\n },\n errorHandling,\n }\n}\n"],"names":["useCompensationManagement","employeeId","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","employeeQuery","useEmployeesGet","cancelCompensationMutation","useJobsAndCompensationsDeleteCompensationMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","employee","jobs","useMemo","primaryJob","job","primaryFlsaStatus","derivePrimaryFlsaStatus","hasMultipleJobs","pendingChanges","getPendingCompensationChanges","cancellingCompensationUuid","cancelPendingChange","useCallback","pendingChange","submitResult","compensationUuid","isPending","errorHandling","composeErrorHandler"],"mappings":";;;;;;;;;AAqEO,SAASA,EAA0B;AAAA,EACxC,YAAAC;AACF,GAAoE;AAUlE,QAAMC,IAAYC;AAAA,IAChB,EAAE,YAAAF,GAAY,SAASG,EAA8C,iBAAA;AAAA,IACrE,EAAE,WAAW,MAAA;AAAA,EAAS,GAIlBC,IAAgBC,EAAgB,EAAE,YAAAL,EAAA,GAAc,EAAE,WAAW,OAAU,GACvEM,IAA6BC,EAAA,GAC7B;AAAA,IACJ,mBAAAC;AAAA,IACA,OAAOC;AAAA,IACP,UAAUC;AAAA,EAAA,IACRC,EAAc,kCAAkC,GAE9CC,IAAWR,EAAc,MAAM,UAE/BS,IAAOC,EAAQ,MAAMb,EAAU,MAAM,QAAQ,CAAA,GAAI,CAACA,EAAU,MAAM,IAAI,CAAC,GACvEc,IAAaD,E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ources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.tsx"],"sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useEmployeesGet } from '@gusto/embedded-api-v-2026-02-01/react-query/employeesGet'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsGetJobs'\nimport { GetV1EmployeesEmployeeIdJobsQueryParamInclude } from '@gusto/embedded-api-v-2026-02-01/models/operations/getv1employeesemployeeidjobs'\nimport { useJobsAndCompensationsDeleteCompensationMutation } from '@gusto/embedded-api-v-2026-02-01/react-query/jobsAndCompensationsDeleteCompensation'\nimport type { Job } from '@gusto/embedded-api-v-2026-02-01/models/components/job'\nimport {\n getPendingCompensationChanges,\n type PendingCompensationChange,\n} from '../getPendingCompensationChanges'\nimport { derivePrimaryFlsaStatus } from '@/components/Employee/Compensation/shared/derivePrimaryFlsaStatus'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type { BaseHookReady, HookLoadingResult, HookSubmitResult } from '@/partner-hook-utils/types'\n\n/**\n * Props for {@link useCompensationManagement}.\n *\n * @public\n */\nexport interface UseCompensationManagementProps {\n /** The associated employee identifier. */\n employeeId: string\n}\n\n/**\n * Ready state of {@link useCompensationManagement}.\n *\n * @public\n */\nexport interface UseCompensationManagementReady extends BaseHookReady<\n {\n jobs: Job[]\n primaryJob?: Job\n primaryFlsaStatus?: string\n hasMultipleJobs: boolean\n pendingChanges: PendingCompensationChange[]\n /** First name from the shared employee fetch; useful for cosmetic copy\n * in alerts (e.g. \"Heads up, Jane has pending changes\"). Optional\n * because the employee record can omit it. */\n employeeFirstName?: string\n },\n {\n isPending: boolean\n cancellingCompensationUuid: string | null\n }\n> {\n /** Actions available when the hook has loaded. */\n actions: {\n cancelPendingChange: (\n pendingChange: PendingCompensationChange,\n ) => Promise<HookSubmitResult<unknown> | undefined>\n }\n}\n\n/**\n * Return type of {@link useCompensationManagement}.\n *\n * @public\n */\nexport type UseCompensationManagementResult = HookLoadingResult | UseCompensationManagementReady\n\n/**\n * Non-Suspense queries powering the standalone Compensation management card.\n * Returns jobs + pending-changes + the employee's first name (for cosmetic\n * alert copy) along with a cancel-pending-change action.\n *\n * @public\n */\nexport function useCompensationManagement({\n employeeId,\n}: UseCompensationManagementProps): UseCompensationManagementResult {\n // staleTime: Infinity on dashboard reads — the SDK QueryClient already\n // invalidates all queries on any mutation success, so post-write\n // freshness is preserved. Without this, every subscriber re-mount\n // (e.g. tab navigation) would fire a redundant background refetch.\n //\n // GET /v1/employees/:id/jobs?include=all_compensations returns all effective-\n // dated compensations (current + future) with compensation.title on each,\n // which is required for pending-change detection. Without the include param,\n // only the current compensation is returned.\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId, include: GetV1EmployeesEmployeeIdJobsQueryParamInclude.AllCompensations },\n { staleTime: Infinity },\n )\n // Employee query is a lightweight secondary fetch for cosmetic data only\n // (first name used in alert copy). Jobs / compensation data comes from jobsQuery.\n const employeeQuery = useEmployeesGet({ employeeId }, { staleTime: Infinity })\n const cancelCompensationMutation = useJobsAndCompensationsDeleteCompensationMutation()\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('Employee.Management.Compensation')\n\n const employee = employeeQuery.data?.employee\n\n const jobs = useMemo(() => jobsQuery.data?.jobs ?? [], [jobsQuery.data?.jobs])\n const primaryJob = useMemo(() => jobs.find(job => job.primary === true), [jobs])\n const primaryFlsaStatus = useMemo(() => derivePrimaryFlsaStatus(jobs), [jobs])\n const hasMultipleJobs = jobs.length > 1\n\n const pendingChanges = useMemo(() => getPendingCompensationChanges(jobs), [jobs])\n\n const cancellingCompensationUuid = cancelCompensationMutation.isPending\n ? cancelCompensationMutation.variables.request.compensationId\n : null\n\n const cancelPendingChange = useCallback(\n async (\n pendingChange: PendingCompensationChange,\n ): Promise<HookSubmitResult<unknown> | undefined> => {\n let submitResult: HookSubmitResult<unknown> | undefined\n await baseSubmitHandler(pendingChange, async ({ compensationUuid }) => {\n const data = await cancelCompensationMutation.mutateAsync({\n request: { compensationId: compensationUuid },\n })\n submitResult = { mode: 'update', data }\n })\n return submitResult\n },\n [baseSubmitHandler, cancelCompensationMutation],\n )\n\n const isPending =\n jobsQuery.isFetching || employeeQuery.isFetching || cancelCompensationMutation.isPending\n\n const errorHandling = composeErrorHandler([jobsQuery, employeeQuery], {\n submitError,\n setSubmitError,\n })\n\n // The card depends on the jobs fetch (jobs, pending changes, FLSA status).\n // The employee fetch is cosmetic (first name for alert copy) and is not\n // gated on here so the card can render as soon as jobs resolve.\n if (jobsQuery.isLoading) {\n return { isLoading: true, errorHandling }\n }\n\n return {\n isLoading: false,\n data: {\n jobs,\n primaryJob,\n primaryFlsaStatus,\n hasMultipleJobs,\n pendingChanges,\n employeeFirstName: employee?.firstName ?? undefined,\n },\n status: {\n isPending,\n cancellingCompensationUuid,\n },\n actions: {\n cancelPendingChange,\n },\n errorHandling,\n }\n}\n"],"names":["useCompensationManagement","employeeId","jobsQuery","useJobsAndCompensationsGetJobs","GetV1EmployeesEmployeeIdJobsQueryParamInclude","employeeQuery","useEmployeesGet","cancelCompensationMutation","useJobsAndCompensationsDeleteCompensationMutation","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","employee","jobs","useMemo","primaryJob","job","primaryFlsaStatus","derivePrimaryFlsaStatus","hasMultipleJobs","pendingChanges","getPendingCompensationChanges","cancellingCompensationUuid","cancelPendingChange","useCallback","pendingChange","submitResult","compensationUuid","isPending","errorHandling","composeErrorHandler"],"mappings":";;;;;;;;;AAqEO,SAASA,EAA0B;AAAA,EACxC,YAAAC;AACF,GAAoE;AAUlE,QAAMC,IAAYC;AAAA,IAChB,EAAE,YAAAF,GAAY,SAASG,EAA8C,iBAAA;AAAA,IACrE,EAAE,WAAW,MAAA;AAAA,EAAS,GAIlBC,IAAgBC,EAAgB,EAAE,YAAAL,EAAA,GAAc,EAAE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iBAAAE;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAmBR,GAAU,aAAa;AAAA,IAAA;AAAA,IAE5C,QAAQ;AAAA,MACN,WAAAgB;AAAA,MACA,4BAAAN;AAAA,IAAA;AAAA,IAEF,SAAS;AAAA,MACP,qBAAAC;AAAA,IAAA;AAAA,IAEF,eAAAM;AAAA,EAAA;AAEJ;"}
@@ -23,19 +23,7 @@ export type JobRequiredValidation = typeof JobErrorCodes.REQUIRED;
23
23
  * @public
24
24
  */
25
25
  export type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<JobRequiredValidation>>;
26
- /**
27
- * Text input bound to the `title` field of {@link useJobForm}.
28
- *
29
- * @remarks
30
- * Available on the hook result as `form.Fields.Title` when `withTitleField` is
31
- * `true` (the default). On update flows where another form owns the title
32
- * (e.g. compensation edits), set `withTitleField: false` on `useJobForm` and
33
- * render the compensation form's title field instead.
34
- *
35
- * @param props - {@link JobTitleFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
36
- * @returns The rendered text input bound to `title`.
37
- * @public
38
- */
26
+ /** @internal */
39
27
  export declare function JobTitleField(props: JobTitleFieldProps): import("react").JSX.Element;
40
28
  /**
41
29
  * Props accepted by {@link useJobForm}'s `Fields.HireDate` component.
@@ -43,20 +31,7 @@ export declare function JobTitleField(props: JobTitleFieldProps): import("react"
43
31
  * @public
44
32
  */
45
33
  export type HireDateFieldProps = HookFieldProps<DatePickerHookFieldProps<JobRequiredValidation>>;
46
- /**
47
- * Date picker bound to the `hireDate` field of {@link useJobForm}.
48
- *
49
- * @remarks
50
- * Available on the hook result as `form.Fields.HireDate` when
51
- * `withHireDateField` is `true` (the default). When `false`, supply the value
52
- * via `JobSubmitOptions.hireDate` at submit time — useful when the hire date
53
- * is derived from external context (e.g. the employee's `startDate` during
54
- * onboarding).
55
- *
56
- * @param props - {@link HireDateFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
57
- * @returns The rendered date picker bound to `hireDate`.
58
- * @public
59
- */
34
+ /** @internal */
60
35
  export declare function HireDateField(props: HireDateFieldProps): import("react").JSX.Element;
61
36
  /**
62
37
  * Props accepted by {@link useJobForm}'s `Fields.TwoPercentShareholder` component.
@@ -64,18 +39,7 @@ export declare function HireDateField(props: HireDateFieldProps): import("react"
64
39
  * @public
65
40
  */
66
41
  export type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>;
67
- /**
68
- * Checkbox bound to the `twoPercentShareholder` field of {@link useJobForm}.
69
- *
70
- * @remarks
71
- * Indicates whether the employee is a 2% shareholder in an S-Corporation.
72
- * Available on the hook result as `form.Fields.TwoPercentShareholder` only
73
- * when the company is taxable as an S-Corp (see `data.showTwoPercentShareholder`).
74
- *
75
- * @param props - {@link TwoPercentShareholderFieldProps} — accepts the standard hook field props (label, description, FieldComponent override).
76
- * @returns The rendered checkbox bound to `twoPercentShareholder`.
77
- * @public
78
- */
42
+ /** @internal */
79
43
  export declare function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps): import("react").JSX.Element;
80
44
  /**
81
45
  * Props accepted by {@link useJobForm}'s `Fields.StateWcCovered` component.
@@ -83,19 +47,7 @@ export declare function TwoPercentShareholderField(props: TwoPercentShareholderF
83
47
  * @public
84
48
  */
85
49
  export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>;
86
- /**
87
- * Radio group bound to the `stateWcCovered` field of {@link useJobForm}.
88
- *
89
- * @remarks
90
- * Captures whether the employee is covered by Washington state workers'
91
- * compensation. Available on the hook result as `form.Fields.StateWcCovered`
92
- * only when the employee's active work address is in Washington (see
93
- * `data.showStateWc`).
94
- *
95
- * @param props - {@link StateWcCoveredFieldProps} — accepts the standard hook field props (label, description, getOptionLabel, FieldComponent override).
96
- * @returns The rendered radio group bound to `stateWcCovered`.
97
- * @public
98
- */
50
+ /** @internal */
99
51
  export declare function StateWcCoveredField(props: StateWcCoveredFieldProps): import("react").JSX.Element;
100
52
  /**
101
53
  * Props accepted by {@link useJobForm}'s `Fields.StateWcClassCode` component.
@@ -103,18 +55,5 @@ export declare function StateWcCoveredField(props: StateWcCoveredFieldProps): im
103
55
  * @public
104
56
  */
105
57
  export type StateWcClassCodeFieldProps = HookFieldProps<SelectHookFieldProps<JobRequiredValidation, WARiskClassCode>>;
106
- /**
107
- * Select dropdown bound to the `stateWcClassCode` field of {@link useJobForm}.
108
- *
109
- * @remarks
110
- * Populated with Washington state workers' compensation risk class codes.
111
- * Available on the hook result as `form.Fields.StateWcClassCode` only when
112
- * the active work address is in Washington and `stateWcCovered` is `true`.
113
- * The schema enforces this field as required whenever it is rendered,
114
- * independent of `optionalFieldsToRequire`.
115
- *
116
- * @param props - {@link StateWcClassCodeFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).
117
- * @returns The rendered select bound to `stateWcClassCode`.
118
- * @public
119
- */
58
+ /** @internal */
120
59
  export declare function StateWcClassCodeField(props: StateWcClassCodeFieldProps): import("react").JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { TextInputHookField as t } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
3
- import { SelectHookField as r } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
2
+ import { SelectHookField as t } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
3
+ import { RadioGroupHookField as r } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
4
4
  import { CheckboxHookField as i } from "../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
5
5
  import { DatePickerHookField as n } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
6
- import { RadioGroupHookField as a } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
6
+ import { TextInputHookField as a } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
7
7
  function F(e) {
8
- return /* @__PURE__ */ o(t, { ...e, name: "title" });
8
+ return /* @__PURE__ */ o(a, { ...e, name: "title" });
9
9
  }
10
10
  function p(e) {
11
11
  return /* @__PURE__ */ o(n, { ...e, name: "hireDate" });
@@ -14,10 +14,10 @@ function k(e) {
14
14
  return /* @__PURE__ */ o(i, { ...e, name: "twoPercentShareholder" });
15
15
  }
16
16
  function s(e) {
17
- return /* @__PURE__ */ o(a, { ...e, name: "stateWcCovered" });
17
+ return /* @__PURE__ */ o(r, { ...e, name: "stateWcCovered" });
18
18
  }
19
19
  function C(e) {
20
- return /* @__PURE__ */ o(r, { ...e, name: "stateWcClassCode" });
20
+ return /* @__PURE__ */ o(t, { ...e, name: "stateWcClassCode" });
21
21
  }
22
22
  export {
23
23
  p as HireDateField,
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/fields.tsx"],"sourcesContent":["import type { JobErrorCodes } from './jobSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { CheckboxHookFieldProps } from '@/partner-hook-utils/form/fields/CheckboxHookField'\nimport type { RadioGroupHookFieldProps } from '@/partner-hook-utils/form/fields/RadioGroupHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { DatePickerHookFieldProps } from '@/partner-hook-utils/form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n CheckboxHookField,\n RadioGroupHookField,\n SelectHookField,\n DatePickerHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\nimport type { WARiskClassCode } from '@/models/WA_RISK_CODES'\n\n/**\n * The validation error code a {@link useJobForm} field can produce.\n *\n * @remarks\n * Currently a single literal — `'REQUIRED'` — surfaced as the key in\n * `validationMessages` on each `Fields.*` component. Future schema additions\n * may extend the union.\n *\n * @public\n */\nexport type JobRequiredValidation = typeof JobErrorCodes.REQUIRED\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.Title` component.\n *\n * @public\n */\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<JobRequiredValidation>>\n\n/**\n * Text input bound to the `title` field of {@link useJobForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.Title` when `withTitleField` is\n * `true` (the default). On update flows where another form owns the title\n * (e.g. compensation edits), set `withTitleField: false` on `useJobForm` and\n * render the compensation form's title field instead.\n *\n * @param props - {@link JobTitleFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered text input bound to `title`.\n * @public\n */\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"title\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.HireDate` component.\n *\n * @public\n */\nexport type HireDateFieldProps = HookFieldProps<DatePickerHookFieldProps<JobRequiredValidation>>\n\n/**\n * Date picker bound to the `hireDate` field of {@link useJobForm}.\n *\n * @remarks\n * Available on the hook result as `form.Fields.HireDate` when\n * `withHireDateField` is `true` (the default). When `false`, supply the value\n * via `JobSubmitOptions.hireDate` at submit time — useful when the hire date\n * is derived from external context (e.g. the employee's `startDate` during\n * onboarding).\n *\n * @param props - {@link HireDateFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered date picker bound to `hireDate`.\n * @public\n */\nexport function HireDateField(props: HireDateFieldProps) {\n return <DatePickerHookField {...props} name=\"hireDate\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.TwoPercentShareholder` component.\n *\n * @public\n */\nexport type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\n/**\n * Checkbox bound to the `twoPercentShareholder` field of {@link useJobForm}.\n *\n * @remarks\n * Indicates whether the employee is a 2% shareholder in an S-Corporation.\n * Available on the hook result as `form.Fields.TwoPercentShareholder` only\n * when the company is taxable as an S-Corp (see `data.showTwoPercentShareholder`).\n *\n * @param props - {@link TwoPercentShareholderFieldProps} — accepts the standard hook field props (label, description, FieldComponent override).\n * @returns The rendered checkbox bound to `twoPercentShareholder`.\n * @public\n */\nexport function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps) {\n return <CheckboxHookField {...props} name=\"twoPercentShareholder\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.StateWcCovered` component.\n *\n * @public\n */\nexport type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>\n\n/**\n * Radio group bound to the `stateWcCovered` field of {@link useJobForm}.\n *\n * @remarks\n * Captures whether the employee is covered by Washington state workers'\n * compensation. Available on the hook result as `form.Fields.StateWcCovered`\n * only when the employee's active work address is in Washington (see\n * `data.showStateWc`).\n *\n * @param props - {@link StateWcCoveredFieldProps} — accepts the standard hook field props (label, description, getOptionLabel, FieldComponent override).\n * @returns The rendered radio group bound to `stateWcCovered`.\n * @public\n */\nexport function StateWcCoveredField(props: StateWcCoveredFieldProps) {\n return <RadioGroupHookField {...props} name=\"stateWcCovered\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.StateWcClassCode` component.\n *\n * @public\n */\nexport type StateWcClassCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<JobRequiredValidation, WARiskClassCode>\n>\n\n/**\n * Select dropdown bound to the `stateWcClassCode` field of {@link useJobForm}.\n *\n * @remarks\n * Populated with Washington state workers' compensation risk class codes.\n * Available on the hook result as `form.Fields.StateWcClassCode` only when\n * the active work address is in Washington and `stateWcCovered` is `true`.\n * The schema enforces this field as required whenever it is rendered,\n * independent of `optionalFieldsToRequire`.\n *\n * @param props - {@link StateWcClassCodeFieldProps} — accepts the standard hook field props (label, description, validationMessages, FieldComponent override).\n * @returns The rendered select bound to `stateWcClassCode`.\n * @public\n */\nexport function StateWcClassCodeField(props: StateWcClassCodeFieldProps) {\n return <SelectHookField {...props} name=\"stateWcClassCode\" />\n}\n"],"names":["JobTitleField","props","jsx","TextInputHookField","HireDateField","DatePickerHookField","TwoPercentShareholderField","CheckboxHookField","StateWcCoveredField","RadioGroupHookField","StateWcClassCodeField","SelectHookField"],"mappings":";;;;;;AAgDO,SAASA,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,SAAQ;AACrD;AAuBO,SAASG,EAAcH,GAA2B;AACvD,SAAO,gBAAAC,EAACG,GAAA,EAAqB,GAAGJ,GAAO,MAAK,YAAW;AACzD;AAqBO,SAASK,EAA2BL,GAAwC;AACjF,SAAO,gBAAAC,EAACK,GAAA,EAAmB,GAAGN,GAAO,MAAK,yBAAwB;AACpE;AAsBO,SAASO,EAAoBP,GAAiC;AACnE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,kBAAiB;AAC/D;AAyBO,SAASS,EAAsBT,GAAmC;AACvE,SAAO,gBAAAC,EAACS,GAAA,EAAiB,GAAGV,GAAO,MAAK,oBAAmB;AAC7D;"}
1
+ {"version":3,"file":"fields.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/fields.tsx"],"sourcesContent":["import type { JobErrorCodes } from './jobSchema'\nimport type { TextInputHookFieldProps } from '@/partner-hook-utils/form/fields/TextInputHookField'\nimport type { CheckboxHookFieldProps } from '@/partner-hook-utils/form/fields/CheckboxHookField'\nimport type { RadioGroupHookFieldProps } from '@/partner-hook-utils/form/fields/RadioGroupHookField'\nimport type { SelectHookFieldProps } from '@/partner-hook-utils/form/fields/SelectHookField'\nimport type { DatePickerHookFieldProps } from '@/partner-hook-utils/form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n CheckboxHookField,\n RadioGroupHookField,\n SelectHookField,\n DatePickerHookField,\n} from '@/partner-hook-utils/form/fields'\nimport type { HookFieldProps } from '@/partner-hook-utils/types'\nimport type { WARiskClassCode } from '@/models/WA_RISK_CODES'\n\n/**\n * The validation error code a {@link useJobForm} field can produce.\n *\n * @remarks\n * Currently a single literal — `'REQUIRED'` — surfaced as the key in\n * `validationMessages` on each `Fields.*` component. Future schema additions\n * may extend the union.\n *\n * @public\n */\nexport type JobRequiredValidation = typeof JobErrorCodes.REQUIRED\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.Title` component.\n *\n * @public\n */\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<JobRequiredValidation>>\n\n/** @internal */\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"title\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.HireDate` component.\n *\n * @public\n */\nexport type HireDateFieldProps = HookFieldProps<DatePickerHookFieldProps<JobRequiredValidation>>\n\n/** @internal */\nexport function HireDateField(props: HireDateFieldProps) {\n return <DatePickerHookField {...props} name=\"hireDate\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.TwoPercentShareholder` component.\n *\n * @public\n */\nexport type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\n/** @internal */\nexport function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps) {\n return <CheckboxHookField {...props} name=\"twoPercentShareholder\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.StateWcCovered` component.\n *\n * @public\n */\nexport type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>\n\n/** @internal */\nexport function StateWcCoveredField(props: StateWcCoveredFieldProps) {\n return <RadioGroupHookField {...props} name=\"stateWcCovered\" />\n}\n\n/**\n * Props accepted by {@link useJobForm}'s `Fields.StateWcClassCode` component.\n *\n * @public\n */\nexport type StateWcClassCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<JobRequiredValidation, WARiskClassCode>\n>\n\n/** @internal */\nexport function StateWcClassCodeField(props: StateWcClassCodeFieldProps) {\n return <SelectHookField {...props} name=\"stateWcClassCode\" />\n}\n"],"names":["JobTitleField","props","jsx","TextInputHookField","HireDateField","DatePickerHookField","TwoPercentShareholderField","CheckboxHookField","StateWcCoveredField","RadioGroupHookField","StateWcClassCodeField","SelectHookField"],"mappings":";;;;;;AAoCO,SAASA,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,SAAQ;AACrD;AAUO,SAASG,EAAcH,GAA2B;AACvD,SAAO,gBAAAC,EAACG,GAAA,EAAqB,GAAGJ,GAAO,MAAK,YAAW;AACzD;AAUO,SAASK,EAA2BL,GAAwC;AACjF,SAAO,gBAAAC,EAACK,GAAA,EAAmB,GAAGN,GAAO,MAAK,yBAAwB;AACpE;AAUO,SAASO,EAAoBP,GAAiC;AACnE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,kBAAiB;AAC/D;AAYO,SAASS,EAAsBT,GAAmC;AACvE,SAAO,gBAAAC,EAACS,GAAA,EAAiB,GAAGV,GAAO,MAAK,oBAAmB;AAC7D;"}
@@ -1,6 +1,4 @@
1
- import "./types/i18next.d.ts"
2
1
  export { useJobForm } from './useJobForm';
3
2
  export type { JobSubmitOptions, UseJobFormProps, UseJobFormResult, UseJobFormReady, JobFieldsMetadata, JobFormFields, } from './useJobForm';
4
- export { createJobSchema, JobErrorCodes, type JobErrorCode, type JobOptionalFieldsToRequire, type JobFormData, type JobFormOutputs, } from './jobSchema';
5
- export { JobTitleField, HireDateField, TwoPercentShareholderField, StateWcCoveredField, StateWcClassCodeField, } from './fields';
3
+ export { JobErrorCodes, type JobErrorCode, type JobOptionalFieldsToRequire, type JobFormData, } from './jobSchema';
6
4
  export type { JobRequiredValidation, JobTitleFieldProps, HireDateFieldProps, TwoPercentShareholderFieldProps, StateWcCoveredFieldProps, StateWcClassCodeFieldProps, } from './fields';
@@ -53,15 +53,7 @@ export type JobFormData = {
53
53
  /** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */
54
54
  stateWcClassCode: string
55
55
  };
56
- /**
57
- * Validated submission shape produced by the {@link useJobForm} schema.
58
- *
59
- * @remarks
60
- * Identical to {@link JobFormData} — exposed as a separate alias so the input
61
- * vs. output sides of the schema remain distinguishable in advanced usages.
62
- *
63
- * @public
64
- */
56
+ /** @internal */
65
57
  export type JobFormOutputs = JobFormData;
66
58
  /**
67
59
  * Override which fields are required on a given submission mode of {@link useJobForm}.
@@ -93,7 +85,7 @@ export type JobFormOutputs = JobFormData;
93
85
  * })
94
86
  * ```
95
87
  */
96
- export type JobOptionalFieldsToRequire = { create?: ("twoPercentShareholder" | "stateWcCovered")[] | undefined; update?: ("title" | "hireDate" | "twoPercentShareholder" | "stateWcCovered")[] | undefined; };
88
+ export type JobOptionalFieldsToRequire = { create?: ("twoPercentShareholder" | "stateWcCovered" | "stateWcClassCode")[] | undefined; update?: ("title" | "hireDate" | "twoPercentShareholder" | "stateWcCovered" | "stateWcClassCode")[] | undefined; };
97
89
  interface JobSchemaOptions {
98
90
  mode?: 'create' | 'update';
99
91
  optionalFieldsToRequire?: JobOptionalFieldsToRequire;
@@ -1 +1 @@
1
- {"version":3,"file":"jobSchema.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/jobSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceToISODate, coerceStringBoolean } from '@/partner-hook-utils/form/preprocessors'\n\n/**\n * Validation error codes produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Use these constants as the keys in a field's `validationMessages` prop to\n * map an error code to a user-facing message.\n *\n * @public\n *\n * @example\n * ```tsx\n * import { JobErrorCodes } from '@gusto/embedded-react-sdk'\n *\n * <Fields.Title\n * label=\"Job title\"\n * validationMessages={{ [JobErrorCodes.REQUIRED]: 'Job title is required' }}\n * />\n * ```\n */\nexport const JobErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\n/**\n * Union of every error code produced by the {@link useJobForm} schema.\n *\n * @public\n */\nexport type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes]\n\nconst fieldValidators = {\n /** The employee's job title (e.g. `\"Software Engineer\"`). */\n title: z.string(),\n /** The employee's hire date as an ISO 8601 string (`YYYY-MM-DD`), or `null` if unknown. */\n hireDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n /** Whether the employee owns 2 % or more of an S-corporation. Affects benefit-deduction tax treatment. */\n twoPercentShareholder: z.boolean(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.\n /** Whether the employee is covered under Washington state workers' compensation insurance. */\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n /** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */\n stateWcClassCode: z.string(),\n}\n\n/**\n * Shape of the form values managed by {@link useJobForm}.\n *\n * @remarks\n * Accepted as `defaultValues` on `useJobForm` and returned by\n * `form.getFormSubmissionValues()` once the form has validated. `hireDate` is\n * an ISO date string (`YYYY-MM-DD`) or `null`; `stateWcCovered` is a boolean\n * even though the radio group surfaces `'true'` / `'false'` strings during\n * input (the schema preprocessor coerces them).\n *\n * @public\n * @interface\n */\nexport type JobFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\n/**\n * Validated submission shape produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Identical to {@link JobFormData} — exposed as a separate alias so the input\n * vs. output sides of the schema remain distinguishable in advanced usages.\n *\n * @public\n */\nexport type JobFormOutputs = JobFormData\n\nconst requiredFieldsConfig = {\n title: 'create',\n hireDate: 'create',\n twoPercentShareholder: 'never',\n stateWcCovered: 'never',\n // stateWcClassCode is gated by stateWcCovered === true. The predicate also\n // depends implicitly on the work-address state being WA — partners enforce\n // that gate by passing `optionalFieldsToRequire` only for WA employees, or\n // by simply never sending stateWcCovered=true outside WA.\n stateWcClassCode: data => String(data.stateWcCovered) === 'true',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * Override which fields are required on a given submission mode of {@link useJobForm}.\n *\n * @remarks\n * Each mode key lists the fields that are optional by default for that mode\n * but should be promoted to required. `stateWcClassCode` is automatically\n * required when `stateWcCovered` is `true` and is not configurable here.\n *\n * | Field | Required on create | Required on update | Configurable? |\n * | ----- | ------------------ | ------------------ | ------------- |\n * | `title` | Yes | No | Yes (on update) |\n * | `hireDate` | Yes | No | Yes (on update) |\n * | `twoPercentShareholder` | No | No | Yes (either mode) |\n * | `stateWcCovered` | No | No | Yes (either mode) |\n * | `stateWcClassCode` | When WC is covered | When WC is covered | No (auto) |\n *\n * @public\n * @interface\n *\n * @example\n * ```tsx\n * const job = useJobForm({\n * employeeId,\n * jobId,\n * optionalFieldsToRequire: {\n * update: ['title', 'hireDate'],\n * },\n * })\n * ```\n */\nexport type JobOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>\n\ninterface JobSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: JobOptionalFieldsToRequire\n /**\n * When `false`, drops `hireDate` from the validated shape entirely — the\n * field becomes hook-managed rather than user-facing (e.g. an onboarding\n * screen that derives hireDate from the employee's `startDate`). Partners\n * supply the value at submit time via `JobSubmitOptions.hireDate`.\n * Defaults to `true`.\n */\n withHireDateField?: boolean\n /**\n * When `false`, drops `title` from the validated shape entirely and the\n * hook stops sending it on PUT `/v1/jobs/:id`. Use this when title is\n * being driven via the compensation form instead (steady-state edits,\n * where title is effective-dated alongside rate/unit/FLSA on a future\n * compensation row). Defaults to `true`.\n */\n withTitleField?: boolean\n}\n\n/** @internal */\nexport function createJobSchema(options: JobSchemaOptions = {}) {\n const {\n mode = 'create',\n optionalFieldsToRequire,\n withHireDateField = true,\n withTitleField = true,\n } = options\n\n const excludeFields: Array<keyof typeof fieldValidators> = []\n if (!withHireDateField) excludeFields.push('hireDate')\n if (!withTitleField) excludeFields.push('title')\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: JobErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields,\n })\n}\n"],"names":["JobErrorCodes","fieldValidators","z","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","createJobSchema","options","mode","optionalFieldsToRequire","withHireDateField","withTitleField","excludeFields","buildFormSchema"],"mappings":";;;AA2BO,MAAMA,IAAgB;AAAA,EAC3B,UAAU;AACZ,GASMC,IAAkB;AAAA;AAAA,EAEtB,OAAOC,EAAE,OAAA;AAAA;AAAA,EAET,UAAUA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA;AAAA,EAE/D,uBAAuBA,EAAE,QAAA;AAAA;AAAA;AAAA,EAGzB,gBAAgBA,EAAE,WAAWE,GAAqBF,EAAE,SAAS;AAAA;AAAA,EAE7D,kBAAkBA,EAAE,OAAA;AACtB,GA8BMG,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,uBAAuB;AAAA,EACvB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhB,kBAAkB,CAAAC,MAAQ,OAAOA,EAAK,cAAc,MAAM;AAC5D;AAwDO,SAASC,EAAgBC,IAA4B,IAAI;AAC9D,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,yBAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,gBAAAC,IAAiB;AAAA,EAAA,IACfJ,GAEEK,IAAqD,CAAA;AAC3D,SAAKF,KAAmBE,EAAc,KAAK,UAAU,GAChDD,KAAgBC,EAAc,KAAK,OAAO,GAExCC,EAAgBb,GAAiB;AAAA,IACtC,sBAAAI;AAAA,IACA,mBAAmBL,EAAc;AAAA,IACjC,MAAAS;AAAA,IACA,yBAAAC;AAAA,IACA,eAAAG;AAAA,EAAA,CACD;AACH;"}
1
+ {"version":3,"file":"jobSchema.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/jobSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\nimport { coerceToISODate, coerceStringBoolean } from '@/partner-hook-utils/form/preprocessors'\n\n/**\n * Validation error codes produced by the {@link useJobForm} schema.\n *\n * @remarks\n * Use these constants as the keys in a field's `validationMessages` prop to\n * map an error code to a user-facing message.\n *\n * @public\n *\n * @example\n * ```tsx\n * import { JobErrorCodes } from '@gusto/embedded-react-sdk'\n *\n * <Fields.Title\n * label=\"Job title\"\n * validationMessages={{ [JobErrorCodes.REQUIRED]: 'Job title is required' }}\n * />\n * ```\n */\nexport const JobErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\n/**\n * Union of every error code produced by the {@link useJobForm} schema.\n *\n * @public\n */\nexport type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes]\n\nconst fieldValidators = {\n /** The employee's job title (e.g. `\"Software Engineer\"`). */\n title: z.string(),\n /** The employee's hire date as an ISO 8601 string (`YYYY-MM-DD`), or `null` if unknown. */\n hireDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n /** Whether the employee owns 2 % or more of an S-corporation. Affects benefit-deduction tax treatment. */\n twoPercentShareholder: z.boolean(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.\n /** Whether the employee is covered under Washington state workers' compensation insurance. */\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n /** Washington state workers' compensation risk-class code. Required when `stateWcCovered` is `true`. */\n stateWcClassCode: z.string(),\n}\n\n/**\n * Shape of the form values managed by {@link useJobForm}.\n *\n * @remarks\n * Accepted as `defaultValues` on `useJobForm` and returned by\n * `form.getFormSubmissionValues()` once the form has validated. `hireDate` is\n * an ISO date string (`YYYY-MM-DD`) or `null`; `stateWcCovered` is a boolean\n * even though the radio group surfaces `'true'` / `'false'` strings during\n * input (the schema preprocessor coerces them).\n *\n * @public\n * @interface\n */\nexport type JobFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\n/** @internal */\nexport type JobFormOutputs = JobFormData\n\nconst requiredFieldsConfig = {\n title: 'create',\n hireDate: 'create',\n twoPercentShareholder: 'never',\n stateWcCovered: 'never',\n // stateWcClassCode is gated by stateWcCovered === true. The predicate also\n // depends implicitly on the work-address state being WA — partners enforce\n // that gate by passing `optionalFieldsToRequire` only for WA employees, or\n // by simply never sending stateWcCovered=true outside WA.\n stateWcClassCode: data => String(data.stateWcCovered) === 'true',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * Override which fields are required on a given submission mode of {@link useJobForm}.\n *\n * @remarks\n * Each mode key lists the fields that are optional by default for that mode\n * but should be promoted to required. `stateWcClassCode` is automatically\n * required when `stateWcCovered` is `true` and is not configurable here.\n *\n * | Field | Required on create | Required on update | Configurable? |\n * | ----- | ------------------ | ------------------ | ------------- |\n * | `title` | Yes | No | Yes (on update) |\n * | `hireDate` | Yes | No | Yes (on update) |\n * | `twoPercentShareholder` | No | No | Yes (either mode) |\n * | `stateWcCovered` | No | No | Yes (either mode) |\n * | `stateWcClassCode` | When WC is covered | When WC is covered | No (auto) |\n *\n * @public\n * @interface\n *\n * @example\n * ```tsx\n * const job = useJobForm({\n * employeeId,\n * jobId,\n * optionalFieldsToRequire: {\n * update: ['title', 'hireDate'],\n * },\n * })\n * ```\n */\nexport type JobOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>\n\ninterface JobSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: JobOptionalFieldsToRequire\n /**\n * When `false`, drops `hireDate` from the validated shape entirely — the\n * field becomes hook-managed rather than user-facing (e.g. an onboarding\n * screen that derives hireDate from the employee's `startDate`). Partners\n * supply the value at submit time via `JobSubmitOptions.hireDate`.\n * Defaults to `true`.\n */\n withHireDateField?: boolean\n /**\n * When `false`, drops `title` from the validated shape entirely and the\n * hook stops sending it on PUT `/v1/jobs/:id`. Use this when title is\n * being driven via the compensation form instead (steady-state edits,\n * where title is effective-dated alongside rate/unit/FLSA on a future\n * compensation row). Defaults to `true`.\n */\n withTitleField?: boolean\n}\n\n/** @internal */\nexport function createJobSchema(options: JobSchemaOptions = {}) {\n const {\n mode = 'create',\n optionalFieldsToRequire,\n withHireDateField = true,\n withTitleField = true,\n } = options\n\n const excludeFields: Array<keyof typeof fieldValidators> = []\n if (!withHireDateField) excludeFields.push('hireDate')\n if (!withTitleField) excludeFields.push('title')\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: JobErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields,\n })\n}\n"],"names":["JobErrorCodes","fieldValidators","z","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","createJobSchema","options","mode","optionalFieldsToRequire","withHireDateField","withTitleField","excludeFields","buildFormSchema"],"mappings":";;;AA2BO,MAAMA,IAAgB;AAAA,EAC3B,UAAU;AACZ,GASMC,IAAkB;AAAA;AAAA,EAEtB,OAAOC,EAAE,OAAA;AAAA;AAAA,EAET,UAAUA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA;AAAA,EAE/D,uBAAuBA,EAAE,QAAA;AAAA;AAAA;AAAA,EAGzB,gBAAgBA,EAAE,WAAWE,GAAqBF,EAAE,SAAS;AAAA;AAAA,EAE7D,kBAAkBA,EAAE,OAAA;AACtB,GAsBMG,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,uBAAuB;AAAA,EACvB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhB,kBAAkB,CAAAC,MAAQ,OAAOA,EAAK,cAAc,MAAM;AAC5D;AAwDO,SAASC,EAAgBC,IAA4B,IAAI;AAC9D,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,yBAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,gBAAAC,IAAiB;AAAA,EAAA,IACfJ,GAEEK,IAAqD,CAAA;AAC3D,SAAKF,KAAmBE,EAAc,KAAK,UAAU,GAChDD,KAAgBC,EAAc,KAAK,OAAO,GAExCC,EAAgBb,GAAiB;AAAA,IACtC,sBAAAI;AAAA,IACA,mBAAmBL,EAAc;AAAA,IACjC,MAAAS;AAAA,IACA,yBAAAC;AAAA,IACA,eAAAG;AAAA,EAAA,CACD;AACH;"}