@gusto/embedded-react-sdk 0.35.0-rc.4 → 0.36.0-rc.1

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 (625) hide show
  1. package/CHANGELOG.md +20 -11
  2. package/README.md +2 -0
  3. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  4. package/dist/UNSTABLE_Hooks.js +48 -6
  5. package/dist/UNSTABLE_Hooks.js.map +1 -1
  6. package/dist/components/Base/Base.d.ts +8 -9
  7. package/dist/components/Base/Base.js +123 -102
  8. package/dist/components/Base/Base.js.map +1 -1
  9. package/dist/components/Base/index.d.ts +1 -1
  10. package/dist/components/Base/useBase.d.ts +3 -7
  11. package/dist/components/Base/useBase.js.map +1 -1
  12. package/dist/components/Base/useBaseSubmit.d.ts +3 -5
  13. package/dist/components/Base/useBaseSubmit.js +27 -50
  14. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  15. package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +2 -0
  16. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +17 -16
  17. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
  18. package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +5 -3
  19. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +46 -36
  20. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
  21. package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +2 -0
  22. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +21 -20
  23. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  24. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +3 -1
  25. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +20 -19
  26. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  27. package/dist/components/Common/Fields/SelectField/SelectField.d.ts +3 -1
  28. package/dist/components/Common/Fields/SelectField/SelectField.js +19 -18
  29. package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
  30. package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +2 -0
  31. package/dist/components/Common/Fields/SwitchField/SwitchField.js +19 -18
  32. package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
  33. package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +2 -0
  34. package/dist/components/Common/Fields/TextInputField/TextInputField.js +10 -9
  35. package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
  36. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
  37. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  38. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
  39. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  40. package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
  41. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  42. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
  43. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
  44. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
  46. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
  50. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  52. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -5
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
  55. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  56. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
  57. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  58. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -5
  61. package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
  62. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -5
  64. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
  65. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  66. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
  67. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -5
  69. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
  70. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  71. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
  72. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  73. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
  74. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
  76. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
  78. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  79. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -5
  80. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
  81. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -5
  83. package/dist/components/Company/FederalTaxes/Actions.js +8 -11
  84. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  85. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
  86. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  87. package/dist/components/Company/FederalTaxes/Form.js +6 -8
  88. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  89. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -5
  90. package/dist/components/Company/Industry/Actions.js +8 -11
  91. package/dist/components/Company/Industry/Actions.js.map +1 -1
  92. package/dist/components/Company/Industry/Context.js +5 -5
  93. package/dist/components/Company/Industry/Edit.js +10 -14
  94. package/dist/components/Company/Industry/Edit.js.map +1 -1
  95. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
  96. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
  98. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
  100. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -5
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/List.js +17 -19
  105. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
  107. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -5
  109. package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
  110. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  111. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
  112. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  113. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
  114. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  115. package/dist/components/Company/OnboardingOverview/context.js +5 -5
  116. package/dist/components/Company/PaySchedule/PaySchedule.js +60 -63
  117. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -13
  119. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  121. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
  122. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  123. package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
  124. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  125. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -5
  126. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -5
  129. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
  130. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
  132. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -5
  134. package/dist/components/Contractor/Address/Address.js +3 -7
  135. package/dist/components/Contractor/Address/Address.js.map +1 -1
  136. package/dist/components/Contractor/Address/Form.js +6 -8
  137. package/dist/components/Contractor/Address/Form.js.map +1 -1
  138. package/dist/components/Contractor/Address/useAddress.js +5 -5
  139. package/dist/components/Contractor/ContractorList/index.js +29 -30
  140. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  141. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
  142. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  143. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
  144. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  145. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  146. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  147. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
  148. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  149. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +12 -14
  150. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  151. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  152. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
  153. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  154. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
  155. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  156. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
  157. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  158. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
  159. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  160. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
  161. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  162. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
  163. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  164. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  165. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -31
  166. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  167. package/dist/components/Contractor/Submit/Submit.js +20 -22
  168. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  169. package/dist/components/Employee/Compensation/Actions.js +12 -14
  170. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  171. package/dist/components/Employee/Compensation/Edit.js +27 -28
  172. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  173. package/dist/components/Employee/Compensation/List.js +23 -25
  174. package/dist/components/Employee/Compensation/List.js.map +1 -1
  175. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +12 -12
  176. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +13 -13
  177. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +13 -13
  178. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
  179. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  180. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
  181. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  182. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
  183. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  184. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
  185. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  186. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
  187. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  188. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -5
  189. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
  190. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  191. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
  192. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  193. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
  194. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  195. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -5
  196. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
  197. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  198. package/dist/components/Employee/EmployeeList/Actions.js +6 -9
  199. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  200. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -7
  201. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  202. package/dist/components/Employee/EmployeeList/Head.js +5 -8
  203. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  204. package/dist/components/Employee/EmployeeList/List.js +16 -17
  205. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  206. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -5
  207. package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
  208. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  209. package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
  210. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  211. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +42 -42
  212. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  213. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -5
  214. package/dist/components/Employee/Landing/Landing.js +14 -15
  215. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  216. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  217. package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
  218. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  219. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
  220. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  221. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -10
  222. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  223. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
  224. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  225. package/dist/components/Employee/PaymentMethod/Split.js +9 -10
  226. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  227. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -5
  228. package/dist/components/Employee/Profile/Actions.js +8 -11
  229. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  230. package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
  231. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  232. package/dist/components/Employee/Profile/HomeAddress.d.ts +3 -3
  233. package/dist/components/Employee/Profile/HomeAddress.js +45 -44
  234. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  235. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -13
  236. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  237. package/dist/components/Employee/Profile/Profile.js +30 -29
  238. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  239. package/dist/components/Employee/Profile/useProfile.js +5 -5
  240. package/dist/components/Employee/StateTaxes/Actions.js +8 -11
  241. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  242. package/dist/components/Employee/StateTaxes/StateTaxes.js +50 -50
  243. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  244. package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -5
  245. package/dist/components/Employee/Taxes/Actions.js +8 -11
  246. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  247. package/dist/components/Employee/Taxes/FederalForm.js +10 -13
  248. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  249. package/dist/components/Employee/Taxes/Taxes.js +53 -53
  250. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  251. package/dist/components/Employee/Taxes/useTaxes.js +5 -5
  252. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +11 -0
  253. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +123 -0
  254. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -0
  255. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +11 -0
  256. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +89 -0
  257. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -0
  258. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +2 -0
  259. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +30 -0
  260. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -0
  261. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +23 -0
  262. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +70 -0
  263. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -0
  264. package/dist/components/Employee/Terminations/TerminationFlow/index.d.ts +3 -0
  265. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +7 -0
  266. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +165 -0
  267. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -0
  268. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts +1 -0
  269. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +9 -0
  270. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +86 -0
  271. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -0
  272. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +20 -0
  273. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +100 -0
  274. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -0
  275. package/dist/components/Employee/Terminations/TerminationsData.d.ts +6 -0
  276. package/dist/components/Employee/Terminations/index.d.ts +8 -0
  277. package/dist/components/Employee/Terminations/types.d.ts +1 -0
  278. package/dist/components/Employee/index.d.ts +7 -0
  279. package/dist/components/Employee/index.js +34 -28
  280. package/dist/components/Employee/index.js.map +1 -1
  281. package/dist/components/Flow/Flow.js +20 -23
  282. package/dist/components/Flow/Flow.js.map +1 -1
  283. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
  284. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  285. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
  286. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  287. package/dist/components/InformationRequests/InformationRequests.js +34 -35
  288. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  289. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +41 -41
  290. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  291. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
  292. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  293. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +2 -0
  294. package/dist/components/Payroll/Dismissal/DismissalFlow.js +32 -0
  295. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -0
  296. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +16 -0
  297. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +52 -0
  298. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -0
  299. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +6 -0
  300. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +69 -0
  301. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -0
  302. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +9 -0
  303. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +50 -0
  304. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -0
  305. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +3 -0
  306. package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +6 -0
  307. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +51 -0
  308. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -0
  309. package/dist/components/Payroll/Dismissal/dismissalStateMachine.test.d.ts +1 -0
  310. package/dist/components/Payroll/Dismissal/index.d.ts +3 -0
  311. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +25 -23
  312. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  313. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
  314. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +19 -18
  315. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  316. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +3 -0
  317. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +32 -24
  318. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  319. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +45 -45
  320. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  321. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  322. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +75 -68
  323. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  324. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js +8 -0
  325. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js.map +1 -0
  326. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +0 -1
  327. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +5 -9
  328. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  329. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
  330. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +2 -2
  331. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  332. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -0
  333. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +1 -0
  334. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  335. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
  336. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  337. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
  338. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  339. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
  340. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  341. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  342. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +186 -159
  343. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  344. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -3
  345. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +71 -71
  346. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  347. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +3 -2
  348. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +8 -8
  349. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
  350. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -3
  351. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +76 -70
  352. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  353. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -42
  354. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  355. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -2
  356. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -196
  357. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  358. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
  359. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  360. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
  361. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +12 -0
  362. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -0
  363. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
  364. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  365. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
  366. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +21 -0
  367. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -0
  368. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  369. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +95 -64
  370. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  371. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +53 -47
  372. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  373. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +38 -40
  374. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  375. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +25 -23
  376. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  377. package/dist/components/Payroll/PayrollList/PayrollList.js +40 -32
  378. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  379. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
  380. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +110 -95
  381. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  382. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +12 -8
  383. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  384. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +2 -3
  385. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  386. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +4 -4
  387. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
  388. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  389. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
  390. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  391. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
  392. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  393. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
  394. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  395. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
  396. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  397. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +2 -0
  398. package/dist/components/Payroll/Transition/TransitionFlow.js +38 -0
  399. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -0
  400. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +19 -0
  401. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +54 -0
  402. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -0
  403. package/dist/components/Payroll/Transition/index.d.ts +3 -0
  404. package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +6 -0
  405. package/dist/components/Payroll/Transition/transitionStateMachine.js +58 -0
  406. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -0
  407. package/dist/components/Payroll/Transition/transitionStateMachine.test.d.ts +1 -0
  408. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +2 -0
  409. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +92 -0
  410. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -0
  411. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +2 -0
  412. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +109 -0
  413. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -0
  414. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js +8 -0
  415. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js.map +1 -0
  416. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +28 -0
  417. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +21 -0
  418. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -0
  419. package/dist/components/Payroll/TransitionCreation/index.d.ts +3 -0
  420. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +8 -0
  421. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +83 -0
  422. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -0
  423. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +16 -0
  424. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +100 -0
  425. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -0
  426. package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +2 -0
  427. package/dist/components/Payroll/helpers.d.ts +2 -1
  428. package/dist/components/Payroll/helpers.js +98 -87
  429. package/dist/components/Payroll/helpers.js.map +1 -1
  430. package/dist/components/Payroll/index.d.ts +6 -0
  431. package/dist/components/Payroll/index.js +32 -26
  432. package/dist/components/Payroll/index.js.map +1 -1
  433. package/dist/components/Payroll/payrollTypes.d.ts +21 -0
  434. package/dist/components/Payroll/payrollTypes.js +27 -0
  435. package/dist/components/Payroll/payrollTypes.js.map +1 -0
  436. package/dist/components/Payroll/usePreparedPayrollData.js +6 -7
  437. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  438. package/dist/components/UNSTABLE_Hooks/collectErrors.d.ts +6 -0
  439. package/dist/components/UNSTABLE_Hooks/collectErrors.js +9 -0
  440. package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +1 -0
  441. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +8 -0
  442. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +13 -0
  443. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -0
  444. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +10 -0
  445. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js +13 -0
  446. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -0
  447. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +23 -0
  448. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js +24 -0
  449. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -0
  450. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +26 -0
  451. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +24 -0
  452. package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +1 -0
  453. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.d.ts +53 -0
  454. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +34 -0
  455. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +1 -0
  456. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.test.d.ts +1 -0
  457. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +3 -0
  458. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +14 -0
  459. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -0
  460. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts +1 -0
  461. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +9 -0
  462. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +29 -0
  463. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -0
  464. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +9 -0
  465. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +29 -0
  466. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -0
  467. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +12 -0
  468. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +35 -0
  469. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -0
  470. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +10 -0
  471. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +35 -0
  472. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -0
  473. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +10 -0
  474. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +35 -0
  475. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -0
  476. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +9 -0
  477. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +29 -0
  478. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -0
  479. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +11 -0
  480. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +33 -0
  481. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -0
  482. package/dist/components/UNSTABLE_Hooks/form/fields/index.d.ts +15 -0
  483. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +2 -0
  484. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js +8 -0
  485. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -0
  486. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.d.ts +18 -0
  487. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js +10 -0
  488. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +1 -0
  489. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.test.d.ts +1 -0
  490. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +14 -0
  491. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +6 -0
  492. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +14 -0
  493. package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +1 -0
  494. package/dist/components/UNSTABLE_Hooks/form/types.d.ts +27 -0
  495. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +2 -0
  496. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +17 -0
  497. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -0
  498. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +4 -0
  499. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +9 -0
  500. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
  501. package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +5 -0
  502. package/dist/components/UNSTABLE_Hooks/form/withOptions.js +7 -0
  503. package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -0
  504. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +5 -0
  505. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +149 -0
  506. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -0
  507. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +97 -0
  508. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +121 -0
  509. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -0
  510. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +34 -0
  511. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js +50 -0
  512. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -0
  513. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +7 -0
  514. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +104 -0
  515. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +259 -0
  516. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -0
  517. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +5 -0
  518. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +112 -0
  519. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -0
  520. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +39 -0
  521. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +45 -0
  522. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
  523. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +23 -0
  524. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +46 -0
  525. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -0
  526. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +7 -0
  527. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +77 -0
  528. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +153 -0
  529. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
  530. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +5 -0
  531. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +69 -0
  532. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -0
  533. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +10 -0
  534. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js +14 -0
  535. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -0
  536. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +7 -0
  537. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +68 -0
  538. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +129 -0
  539. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
  540. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +25 -0
  541. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +24 -0
  542. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -0
  543. package/dist/components/UNSTABLE_Hooks/index.d.ts +9 -0
  544. package/dist/components/UNSTABLE_Hooks/types.d.ts +49 -0
  545. package/dist/components/UNSTABLE_Hooks/useErrorHandling.d.ts +9 -0
  546. package/dist/components/UNSTABLE_Hooks/useErrorHandling.js +12 -0
  547. package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +1 -0
  548. package/dist/components/UNSTABLE_Hooks/useErrorHandling.test.d.ts +1 -0
  549. package/dist/contexts/ApiProvider/ApiProvider.js +11 -11
  550. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  551. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +43 -50
  552. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  553. package/dist/contexts/ObservabilityProvider/index.d.ts +1 -1
  554. package/dist/contexts/ObservabilityProvider/sanitization.d.ts +0 -14
  555. package/dist/contexts/ObservabilityProvider/sanitization.js +51 -51
  556. package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
  557. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +0 -3
  558. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -1
  559. package/dist/helpers/requiredIf.d.ts +13 -0
  560. package/dist/helpers/requiredIf.js +8 -0
  561. package/dist/helpers/requiredIf.js.map +1 -0
  562. package/dist/i18n/I18n.js +13 -13
  563. package/dist/i18n/I18n.js.map +1 -1
  564. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js +18 -0
  565. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js.map +1 -0
  566. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js +12 -0
  567. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js.map +1 -0
  568. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js +20 -0
  569. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js.map +1 -0
  570. package/dist/i18n/en/Payroll.Dismissal.json.js +22 -0
  571. package/dist/i18n/en/Payroll.Dismissal.json.js.map +1 -0
  572. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +15 -11
  573. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  574. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +1 -1
  575. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -18
  576. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  577. package/dist/i18n/en/Payroll.PayrollList.json.js +20 -18
  578. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  579. package/dist/i18n/en/Payroll.Transition.json.js +8 -0
  580. package/dist/i18n/en/Payroll.Transition.json.js.map +1 -0
  581. package/dist/i18n/en/Payroll.TransitionCreation.json.js +26 -0
  582. package/dist/i18n/en/Payroll.TransitionCreation.json.js.map +1 -0
  583. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +18 -0
  584. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js.map +1 -0
  585. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +58 -0
  586. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +1 -0
  587. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +34 -0
  588. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +1 -0
  589. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +24 -0
  590. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +1 -0
  591. package/dist/i18n/en/common.json.d.ts +2 -1
  592. package/dist/i18n/en/common.json.js +9 -9
  593. package/dist/index.d.ts +3 -2
  594. package/dist/index.js +14 -13
  595. package/dist/models/WA_RISK_CODES.d.ts +5 -2866
  596. package/dist/models/WA_RISK_CODES.js.map +1 -1
  597. package/dist/shared/constants.d.ts +32 -0
  598. package/dist/shared/constants.js +83 -65
  599. package/dist/shared/constants.js.map +1 -1
  600. package/dist/style.css +1 -1
  601. package/dist/types/i18next.d.ts +279 -1
  602. package/dist/types/observability.d.ts +31 -65
  603. package/dist/types/sdkError.d.ts +97 -0
  604. package/dist/types/sdkError.js +95 -0
  605. package/dist/types/sdkError.js.map +1 -0
  606. package/dist/types/sdkError.test.d.ts +1 -0
  607. package/docs/reference/endpoint-inventory.json +212 -14
  608. package/package.json +16 -16
  609. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +0 -6
  610. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +0 -70
  611. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +0 -1
  612. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +0 -7
  613. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +0 -6
  614. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +0 -1
  615. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +0 -9
  616. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +0 -40
  617. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +0 -1
  618. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +0 -5
  619. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +0 -2
  620. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +0 -12
  621. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +0 -1
  622. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +0 -2
  623. package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +0 -5
  624. package/dist/contexts/ObservabilityProvider/observabilityUtils.js +0 -45
  625. package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +0 -1
