@gusto/embedded-react-sdk 0.42.0 → 0.44.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 (778) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/README.md +23 -5
  3. package/dist/assets/icons/edit-02.svg.js +10 -0
  4. package/dist/assets/icons/edit-02.svg.js.map +1 -0
  5. package/dist/assets/icons/search-lg.svg.js +10 -0
  6. package/dist/assets/icons/search-lg.svg.js.map +1 -0
  7. package/dist/components/Base/Base.js +3 -2
  8. package/dist/components/Base/Base.js.map +1 -1
  9. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +3 -1
  10. package/dist/components/Common/DataView/DataCards/DataCards.js +55 -45
  11. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  12. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +16 -10
  13. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  14. package/dist/components/Common/DataView/DataTable/DataTable.js +86 -64
  15. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  16. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +1 -1
  17. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  18. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +52 -0
  19. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -0
  20. package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js +18 -0
  21. package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js.map +1 -0
  22. package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.d.ts +13 -0
  23. package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js +12 -0
  24. package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js.map +1 -0
  25. package/dist/components/Common/Fields/hooks/fieldElementRegistry.d.ts +21 -0
  26. package/dist/components/Common/Fields/hooks/fieldElementRegistry.js +29 -0
  27. package/dist/components/Common/Fields/hooks/fieldElementRegistry.js.map +1 -0
  28. package/dist/components/Common/Fields/hooks/useField.js +43 -37
  29. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  30. package/dist/components/Common/Flex/Flex.d.ts +2 -1
  31. package/dist/components/Common/Flex/Flex.js +14 -12
  32. package/dist/components/Common/Flex/Flex.js.map +1 -1
  33. package/dist/components/Common/Flex/Flex.module.scss.js +4 -4
  34. package/dist/components/Common/TaxInputs/TaxInputs.js +1 -1
  35. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  36. package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
  37. package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
  38. package/dist/components/Common/UI/ComboBox/ComboBox.d.ts +1 -1
  39. package/dist/components/Common/UI/ComboBox/ComboBox.js +26 -25
  40. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  41. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +5 -0
  42. package/dist/components/Common/UI/DatePicker/DatePicker.js +4 -4
  43. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  44. package/dist/components/Common/UI/Dialog/Dialog.js +35 -36
  45. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
  46. package/dist/components/Common/UI/Menu/Menu.js +18 -17
  47. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  48. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +5 -0
  49. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  50. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +1 -1
  51. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
  52. package/dist/components/Common/UI/Select/Select.js +9 -9
  53. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  54. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +2 -2
  55. package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
  56. package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
  57. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  58. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
  59. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
  61. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  62. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +7 -3
  63. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  64. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +7 -3
  67. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  68. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
  69. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  70. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +9 -5
  71. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  72. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  73. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
  75. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountForm/context.js +7 -3
  77. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  78. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
  79. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  80. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
  81. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  82. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
  83. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  84. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
  85. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  86. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  87. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  88. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +7 -3
  89. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  90. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +4 -3
  91. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  92. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +26 -25
  93. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
  94. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  95. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  96. package/dist/components/Company/FederalTaxes/FederalTaxes.js +8 -7
  97. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  98. package/dist/components/Company/FederalTaxes/Form.js +4 -2
  99. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  100. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -8
  101. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  102. package/dist/components/Company/Industry/Actions.js +7 -5
  103. package/dist/components/Company/Industry/Actions.js.map +1 -1
  104. package/dist/components/Company/Industry/Context.js +10 -6
  105. package/dist/components/Company/Industry/Context.js.map +1 -1
  106. package/dist/components/Company/Industry/Edit.js +12 -10
  107. package/dist/components/Company/Industry/Edit.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
  109. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationForm/Form.d.ts +6 -1
  111. package/dist/components/Company/Locations/LocationForm/Form.js +29 -27
  112. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js +59 -54
  114. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  115. package/dist/components/Company/Locations/LocationForm/index.d.ts +2 -0
  116. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +7 -3
  117. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  118. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  119. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  120. package/dist/components/Company/Locations/LocationsList/List.js +43 -40
  121. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  122. package/dist/components/Company/Locations/LocationsList/List.module.scss.js +8 -0
  123. package/dist/components/Company/Locations/LocationsList/List.module.scss.js.map +1 -0
  124. package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -2
  125. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  126. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +7 -3
  127. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  128. package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
  129. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  130. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -5
  131. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  132. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
  133. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  134. package/dist/components/Company/OnboardingOverview/context.js +7 -3
  135. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  136. package/dist/components/Company/PaySchedule/PayScheduleList.js +4 -3
  137. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  138. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +53 -52
  139. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
  141. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  142. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +12 -11
  143. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -63
  145. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +7 -3
  147. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  148. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
  149. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +6 -0
  150. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -0
  151. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
  152. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  153. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +58 -26
  154. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  155. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +7 -3
  156. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  157. package/dist/components/Company/exports/companyOnboarding.d.ts +3 -0
  158. package/dist/components/Company/exports/companyOnboarding.js +21 -15
  159. package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
  160. package/dist/components/Company/index.d.ts +1 -0
  161. package/dist/components/Company/index.js +14 -12
  162. package/dist/components/Company/index.js.map +1 -1
  163. package/dist/components/Contractor/Address/Address.js +10 -9
  164. package/dist/components/Contractor/Address/Address.js.map +1 -1
  165. package/dist/components/Contractor/Address/Form.js +4 -4
  166. package/dist/components/Contractor/Address/Head.js +12 -9
  167. package/dist/components/Contractor/Address/Head.js.map +1 -1
  168. package/dist/components/Contractor/Address/useAddress.js +9 -5
  169. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  170. package/dist/components/Contractor/ContractorList/index.js +20 -19
  171. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  172. package/dist/components/Contractor/NewHireReport/NewHireReport.js +42 -41
  173. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  174. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
  175. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  176. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +17 -17
  177. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  178. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  179. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  180. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +4 -2
  181. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  182. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -5
  183. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  184. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +4 -3
  185. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  186. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +4 -2
  187. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  188. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +15 -13
  189. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  190. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +4 -2
  191. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  192. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +9 -7
  193. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  194. package/dist/components/Contractor/Profile/ContractorProfileForm.js +48 -49
  195. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  196. package/dist/components/Contractor/Profile/useContractorProfile.js +35 -33
  197. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  198. package/dist/components/Contractor/Submit/Submit.js +4 -3
  199. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  200. package/dist/components/Contractor/Submit/SubmitDone.js +14 -12
  201. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  202. package/dist/components/Employee/Compensation/Compensation.d.ts +7 -4
  203. package/dist/components/Employee/Compensation/Compensation.js +72 -179
  204. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  205. package/dist/components/Employee/Compensation/CompensationFlowComponents.d.ts +27 -0
  206. package/dist/components/Employee/Compensation/CompensationFlowComponents.js +61 -0
  207. package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +1 -0
  208. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +14 -0
  209. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +128 -0
  210. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +1 -0
  211. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +17 -0
  212. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +224 -0
  213. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +1 -0
  214. package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +5 -0
  215. package/dist/components/Employee/Compensation/JobsList/JobsList.d.ts +5 -0
  216. package/dist/components/Employee/Compensation/JobsList/JobsList.js +47 -0
  217. package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +1 -0
  218. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.d.ts +11 -0
  219. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js +98 -0
  220. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +1 -0
  221. package/dist/components/Employee/Compensation/JobsList/index.d.ts +5 -0
  222. package/dist/components/Employee/Compensation/{useCompensation.d.ts → compensationSchema.d.ts} +0 -22
  223. package/dist/components/Employee/Compensation/{useCompensation.js → compensationSchema.js} +9 -12
  224. package/dist/components/Employee/Compensation/compensationSchema.js.map +1 -0
  225. package/dist/components/Employee/Compensation/compensationStateMachine.d.ts +6 -0
  226. package/dist/components/Employee/Compensation/compensationStateMachine.js +73 -0
  227. package/dist/components/Employee/Compensation/compensationStateMachine.js.map +1 -0
  228. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +62 -36
  229. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +81 -57
  230. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  231. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +5 -12
  232. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +22 -35
  233. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  234. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +5 -3
  235. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +55 -13
  236. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +216 -226
  237. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  238. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +15 -0
  239. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +27 -0
  240. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +1 -0
  241. package/dist/components/Employee/Compensation/shared/useJobForm/fields.d.ts +19 -0
  242. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +29 -0
  243. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js.map +1 -0
  244. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +7 -0
  245. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +43 -0
  246. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +37 -0
  247. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -0
  248. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +13 -0
  249. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +26 -0
  250. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +1 -0
  251. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +56 -0
  252. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +180 -0
  253. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -0
  254. package/dist/components/Employee/Dashboard/BasicDetailsView.js +15 -13
  255. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  256. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -0
  257. package/dist/components/Employee/Dashboard/DashboardComponents.js +33 -15
  258. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  259. package/dist/components/Employee/Dashboard/DocumentsView.js +13 -11
  260. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  261. package/dist/components/Employee/Dashboard/JobAndPayView.js +11 -9
  262. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  263. package/dist/components/Employee/Dashboard/TaxesView.js +21 -19
  264. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  265. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
  266. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +54 -33
  267. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  268. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +15 -11
  269. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  270. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +37 -33
  271. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  272. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +26 -26
  273. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  274. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +7 -3
  275. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  276. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +8 -7
  277. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  278. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  279. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  280. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -5
  281. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  282. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  283. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  284. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +7 -3
  285. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  286. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +9 -7
  287. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  288. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +36 -34
  289. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  290. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -7
  291. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  292. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +1 -1
  293. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -1
  294. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js +100 -99
  295. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  296. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +4 -2
  297. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  298. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +9 -7
  299. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  300. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +42 -40
  301. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  302. package/dist/components/Employee/FederalTaxes/index.d.ts +3 -1
  303. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +8 -0
  304. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +71 -0
  305. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -0
  306. package/dist/components/Employee/FederalTaxes/management/index.d.ts +2 -0
  307. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +8 -0
  308. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +55 -0
  309. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -0
  310. package/dist/components/Employee/FederalTaxes/onboarding/index.d.ts +2 -0
  311. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.d.ts +15 -0
  312. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +104 -0
  313. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -0
  314. package/dist/components/Employee/FederalTaxes/shared/index.d.ts +3 -0
  315. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +41 -0
  316. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +40 -0
  317. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -0
  318. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +18 -0
  319. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +31 -0
  320. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js.map +1 -0
  321. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/index.d.ts +5 -0
  322. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +37 -0
  323. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +140 -0
  324. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -0
  325. package/dist/components/Employee/Landing/Landing.js +15 -14
  326. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  327. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
  328. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +2 -2
  329. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  330. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +1 -1
  331. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  332. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  333. package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
  334. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  335. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
  336. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  337. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +7 -6
  338. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  339. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
  340. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  341. package/dist/components/Employee/PaymentMethod/Split.js +4 -3
  342. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  343. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +9 -5
  344. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  345. package/dist/components/Employee/Profile/management/Profile.d.ts +6 -0
  346. package/dist/components/Employee/Profile/management/Profile.js +122 -0
  347. package/dist/components/Employee/Profile/management/Profile.js.map +1 -0
  348. package/dist/components/Employee/Profile/management/Profile.module.scss.js +8 -0
  349. package/dist/components/Employee/Profile/management/Profile.module.scss.js.map +1 -0
  350. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +352 -0
  351. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -0
  352. package/dist/components/Employee/Profile/{EmployeeProfile.js → onboarding/EmployeeProfile.js} +60 -66
  353. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -0
  354. package/dist/components/Employee/Profile/{Profile.d.ts → onboarding/Profile.d.ts} +2 -2
  355. package/dist/components/Employee/Profile/{Profile.js → onboarding/Profile.js} +4 -4
  356. package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -0
  357. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +9 -4
  358. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +61 -58
  359. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  360. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +1 -1
  361. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -1
  362. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +50 -49
  363. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  364. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +47 -46
  365. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  366. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +14 -14
  367. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  368. package/dist/components/Employee/StateTaxes/index.d.ts +2 -1
  369. package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +6 -0
  370. package/dist/components/Employee/StateTaxes/management/StateTaxes.js +59 -0
  371. package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -0
  372. package/dist/components/Employee/StateTaxes/management/index.d.ts +2 -0
  373. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +8 -0
  374. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +49 -0
  375. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -0
  376. package/dist/components/Employee/StateTaxes/onboarding/index.d.ts +2 -0
  377. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.d.ts +14 -0
  378. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +32 -0
  379. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -0
  380. package/dist/components/Employee/StateTaxes/shared/index.d.ts +3 -0
  381. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +8 -0
  382. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +36 -0
  383. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +56 -0
  384. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js +116 -0
  385. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -0
  386. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.d.ts +12 -0
  387. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +76 -0
  388. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -0
  389. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +14 -0
  390. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js +23 -0
  391. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -0
  392. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMeta.d.ts +6 -0
  393. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +39 -0
  394. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +46 -0
  395. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js +93 -0
  396. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -0
  397. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +6 -0
  398. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +36 -0
  399. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +159 -0
  400. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -0
  401. package/dist/components/Employee/Taxes/Actions.js +10 -8
  402. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  403. package/dist/components/Employee/Taxes/FederalForm.js +6 -4
  404. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  405. package/dist/components/Employee/Taxes/useTaxes.js +7 -3
  406. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  407. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +4 -2
  408. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  409. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +13 -12
  410. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  411. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +4 -2
  412. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  413. package/dist/components/Employee/exports/employeeManagement.d.ts +3 -0
  414. package/dist/components/Employee/exports/employeeManagement.js +16 -10
  415. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  416. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  417. package/dist/components/Employee/exports/employeeOnboarding.js +19 -19
  418. package/dist/components/Employee/index.d.ts +2 -1
  419. package/dist/components/Employee/index.js +37 -37
  420. package/dist/components/Flow/FlowHeader.js +11 -10
  421. package/dist/components/Flow/FlowHeader.js.map +1 -1
  422. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +56 -54
  423. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  424. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +12 -11
  425. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  426. package/dist/components/InformationRequests/InformationRequests.js +4 -3
  427. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  428. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -0
  429. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  430. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +10 -8
  431. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  432. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +23 -20
  433. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  434. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +20 -18
  435. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  436. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +12 -10
  437. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  438. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +8 -6
  439. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  440. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +4 -2
  441. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  442. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +13 -11
  443. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  444. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  445. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +18 -16
  446. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  447. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +4 -2
  448. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  449. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +14 -12
  450. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  451. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
  452. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  453. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +4 -2
  454. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  455. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  456. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  457. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +7 -6
  458. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  459. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +7 -6
  460. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  461. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -2
  462. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  463. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +4 -2
  464. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  465. package/dist/components/Payroll/usePreparedPayrollData.js +16 -12
  466. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  467. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +11 -0
  468. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
  469. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +3 -0
  470. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +19 -0
  471. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
  472. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +6 -0
  473. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +149 -0
  474. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -0
  475. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +2 -0
  476. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +80 -0
  477. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -0
  478. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +21 -0
  479. package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +5 -0
  480. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionForm.d.ts +1 -0
  481. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +115 -0
  482. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
  483. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -10
  484. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
  485. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +2 -0
  486. package/dist/components/TimeOff/PolicyList/PolicyList.js +103 -0
  487. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -0
  488. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +135 -0
  489. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
  490. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListTypes.d.ts +1 -1
  491. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +70 -0
  492. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -0
  493. package/dist/components/TimeOff/PolicySettings/PolicySettings.module.scss.js +16 -0
  494. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.module.scss.js.map +1 -1
  495. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +164 -0
  496. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
  497. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsTypes.d.ts +1 -1
  498. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +31 -0
  499. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -0
  500. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
  501. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +68 -0
  502. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
  503. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +1 -0
  504. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
  505. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -3
  506. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +117 -0
  507. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
  508. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +9 -0
  509. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js +25 -0
  510. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -0
  511. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/timeOffStateMachine.d.ts +4 -2
  512. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +487 -0
  513. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
  514. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
  515. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +158 -0
  516. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
  517. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +230 -0
  518. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
  519. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +6 -0
  520. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +143 -0
  521. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -0
  522. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +2 -0
  523. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +103 -0
  524. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -0
  525. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +41 -0
  526. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +9 -0
  527. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +216 -0
  528. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -0
  529. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +12 -0
  530. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +64 -0
  531. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -0
  532. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +9 -0
  533. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +56 -0
  534. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -0
  535. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +5 -0
  536. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +251 -0
  537. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -0
  538. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +10 -0
  539. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js.map +1 -0
  540. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +2 -0
  541. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +143 -0
  542. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -0
  543. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +52 -0
  544. package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +7 -0
  545. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +9 -0
  546. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
  547. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +6 -0
  548. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js +9 -0
  549. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -0
  550. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +9 -0
  551. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
  552. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.d.ts +7 -8
  553. package/dist/components/TimeOff/index.js +27 -0
  554. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.js.map +1 -1
  555. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
  556. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +95 -0
  557. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -0
  558. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +10 -0
  559. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js.map +1 -0
  560. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
  561. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +3 -0
  562. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +86 -0
  563. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -0
  564. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +27 -0
  565. package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +3 -0
  566. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.d.ts +1 -1
  567. package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.js +8 -8
  568. package/dist/components/TimeOff/shared/holidayHelpers.js.map +1 -0
  569. package/dist/components/TimeOff/shared/holidayHelpers.test.d.ts +1 -0
  570. package/dist/components/index.d.ts +1 -1
  571. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +1 -0
  572. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +35 -32
  573. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  574. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +8 -0
  575. package/dist/contexts/ThemeProvider/ThemeProvider.js +26 -21
  576. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  577. package/dist/contexts/ThemeProvider/useTheme.d.ts +1 -1
  578. package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
  579. package/dist/helpers/dateFormatting.d.ts +2 -0
  580. package/dist/helpers/dateFormatting.js +4 -0
  581. package/dist/helpers/dateFormatting.js.map +1 -1
  582. package/dist/i18n/I18n.js +12 -10
  583. package/dist/i18n/I18n.js.map +1 -1
  584. package/dist/i18n/en/Company.Locations.json.js +43 -39
  585. package/dist/i18n/en/Company.Locations.json.js.map +1 -1
  586. package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
  587. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +10 -12
  588. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  589. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -16
  590. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
  591. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +14 -0
  592. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -0
  593. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +30 -0
  594. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -0
  595. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +14 -14
  596. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +46 -42
  597. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -1
  598. package/dist/i18n/en/Employee.FederalTaxes.json.js +16 -10
  599. package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
  600. package/dist/i18n/en/Employee.Profile.json.js +24 -20
  601. package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
  602. package/dist/i18n/en/Employee.StateTaxes.json.js +14 -6
  603. package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
  604. package/dist/i18n/en/Payroll.GrossUpModal.json.js +12 -10
  605. package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
  606. package/dist/index.d.ts +8 -2
  607. package/dist/index.js +118 -93
  608. package/dist/index.js.map +1 -1
  609. package/dist/partner-hook-utils/form/SDKFormProvider.js +18 -14
  610. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  611. package/dist/partner-hook-utils/form/buildFormSchema.js +41 -41
  612. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  613. package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +10 -6
  614. package/dist/partner-hook-utils/form/composeSubmitHandler.js +49 -26
  615. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  616. package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -1
  617. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +30 -24
  618. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  619. package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -1
  620. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -29
  621. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  622. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -1
  623. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +34 -28
  624. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  625. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -1
  626. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +30 -24
  627. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  628. package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -1
  629. package/dist/partner-hook-utils/form/fields/SelectHookField.js +38 -32
  630. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  631. package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -1
  632. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +28 -22
  633. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  634. package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -1
  635. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +30 -24
  636. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  637. package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.d.ts +10 -0
  638. package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js +9 -0
  639. package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js.map +1 -0
  640. package/dist/partner-hook-utils/form/index.d.ts +3 -0
  641. package/dist/partner-hook-utils/form/resolveFieldError.js +10 -7
  642. package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -1
  643. package/dist/partner-hook-utils/form/useFieldErrorMessage.js +10 -7
  644. package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -1
  645. package/dist/partner-hook-utils/form/useHookFieldResolution.d.ts +10 -3
  646. package/dist/partner-hook-utils/form/useHookFieldResolution.js +6 -6
  647. package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
  648. package/dist/partner-hook-utils/form/useHookFormInternals.d.ts +22 -0
  649. package/dist/partner-hook-utils/form/useHookFormInternals.js +12 -0
  650. package/dist/partner-hook-utils/form/useHookFormInternals.js.map +1 -0
  651. package/dist/partner-hook-utils/form/withOptions.d.ts +1 -1
  652. package/dist/partner-hook-utils/form/withOptions.js.map +1 -1
  653. package/dist/partner-hook-utils/types.d.ts +16 -1
  654. package/dist/shared/constants.d.ts +24 -0
  655. package/dist/shared/constants.js +42 -30
  656. package/dist/shared/constants.js.map +1 -1
  657. package/dist/style.css +1 -1
  658. package/dist/types/i18next.d.ts +82 -14
  659. package/docs/reference/endpoint-inventory.json +453 -123
  660. package/package.json +22 -20
  661. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +0 -8
  662. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js.map +0 -1
  663. package/dist/components/Employee/Compensation/Actions.d.ts +0 -1
  664. package/dist/components/Employee/Compensation/Actions.js +0 -38
  665. package/dist/components/Employee/Compensation/Actions.js.map +0 -1
  666. package/dist/components/Employee/Compensation/Edit.d.ts +0 -5
  667. package/dist/components/Employee/Compensation/Edit.js +0 -178
  668. package/dist/components/Employee/Compensation/Edit.js.map +0 -1
  669. package/dist/components/Employee/Compensation/Head.d.ts +0 -1
  670. package/dist/components/Employee/Compensation/Head.js +0 -22
  671. package/dist/components/Employee/Compensation/Head.js.map +0 -1
  672. package/dist/components/Employee/Compensation/List.d.ts +0 -1
  673. package/dist/components/Employee/Compensation/List.js +0 -71
  674. package/dist/components/Employee/Compensation/List.js.map +0 -1
  675. package/dist/components/Employee/Compensation/useCompensation.js.map +0 -1
  676. package/dist/components/Employee/FederalTaxes/Actions.d.ts +0 -1
  677. package/dist/components/Employee/FederalTaxes/Actions.js +0 -13
  678. package/dist/components/Employee/FederalTaxes/Actions.js.map +0 -1
  679. package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +0 -12
  680. package/dist/components/Employee/FederalTaxes/FederalForm.js +0 -109
  681. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +0 -1
  682. package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +0 -6
  683. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +0 -84
  684. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +0 -1
  685. package/dist/components/Employee/FederalTaxes/Head.d.ts +0 -1
  686. package/dist/components/Employee/FederalTaxes/Head.js +0 -24
  687. package/dist/components/Employee/FederalTaxes/Head.js.map +0 -1
  688. package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +0 -5
  689. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +0 -20
  690. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +0 -1
  691. package/dist/components/Employee/Profile/AdminProfile.js +0 -358
  692. package/dist/components/Employee/Profile/AdminProfile.js.map +0 -1
  693. package/dist/components/Employee/Profile/EmployeeProfile.js.map +0 -1
  694. package/dist/components/Employee/Profile/Profile.js.map +0 -1
  695. package/dist/components/Employee/Profile/index.d.ts +0 -2
  696. package/dist/components/Employee/StateTaxes/Actions.d.ts +0 -1
  697. package/dist/components/Employee/StateTaxes/Actions.js +0 -13
  698. package/dist/components/Employee/StateTaxes/Actions.js.map +0 -1
  699. package/dist/components/Employee/StateTaxes/StateForm.d.ts +0 -6
  700. package/dist/components/Employee/StateTaxes/StateForm.js +0 -34
  701. package/dist/components/Employee/StateTaxes/StateForm.js.map +0 -1
  702. package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +0 -7
  703. package/dist/components/Employee/StateTaxes/StateTaxes.js +0 -98
  704. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +0 -1
  705. package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +0 -8
  706. package/dist/components/Employee/StateTaxes/useStateTaxes.js +0 -20
  707. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +0 -1
  708. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +0 -46
  709. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +0 -1
  710. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +0 -46
  711. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +0 -1
  712. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +0 -49
  713. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +0 -1
  714. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +0 -1
  715. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +0 -107
  716. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +0 -1
  717. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +0 -124
  718. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +0 -1
  719. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +0 -46
  720. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +0 -1
  721. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +0 -18
  722. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +0 -166
  723. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +0 -1
  724. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +0 -29
  725. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +0 -1
  726. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +0 -66
  727. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +0 -1
  728. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +0 -1
  729. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +0 -103
  730. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +0 -1
  731. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +0 -290
  732. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +0 -1
  733. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +0 -71
  734. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +0 -1
  735. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +0 -206
  736. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +0 -1
  737. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +0 -35
  738. package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +0 -1
  739. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +0 -35
  740. package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +0 -1
  741. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +0 -5
  742. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +0 -35
  743. package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +0 -1
  744. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +0 -5
  745. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +0 -35
  746. package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +0 -1
  747. package/dist/components/UNSTABLE_TimeOff/index.js +0 -29
  748. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
  749. package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +0 -1
  750. /package/dist/components/Employee/{Compensation/shared/useCompensationForm/compensationSchemaParity.test.d.ts → FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.test.d.ts} +0 -0
  751. /package/dist/components/Employee/Profile/{AdminProfile.d.ts → onboarding/AdminProfile.d.ts} +0 -0
  752. /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js → onboarding/AdminProfile.module.scss.js} +0 -0
  753. /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js.map → onboarding/AdminProfile.module.scss.js.map} +0 -0
  754. /package/dist/components/Employee/Profile/{EmployeeProfile.d.ts → onboarding/EmployeeProfile.d.ts} +0 -0
  755. /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js → onboarding/EmployeeProfile.module.scss.js} +0 -0
  756. /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js.map → onboarding/EmployeeProfile.module.scss.js.map} +0 -0
  757. /package/dist/components/{UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts → Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.test.d.ts} +0 -0
  758. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +0 -0
  759. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +0 -0
  760. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyList.d.ts +0 -0
  761. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.d.ts +0 -0
  762. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js +0 -0
  763. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js.map +0 -0
  764. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.d.ts +0 -0
  765. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsPresentation.d.ts +0 -0
  766. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelector.d.ts +0 -0
  767. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.d.ts +0 -0
  768. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.js +0 -0
  769. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/index.d.ts +0 -0
  770. /package/dist/components/{UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts → TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts} +0 -0
  771. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +0 -0
  772. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +0 -0
  773. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +0 -0
  774. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +0 -0
  775. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -0
  776. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +0 -0
  777. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +0 -0
  778. /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useCompensationForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react'\nimport { useForm, useWatch } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useJobsAndCompensationsCreateJobMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsCreateJob'\nimport { useJobsAndCompensationsUpdateMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsUpdate'\nimport { useJobsAndCompensationsUpdateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsUpdateCompensation'\nimport { useLocationsGetMinimumWages } from '@gusto/embedded-api/react-query/locationsGetMinimumWages'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useFederalTaxDetailsGet } from '@gusto/embedded-api/react-query/federalTaxDetailsGet'\nimport {\n createCompensationSchema,\n type CompensationOptionalFieldsToRequire,\n type CompensationFormData,\n type CompensationFormOutputs,\n} from './compensationSchema'\nimport {\n JobTitleField,\n FlsaStatusField,\n RateField,\n PaymentUnitField,\n AdjustForMinimumWageField,\n MinimumWageIdField,\n TwoPercentShareholderField,\n StateWcCoveredField,\n StateWcClassCodeField,\n StartDateField,\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 { 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 { WA_RISK_CLASS_CODES, type WARiskClassCode } from '@/models/WA_RISK_CODES'\n\nexport interface CompensationSubmitCallbacks {\n onJobCreated?: (job: Job) => void\n onJobUpdated?: (job: Job) => void\n onCompensationUpdated?: (compensation: Compensation | undefined) => void\n}\n\nexport interface CompensationSubmitOptions {\n employeeId?: string\n startDate?: string\n}\n\nexport interface UseCompensationFormProps {\n employeeId?: string\n withStartDateField?: boolean\n jobId?: string\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n defaultValues?: Partial<CompensationFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface UseCompensationFormReady extends BaseFormHookReady<\n FieldsMetadata,\n CompensationFormData\n> {\n data: {\n compensation: Compensation | null\n jobs: Job[] | undefined\n currentJob: Job | null\n minimumWages: MinimumWage[]\n }\n status: { isPending: boolean; mode: 'create' | 'update' }\n actions: {\n onSubmit: (\n callbacks?: CompensationSubmitCallbacks,\n options?: CompensationSubmitOptions,\n ) => Promise<HookSubmitResult<Compensation | undefined> | undefined>\n }\n}\n\nfunction findCurrentCompensation(job?: Job | null): Compensation | undefined {\n return job?.compensations?.find(comp => comp.uuid === job.currentCompensationUuid)\n}\n\ntype FlsaStatusValue = CompensationFormData['flsaStatus']\n\nfunction derivePrimaryFlsaStatus(jobs: Job[]): FlsaStatusValue | undefined {\n return jobs.reduce<FlsaStatusValue | undefined>((prev, curr) => {\n const compensation = curr.compensations?.find(\n comp => comp.uuid === curr.currentCompensationUuid,\n )\n if (!curr.primary || !compensation) return prev\n return compensation.flsaStatus ?? prev\n }, undefined)\n}\n\nconst flsaStatusEntries: FlsaStatusType[] = (\n Object.keys(FlsaStatus) as Array<keyof typeof FlsaStatus>\n).map(key => FlsaStatus[key])\n\nconst flsaOptions = flsaStatusEntries.map(status => ({\n value: status,\n label: status,\n}))\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 => ({\n value: unit,\n label: unit,\n}))\n\nexport function useCompensationForm({\n employeeId,\n withStartDateField = true,\n jobId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseCompensationFormProps): HookLoadingResult | UseCompensationFormReady {\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId: employeeId ?? '' },\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 const companyUuid = employee?.companyUuid\n\n const minWagesQuery = useLocationsGetMinimumWages(\n { locationUuid: locationUuid ?? '' },\n { enabled: !!locationUuid },\n )\n\n const taxQuery = useFederalTaxDetailsGet(\n { companyId: companyUuid ?? '' },\n { enabled: !!companyUuid },\n )\n\n const minimumWages = minWagesQuery.data?.minimumWageList ?? []\n const federalTaxDetails = taxQuery.data?.federalTaxDetails\n const showTwoPercentStakeholder = federalTaxDetails?.taxableAsScorp === true\n\n const currentJob = useMemo<Job | null>(() => {\n if (!employeeJobs) return null\n if (jobId) {\n return employeeJobs.find(j => j.uuid === jobId) ?? null\n }\n return employeeJobs.length === 1 ? (employeeJobs[0] ?? null) : null\n }, [employeeJobs, jobId])\n\n const currentCompensation = useMemo(() => findCurrentCompensation(currentJob), [currentJob])\n\n const primaryFlsaStatus = useMemo(() => {\n if (!employeeJobs) return undefined\n return derivePrimaryFlsaStatus(employeeJobs)\n }, [employeeJobs])\n\n const isCreateMode = !currentJob\n const mode = isCreateMode ? 'create' : 'update'\n\n const [schema, metadataConfig] = useMemo(\n () => createCompensationSchema({ mode, optionalFieldsToRequire, withStartDateField }),\n [mode, optionalFieldsToRequire, withStartDateField],\n )\n\n const state = currentWorkAddress?.state\n\n const hireDate = currentJob?.hireDate\n const resolvedDefaults: CompensationFormData = {\n jobTitle: currentJob?.title || partnerDefaults?.jobTitle || '',\n flsaStatus:\n currentCompensation?.flsaStatus ??\n primaryFlsaStatus ??\n partnerDefaults?.flsaStatus ??\n FlsaStatus.NONEXEMPT,\n rate: Number(currentCompensation?.rate ?? partnerDefaults?.rate ?? 0),\n adjustForMinimumWage: currentCompensation?.adjustForMinimumWage ?? false,\n minimumWageId: currentCompensation?.minimumWages?.[0]?.uuid ?? '',\n paymentUnit:\n currentCompensation?.paymentUnit ?? partnerDefaults?.paymentUnit ?? PAY_PERIODS.HOUR,\n stateWcCovered: currentJob?.stateWcCovered ?? false,\n stateWcClassCode: currentJob?.stateWcClassCode ?? '',\n twoPercentShareholder: currentJob?.twoPercentShareholder ?? false,\n startDate: hireDate ?? partnerDefaults?.startDate ?? null,\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 watchedFlsaStatus = useWatch({\n control: formMethods.control,\n name: 'flsaStatus',\n })\n const watchedAdjustForMinimumWage = useWatch({\n control: formMethods.control,\n name: 'adjustForMinimumWage',\n })\n const rawStateWcCovered = useWatch({\n control: formMethods.control,\n name: 'stateWcCovered',\n })\n const watchedStateWcCovered = String(rawStateWcCovered) === 'true'\n\n useEffect(() => {\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n formMethods.setValue('paymentUnit', PAY_PERIODS.PAYCHECK)\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n formMethods.setValue('paymentUnit', PAY_PERIODS.YEAR)\n formMethods.setValue('rate', 0)\n } else {\n formMethods.setValue('paymentUnit', resolvedDefaults.paymentUnit)\n }\n }, [watchedFlsaStatus, formMethods.setValue, resolvedDefaults.paymentUnit])\n\n const updateCompensationMutation = useJobsAndCompensationsUpdateCompensationMutation()\n const createJobMutation = useJobsAndCompensationsCreateJobMutation()\n const updateJobMutation = useJobsAndCompensationsUpdateMutation()\n\n const isPending =\n updateCompensationMutation.isPending ||\n createJobMutation.isPending ||\n updateJobMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('CompensationForm')\n\n const queries = employeeId\n ? [jobsQuery, addressesQuery, employeeQuery, minWagesQuery, taxQuery]\n : []\n const errorHandling = composeErrorHandler(queries, { submitError, setSubmitError })\n\n const isCommissionOnly =\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n\n const isOwner = watchedFlsaStatus === FlsaStatus.OWNER\n\n const isFlsaSelectionEnabled =\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 const isWaState = state === 'WA'\n\n const minimumWageOptions = minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${wage.wage} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))\n\n const stateWcClassCodeOptions = WA_RISK_CLASS_CODES.map(({ code, description }) => ({\n value: code,\n label: `${code}: ${description}`,\n }))\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const fieldsMetadata = {\n startDate: baseMetadata.startDate,\n jobTitle: baseMetadata.jobTitle,\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 twoPercentShareholder: {\n ...baseMetadata.twoPercentShareholder,\n isDisabled: !showTwoPercentStakeholder,\n },\n stateWcCovered: withOptions<boolean>(\n { ...baseMetadata.stateWcCovered, isDisabled: !isWaState },\n [\n { label: 'Yes', value: 'true' },\n { label: 'No', value: 'false' },\n ],\n [true, false],\n ),\n stateWcClassCode: withOptions<WARiskClassCode>(\n { ...baseMetadata.stateWcClassCode, isDisabled: !isWaState },\n stateWcClassCodeOptions,\n WA_RISK_CLASS_CODES,\n ),\n }\n\n const onSubmit = async (\n callbacks?: CompensationSubmitCallbacks,\n options?: CompensationSubmitOptions,\n ): Promise<HookSubmitResult<Compensation | undefined> | undefined> => {\n let submitResult: HookSubmitResult<Compensation | undefined> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: CompensationFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const resolvedEmployeeId = options?.employeeId ?? employeeId\n\n if (!resolvedEmployeeId) {\n throw new SDKInternalError('employeeId is required to submit compensation')\n }\n\n const {\n jobTitle,\n twoPercentShareholder,\n startDate: formStartDate,\n ...compensationData\n } = payload\n\n const resolvedHireDate =\n withStartDateField && formStartDate ? formStartDate : options?.startDate\n\n let updatedJobData: Job\n\n if (!currentJob) {\n if (!resolvedHireDate) {\n throw new SDKInternalError('Start date is required')\n }\n\n const result = await createJobMutation.mutateAsync({\n request: {\n employeeId: resolvedEmployeeId,\n jobsCreateRequestBody: {\n title: jobTitle,\n hireDate: resolvedHireDate,\n stateWcCovered: compensationData.stateWcCovered,\n stateWcClassCode: compensationData.stateWcCovered\n ? compensationData.stateWcClassCode\n : null,\n twoPercentShareholder,\n },\n },\n })\n updatedJobData = result.job!\n callbacks?.onJobCreated?.(updatedJobData)\n } else {\n const result = await updateJobMutation.mutateAsync({\n request: {\n jobId: currentJob.uuid,\n jobsUpdateRequestBody: {\n title: jobTitle,\n version: currentJob.version as string,\n hireDate: resolvedHireDate,\n stateWcClassCode: compensationData.stateWcCovered\n ? compensationData.stateWcClassCode\n : null,\n stateWcCovered: compensationData.stateWcCovered,\n twoPercentShareholder,\n },\n },\n })\n updatedJobData = result.job!\n callbacks?.onJobUpdated?.(updatedJobData)\n }\n\n const { compensation } = await updateCompensationMutation.mutateAsync({\n request: {\n compensationId: updatedJobData.currentCompensationUuid!,\n compensationsUpdateRequestBody: {\n // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\n version: updatedJobData.compensations?.find(\n comp => comp.uuid === updatedJobData.currentCompensationUuid,\n )?.version!,\n ...compensationData,\n rate: String(compensationData.rate),\n minimumWages: compensationData.adjustForMinimumWage\n ? [{ uuid: compensationData.minimumWageId }]\n : [],\n },\n },\n })\n\n callbacks?.onCompensationUpdated?.(compensation)\n\n submitResult = {\n mode: isCreateMode ? 'create' : 'update',\n data: compensation,\n }\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 taxQuery.isLoading\n : false\n\n if (\n isDataLoading ||\n (employeeId && (!employeeJobs || !employee || !companyUuid || !federalTaxDetails))\n ) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n compensation: currentCompensation ?? null,\n jobs: employeeJobs,\n currentJob,\n minimumWages,\n },\n status: {\n isPending,\n mode: isCreateMode ? 'create' : 'update',\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n StartDate: withStartDateField ? StartDateField : undefined,\n JobTitle: JobTitleField,\n FlsaStatus: isFlsaSelectionEnabled ? FlsaStatusField : undefined,\n Rate: RateField,\n PaymentUnit: PaymentUnitField,\n AdjustForMinimumWage: isAdjustMinimumWageEnabled ? AdjustForMinimumWageField : undefined,\n MinimumWageId:\n isAdjustMinimumWageEnabled && watchedAdjustForMinimumWage\n ? MinimumWageIdField\n : undefined,\n TwoPercentShareholder: showTwoPercentStakeholder ? TwoPercentShareholderField : undefined,\n StateWcCovered: isWaState ? StateWcCoveredField : undefined,\n StateWcClassCode: isWaState && watchedStateWcCovered ? StateWcClassCodeField : undefined,\n },\n fieldsMetadata,\n hookFormInternals: { formMethods },\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseCompensationFormResult = HookLoadingResult | UseCompensationFormReady\nexport type CompensationFieldsMetadata = UseCompensationFormReady['form']['fieldsMetadata']\nexport type CompensationFormFields = UseCompensationFormReady['form']['Fields']\n"],"names":["findCurrentCompensation","job","comp","derivePrimaryFlsaStatus","jobs","prev","curr","compensation","flsaStatusEntries","FlsaStatus","key","flsaOptions","status","paymentUnitEntries","PAY_PERIODS","paymentUnitOptions","unit","useCompensationForm","employeeId","withStartDateField","jobId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","jobsQuery","useJobsAndCompensationsGetJobs","addressesQuery","useEmployeeAddressesGetWorkAddresses","employeeQuery","useEmployeesGet","employeeJobs","currentWorkAddress","address","locationUuid","employee","companyUuid","minWagesQuery","useLocationsGetMinimumWages","taxQuery","useFederalTaxDetailsGet","minimumWages","federalTaxDetails","showTwoPercentStakeholder","currentJob","useMemo","j","currentCompensation","primaryFlsaStatus","isCreateMode","mode","schema","metadataConfig","createCompensationSchema","state","hireDate","resolvedDefaults","formMethods","useForm","zodResolver","watchedFlsaStatus","useWatch","watchedAdjustForMinimumWage","rawStateWcCovered","watchedStateWcCovered","useEffect","updateCompensationMutation","useJobsAndCompensationsUpdateCompensationMutation","createJobMutation","useJobsAndCompensationsCreateJobMutation","updateJobMutation","useJobsAndCompensationsUpdateMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isCommissionOnly","isOwner","isFlsaSelectionEnabled","isAdjustMinimumWageEnabled","TIP_CREDITS_UNSUPPORTED_STATES","isWaState","minimumWageOptions","wage","stateWcClassCodeOptions","WA_RISK_CLASS_CODES","code","description","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","withOptions","onSubmit","callbacks","options","submitResult","resolve","data","payload","resolvedEmployeeId","SDKInternalError","jobTitle","twoPercentShareholder","formStartDate","compensationData","resolvedHireDate","updatedJobData","StartDateField","JobTitleField","FlsaStatusField","RateField","PaymentUnitField","AdjustForMinimumWageField","MinimumWageIdField","TwoPercentShareholderField","StateWcCoveredField","StateWcClassCodeField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyFA,SAASA,GAAwBC,GAA4C;AAC3E,SAAOA,GAAK,eAAe,KAAK,OAAQC,EAAK,SAASD,EAAI,uBAAuB;AACnF;AAIA,SAASE,GAAwBC,GAA0C;AACzE,SAAOA,EAAK,OAAoC,CAACC,GAAMC,MAAS;AAC9D,UAAMC,IAAeD,EAAK,eAAe;AAAA,MACvC,CAAAJ,MAAQA,EAAK,SAASI,EAAK;AAAA,IAAA;AAE7B,WAAI,CAACA,EAAK,WAAW,CAACC,IAAqBF,IACpCE,EAAa,cAAcF;AAAA,EACpC,GAAG,MAAS;AACd;AAEA,MAAMG,KACJ,OAAO,KAAKC,CAAU,EACtB,IAAI,CAAAC,MAAOD,EAAWC,CAAG,CAAC,GAEtBC,KAAcH,GAAkB,IAAI,CAAAI,OAAW;AAAA,EACnD,OAAOA;AAAA,EACP,OAAOA;AACT,EAAE,GAEIC,KAAoC;AAAA,EACxCC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd,GAEMC,KAAqBF,GAAmB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ACN,aAAaC;AAAA,QACb,sBAAsBhC,IAA6BiC,KAA4B;AAAA,QAC/E,eACEjC,KAA8BpB,KAC1BsD,KACA;AAAA,QACN,uBAAuBzE,IAA4B0E,KAA6B;AAAA,QAChF,gBAAgBjC,IAAYkC,KAAsB;AAAA,QAClD,kBAAkBlC,KAAapB,KAAwBuD,KAAwB;AAAA,MAAA;AAAA,MAEjF,gBAAA1B;AAAA,MACA,mBAAmB,EAAE,aAAApC,EAAA;AAAA,MACrB,yBAAyB+D,GAA8B/D,GAAaN,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
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 { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { Job } from '@gusto/embedded-api/models/components/job'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useJobsAndCompensationsCreateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsCreateCompensation'\nimport { useJobsAndCompensationsUpdateCompensationMutation } from '@gusto/embedded-api/react-query/jobsAndCompensationsUpdateCompensation'\nimport { useLocationsGetMinimumWages } from '@gusto/embedded-api/react-query/locationsGetMinimumWages'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeesGet } from '@gusto/embedded-api/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'\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\nexport interface UseCompensationFormProps {\n employeeId?: string\n /** When updating, the parent job's UUID. Used to scope minimum wages and to derive `status.willDeleteSecondaryJobs`. */\n jobId?: string\n /** Present → update mode (PUT /v1/compensations/:id). Omitted → create mode (POST /v1/jobs/:jobId/compensations). */\n compensationId?: string\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n defaultValues?: Partial<CompensationFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface CompensationFormFields {\n Title: typeof TitleField\n FlsaStatus: typeof FlsaStatusField | undefined\n Rate: typeof RateField\n PaymentUnit: typeof PaymentUnitField\n AdjustForMinimumWage: typeof AdjustForMinimumWageField | undefined\n MinimumWageId: typeof MinimumWageIdField | undefined\n EffectiveDate: typeof EffectiveDateField | undefined\n}\n\nexport interface UseCompensationFormReady extends BaseFormHookReady<\n FieldsMetadata,\n CompensationFormData,\n CompensationFormFields\n> {\n data: {\n /** The compensation row loaded for update; `null` in create mode. */\n compensation: Compensation | null\n /** The parent job (when `jobId` resolves), used for derived helpers. */\n currentJob: Job | null\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 status: {\n isPending: boolean\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 actions: {\n onSubmit: (\n options?: CompensationSubmitOptions,\n ) => Promise<HookSubmitResult<Compensation> | undefined>\n }\n}\n\nfunction findCompensation(\n job: Job | null,\n compensationId: string | undefined,\n): Compensation | null {\n if (!job || !compensationId) return null\n return job.compensations?.find(c => c.uuid === compensationId) ?? 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\nexport function useCompensationForm({\n employeeId,\n jobId,\n compensationId,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseCompensationFormProps): HookLoadingResult | UseCompensationFormReady {\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId: employeeId ?? '' },\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 currentJob = useMemo<Job | null>(() => {\n if (!employeeJobs) return null\n if (jobId) return employeeJobs.find(j => j.uuid === jobId) ?? null\n return null\n }, [employeeJobs, jobId])\n\n const currentCompensation = useMemo(\n () => findCompensation(currentJob, compensationId),\n [currentJob, compensationId],\n )\n\n const otherJobsCount = useMemo(() => {\n if (!employeeJobs || !currentJob) return 0\n return employeeJobs.filter(j => j.uuid !== currentJob.uuid).length\n }, [employeeJobs, currentJob])\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 is no primary\n // job or it has no current compensation yet.\n const primaryFlsaStatus = useMemo<FlsaStatusType | null>(() => {\n if (!employeeJobs) return null\n for (const job of employeeJobs) {\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 }, [employeeJobs])\n\n const hireDate = currentJob?.hireDate ?? null\n\n const futureCompensations = useMemo(() => {\n if (!currentJob?.compensations) return []\n const today = todayISO()\n return currentJob.compensations.filter(\n c => c.effectiveDate !== undefined && c.effectiveDate > today,\n )\n }, [currentJob])\n\n const hasPendingFutureCompensation = futureCompensations.length > 0\n const maximumEffectiveDate = useMemo(() => {\n if (futureCompensations.length === 0) return null\n return futureCompensations.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 }, [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 const isAddingSecondaryJob = isCreateMode && primaryFlsaStatus === FlsaStatus.NONEXEMPT\n\n const [schema, metadataConfig] = useMemo(\n () => createCompensationSchema({ mode, optionalFieldsToRequire, hireDate }),\n [mode, optionalFieldsToRequire, hireDate],\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 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, 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 } = formMethods\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedAdjustForMinimumWage = useWatch({\n control,\n name: 'adjustForMinimumWage',\n })\n\n useEffect(() => {\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, resolvedDefaults.paymentUnit])\n\n // Carve-out UX (matches gws-flows): when the user flips a Nonexempt primary\n // compensation to a non-Nonexempt status while secondary jobs exist, the\n // server only honors the change immediately — saving \"deletes\" the\n // secondary jobs. Mirror the screen UX by forcing `effectiveDate` to today\n // (so submits route through PUT-current rather than create-future) and\n // disabling the field. Snapshot the prior value so a revert (back to\n // Nonexempt before saving) restores what the user had selected.\n const currentCompensationFlsaStatus = currentCompensation?.flsaStatus\n const carveOutActiveRef = useRef(false)\n const priorEffectiveDateRef = useRef<string | null>(null)\n useEffect(() => {\n const carveOutBranch =\n !isCreateMode &&\n currentCompensationFlsaStatus === FlsaStatus.NONEXEMPT &&\n watchedFlsaStatus !== undefined &&\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT &&\n otherJobsCount > 0\n\n if (carveOutBranch && !carveOutActiveRef.current) {\n priorEffectiveDateRef.current = getValues('effectiveDate') ?? null\n setValue('effectiveDate', todayISO(), { shouldDirty: true, shouldValidate: false })\n carveOutActiveRef.current = true\n } else if (!carveOutBranch && 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 }, [\n isCreateMode,\n currentCompensationFlsaStatus,\n watchedFlsaStatus,\n otherJobsCount,\n getValues,\n setValue,\n ])\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 }, [isAdjustMinimumWageEnabled, getValues, setValue])\n\n const minimumWageOptions = minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${wage.wage} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))\n\n // Carve-out branch — true when the form is currently positioned to delete\n // secondary jobs on submit. The hook locks `effectiveDate` to today and\n // disables the field while this is true (see effect above), so the flag\n // is also the trigger for an inline warning above the form.\n const willDeleteSecondaryJobs =\n !isCreateMode &&\n currentCompensationFlsaStatus === FlsaStatus.NONEXEMPT &&\n watchedFlsaStatus !== undefined &&\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT &&\n otherJobsCount > 0\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const fieldsMetadata = {\n title: baseMetadata.title,\n effectiveDate: { ...baseMetadata.effectiveDate, isDisabled: willDeleteSecondaryJobs },\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 const requestBodyBase = {\n rate: String(payload.rate),\n paymentUnit: payload.paymentUnit,\n flsaStatus: payload.flsaStatus,\n effectiveDate: payload.effectiveDate ?? undefined,\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: hireDate,\n maximumEffectiveDate,\n hasPendingFutureCompensation,\n },\n status: {\n isPending,\n mode: isCreateMode ? 'create' : 'update',\n willDeleteSecondaryJobs,\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Title: TitleField,\n FlsaStatus: isFlsaSelectionEnabled ? FlsaStatusField : undefined,\n Rate: RateField,\n PaymentUnit: PaymentUnitField,\n AdjustForMinimumWage: isAdjustMinimumWageEnabled ? AdjustForMinimumWageField : undefined,\n MinimumWageId:\n isAdjustMinimumWageEnabled && watchedAdjustForMinimumWage\n ? MinimumWageIdField\n : undefined,\n EffectiveDate: EffectiveDateField,\n },\n fieldsMetadata,\n hookFormInternals,\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseCompensationFormResult = HookLoadingResult | UseCompensationFormReady\nexport type CompensationFieldsMetadata = UseCompensationFormReady['form']['fieldsMetadata']\n"],"names":["findCompensation","job","compensationId","c","flsaStatusEntries","FlsaStatus","flsaOptions","status","paymentUnitEntries","PAY_PERIODS","paymentUnitOptions","unit","todayISO","useCompensationForm","employeeId","jobId","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","jobsQuery","useJobsAndCompensationsGetJobs","addressesQuery","useEmployeeAddressesGetWorkAddresses","employeeQuery","useEmployeesGet","employeeJobs","currentWorkAddress","address","locationUuid","employee","minWagesQuery","useLocationsGetMinimumWages","minimumWages","currentJob","useMemo","j","currentCompensation","otherJobsCount","primaryFlsaStatus","compensation","hireDate","futureCompensations","today","hasPendingFutureCompensation","maximumEffectiveDate","min","d","isCreateMode","mode","isAddingSecondaryJob","schema","metadataConfig","createCompensationSchema","state","resolvedDefaults","formMethods","useForm","zodResolver","control","getValues","setValue","watchedFlsaStatus","useWatch","watchedAdjustForMinimumWage","useEffect","currentCompensationFlsaStatus","carveOutActiveRef","useRef","priorEffectiveDateRef","carveOutBranch","updateCompensationMutation","useJobsAndCompensationsUpdateCompensationMutation","createCompensationMutation","useJobsAndCompensationsCreateCompensationMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","isCommissionOnly","isOwner","isFlsaSelectionEnabled","isAdjustMinimumWageEnabled","TIP_CREDITS_UNSUPPORTED_STATES","minimumWageOptions","wage","willDeleteSecondaryJobs","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","withOptions","onSubmit","options","submitResult","resolve","data","payload","resolvedJobId","resolvedCompensationId","resolvedMode","requestBodyBase","result","SDKInternalError","resolvedVersion","isDataLoading","hookFormInternals","useHookFormInternals","TitleField","FlsaStatusField","RateField","PaymentUnitField","AdjustForMinimumWageField","MinimumWageIdField","EffectiveDateField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;;;AAiIA,SAASA,GACPC,GACAC,GACqB;AACrB,SAAI,CAACD,KAAO,CAACC,IAAuB,OAC7BD,EAAI,eAAe,KAAK,OAAKE,EAAE,SAASD,CAAc,KAAK;AACpE;AAEA,MAAME,KAAsC;AAAA,EAC1CC,EAAW;AAAA,EACXA,EAAW;AAAA,EACXA,EAAW;AAAA,EACXA,EAAW;AAAA,EACXA,EAAW;AAAA,EACXA,EAAW;AACb,GAEMC,KAAcF,GAAkB,IAAI,CAAAG,OAAW,EAAE,OAAOA,GAAQ,OAAOA,EAAA,EAAS,GAEhFC,KAAoC;AAAA,EACxCC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd,GAEMC,KAAqBF,GAAmB,IAAI,CAAAG,OAAS,EAAE,OAAOA,GAAM,OAAOA,EAAA,EAAO;AAExF,SAASC,KAAmB;AAC1B,UAAO,oBAAI,QAAO,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC;AAC9C;AAEO,SAASC,GAAoB;AAAA,EAClC,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAb;AAAA,EACA,yBAAAc;AAAA,EACA,eAAeC;AAAA,EACf,g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AoBC,GAAqBrD,CAAW;AAE1D,SAAImD,MAAkB7F,MAAe,CAACY,KAAgB,CAACI,MAC9C,EAAE,WAAW,IAAe,eAAAkD,EAAA,IAG9B;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,cAAc3C;AAAA,MACd,YAAAH;AAAA,MACA,cAAAD;AAAA,MACA,sBAAsBQ;AAAA,MACtB,sBAAAI;AAAA,MACA,8BAAAD;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,WAAA+B;AAAA,MACA,MAAM3B,IAAe,WAAW;AAAA,MAChC,yBAAAyC;AAAA,IAAA;AAAA,IAEF,SAAS,EAAE,UAAAK,GAAA;AAAA,IACX,eAAAd;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,OAAO8B;AAAA,QACP,YAAY1B,KAAyB2B,KAAkB;AAAA,QACvD,MAAMC;AAAA,QACN,aAAaC;AAAA,QACb,sBAAsB5B,IAA6B6B,KAA4B;AAAA,QAC/E,eACE7B,KAA8BrB,KAC1BmD,KACA;AAAA,QACN,eAAeC;AAAA,MAAA;AAAA,MAEjB,gBAAAxB;AAAA,MACA,mBAAAgB;AAAA,MACA,yBAAyBS,GAA8B7D,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
@@ -0,0 +1,15 @@
1
+ import { UseCompensationFormProps, UseCompensationFormResult } from './useCompensationForm';
2
+ export type UseCurrentCompensationFormProps = Omit<UseCompensationFormProps, 'jobId' | 'compensationId'>;
3
+ /**
4
+ * Resolves the employee's primary job and threads its `currentCompensationUuid`
5
+ * into `useCompensationForm`. When no primary job exists the wrapped hook lands
6
+ * in `create` mode (and the partner must thread `jobId` via submit options
7
+ * after the parent job is created).
8
+ *
9
+ * Mirrors `useCurrentHomeAddressForm` exactly: the prop surface is
10
+ * `Omit<UseCompensationFormProps, 'jobId' | 'compensationId'>` and the wrapper
11
+ * takes no additional parameters. Partners needing to edit a specific
12
+ * compensation (e.g. on a secondary job, or a pending future compensation)
13
+ * should use the core `useCompensationForm` directly.
14
+ */
15
+ export declare function useCurrentCompensationForm(props: UseCurrentCompensationFormProps): UseCompensationFormResult;
@@ -0,0 +1,27 @@
1
+ import { useJobsAndCompensationsGetJobs as a } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
2
+ import { useCompensationForm as d } from "./useCompensationForm.js";
3
+ import { composeErrorHandler as n } from "../../../../../partner-hook-utils/composeErrorHandler.js";
4
+ function p(i) {
5
+ const { employeeId: e } = i, o = a(
6
+ { employeeId: e ?? "" },
7
+ { enabled: !!e }
8
+ ), t = o.data?.jobs?.find((s) => s.primary), r = d({
9
+ ...i,
10
+ jobId: t?.uuid,
11
+ compensationId: t?.currentCompensationUuid
12
+ });
13
+ return o.isLoading && !o.data ? {
14
+ isLoading: !0,
15
+ errorHandling: n([o])
16
+ } : r.isLoading ? {
17
+ ...r,
18
+ errorHandling: n([o, { errorHandling: r.errorHandling }])
19
+ } : {
20
+ ...r,
21
+ errorHandling: n([o, { errorHandling: r.errorHandling }])
22
+ };
23
+ }
24
+ export {
25
+ p as useCurrentCompensationForm
26
+ };
27
+ //# sourceMappingURL=useCurrentCompensationForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCurrentCompensationForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.tsx"],"sourcesContent":["import { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useCompensationForm } from './useCompensationForm'\nimport type { UseCompensationFormProps, UseCompensationFormResult } from './useCompensationForm'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\n\nexport type UseCurrentCompensationFormProps = Omit<\n UseCompensationFormProps,\n 'jobId' | 'compensationId'\n>\n\n/**\n * Resolves the employee's primary job and threads its `currentCompensationUuid`\n * into `useCompensationForm`. When no primary job exists the wrapped hook lands\n * in `create` mode (and the partner must thread `jobId` via submit options\n * after the parent job is created).\n *\n * Mirrors `useCurrentHomeAddressForm` exactly: the prop surface is\n * `Omit<UseCompensationFormProps, 'jobId' | 'compensationId'>` and the wrapper\n * takes no additional parameters. Partners needing to edit a specific\n * compensation (e.g. on a secondary job, or a pending future compensation)\n * should use the core `useCompensationForm` directly.\n */\nexport function useCurrentCompensationForm(\n props: UseCurrentCompensationFormProps,\n): UseCompensationFormResult {\n const { employeeId } = props\n\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n\n const jobs = jobsQuery.data?.jobs\n const primaryJob = jobs?.find(job => job.primary)\n\n const base = useCompensationForm({\n ...props,\n jobId: primaryJob?.uuid,\n compensationId: primaryJob?.currentCompensationUuid,\n })\n\n const listInitiallyBlocking = jobsQuery.isLoading && !jobsQuery.data\n\n if (listInitiallyBlocking) {\n return {\n isLoading: true as const,\n errorHandling: composeErrorHandler([jobsQuery]),\n }\n }\n\n if (base.isLoading) {\n return {\n ...base,\n errorHandling: composeErrorHandler([jobsQuery, { errorHandling: base.errorHandling }]),\n }\n }\n\n return {\n ...base,\n errorHandling: composeErrorHandler([jobsQuery, { errorHandling: base.errorHandling }]),\n }\n}\n"],"names":["useCurrentCompensationForm","props","employeeId","jobsQuery","useJobsAndCompensationsGetJobs","primaryJob","job","base","useCompensationForm","composeErrorHandler"],"mappings":";;;AAsBO,SAASA,EACdC,GAC2B;AAC3B,QAAM,EAAE,YAAAC,MAAeD,GAEjBE,IAAYC;AAAA,IAChB,EAAE,YAAYF,KAAc,GAAA;AAAA,IAC5B,EAAE,SAAS,CAAC,CAACA,EAAA;AAAA,EAAW,GAIpBG,IADOF,EAAU,MAAM,MACJ,KAAK,CAAAG,MAAOA,EAAI,OAAO,GAE1CC,IAAOC,EAAoB;AAAA,IAC/B,GAAGP;AAAA,IACH,OAAOI,GAAY;AAAA,IACnB,gBAAgBA,GAAY;AAAA,EAAA,CAC7B;AAID,SAF8BF,EAAU,aAAa,CAACA,EAAU,OAGvD;AAAA,IACL,WAAW;AAAA,IACX,eAAeM,EAAoB,CAACN,CAAS,CAAC;AAAA,EAAA,IAI9CI,EAAK,YACA;AAAA,IACL,GAAGA;AAAA,IACH,eAAeE,EAAoB,CAACN,GAAW,EAAE,eAAeI,EAAK,eAAe,CAAC;AAAA,EAAA,IAIlF;AAAA,IACL,GAAGA;AAAA,IACH,eAAeE,EAAoB,CAACN,GAAW,EAAE,eAAeI,EAAK,eAAe,CAAC;AAAA,EAAA;AAEzF;"}
@@ -0,0 +1,19 @@
1
+ import { JobErrorCodes } from './jobSchema';
2
+ import { TextInputHookFieldProps } from '../../../../../partner-hook-utils/form/fields/TextInputHookField';
3
+ import { CheckboxHookFieldProps } from '../../../../../partner-hook-utils/form/fields/CheckboxHookField';
4
+ import { RadioGroupHookFieldProps } from '../../../../../partner-hook-utils/form/fields/RadioGroupHookField';
5
+ import { SelectHookFieldProps } from '../../../../../partner-hook-utils/form/fields/SelectHookField';
6
+ import { DatePickerHookFieldProps } from '../../../../../partner-hook-utils/form/fields/DatePickerHookField';
7
+ import { HookFieldProps } from '../../../../../partner-hook-utils/types';
8
+ import { WARiskClassCode } from '../../../../../models/WA_RISK_CODES';
9
+ export type JobRequiredValidation = typeof JobErrorCodes.REQUIRED;
10
+ export type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<JobRequiredValidation>>;
11
+ export declare function JobTitleField(props: JobTitleFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ export type HireDateFieldProps = HookFieldProps<DatePickerHookFieldProps<JobRequiredValidation>>;
13
+ export declare function HireDateField(props: HireDateFieldProps): import("react/jsx-runtime").JSX.Element;
14
+ export type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>;
15
+ export declare function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps): import("react/jsx-runtime").JSX.Element;
16
+ export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>;
17
+ export declare function StateWcCoveredField(props: StateWcCoveredFieldProps): import("react/jsx-runtime").JSX.Element;
18
+ export type StateWcClassCodeFieldProps = HookFieldProps<SelectHookFieldProps<JobRequiredValidation, WARiskClassCode>>;
19
+ export declare function StateWcClassCodeField(props: StateWcClassCodeFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { jsx as o } from "react/jsx-runtime";
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
+ import { CheckboxHookField as i } from "../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
5
+ import { DatePickerHookField as n } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
6
+ import { TextInputHookField as a } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
7
+ function F(e) {
8
+ return /* @__PURE__ */ o(a, { ...e, name: "title" });
9
+ }
10
+ function p(e) {
11
+ return /* @__PURE__ */ o(n, { ...e, name: "hireDate" });
12
+ }
13
+ function k(e) {
14
+ return /* @__PURE__ */ o(i, { ...e, name: "twoPercentShareholder" });
15
+ }
16
+ function s(e) {
17
+ return /* @__PURE__ */ o(r, { ...e, name: "stateWcCovered" });
18
+ }
19
+ function C(e) {
20
+ return /* @__PURE__ */ o(t, { ...e, name: "stateWcClassCode" });
21
+ }
22
+ export {
23
+ p as HireDateField,
24
+ F as JobTitleField,
25
+ C as StateWcClassCodeField,
26
+ s as StateWcCoveredField,
27
+ k as TwoPercentShareholderField
28
+ };
29
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +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\nexport type JobRequiredValidation = typeof JobErrorCodes.REQUIRED\n\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<JobRequiredValidation>>\n\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"title\" />\n}\n\nexport type HireDateFieldProps = HookFieldProps<DatePickerHookFieldProps<JobRequiredValidation>>\n\nexport function HireDateField(props: HireDateFieldProps) {\n return <DatePickerHookField {...props} name=\"hireDate\" />\n}\n\nexport type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps) {\n return <CheckboxHookField {...props} name=\"twoPercentShareholder\" />\n}\n\nexport type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>\n\nexport function StateWcCoveredField(props: StateWcCoveredFieldProps) {\n return <RadioGroupHookField {...props} name=\"stateWcCovered\" />\n}\n\nexport type StateWcClassCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<JobRequiredValidation, WARiskClassCode>\n>\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":";;;;;;AAoBO,SAASA,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,SAAQ;AACrD;AAIO,SAASG,EAAcH,GAA2B;AACvD,SAAO,gBAAAC,EAACG,GAAA,EAAqB,GAAGJ,GAAO,MAAK,YAAW;AACzD;AAIO,SAASK,EAA2BL,GAAwC;AACjF,SAAO,gBAAAC,EAACK,GAAA,EAAmB,GAAGN,GAAO,MAAK,yBAAwB;AACpE;AAIO,SAASO,EAAoBP,GAAiC;AACnE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,kBAAiB;AAC/D;AAMO,SAASS,EAAsBT,GAAmC;AACvE,SAAO,gBAAAC,EAACS,GAAA,EAAiB,GAAGV,GAAO,MAAK,oBAAmB;AAC7D;"}
@@ -0,0 +1,7 @@
1
+ import "./types/i18next.d.ts"
2
+ export { useJobForm } from './useJobForm';
3
+ export { useCurrentJobForm } from './useCurrentJobForm';
4
+ export type { JobSubmitOptions, UseJobFormProps, UseJobFormResult, UseJobFormReady, JobFieldsMetadata, JobFormFields, } from './useJobForm';
5
+ export type { UseCurrentJobFormProps } from './useCurrentJobForm';
6
+ export { createJobSchema, JobErrorCodes, type JobErrorCode, type JobOptionalFieldsToRequire, type JobFormData, type JobFormOutputs, } from './jobSchema';
7
+ export type { JobRequiredValidation, JobTitleFieldProps, HireDateFieldProps, TwoPercentShareholderFieldProps, StateWcCoveredFieldProps, StateWcClassCodeFieldProps, } from './fields';
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
3
+ export declare const JobErrorCodes: {
4
+ readonly REQUIRED: "REQUIRED";
5
+ };
6
+ export type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes];
7
+ declare const fieldValidators: {
8
+ title: z.ZodString;
9
+ hireDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
10
+ twoPercentShareholder: z.ZodBoolean;
11
+ stateWcCovered: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
12
+ stateWcClassCode: z.ZodString;
13
+ };
14
+ export type JobFormData = {
15
+ [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
16
+ };
17
+ export type JobFormOutputs = JobFormData;
18
+ declare const requiredFieldsConfig: {
19
+ title: "create";
20
+ hireDate: "create";
21
+ twoPercentShareholder: "never";
22
+ stateWcCovered: "never";
23
+ stateWcClassCode: (data: {
24
+ title: string;
25
+ hireDate: string | null;
26
+ twoPercentShareholder: boolean;
27
+ stateWcCovered: boolean;
28
+ stateWcClassCode: string;
29
+ }) => boolean;
30
+ };
31
+ export type JobOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
32
+ interface JobSchemaOptions {
33
+ mode?: 'create' | 'update';
34
+ optionalFieldsToRequire?: JobOptionalFieldsToRequire;
35
+ }
36
+ export declare function createJobSchema(options?: JobSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
37
+ title: z.ZodString;
38
+ hireDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
39
+ twoPercentShareholder: z.ZodBoolean;
40
+ stateWcCovered: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
41
+ stateWcClassCode: z.ZodString;
42
+ }>;
43
+ export {};
@@ -0,0 +1,37 @@
1
+ import { z as e } from "zod";
2
+ import { buildFormSchema as a } from "../../../../../partner-hook-utils/form/buildFormSchema.js";
3
+ import { coerceStringBoolean as c, coerceToISODate as s } from "../../../../../partner-hook-utils/form/preprocessors.js";
4
+ const i = {
5
+ REQUIRED: "REQUIRED"
6
+ }, n = {
7
+ title: e.string(),
8
+ hireDate: e.preprocess(s, e.iso.date().nullable()),
9
+ twoPercentShareholder: e.boolean(),
10
+ // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.
11
+ stateWcCovered: e.preprocess(c, e.boolean()),
12
+ stateWcClassCode: e.string()
13
+ }, d = {
14
+ title: "create",
15
+ hireDate: "create",
16
+ twoPercentShareholder: "never",
17
+ stateWcCovered: "never",
18
+ // stateWcClassCode is gated by stateWcCovered === true. The predicate also
19
+ // depends implicitly on the work-address state being WA — partners enforce
20
+ // that gate by passing `optionalFieldsToRequire` only for WA employees, or
21
+ // by simply never sending stateWcCovered=true outside WA.
22
+ stateWcClassCode: (r) => String(r.stateWcCovered) === "true"
23
+ };
24
+ function p(r = {}) {
25
+ const { mode: o = "create", optionalFieldsToRequire: t } = r;
26
+ return a(n, {
27
+ requiredFieldsConfig: d,
28
+ requiredErrorCode: i.REQUIRED,
29
+ mode: o,
30
+ optionalFieldsToRequire: t
31
+ });
32
+ }
33
+ export {
34
+ i as JobErrorCodes,
35
+ p as createJobSchema
36
+ };
37
+ //# sourceMappingURL=jobSchema.js.map
@@ -0,0 +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\nexport const JobErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\nexport type JobErrorCode = (typeof JobErrorCodes)[keyof typeof JobErrorCodes]\n\nconst fieldValidators = {\n title: z.string(),\n hireDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n twoPercentShareholder: z.boolean(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean.\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n stateWcClassCode: z.string(),\n}\n\nexport type JobFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\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\nexport type JobOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>\n\ninterface JobSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: JobOptionalFieldsToRequire\n}\n\nexport function createJobSchema(options: JobSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: JobErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n })\n}\n"],"names":["JobErrorCodes","fieldValidators","z","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","createJobSchema","options","mode","optionalFieldsToRequire","buildFormSchema"],"mappings":";;;AAQO,MAAMA,IAAgB;AAAA,EAC3B,UAAU;AACZ,GAIMC,IAAkB;AAAA,EACtB,OAAOC,EAAE,OAAA;AAAA,EACT,UAAUA,EAAE,WAAWC,GAAiBD,EAAE,IAAI,OAAO,UAAU;AAAA,EAC/D,uBAAuBA,EAAE,QAAA;AAAA;AAAA,EAEzB,gBAAgBA,EAAE,WAAWE,GAAqBF,EAAE,SAAS;AAAA,EAC7D,kBAAkBA,EAAE,OAAA;AACtB,GAOMG,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;AASO,SAASC,EAAgBC,IAA4B,IAAI;AAC9D,QAAM,EAAE,MAAAC,IAAO,UAAU,yBAAAC,EAAA,IAA4BF;AAErD,SAAOG,EAAgBV,GAAiB;AAAA,IACtC,sBAAAI;AAAA,IACA,mBAAmBL,EAAc;AAAA,IACjC,MAAAS;AAAA,IACA,yBAAAC;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,13 @@
1
+ import { UseJobFormProps, UseJobFormResult } from './useJobForm';
2
+ export type UseCurrentJobFormProps = Omit<UseJobFormProps, 'jobId'>;
3
+ /**
4
+ * Resolves the employee's primary job and threads its UUID into `useJobForm`.
5
+ * When no primary job exists (e.g. employee has no jobs yet) the wrapped hook
6
+ * lands in `create` mode.
7
+ *
8
+ * Mirrors `useCurrentHomeAddressForm` / `useCurrentWorkAddressForm` exactly:
9
+ * the prop surface is `Omit<UseJobFormProps, 'jobId'>` and the wrapper takes
10
+ * no additional parameters. Partners needing to edit a specific (e.g.
11
+ * secondary) job should use the core `useJobForm` directly with `jobId`.
12
+ */
13
+ export declare function useCurrentJobForm(props: UseCurrentJobFormProps): UseJobFormResult;
@@ -0,0 +1,26 @@
1
+ import { useJobsAndCompensationsGetJobs as a } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
2
+ import { useJobForm as d } from "./useJobForm.js";
3
+ import { composeErrorHandler as n } from "../../../../../partner-hook-utils/composeErrorHandler.js";
4
+ function c(i) {
5
+ const { employeeId: e } = i, r = a(
6
+ { employeeId: e ?? "" },
7
+ { enabled: !!e }
8
+ ), t = r.data?.jobs?.find((s) => s.primary), o = d({
9
+ ...i,
10
+ jobId: t?.uuid
11
+ });
12
+ return r.isLoading && !r.data ? {
13
+ isLoading: !0,
14
+ errorHandling: n([r])
15
+ } : o.isLoading ? {
16
+ ...o,
17
+ errorHandling: n([r, { errorHandling: o.errorHandling }])
18
+ } : {
19
+ ...o,
20
+ errorHandling: n([r, { errorHandling: o.errorHandling }])
21
+ };
22
+ }
23
+ export {
24
+ c as useCurrentJobForm
25
+ };
26
+ //# sourceMappingURL=useCurrentJobForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCurrentJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.tsx"],"sourcesContent":["import { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs'\nimport { useJobForm } from './useJobForm'\nimport type { UseJobFormProps, UseJobFormResult } from './useJobForm'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\n\nexport type UseCurrentJobFormProps = Omit<UseJobFormProps, 'jobId'>\n\n/**\n * Resolves the employee's primary job and threads its UUID into `useJobForm`.\n * When no primary job exists (e.g. employee has no jobs yet) the wrapped hook\n * lands in `create` mode.\n *\n * Mirrors `useCurrentHomeAddressForm` / `useCurrentWorkAddressForm` exactly:\n * the prop surface is `Omit<UseJobFormProps, 'jobId'>` and the wrapper takes\n * no additional parameters. Partners needing to edit a specific (e.g.\n * secondary) job should use the core `useJobForm` directly with `jobId`.\n */\nexport function useCurrentJobForm(props: UseCurrentJobFormProps): UseJobFormResult {\n const { employeeId } = props\n\n const jobsQuery = useJobsAndCompensationsGetJobs(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n\n const jobs = jobsQuery.data?.jobs\n const primaryJob = jobs?.find(job => job.primary)\n\n const base = useJobForm({\n ...props,\n jobId: primaryJob?.uuid,\n })\n\n const listInitiallyBlocking = jobsQuery.isLoading && !jobsQuery.data\n\n if (listInitiallyBlocking) {\n return {\n isLoading: true as const,\n errorHandling: composeErrorHandler([jobsQuery]),\n }\n }\n\n if (base.isLoading) {\n return {\n ...base,\n errorHandling: composeErrorHandler([jobsQuery, { errorHandling: base.errorHandling }]),\n }\n }\n\n return {\n ...base,\n errorHandling: composeErrorHandler([jobsQuery, { errorHandling: base.errorHandling }]),\n }\n}\n"],"names":["useCurrentJobForm","props","employeeId","jobsQuery","useJobsAndCompensationsGetJobs","primaryJob","job","base","useJobForm","composeErrorHandler"],"mappings":";;;AAiBO,SAASA,EAAkBC,GAAiD;AACjF,QAAM,EAAE,YAAAC,MAAeD,GAEjBE,IAAYC;AAAA,IAChB,EAAE,YAAYF,KAAc,GAAA;AAAA,IAC5B,EAAE,SAAS,CAAC,CAACA,EAAA;AAAA,EAAW,GAIpBG,IADOF,EAAU,MAAM,MACJ,KAAK,CAAAG,MAAOA,EAAI,OAAO,GAE1CC,IAAOC,EAAW;AAAA,IACtB,GAAGP;AAAA,IACH,OAAOI,GAAY;AAAA,EAAA,CACpB;AAID,SAF8BF,EAAU,aAAa,CAACA,EAAU,OAGvD;AAAA,IACL,WAAW;AAAA,IACX,eAAeM,EAAoB,CAACN,CAAS,CAAC;AAAA,EAAA,IAI9CI,EAAK,YACA;AAAA,IACL,GAAGA;AAAA,IACH,eAAeE,EAAoB,CAACN,GAAW,EAAE,eAAeI,EAAK,eAAe,CAAC;AAAA,EAAA,IAIlF;AAAA,IACL,GAAGA;AAAA,IACH,eAAeE,EAAoB,CAACN,GAAW,EAAE,eAAeI,EAAK,eAAe,CAAC;AAAA,EAAA;AAEzF;"}
@@ -0,0 +1,56 @@
1
+ import { UseFormProps } from 'react-hook-form';
2
+ import { Job } from '@gusto/embedded-api/models/components/job';
3
+ import { Employee } from '@gusto/embedded-api/models/components/employee';
4
+ import { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress';
5
+ import { JobOptionalFieldsToRequire, JobFormData } from './jobSchema';
6
+ import { JobTitleField, HireDateField, TwoPercentShareholderField, StateWcCoveredField, StateWcClassCodeField } from './fields';
7
+ import { BaseFormHookReady, FieldsMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
8
+ export interface JobSubmitOptions {
9
+ /** Override the `employeeId` configured at hook construction. Useful when the employee is created in the same submit chain. */
10
+ employeeId?: string;
11
+ }
12
+ export interface UseJobFormProps {
13
+ employeeId?: string;
14
+ /** Present → update mode (PUT /v1/jobs/:id with `version`). Omitted → create mode (POST /v1/employees/:id/jobs). */
15
+ jobId?: string;
16
+ optionalFieldsToRequire?: JobOptionalFieldsToRequire;
17
+ defaultValues?: Partial<JobFormData>;
18
+ validationMode?: UseFormProps['mode'];
19
+ shouldFocusError?: boolean;
20
+ }
21
+ export interface JobFormFields {
22
+ Title: typeof JobTitleField;
23
+ HireDate: typeof HireDateField;
24
+ TwoPercentShareholder: typeof TwoPercentShareholderField | undefined;
25
+ StateWcCovered: typeof StateWcCoveredField | undefined;
26
+ StateWcClassCode: typeof StateWcClassCodeField | undefined;
27
+ }
28
+ export interface UseJobFormReady extends BaseFormHookReady<FieldsMetadata, JobFormData, JobFormFields> {
29
+ data: {
30
+ /** The job row loaded for update; `null` in create mode. */
31
+ currentJob: Job | null;
32
+ /** All jobs for the employee, when employeeId is set. Useful for screen-level cross-checks across jobs. */
33
+ jobs: Job[] | undefined;
34
+ employee: Employee | null;
35
+ currentWorkAddress: EmployeeWorkAddress | null;
36
+ /** True when the company is taxable as an S-Corp; partners use this to decide whether to render `TwoPercentShareholder`. */
37
+ showTwoPercentShareholder: boolean;
38
+ /**
39
+ * True when the active work-address state is WA; partners use this to decide whether to render
40
+ * `StateWcCovered`. `Fields.StateWcClassCode` is additionally gated on `stateWcCovered === true`,
41
+ * so partners typically only need to check `Fields.StateWcCovered` / `Fields.StateWcClassCode`
42
+ * truthiness rather than this flag directly.
43
+ */
44
+ showStateWc: boolean;
45
+ };
46
+ status: {
47
+ isPending: boolean;
48
+ mode: 'create' | 'update';
49
+ };
50
+ actions: {
51
+ onSubmit: (options?: JobSubmitOptions) => Promise<HookSubmitResult<Job> | undefined>;
52
+ };
53
+ }
54
+ export declare function useJobForm({ employeeId, jobId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseJobFormProps): HookLoadingResult | UseJobFormReady;
55
+ export type UseJobFormResult = HookLoadingResult | UseJobFormReady;
56
+ export type JobFieldsMetadata = UseJobFormReady['form']['fieldsMetadata'];