@@ -0,0 +1,97 @@
1
+ import { z } from 'zod';
2
+ import { RequiredFields } from '../../form/resolveRequiredFields';
3
+ export declare const CompensationErrorCodes: {
4
+ readonly REQUIRED: "REQUIRED";
5
+ readonly RATE_MINIMUM: "RATE_MINIMUM";
6
+ readonly RATE_EXEMPT_THRESHOLD: "RATE_EXEMPT_THRESHOLD";
7
+ readonly PAYMENT_UNIT_OWNER: "PAYMENT_UNIT_OWNER";
8
+ readonly PAYMENT_UNIT_COMMISSION: "PAYMENT_UNIT_COMMISSION";
9
+ readonly RATE_COMMISSION_ZERO: "RATE_COMMISSION_ZERO";
10
+ };
11
+ export type CompensationErrorCode = (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes];
12
+ declare const fieldValidators: {
13
+ jobTitle: z.ZodString;
14
+ flsaStatus: z.ZodEnum<{
15
+ Exempt: "Exempt";
16
+ "Salaried Nonexempt": "Salaried Nonexempt";
17
+ Nonexempt: "Nonexempt";
18
+ Owner: "Owner";
19
+ "Commission Only Exempt": "Commission Only Exempt";
20
+ "Commission Only Nonexempt": "Commission Only Nonexempt";
21
+ }>;
22
+ paymentUnit: z.ZodEnum<{
23
+ Hour: "Hour";
24
+ Week: "Week";
25
+ Month: "Month";
26
+ Year: "Year";
27
+ Paycheck: "Paycheck";
28
+ }>;
29
+ rate: z.ZodOptional<z.ZodNumber>;
30
+ startDate: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
31
+ adjustForMinimumWage: z.ZodBoolean;
32
+ minimumWageId: z.ZodOptional<z.ZodString>;
33
+ stateWcCovered: z.ZodOptional<z.ZodBoolean>;
34
+ stateWcClassCode: z.ZodOptional<z.ZodString>;
35
+ twoPercentShareholder: z.ZodOptional<z.ZodBoolean>;
36
+ };
37
+ export type CompensationField = Exclude<keyof typeof fieldValidators, 'adjustForMinimumWage' | 'minimumWageId' | 'stateWcCovered' | 'stateWcClassCode' | 'twoPercentShareholder'>;
38
+ export type CompensationFormData = {
39
+ [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
40
+ };
41
+ export type CompensationFormOutputs = CompensationFormData;
42
+ interface CompensationSchemaOptions {
43
+ mode?: 'create' | 'update';
44
+ requiredFields?: RequiredFields<CompensationField>;
45
+ withStartDateField?: boolean;
46
+ }
47
+ export declare function createCompensationSchema(options?: CompensationSchemaOptions): z.ZodObject<{
48
+ rate: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>;
49
+ startDate: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodISODate>;
50
+ stateWcCovered: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
51
+ jobTitle: z.ZodString;
52
+ flsaStatus: z.ZodEnum<{
53
+ Exempt: "Exempt";
54
+ "Salaried Nonexempt": "Salaried Nonexempt";
55
+ Nonexempt: "Nonexempt";
56
+ Owner: "Owner";
57
+ "Commission Only Exempt": "Commission Only Exempt";
58
+ "Commission Only Nonexempt": "Commission Only Nonexempt";
59
+ }>;
60
+ paymentUnit: z.ZodEnum<{
61
+ Hour: "Hour";
62
+ Week: "Week";
63
+ Month: "Month";
64
+ Year: "Year";
65
+ Paycheck: "Paycheck";
66
+ }>;
67
+ adjustForMinimumWage: z.ZodBoolean;
68
+ minimumWageId: z.ZodOptional<z.ZodString>;
69
+ stateWcClassCode: z.ZodOptional<z.ZodString>;
70
+ twoPercentShareholder: z.ZodOptional<z.ZodBoolean>;
71
+ }, z.core.$strip>;
72
+ export declare const CompensationSchema: z.ZodObject<{
73
+ rate: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>;
74
+ startDate: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodISODate>;
75
+ stateWcCovered: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
76
+ jobTitle: z.ZodString;
77
+ flsaStatus: z.ZodEnum<{
78
+ Exempt: "Exempt";
79
+ "Salaried Nonexempt": "Salaried Nonexempt";
80
+ Nonexempt: "Nonexempt";
81
+ Owner: "Owner";
82
+ "Commission Only Exempt": "Commission Only Exempt";
83
+ "Commission Only Nonexempt": "Commission Only Nonexempt";
84
+ }>;
85
+ paymentUnit: z.ZodEnum<{
86
+ Hour: "Hour";
87
+ Week: "Week";
88
+ Month: "Month";
89
+ Year: "Year";
90
+ Paycheck: "Paycheck";
91
+ }>;
92
+ adjustForMinimumWage: z.ZodBoolean;
93
+ minimumWageId: z.ZodOptional<z.ZodString>;
94
+ stateWcClassCode: z.ZodOptional<z.ZodString>;
95
+ twoPercentShareholder: z.ZodOptional<z.ZodBoolean>;
96
+ }, z.core.$strip>;
97
+ export {};
@@ -0,0 +1,121 @@
1
+ import { z as e } from "zod";
2
+ import { composeFormSchema as u } from "../../form/composeFormSchema.js";
3
+ import { filterRequiredFields as M } from "../../form/resolveRequiredFields.js";
4
+ import { FlsaStatus as t, FLSA_OVERTIME_SALARY_LIMIT as R, PAY_PERIODS as r } from "../../../../shared/constants.js";
5
+ import { yearlyRate as N } from "../../../../helpers/payRateCalculator.js";
6
+ const a = {
7
+ REQUIRED: "REQUIRED",
8
+ RATE_MINIMUM: "RATE_MINIMUM",
9
+ RATE_EXEMPT_THRESHOLD: "RATE_EXEMPT_THRESHOLD",
10
+ PAYMENT_UNIT_OWNER: "PAYMENT_UNIT_OWNER",
11
+ PAYMENT_UNIT_COMMISSION: "PAYMENT_UNIT_COMMISSION",
12
+ RATE_COMMISSION_ZERO: "RATE_COMMISSION_ZERO"
13
+ }, O = {
14
+ jobTitle: e.string().min(1, { message: a.REQUIRED }),
15
+ flsaStatus: e.enum([
16
+ t.EXEMPT,
17
+ t.SALARIED_NONEXEMPT,
18
+ t.NONEXEMPT,
19
+ t.OWNER,
20
+ t.COMMISSION_ONLY_EXEMPT,
21
+ t.COMMISSION_ONLY_NONEXEMPT
22
+ ]),
23
+ paymentUnit: e.enum([
24
+ r.HOUR,
25
+ r.WEEK,
26
+ r.MONTH,
27
+ r.YEAR,
28
+ r.PAYCHECK
29
+ ]),
30
+ rate: e.number().optional(),
31
+ startDate: e.iso.date().nullable().optional(),
32
+ adjustForMinimumWage: e.boolean(),
33
+ minimumWageId: e.string().optional(),
34
+ stateWcCovered: e.boolean().optional(),
35
+ stateWcClassCode: e.string().optional(),
36
+ twoPercentShareholder: e.boolean().optional()
37
+ }, c = /* @__PURE__ */ new Set([
38
+ "adjustForMinimumWage",
39
+ "minimumWageId",
40
+ "stateWcCovered",
41
+ "stateWcClassCode",
42
+ "twoPercentShareholder"
43
+ ]), S = {
44
+ ...O,
45
+ rate: e.preprocess((s) => Number.isNaN(s) ? void 0 : s, e.number()),
46
+ startDate: e.preprocess((s) => {
47
+ if (s instanceof Date) return s.toISOString().split("T")[0];
48
+ if (!(s === null || s === ""))
49
+ return s;
50
+ }, e.iso.date()),
51
+ stateWcCovered: e.preprocess((s) => typeof s == "string" ? s === "true" : s, e.boolean()).optional()
52
+ }, T = /* @__PURE__ */ new Set([
53
+ "jobTitle",
54
+ "flsaStatus",
55
+ "rate",
56
+ "paymentUnit"
57
+ ]), _ = /* @__PURE__ */ new Set([]);
58
+ function C(s, o) {
59
+ s.adjustForMinimumWage && (!s.minimumWageId || s.minimumWageId.trim() === "") && o.addIssue({
60
+ code: e.ZodIssueCode.custom,
61
+ path: ["minimumWageId"],
62
+ message: a.REQUIRED
63
+ }), s.stateWcCovered === !0 && (!s.stateWcClassCode || s.stateWcClassCode.trim() === "") && o.addIssue({
64
+ code: e.ZodIssueCode.custom,
65
+ path: ["stateWcClassCode"],
66
+ message: a.REQUIRED
67
+ });
68
+ const { flsaStatus: i, paymentUnit: E, rate: d } = s;
69
+ i === t.EXEMPT || i === t.SALARIED_NONEXEMPT || i === t.NONEXEMPT ? (i === t.EXEMPT && d !== void 0 && N(d, E) < R && o.addIssue({
70
+ code: e.ZodIssueCode.custom,
71
+ path: ["rate"],
72
+ message: a.RATE_EXEMPT_THRESHOLD
73
+ }), d === void 0 ? o.addIssue({
74
+ code: e.ZodIssueCode.custom,
75
+ path: ["rate"],
76
+ message: a.REQUIRED
77
+ }) : d < 1 && o.addIssue({
78
+ code: e.ZodIssueCode.custom,
79
+ path: ["rate"],
80
+ message: a.RATE_MINIMUM
81
+ })) : i === t.OWNER ? (E !== r.PAYCHECK && o.addIssue({
82
+ code: e.ZodIssueCode.custom,
83
+ path: ["paymentUnit"],
84
+ message: a.PAYMENT_UNIT_OWNER
85
+ }), d === void 0 ? o.addIssue({
86
+ code: e.ZodIssueCode.custom,
87
+ path: ["rate"],
88
+ message: a.REQUIRED
89
+ }) : d < 1 && o.addIssue({
90
+ code: e.ZodIssueCode.custom,
91
+ path: ["rate"],
92
+ message: a.RATE_MINIMUM
93
+ })) : [t.COMMISSION_ONLY_EXEMPT, t.COMMISSION_ONLY_NONEXEMPT].includes(i) && (E !== r.YEAR && o.addIssue({
94
+ code: e.ZodIssueCode.custom,
95
+ path: ["paymentUnit"],
96
+ message: a.PAYMENT_UNIT_COMMISSION
97
+ }), d !== 0 && o.addIssue({
98
+ code: e.ZodIssueCode.custom,
99
+ path: ["rate"],
100
+ message: a.RATE_COMMISSION_ZERO
101
+ }));
102
+ }
103
+ function p(s = {}) {
104
+ const { mode: o = "create", requiredFields: i, withStartDateField: E = !0 } = s, d = E ? i : M(i, "startDate"), n = new Set(T);
105
+ return E && n.add("startDate"), u({
106
+ fieldValidators: S,
107
+ fixedFields: c,
108
+ requiredOnCreate: n,
109
+ requiredOnUpdate: _,
110
+ mode: o,
111
+ requiredFields: d
112
+ }).superRefine((I, m) => {
113
+ C(I, m);
114
+ });
115
+ }
116
+ p();
117
+ export {
118
+ a as CompensationErrorCodes,
119
+ p as createCompensationSchema
120
+ };
121
+ //# sourceMappingURL=compensationSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compensationSchema.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport { composeFormSchema } from '../../form/composeFormSchema'\nimport { filterRequiredFields, type RequiredFields } from '../../form/resolveRequiredFields'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport { yearlyRate } from '@/helpers/payRateCalculator'\n\nexport const CompensationErrorCodes = {\n REQUIRED: 'REQUIRED',\n RATE_MINIMUM: 'RATE_MINIMUM',\n RATE_EXEMPT_THRESHOLD: 'RATE_EXEMPT_THRESHOLD',\n PAYMENT_UNIT_OWNER: 'PAYMENT_UNIT_OWNER',\n PAYMENT_UNIT_COMMISSION: 'PAYMENT_UNIT_COMMISSION',\n RATE_COMMISSION_ZERO: 'RATE_COMMISSION_ZERO',\n} as const\n\nexport type CompensationErrorCode =\n (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes]\n\nconst fieldValidators = {\n jobTitle: z.string().min(1, { message: CompensationErrorCodes.REQUIRED }),\n flsaStatus: z.enum([\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 paymentUnit: z.enum([\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n ]),\n rate: z.number().optional(),\n startDate: z.iso.date().nullable().optional(),\n adjustForMinimumWage: z.boolean(),\n minimumWageId: z.string().optional(),\n stateWcCovered: z.boolean().optional(),\n stateWcClassCode: z.string().optional(),\n twoPercentShareholder: z.boolean().optional(),\n}\n\nconst FIXED_FIELDS = new Set([\n 'adjustForMinimumWage',\n 'minimumWageId',\n 'stateWcCovered',\n 'stateWcClassCode',\n 'twoPercentShareholder',\n])\n\nexport type CompensationField = Exclude<\n keyof typeof fieldValidators,\n | 'adjustForMinimumWage'\n | 'minimumWageId'\n | 'stateWcCovered'\n | 'stateWcClassCode'\n | 'twoPercentShareholder'\n>\n\nexport type CompensationFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type CompensationFormOutputs = CompensationFormData\n\nconst runtimeFieldValidators = {\n ...fieldValidators,\n rate: z.preprocess(val => (Number.isNaN(val) ? undefined : val), z.number()),\n startDate: z.preprocess(val => {\n if (val instanceof Date) return val.toISOString().split('T')[0]\n if (val === null || val === '') return undefined\n return val\n }, z.iso.date()),\n stateWcCovered: z\n .preprocess(val => (typeof val === 'string' ? val === 'true' : val), z.boolean())\n .optional(),\n}\n\nconst REQUIRED_ON_CREATE = new Set<CompensationField>([\n 'jobTitle',\n 'flsaStatus',\n 'rate',\n 'paymentUnit',\n])\nconst REQUIRED_ON_UPDATE = new Set<CompensationField>([])\n\ninterface CompensationSchemaOptions {\n mode?: 'create' | 'update'\n requiredFields?: RequiredFields<CompensationField>\n withStartDateField?: boolean\n}\n\nfunction compensationSuperRefine(data: CompensationFormData, ctx: z.RefinementCtx) {\n if (data.adjustForMinimumWage && (!data.minimumWageId || data.minimumWageId.trim() === '')) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['minimumWageId'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n if (\n data.stateWcCovered === true &&\n (!data.stateWcClassCode || data.stateWcClassCode.trim() === '')\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['stateWcClassCode'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n const { flsaStatus, paymentUnit, rate } = data\n\n if (\n flsaStatus === FlsaStatus.EXEMPT ||\n flsaStatus === FlsaStatus.SALARIED_NONEXEMPT ||\n flsaStatus === FlsaStatus.NONEXEMPT\n ) {\n if (\n flsaStatus === FlsaStatus.EXEMPT &&\n rate !== undefined &&\n yearlyRate(rate, paymentUnit) < FLSA_OVERTIME_SALARY_LIMIT\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_EXEMPT_THRESHOLD,\n })\n }\n\n if (rate === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.REQUIRED,\n })\n } else if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n } else if (flsaStatus === FlsaStatus.OWNER) {\n if (paymentUnit !== PAY_PERIODS.PAYCHECK) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_OWNER,\n })\n }\n if (rate === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.REQUIRED,\n })\n } else if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n } else if (\n [FlsaStatus.COMMISSION_ONLY_EXEMPT, FlsaStatus.COMMISSION_ONLY_NONEXEMPT].includes(flsaStatus)\n ) {\n if (paymentUnit !== PAY_PERIODS.YEAR) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_COMMISSION,\n })\n }\n if (rate !== 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_COMMISSION_ZERO,\n })\n }\n }\n}\n\nexport function createCompensationSchema(options: CompensationSchemaOptions = {}) {\n const { mode = 'create', requiredFields, withStartDateField = true } = options\n\n const effectiveRequiredFields = withStartDateField\n ? requiredFields\n : filterRequiredFields(requiredFields, 'startDate')\n\n const effectiveRequiredOnCreate = new Set(REQUIRED_ON_CREATE)\n if (withStartDateField) {\n effectiveRequiredOnCreate.add('startDate')\n }\n\n const baseSchema = composeFormSchema({\n fieldValidators: runtimeFieldValidators,\n fixedFields: FIXED_FIELDS,\n requiredOnCreate: effectiveRequiredOnCreate,\n requiredOnUpdate: REQUIRED_ON_UPDATE,\n mode,\n requiredFields: effectiveRequiredFields,\n })\n\n return baseSchema.superRefine((data, ctx) => {\n compensationSuperRefine(data as CompensationFormData, ctx)\n })\n}\n\nexport const CompensationSchema = createCompensationSchema()\n"],"names":["CompensationErrorCodes","fieldValidators","z","FlsaStatus","PAY_PERIODS","FIXED_FIELDS","runtimeFieldValidators","val","REQUIRED_ON_CREATE","REQUIRED_ON_UPDATE","compensationSuperRefine","data","ctx","flsaStatus","paymentUnit","rate","yearlyRate","FLSA_OVERTIME_SALARY_LIMIT","createCompensationSchema","options","mode","requiredFields","withStartDateField","effectiveRequiredFields","filterRequiredFields","effectiveRequiredOnCreate","composeFormSchema"],"mappings":";;;;;AAMO,MAAMA,IAAyB;AAAA,EACpC,UAAU;AAAA,EACV,cAAc;AAAA,EACd,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,sBAAsB;AACxB,GAKMC,IAAkB;AAAA,EACtB,UAAUC,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,SAASF,EAAuB,UAAU;AAAA,EACxE,YAAYE,EAAE,KAAK;AAAA,IACjBC,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,EAAA,CACZ;AAAA,EACD,aAAaD,EAAE,KAAK;AAAA,IAClBE,EAAY;AAAA,IACZA,EAAY;AAAA,IACZA,EAAY;AAAA,IACZA,EAAY;AAAA,IACZA,EAAY;AAAA,EAAA,CACb;AAAA,EACD,MAAMF,EAAE,OAAA,EAAS,SAAA;AAAA,EACjB,WAAWA,EAAE,IAAI,OAAO,SAAA,EAAW,SAAA;AAAA,EACnC,sBAAsBA,EAAE,QAAA;AAAA,EACxB,eAAeA,EAAE,OAAA,EAAS,SAAA;AAAA,EAC1B,gBAAgBA,EAAE,QAAA,EAAU,SAAA;AAAA,EAC5B,kBAAkBA,EAAE,OAAA,EAAS,SAAA;AAAA,EAC7B,uBAAuBA,EAAE,QAAA,EAAU,SAAA;AACrC,GAEMG,wBAAmB,IAAI;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAgBKC,IAAyB;AAAA,EAC7B,GAAGL;AAAA,EACH,MAAMC,EAAE,WAAW,CAAAK,MAAQ,OAAO,MAAMA,CAAG,IAAI,SAAYA,GAAML,EAAE,OAAA,CAAQ;AAAA,EAC3E,WAAWA,EAAE,WAAW,CAAAK,MAAO;AAC7B,QAAIA,aAAe,KAAM,QAAOA,EAAI,cAAc,MAAM,GAAG,EAAE,CAAC;AAC9D,QAAI,EAAAA,MAAQ,QAAQA,MAAQ;AAC5B,aAAOA;AAAA,EACT,GAAGL,EAAE,IAAI,MAAM;AAAA,EACf,gBAAgBA,EACb,WAAW,CAAAK,MAAQ,OAAOA,KAAQ,WAAWA,MAAQ,SAASA,GAAML,EAAE,QAAA,CAAS,EAC/E,SAAA;AACL,GAEMM,wBAAyB,IAAuB;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GACKC,IAAqB,oBAAI,IAAuB,EAAE;AAQxD,SAASC,EAAwBC,GAA4BC,GAAsB;AACjF,EAAID,EAAK,yBAAyB,CAACA,EAAK,iBAAiBA,EAAK,cAAc,WAAW,OACrFC,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,eAAe;AAAA,IACtB,SAASF,EAAuB;AAAA,EAAA,CACjC,GAIDW,EAAK,mBAAmB,OACvB,CAACA,EAAK,oBAAoBA,EAAK,iBAAiB,KAAA,MAAW,OAE5DC,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,kBAAkB;AAAA,IACzB,SAASF,EAAuB;AAAA,EAAA,CACjC;AAGH,QAAM,EAAE,YAAAa,GAAY,aAAAC,GAAa,MAAAC,EAAA,IAASJ;AAE1C,EACEE,MAAeV,EAAW,UAC1BU,MAAeV,EAAW,sBAC1BU,MAAeV,EAAW,aAGxBU,MAAeV,EAAW,UAC1BY,MAAS,UACTC,EAAWD,GAAMD,CAAW,IAAIG,KAEhCL,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,GAGCe,MAAS,SACXH,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,IACQe,IAAO,KAChBH,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,KAEMa,MAAeV,EAAW,SAC/BW,MAAgBV,EAAY,YAC9BQ,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,aAAa;AAAA,IACpB,SAASF,EAAuB;AAAA,EAAA,CACjC,GAECe,MAAS,SACXH,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,IACQe,IAAO,KAChBH,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,KAGH,CAACG,EAAW,wBAAwBA,EAAW,yBAAyB,EAAE,SAASU,CAAU,MAEzFC,MAAgBV,EAAY,QAC9BQ,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,aAAa;AAAA,IACpB,SAASF,EAAuB;AAAA,EAAA,CACjC,GAECe,MAAS,KACXH,EAAI,SAAS;AAAA,IACX,MAAMV,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC;AAGP;AAEO,SAASkB,EAAyBC,IAAqC,IAAI;AAChF,QAAM,EAAE,MAAAC,IAAO,UAAU,gBAAAC,GAAgB,oBAAAC,IAAqB,OAASH,GAEjEI,IAA0BD,IAC5BD,IACAG,EAAqBH,GAAgB,WAAW,GAE9CI,IAA4B,IAAI,IAAIjB,CAAkB;AAC5D,SAAIc,KACFG,EAA0B,IAAI,WAAW,GAGxBC,EAAkB;AAAA,IACnC,iBAAiBpB;AAAA,IACjB,aAAaD;AAAA,IACb,kBAAkBoB;AAAA,IAClB,kBAAkBhB;AAAA,IAClB,MAAAW;AAAA,IACA,gBAAgBG;AAAA,EAAA,CACjB,EAEiB,YAAY,CAACZ,GAAMC,MAAQ;AAC3C,IAAAF,EAAwBC,GAA8BC,CAAG;AAAA,EAC3D,CAAC;AACH;AAEkCM,EAAA;"}
@@ -0,0 +1,34 @@
1
+ import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
2
+ import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
3
+ import { PaymentUnit } from '@gusto/embedded-api/models/components/compensation';
4
+ import { HookFieldProps } from '../../form/types';
5
+ import { TextInputHookFieldProps } from '../../form/fields/TextInputHookField';
6
+ import { SelectHookFieldProps } from '../../form/fields/SelectHookField';
7
+ import { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField';
8
+ import { CheckboxHookFieldProps } from '../../form/fields/CheckboxHookField';
9
+ import { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField';
10
+ import { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField';
11
+ import { CompensationErrorCodes } from './compensationSchema';
12
+ import { WARiskClassCode } from '../../../../models/WA_RISK_CODES';
13
+ export type RequiredValidation = typeof CompensationErrorCodes.REQUIRED;
14
+ export type RateValidation = (typeof CompensationErrorCodes)['REQUIRED' | 'RATE_MINIMUM' | 'RATE_EXEMPT_THRESHOLD'];
15
+ export type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
16
+ export declare function JobTitleField(props: JobTitleFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export type FlsaStatusFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, FlsaStatusType>>;
18
+ export declare function FlsaStatusField(props: FlsaStatusFieldProps): import("react/jsx-runtime").JSX.Element;
19
+ export type RateFieldProps = HookFieldProps<NumberInputHookFieldProps<RateValidation>>;
20
+ export declare function RateField(props: RateFieldProps): import("react/jsx-runtime").JSX.Element;
21
+ export type PaymentUnitFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, PaymentUnit>>;
22
+ export declare function PaymentUnitField(props: PaymentUnitFieldProps): import("react/jsx-runtime").JSX.Element;
23
+ export type AdjustForMinimumWageFieldProps = HookFieldProps<CheckboxHookFieldProps>;
24
+ export declare function AdjustForMinimumWageField(props: AdjustForMinimumWageFieldProps): import("react/jsx-runtime").JSX.Element;
25
+ export type MinimumWageIdFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, MinimumWage>>;
26
+ export declare function MinimumWageIdField(props: MinimumWageIdFieldProps): import("react/jsx-runtime").JSX.Element;
27
+ export type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>;
28
+ export declare function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps): import("react/jsx-runtime").JSX.Element;
29
+ export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>;
30
+ export declare function StateWcCoveredField(props: StateWcCoveredFieldProps): import("react/jsx-runtime").JSX.Element;
31
+ export type StateWcClassCodeFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, WARiskClassCode>>;
32
+ export declare function StateWcClassCodeField(props: StateWcClassCodeFieldProps): import("react/jsx-runtime").JSX.Element;
33
+ export type StartDateFieldProps = HookFieldProps<DatePickerHookFieldProps<typeof CompensationErrorCodes.REQUIRED>>;
34
+ export declare function StartDateField(props: StartDateFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { SelectHookField as n } from "../../form/fields/SelectHookField.js";
3
+ import { RadioGroupHookField as o } from "../../form/fields/RadioGroupHookField.js";
4
+ import { CheckboxHookField as r } from "../../form/fields/CheckboxHookField.js";
5
+ import { NumberInputHookField as i } from "../../form/fields/NumberInputHookField.js";
6
+ import { TextInputHookField as a } from "../../form/fields/TextInputHookField.js";
7
+ import { DatePickerHookField as m } from "../../form/fields/DatePickerHookField.js";
8
+ function p(e) {
9
+ return /* @__PURE__ */ t(a, { ...e, name: "jobTitle" });
10
+ }
11
+ function k(e) {
12
+ return /* @__PURE__ */ t(n, { ...e, name: "flsaStatus" });
13
+ }
14
+ function S(e) {
15
+ return /* @__PURE__ */ t(i, { ...e, name: "rate", format: "currency", min: 0 });
16
+ }
17
+ function W(e) {
18
+ return /* @__PURE__ */ t(n, { ...e, name: "paymentUnit" });
19
+ }
20
+ function C(e) {
21
+ return /* @__PURE__ */ t(r, { ...e, name: "adjustForMinimumWage" });
22
+ }
23
+ function H(e) {
24
+ return /* @__PURE__ */ t(n, { ...e, name: "minimumWageId" });
25
+ }
26
+ function h(e) {
27
+ return /* @__PURE__ */ t(r, { ...e, name: "twoPercentShareholder" });
28
+ }
29
+ function b(e) {
30
+ return /* @__PURE__ */ t(o, { ...e, name: "stateWcCovered" });
31
+ }
32
+ function g(e) {
33
+ return /* @__PURE__ */ t(n, { ...e, name: "stateWcClassCode" });
34
+ }
35
+ function j(e) {
36
+ return /* @__PURE__ */ t(m, { ...e, name: "startDate" });
37
+ }
38
+ export {
39
+ C as AdjustForMinimumWageField,
40
+ k as FlsaStatusField,
41
+ p as JobTitleField,
42
+ H as MinimumWageIdField,
43
+ W as PaymentUnitField,
44
+ S as RateField,
45
+ j as StartDateField,
46
+ g as StateWcClassCodeField,
47
+ b as StateWcCoveredField,
48
+ h as TwoPercentShareholderField
49
+ };
50
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { HookFieldProps } from '../../form/types'\nimport type { TextInputHookFieldProps } from '../../form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '../../form/fields/SelectHookField'\nimport type { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField'\nimport type { CheckboxHookFieldProps } from '../../form/fields/CheckboxHookField'\nimport type { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n NumberInputHookField,\n CheckboxHookField,\n RadioGroupHookField,\n DatePickerHookField,\n} from '../../form/fields'\nimport type { CompensationErrorCodes } from './compensationSchema'\nimport type { WARiskClassCode } from '@/models/WA_RISK_CODES'\n\nexport type RequiredValidation = typeof CompensationErrorCodes.REQUIRED\nexport type RateValidation = (typeof CompensationErrorCodes)[\n | 'REQUIRED'\n | 'RATE_MINIMUM'\n | 'RATE_EXEMPT_THRESHOLD']\n\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"jobTitle\" />\n}\n\nexport type FlsaStatusFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, FlsaStatusType>\n>\n\nexport function FlsaStatusField(props: FlsaStatusFieldProps) {\n return <SelectHookField {...props} name=\"flsaStatus\" />\n}\n\nexport type RateFieldProps = HookFieldProps<NumberInputHookFieldProps<RateValidation>>\n\nexport function RateField(props: RateFieldProps) {\n return <NumberInputHookField {...props} name=\"rate\" format=\"currency\" min={0} />\n}\n\nexport type PaymentUnitFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PaymentUnit>\n>\n\nexport function PaymentUnitField(props: PaymentUnitFieldProps) {\n return <SelectHookField {...props} name=\"paymentUnit\" />\n}\n\nexport type AdjustForMinimumWageFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function AdjustForMinimumWageField(props: AdjustForMinimumWageFieldProps) {\n return <CheckboxHookField {...props} name=\"adjustForMinimumWage\" />\n}\n\nexport type MinimumWageIdFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, MinimumWage>\n>\n\nexport function MinimumWageIdField(props: MinimumWageIdFieldProps) {\n return <SelectHookField {...props} name=\"minimumWageId\" />\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, string>>\n\nexport function StateWcCoveredField(props: StateWcCoveredFieldProps) {\n return <RadioGroupHookField {...props} name=\"stateWcCovered\" />\n}\n\nexport type StateWcClassCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, WARiskClassCode>\n>\n\nexport function StateWcClassCodeField(props: StateWcClassCodeFieldProps) {\n return <SelectHookField {...props} name=\"stateWcClassCode\" />\n}\n\nexport type StartDateFieldProps = HookFieldProps<\n DatePickerHookFieldProps<typeof CompensationErrorCodes.REQUIRED>\n>\n\nexport function StartDateField(props: StartDateFieldProps) {\n return <DatePickerHookField {...props} name=\"startDate\" />\n}\n"],"names":["JobTitleField","props","jsx","TextInputHookField","FlsaStatusField","SelectHookField","RateField","NumberInputHookField","PaymentUnitField","AdjustForMinimumWageField","CheckboxHookField","MinimumWageIdField","TwoPercentShareholderField","StateWcCoveredField","RadioGroupHookField","StateWcClassCodeField","StartDateField","DatePickerHookField"],"mappings":";;;;;;;AA6BO,SAASA,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,YAAW;AACxD;AAMO,SAASG,EAAgBH,GAA6B;AAC3D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,cAAa;AACvD;AAIO,SAASK,EAAUL,GAAuB;AAC/C,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,QAAO,QAAO,YAAW,KAAK,EAAA,CAAG;AAChF;AAMO,SAASO,EAAiBP,GAA8B;AAC7D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,eAAc;AACxD;AAIO,SAASQ,EAA0BR,GAAuC;AAC/E,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,wBAAuB;AACnE;AAMO,SAASU,EAAmBV,GAAgC;AACjE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,iBAAgB;AAC1D;AAIO,SAASW,EAA2BX,GAAwC;AACjF,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,yBAAwB;AACpE;AAIO,SAASY,EAAoBZ,GAAiC;AACnE,SAAO,gBAAAC,EAACY,GAAA,EAAqB,GAAGb,GAAO,MAAK,kBAAiB;AAC/D;AAMO,SAASc,EAAsBd,GAAmC;AACvE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,oBAAmB;AAC7D;AAMO,SAASe,EAAef,GAA4B;AACzD,SAAO,gBAAAC,EAACe,GAAA,EAAqB,GAAGhB,GAAO,MAAK,aAAY;AAC1D;"}
@@ -0,0 +1,7 @@
1
+ import "./types/i18next.d.ts"
2
+ export { useCompensationForm } from './useCompensationForm';
3
+ export type { CompensationSubmitCallbacks, CompensationSubmitOptions, CompensationRequiredFields, UseCompensationFormProps, UseCompensationFormResult, UseCompensationFormReady, CompensationFieldsMetadata, CompensationFormFields, } from './useCompensationForm';
4
+ export { CompensationForm } from './CompensationForm';
5
+ export type { CompensationFormProps } from './CompensationForm';
6
+ export { CompensationSchema, createCompensationSchema, CompensationErrorCodes, type CompensationErrorCode, type CompensationField, type CompensationFormData, type CompensationFormOutputs, } from './compensationSchema';
7
+ export type { RequiredValidation, RateValidation, StartDateFieldProps, JobTitleFieldProps, FlsaStatusFieldProps, RateFieldProps, PaymentUnitFieldProps, AdjustForMinimumWageFieldProps, MinimumWageIdFieldProps, TwoPercentShareholderFieldProps, StateWcCoveredFieldProps, StateWcClassCodeFieldProps, } from './fields';
@@ -0,0 +1,104 @@
1
+ import { UseFormProps } from 'react-hook-form';
2
+ import { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components/compensation';
3
+ import { Job } from '@gusto/embedded-api/models/components/job';
4
+ import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
5
+ import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
6
+ import { HookSubmitResult } from '../../types';
7
+ import { RequiredFields } from '../../form/resolveRequiredFields';
8
+ import { CompensationField, CompensationFormData } from './compensationSchema';
9
+ import { JobTitleField, FlsaStatusField, RateField, PaymentUnitField, AdjustForMinimumWageField, MinimumWageIdField, TwoPercentShareholderField, StateWcCoveredField, StateWcClassCodeField, StartDateField } from './fields';
10
+ import { WARiskClassCode } from '../../../../models/WA_RISK_CODES';
11
+ export interface CompensationSubmitCallbacks {
12
+ onJobCreated?: (job: Job) => void;
13
+ onJobUpdated?: (job: Job) => void;
14
+ onCompensationUpdated?: (compensation: Compensation | undefined) => void;
15
+ }
16
+ export interface CompensationSubmitOptions {
17
+ employeeId?: string;
18
+ startDate?: string;
19
+ }
20
+ export type CompensationRequiredFields = RequiredFields<CompensationField>;
21
+ export interface UseCompensationFormProps {
22
+ employeeId?: string;
23
+ withStartDateField?: boolean;
24
+ jobId?: string;
25
+ requiredFields?: CompensationRequiredFields;
26
+ defaultValues?: Partial<CompensationFormData>;
27
+ validationMode?: UseFormProps['mode'];
28
+ shouldFocusError?: boolean;
29
+ }
30
+ export declare function useCompensationForm({ employeeId, withStartDateField, jobId, requiredFields, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseCompensationFormProps): {
31
+ isLoading: true;
32
+ errorHandling: import('../..').HookErrorHandling;
33
+ data?: undefined;
34
+ status?: undefined;
35
+ actions?: undefined;
36
+ form?: undefined;
37
+ } | {
38
+ isLoading: false;
39
+ data: {
40
+ compensation: Compensation | null;
41
+ jobs: Job[] | undefined;
42
+ currentJob: Job | null;
43
+ minimumWages: MinimumWage[];
44
+ };
45
+ status: {
46
+ isPending: boolean;
47
+ mode: string;
48
+ };
49
+ actions: {
50
+ onSubmit: (callbacks?: CompensationSubmitCallbacks, options?: CompensationSubmitOptions) => Promise<HookSubmitResult<Compensation | undefined> | undefined>;
51
+ };
52
+ errorHandling: import('../..').HookErrorHandling;
53
+ form: {
54
+ Fields: {
55
+ StartDate: typeof StartDateField | undefined;
56
+ JobTitle: typeof JobTitleField;
57
+ FlsaStatus: typeof FlsaStatusField | undefined;
58
+ Rate: typeof RateField;
59
+ PaymentUnit: typeof PaymentUnitField;
60
+ AdjustForMinimumWage: typeof AdjustForMinimumWageField | undefined;
61
+ MinimumWageId: typeof MinimumWageIdField | undefined;
62
+ TwoPercentShareholder: typeof TwoPercentShareholderField | undefined;
63
+ StateWcCovered: typeof StateWcCoveredField | undefined;
64
+ StateWcClassCode: typeof StateWcClassCodeField | undefined;
65
+ };
66
+ fieldsMetadata: {
67
+ startDate: import('../..').FieldMetadata;
68
+ jobTitle: import('../..').FieldMetadata;
69
+ flsaStatus: import('../..').FieldMetadataWithOptions<FlsaStatusType>;
70
+ rate: {
71
+ isDisabled: boolean;
72
+ name: string;
73
+ isRequired?: boolean;
74
+ hasRedactedValue?: boolean;
75
+ };
76
+ paymentUnit: import('../..').FieldMetadataWithOptions<PaymentUnit>;
77
+ adjustForMinimumWage: {
78
+ isDisabled: boolean;
79
+ name: string;
80
+ isRequired?: boolean;
81
+ hasRedactedValue?: boolean;
82
+ };
83
+ minimumWageId: import('../..').FieldMetadataWithOptions<MinimumWage>;
84
+ twoPercentShareholder: {
85
+ isDisabled: boolean;
86
+ name: string;
87
+ isRequired?: boolean;
88
+ hasRedactedValue?: boolean;
89
+ };
90
+ stateWcCovered: import('../..').FieldMetadataWithOptions<string>;
91
+ stateWcClassCode: import('../..').FieldMetadataWithOptions<WARiskClassCode>;
92
+ };
93
+ hookFormInternals: {
94
+ formMethods: import('react-hook-form').UseFormReturn<CompensationFormData, unknown, CompensationFormData>;
95
+ };
96
+ getFormSubmissionValues: () => CompensationFormData | undefined;
97
+ };
98
+ };
99
+ export type UseCompensationFormResult = ReturnType<typeof useCompensationForm>;
100
+ export type UseCompensationFormReady = Extract<UseCompensationFormResult, {
101
+ data: object;
102
+ }>;
103
+ export type CompensationFieldsMetadata = UseCompensationFormReady['form']['fieldsMetadata'];
104
+ export type CompensationFormFields = UseCompensationFormReady['form']['Fields'];