@gusto/embedded-react-sdk 0.39.0 → 0.40.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 (464) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  3. package/dist/components/Common/SignatureForm/SignatureFormActions.js +7 -8
  4. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  5. package/dist/components/Common/SignatureForm/SignatureFormFields.js +4 -5
  6. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  7. package/dist/components/Common/UI/Alert/Alert.module.scss.js +12 -12
  8. package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
  9. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
  10. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  11. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  17. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  18. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  19. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  20. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  21. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  22. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  23. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  24. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.d.ts +3 -3
  25. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/fields.js +2 -2
  26. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js.map +1 -0
  27. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/index.d.ts +0 -2
  28. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.d.ts +2 -2
  29. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/signCompanyFormSchema.js +1 -1
  30. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
  31. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/useSignCompanyForm.d.ts +6 -31
  32. package/dist/components/{UNSTABLE_Hooks/hooks → Company/DocumentSigner/shared}/useSignCompanyForm/useSignCompanyForm.js +24 -19
  33. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
  34. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  35. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  36. package/dist/components/Company/Industry/Actions.js +5 -6
  37. package/dist/components/Company/Industry/Actions.js.map +1 -1
  38. package/dist/components/Company/Industry/Edit.js +10 -11
  39. package/dist/components/Company/Industry/Edit.js.map +1 -1
  40. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  41. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  42. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  43. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  44. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  45. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  46. package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
  47. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  48. package/dist/components/Company/PaySchedule/_parts/Edit.js +6 -6
  49. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.d.ts +6 -6
  50. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/fields.js +5 -5
  51. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -0
  52. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/index.d.ts +0 -2
  53. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.d.ts +2 -2
  54. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/payScheduleSchema.js +2 -2
  55. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -0
  56. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +33 -0
  57. package/dist/components/{UNSTABLE_Hooks/hooks → Company/PaySchedule/shared}/usePayScheduleForm/usePayScheduleForm.js +30 -26
  58. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
  59. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  60. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  61. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  62. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  63. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  64. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  65. package/dist/components/Company/exports/companyOnboarding.d.ts +14 -0
  66. package/dist/components/Company/exports/companyOnboarding.js +31 -0
  67. package/dist/components/Company/exports/companyOnboarding.js.map +1 -0
  68. package/dist/components/Contractor/Address/Form.js +4 -4
  69. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  70. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  71. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  72. package/dist/components/Contractor/Submit/Submit.js +73 -50
  73. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  74. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +7 -0
  75. package/dist/components/Contractor/exports/contractorOnboarding.js +17 -0
  76. package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -0
  77. package/dist/components/Employee/Compensation/Actions.js +1 -1
  78. package/dist/components/Employee/Compensation/List.js +5 -6
  79. package/dist/components/Employee/Compensation/List.js.map +1 -1
  80. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.d.ts +2 -2
  81. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchema.js +4 -4
  82. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -0
  83. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.d.ts +8 -8
  84. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/fields.js +6 -6
  85. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -0
  86. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/index.d.ts +0 -2
  87. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +43 -0
  88. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/useCompensationForm.js +28 -24
  89. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -0
  90. package/dist/components/Employee/Dashboard/Dashboard.js +79 -79
  91. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  92. package/dist/components/Employee/Dashboard/DocumentsView.js +2 -5
  93. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  94. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +8 -11
  95. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +8 -8
  96. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  97. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +10 -12
  98. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +11 -11
  99. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  100. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +6 -9
  101. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -10
  102. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
  103. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +7 -10
  104. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +8 -8
  105. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
  106. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  107. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  108. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +16 -16
  109. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +8 -8
  110. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.d.ts +5 -5
  111. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/fields.js +4 -4
  112. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -0
  113. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/index.d.ts +0 -4
  114. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.d.ts +1 -1
  115. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/signEmployeeFormSchema.js +1 -1
  116. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  117. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +47 -0
  118. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/DocumentSigner/shared}/useSignEmployeeForm/useSignEmployeeForm.js +66 -59
  119. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  120. package/dist/components/Employee/FederalTaxes/Actions.js +2 -3
  121. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  122. package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
  123. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  124. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  125. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  126. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  127. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  128. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +4 -4
  129. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  130. package/dist/components/Employee/Profile/AdminProfile.d.ts +2 -0
  131. package/dist/components/Employee/Profile/AdminProfile.js +360 -0
  132. package/dist/components/Employee/Profile/AdminProfile.js.map +1 -0
  133. package/dist/components/Employee/Profile/AdminProfile.module.scss.js +10 -0
  134. package/dist/components/Employee/Profile/AdminProfile.module.scss.js.map +1 -0
  135. package/dist/components/Employee/Profile/EmployeeProfile.d.ts +2 -0
  136. package/dist/components/Employee/Profile/EmployeeProfile.js +211 -0
  137. package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -0
  138. package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js +10 -0
  139. package/dist/components/Employee/Profile/EmployeeProfile.module.scss.js.map +1 -0
  140. package/dist/components/Employee/Profile/Profile.d.ts +3 -3
  141. package/dist/components/Employee/Profile/Profile.js +25 -261
  142. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  143. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
  144. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/employeeDetailsSchema.js +2 -2
  145. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
  146. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.d.ts +4 -4
  147. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/fields.js +5 -5
  148. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -0
  149. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/index.d.ts +0 -2
  150. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +15 -33
  151. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useEmployeeDetailsForm/useEmployeeDetailsForm.js +31 -27
  152. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
  153. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +22 -0
  154. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +36 -0
  155. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -0
  156. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +41 -0
  157. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +32 -0
  158. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -0
  159. package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +5 -0
  160. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +44 -0
  161. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +161 -0
  162. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -0
  163. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.d.ts +3 -3
  164. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/fields.js +2 -2
  165. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js.map +1 -0
  166. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/index.d.ts +0 -2
  167. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.d.ts +11 -32
  168. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/useWorkAddressForm.js +34 -30
  169. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
  170. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.d.ts +3 -5
  171. package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Profile/shared}/useWorkAddressForm/workAddressSchema.js +7 -9
  172. package/dist/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js.map +1 -0
  173. package/dist/components/Employee/StateTaxes/Actions.js +6 -7
  174. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  175. package/dist/components/Employee/Taxes/Actions.js +7 -8
  176. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  177. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  178. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  179. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +5 -5
  180. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  181. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +10 -10
  182. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.d.ts +1 -1
  183. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeList.js +7 -7
  184. package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +1 -0
  185. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.d.ts +1 -1
  186. package/dist/components/Employee/{EmployeeList → employee-list/management}/ManagementEmployeeListView.js +12 -12
  187. package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -0
  188. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.d.ts +1 -1
  189. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeList.js +7 -7
  190. package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +1 -0
  191. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeListView.d.ts +1 -1
  192. package/dist/components/Employee/{EmployeeList → employee-list/onboarding}/EmployeeListView.js +12 -12
  193. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -0
  194. package/dist/components/Employee/employee-list/shared/index.d.ts +2 -0
  195. package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.d.ts +8 -10
  196. package/dist/components/Employee/{EmployeeList → employee-list/shared}/useEmployeeList.js +32 -28
  197. package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +1 -0
  198. package/dist/components/Employee/exports/employeeManagement.d.ts +6 -0
  199. package/dist/components/Employee/exports/employeeManagement.js +15 -0
  200. package/dist/components/Employee/exports/employeeManagement.js.map +1 -0
  201. package/dist/components/Employee/exports/employeeOnboarding.d.ts +14 -0
  202. package/dist/components/Employee/exports/employeeOnboarding.js +31 -0
  203. package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -0
  204. package/dist/components/Employee/index.d.ts +1 -2
  205. package/dist/components/Employee/index.js +35 -37
  206. package/dist/components/Employee/index.js.map +1 -1
  207. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -10
  208. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +11 -12
  209. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  210. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
  211. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  212. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -3
  213. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  214. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +17 -17
  215. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  216. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +106 -108
  217. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  218. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +10 -10
  219. package/dist/components/Payroll/usePreparedPayrollData.js +4 -4
  220. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  221. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +1 -1
  222. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +96 -62
  223. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
  224. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +1 -1
  225. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +47 -45
  226. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  227. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +2 -0
  228. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +18 -0
  229. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js.map +1 -0
  230. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +2 -0
  231. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +166 -0
  232. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
  233. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsTypes.d.ts +18 -0
  234. package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -0
  235. package/dist/components/UNSTABLE_TimeOff/index.js +24 -22
  236. package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -1
  237. package/dist/components/index.d.ts +7 -0
  238. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  239. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  240. package/dist/contexts/ObservabilityProvider/useObservability.js +6 -6
  241. package/dist/contexts/ObservabilityProvider/useObservability.js.map +1 -1
  242. package/dist/i18n/I18n.js +9 -9
  243. package/dist/i18n/I18n.js.map +1 -1
  244. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +1 -1
  245. package/dist/i18n/en/Contractor.Submit.json.js +16 -12
  246. package/dist/i18n/en/Contractor.Submit.json.js.map +1 -1
  247. package/dist/i18n/en/common.json.d.ts +1 -0
  248. package/dist/i18n/en/common.json.js +1 -1
  249. package/dist/index.d.ts +16 -0
  250. package/dist/index.js +102 -26
  251. package/dist/index.js.map +1 -1
  252. package/dist/partner-hook-utils/collectErrors.js.map +1 -0
  253. package/dist/partner-hook-utils/composeErrorHandler.d.ts +24 -0
  254. package/dist/partner-hook-utils/composeErrorHandler.js +30 -0
  255. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -0
  256. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.d.ts +2 -2
  257. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataContext.js +3 -3
  258. package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js.map +1 -0
  259. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.d.ts +2 -2
  260. package/dist/partner-hook-utils/form/FormFieldsMetadataProvider.js.map +1 -0
  261. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.d.ts +2 -2
  262. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -0
  263. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.d.ts +1 -1
  264. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -0
  265. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.d.ts +29 -3
  266. package/dist/partner-hook-utils/form/composeSubmitHandler.js +40 -0
  267. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -0
  268. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/CheckboxHookField.d.ts +3 -3
  269. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/CheckboxHookField.js +8 -9
  270. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -0
  271. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.d.ts +3 -3
  272. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/DatePickerHookField.js +1 -1
  273. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -0
  274. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/NumberInputHookField.d.ts +3 -3
  275. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/NumberInputHookField.js +12 -13
  276. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -0
  277. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.d.ts +3 -3
  278. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/RadioGroupHookField.js +3 -4
  279. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -0
  280. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.d.ts +3 -3
  281. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SelectHookField.js +8 -9
  282. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -0
  283. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SwitchHookField.d.ts +3 -3
  284. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/SwitchHookField.js +8 -9
  285. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -0
  286. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/TextInputHookField.d.ts +3 -3
  287. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +38 -0
  288. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -0
  289. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/fields/index.d.ts +7 -7
  290. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.d.ts +1 -1
  291. package/dist/partner-hook-utils/form/getFieldWithOptions.js.map +1 -0
  292. package/dist/partner-hook-utils/form/getFormSubmissionValues.js.map +1 -0
  293. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/index.d.ts +2 -2
  294. package/dist/partner-hook-utils/form/preprocessors.js.map +1 -0
  295. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.d.ts +2 -2
  296. package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -0
  297. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useDeriveFieldsMetadata.d.ts +1 -1
  298. package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js +21 -0
  299. package/dist/partner-hook-utils/form/useDeriveFieldsMetadata.js.map +1 -0
  300. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.d.ts +1 -1
  301. package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -0
  302. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.d.ts +2 -2
  303. package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -0
  304. package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.d.ts +1 -1
  305. package/dist/partner-hook-utils/form/withOptions.js.map +1 -0
  306. package/dist/partner-hook-utils/index.d.ts +5 -0
  307. package/dist/{types/sdkHooks.d.ts → partner-hook-utils/types.d.ts} +37 -9
  308. package/dist/shared/constants.d.ts +1 -1
  309. package/dist/shared/constants.js +15 -16
  310. package/dist/shared/constants.js.map +1 -1
  311. package/dist/style.css +1 -1
  312. package/dist/types/i18next.d.ts +15 -252
  313. package/dist/types/sdkError.js.map +1 -1
  314. package/docs/reference/endpoint-inventory.json +542 -162
  315. package/package.json +13 -17
  316. package/dist/UNSTABLE_Hooks.d.ts +0 -1
  317. package/dist/UNSTABLE_Hooks.js +0 -71
  318. package/dist/UNSTABLE_Hooks.js.map +0 -1
  319. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +0 -1
  320. package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +0 -1
  321. package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +0 -1
  322. package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +0 -1
  323. package/dist/components/Employee/EmployeeList/index.d.ts +0 -3
  324. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +0 -1
  325. package/dist/components/Employee/Profile/Actions.d.ts +0 -1
  326. package/dist/components/Employee/Profile/Actions.js +0 -14
  327. package/dist/components/Employee/Profile/Actions.js.map +0 -1
  328. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +0 -33
  329. package/dist/components/Employee/Profile/AdminPersonalDetails.js +0 -59
  330. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +0 -1
  331. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +0 -8
  332. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +0 -1
  333. package/dist/components/Employee/Profile/Head.d.ts +0 -1
  334. package/dist/components/Employee/Profile/Head.js +0 -14
  335. package/dist/components/Employee/Profile/Head.js.map +0 -1
  336. package/dist/components/Employee/Profile/HomeAddress.d.ts +0 -31
  337. package/dist/components/Employee/Profile/HomeAddress.js +0 -128
  338. package/dist/components/Employee/Profile/HomeAddress.js.map +0 -1
  339. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +0 -49
  340. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +0 -146
  341. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +0 -1
  342. package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +0 -16
  343. package/dist/components/Employee/Profile/SelfPersonalDetails.js +0 -29
  344. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +0 -1
  345. package/dist/components/Employee/Profile/WorkAddress.d.ts +0 -1
  346. package/dist/components/Employee/Profile/WorkAddress.js +0 -21
  347. package/dist/components/Employee/Profile/WorkAddress.js.map +0 -1
  348. package/dist/components/Employee/Profile/WorkAddress.module.scss.js +0 -8
  349. package/dist/components/Employee/Profile/WorkAddress.module.scss.js.map +0 -1
  350. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.d.ts +0 -2
  351. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js +0 -8
  352. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +0 -1
  353. package/dist/components/Employee/Profile/useProfile.d.ts +0 -16
  354. package/dist/components/Employee/Profile/useProfile.js +0 -20
  355. package/dist/components/Employee/Profile/useProfile.js.map +0 -1
  356. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +0 -1
  357. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +0 -1
  358. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +0 -1
  359. package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +0 -1
  360. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +0 -34
  361. package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +0 -1
  362. package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +0 -1
  363. package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +0 -1
  364. package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +0 -1
  365. package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +0 -1
  366. package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +0 -1
  367. package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +0 -1
  368. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +0 -39
  369. package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +0 -1
  370. package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +0 -1
  371. package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +0 -1
  372. package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +0 -1
  373. package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +0 -1
  374. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +0 -21
  375. package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +0 -1
  376. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +0 -1
  377. package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +0 -1
  378. package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +0 -1
  379. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +0 -5
  380. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +0 -149
  381. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +0 -1
  382. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +0 -1
  383. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +0 -1
  384. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +0 -102
  385. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +0 -1
  386. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +0 -5
  387. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +0 -112
  388. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +0 -1
  389. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +0 -1
  390. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +0 -1
  391. package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +0 -1
  392. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +0 -5
  393. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +0 -172
  394. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +0 -1
  395. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js +0 -14
  396. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js.map +0 -1
  397. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +0 -1
  398. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +0 -1
  399. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +0 -69
  400. package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +0 -1
  401. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +0 -5
  402. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +0 -69
  403. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +0 -1
  404. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +0 -1
  405. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +0 -1
  406. package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +0 -1
  407. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +0 -5
  408. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +0 -71
  409. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +0 -1
  410. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +0 -5
  411. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +0 -179
  412. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +0 -1
  413. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +0 -1
  414. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  415. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -151
  416. package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  417. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +0 -5
  418. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +0 -69
  419. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +0 -1
  420. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +0 -1
  421. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +0 -1
  422. package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +0 -1
  423. package/dist/components/UNSTABLE_Hooks/index.d.ts +0 -12
  424. package/dist/helpers/buildQueryErrorHandling.d.ts +0 -22
  425. package/dist/helpers/buildQueryErrorHandling.js +0 -11
  426. package/dist/helpers/buildQueryErrorHandling.js.map +0 -1
  427. package/dist/helpers/collectErrors.js.map +0 -1
  428. package/dist/hooks/useErrorHandling.d.ts +0 -9
  429. package/dist/hooks/useErrorHandling.js +0 -12
  430. package/dist/hooks/useErrorHandling.js.map +0 -1
  431. package/dist/hooks/useErrorHandling.test.d.ts +0 -1
  432. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +0 -58
  433. package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +0 -1
  434. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +0 -34
  435. package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +0 -1
  436. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +0 -24
  437. package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +0 -1
  438. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +0 -20
  439. package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +0 -1
  440. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +0 -22
  441. package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +0 -1
  442. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +0 -70
  443. package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +0 -1
  444. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +0 -24
  445. package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +0 -1
  446. /package/dist/components/{UNSTABLE_Hooks/hooks → Employee/Compensation/shared}/useCompensationForm/compensationSchemaParity.test.d.ts +0 -0
  447. /package/dist/{helpers → partner-hook-utils}/collectErrors.d.ts +0 -0
  448. /package/dist/{helpers → partner-hook-utils}/collectErrors.js +0 -0
  449. /package/dist/{components/Employee/Profile/getEmployeeAddressForProfile.test.d.ts → partner-hook-utils/composeErrorHandler.test.d.ts} +0 -0
  450. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/FormFieldsMetadataProvider.js +0 -0
  451. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/SDKFormProvider.js +0 -0
  452. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.js +0 -0
  453. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/buildFormSchema.test.d.ts +0 -0
  454. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/composeSubmitHandler.test.d.ts +0 -0
  455. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFieldWithOptions.js +0 -0
  456. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.d.ts +0 -0
  457. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.js +0 -0
  458. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/getFormSubmissionValues.test.d.ts +0 -0
  459. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.d.ts +0 -0
  460. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/preprocessors.js +0 -0
  461. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/resolveFieldError.js +0 -0
  462. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useFieldErrorMessage.js +0 -0
  463. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/useHookFieldResolution.js +0 -0
  464. /package/dist/{components/UNSTABLE_Hooks → partner-hook-utils}/form/withOptions.js +0 -0
@@ -3,7 +3,7 @@ import { Location } from '@gusto/embedded-api/models/components/location';
3
3
  import { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress';
4
4
  import { WorkAddressOptionalFieldsToRequire, WorkAddressFormData } from './workAddressSchema';
5
5
  import { LocationField, EffectiveDateField } from './fields';
6
- import { HookSubmitResult } from '../../../../types/sdkHooks';
6
+ import { BaseFormHookReady, FieldsMetadata, HookLoadingResult, HookSubmitResult } from '../../../../../partner-hook-utils/types';
7
7
  export type { WorkAddressOptionalFieldsToRequire } from './workAddressSchema';
8
8
  export interface WorkAddressSubmitCallbacks {
9
9
  onWorkAddressCreated?: (workAddress: EmployeeWorkAddress) => void;
@@ -22,46 +22,25 @@ export interface UseWorkAddressFormProps {
22
22
  validationMode?: UseFormProps['mode'];
23
23
  shouldFocusError?: boolean;
24
24
  }
25
- export declare function useWorkAddressForm({ companyId, employeeId, withEffectiveDateField, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseWorkAddressFormProps): {
26
- isLoading: true;
27
- errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
28
- data?: undefined;
29
- status?: undefined;
30
- actions?: undefined;
31
- form?: undefined;
32
- } | {
33
- isLoading: false;
25
+ export interface WorkAddressFields {
26
+ Location: typeof LocationField;
27
+ EffectiveDate: typeof EffectiveDateField | undefined;
28
+ }
29
+ export interface UseWorkAddressFormReady extends BaseFormHookReady<FieldsMetadata, WorkAddressFormData, WorkAddressFields> {
34
30
  data: {
35
31
  workAddress: EmployeeWorkAddress | null;
36
32
  workAddresses: EmployeeWorkAddress[] | undefined;
37
- companyLocations: Location[];
33
+ companyLocations: Location[] | undefined;
38
34
  };
39
35
  status: {
40
36
  isPending: boolean;
41
- mode: "create" | "update";
37
+ mode: 'create' | 'update';
42
38
  };
43
39
  actions: {
44
40
  onSubmit: (callbacks?: WorkAddressSubmitCallbacks, options?: WorkAddressSubmitOptions) => Promise<HookSubmitResult<EmployeeWorkAddress> | undefined>;
45
41
  };
46
- errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
47
- form: {
48
- Fields: {
49
- Location: typeof LocationField;
50
- EffectiveDate: typeof EffectiveDateField | undefined;
51
- };
52
- fieldsMetadata: {
53
- locationUuid: import('../../../../types/sdkHooks').FieldMetadataWithOptions<Location>;
54
- effectiveDate: import('../../../../types/sdkHooks').FieldMetadata;
55
- };
56
- hookFormInternals: {
57
- formMethods: import('react-hook-form').UseFormReturn<WorkAddressFormData, unknown, WorkAddressFormData>;
58
- };
59
- getFormSubmissionValues: () => WorkAddressFormData | undefined;
60
- };
61
- };
62
- export type UseWorkAddressFormResult = ReturnType<typeof useWorkAddressForm>;
63
- export type UseWorkAddressFormReady = Extract<UseWorkAddressFormResult, {
64
- data: object;
65
- }>;
42
+ }
43
+ export declare function useWorkAddressForm({ companyId, employeeId, withEffectiveDateField, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseWorkAddressFormProps): HookLoadingResult | UseWorkAddressFormReady;
44
+ export type UseWorkAddressFormResult = HookLoadingResult | UseWorkAddressFormReady;
66
45
  export type WorkAddressFieldsMetadata = UseWorkAddressFormReady['form']['fieldsMetadata'];
67
46
  export type WorkAddressFormFields = UseWorkAddressFormReady['form']['Fields'];
@@ -6,16 +6,16 @@ import { useEmployeeAddressesGetWorkAddresses as j } from "@gusto/embedded-api/r
6
6
  import { useEmployeeAddressesCreateWorkAddressMutation as J } from "@gusto/embedded-api/react-query/employeeAddressesCreateWorkAddress";
7
7
  import { useEmployeeAddressesUpdateWorkAddressMutation as N } from "@gusto/embedded-api/react-query/employeeAddressesUpdateWorkAddress";
8
8
  import { RFCDate as X } from "@gusto/embedded-api/types/rfcdate";
9
- import { useDeriveFieldsMetadata as Y } from "../../form/useDeriveFieldsMetadata.js";
10
- import { createGetFormSubmissionValues as Z } from "../../form/getFormSubmissionValues.js";
11
- import { withOptions as _ } from "../../form/withOptions.js";
12
- import { createWorkAddressSchema as $ } from "./workAddressSchema.js";
13
- import { EffectiveDateField as T, LocationField as ee } from "./fields.js";
14
- import { useErrorHandling as oe } from "../../../../hooks/useErrorHandling.js";
15
- import { useBaseSubmit as te } from "../../../Base/useBaseSubmit.js";
16
- import { SDKInternalError as l } from "../../../../types/sdkError.js";
17
- import { addressInline as se } from "../../../../helpers/formattedStrings.js";
18
- function ge({
9
+ import { createWorkAddressSchema as Y } from "./workAddressSchema.js";
10
+ import { EffectiveDateField as Z, LocationField as _ } from "./fields.js";
11
+ import { useDeriveFieldsMetadata as $ } from "../../../../../partner-hook-utils/form/useDeriveFieldsMetadata.js";
12
+ import { createGetFormSubmissionValues as T } from "../../../../../partner-hook-utils/form/getFormSubmissionValues.js";
13
+ import { withOptions as ee } from "../../../../../partner-hook-utils/form/withOptions.js";
14
+ import { composeErrorHandler as oe } from "../../../../../partner-hook-utils/composeErrorHandler.js";
15
+ import { useBaseSubmit as te } from "../../../../Base/useBaseSubmit.js";
16
+ import { SDKInternalError as l } from "../../../../../types/sdkError.js";
17
+ import { addressInline as se } from "../../../../../helpers/formattedStrings.js";
18
+ function Le({
19
19
  companyId: F,
20
20
  employeeId: o,
21
21
  withEffectiveDateField: i = !0,
@@ -28,45 +28,49 @@ function ge({
28
28
  { employeeId: o ?? "" },
29
29
  { enabled: !!o }
30
30
  ), d = a.data?.companyLocationsList, f = c.data?.employeeWorkAddressesList, t = f?.find((e) => e.active), n = !t, k = n ? "create" : "update", [v, C] = R(
31
- () => $({ mode: k, optionalFieldsToRequire: p, withEffectiveDateField: i }),
31
+ () => Y({ mode: k, optionalFieldsToRequire: p, withEffectiveDateField: i }),
32
32
  [k, p, i]
33
33
  ), W = {
34
34
  locationUuid: t?.locationUuid ?? A?.locationUuid ?? "",
35
35
  effectiveDate: t?.effectiveDate ?? A?.effectiveDate ?? ""
36
- }, u = x({
36
+ }, m = x({
37
37
  resolver: z(v),
38
38
  mode: h,
39
39
  shouldFocusError: q,
40
40
  defaultValues: W,
41
41
  values: W,
42
42
  resetOptions: { keepDirtyValues: !0 }
43
- }), D = J(), y = N(), P = D.isPending || y.isPending, { baseSubmitHandler: V, error: B, setError: G } = te("WorkAddressForm"), w = oe(o ? [a, c] : [a], { error: B, setError: G }), H = (d ?? []).map((e) => ({
43
+ }), D = J(), y = N(), P = D.isPending || y.isPending, {
44
+ baseSubmitHandler: V,
45
+ error: B,
46
+ setError: G
47
+ } = te("WorkAddressForm"), w = oe(o ? [a, c] : [a], { submitError: B, setSubmitError: G }), H = (d ?? []).map((e) => ({
44
48
  value: e.uuid,
45
49
  label: se(e)
46
- })), b = Y(C, u.control), I = {
47
- locationUuid: _(
50
+ })), b = $(C, m.control), I = {
51
+ locationUuid: ee(
48
52
  b.locationUuid,
49
53
  H,
50
54
  d ?? []
51
55
  ),
52
56
  effectiveDate: b.effectiveDate
53
- }, O = async (e, g) => {
54
- let L;
57
+ }, O = async (e, L) => {
58
+ let g;
55
59
  return await new Promise((U) => {
56
- u.handleSubmit(
60
+ m.handleSubmit(
57
61
  async (Q) => {
58
- await V(Q, async (m) => {
59
- const M = g?.employeeId ?? o;
62
+ await V(Q, async (u) => {
63
+ const M = L?.employeeId ?? o;
60
64
  if (!M)
61
65
  throw new l("employeeId is required to submit work address");
62
- const S = i && m.effectiveDate ? m.effectiveDate : g?.effectiveDate, E = S ? new X(new Date(S)) : void 0;
66
+ const S = i && u.effectiveDate ? u.effectiveDate : L?.effectiveDate, E = S ? new X(new Date(S)) : void 0;
63
67
  let s;
64
68
  if (n) {
65
69
  const r = await D.mutateAsync({
66
70
  request: {
67
71
  employeeId: M,
68
72
  requestBody: {
69
- locationUuid: m.locationUuid,
73
+ locationUuid: u.locationUuid,
70
74
  effectiveDate: E
71
75
  }
72
76
  }
@@ -80,7 +84,7 @@ function ge({
80
84
  workAddressUuid: t.uuid,
81
85
  requestBody: {
82
86
  version: t.version,
83
- locationUuid: m.locationUuid,
87
+ locationUuid: u.locationUuid,
84
88
  effectiveDate: E
85
89
  }
86
90
  }
@@ -89,7 +93,7 @@ function ge({
89
93
  throw new l("Work address update failed");
90
94
  s = r.employeeWorkAddress, e?.onWorkAddressUpdated?.(s);
91
95
  }
92
- L = {
96
+ g = {
93
97
  mode: n ? "create" : "update",
94
98
  data: s
95
99
  };
@@ -99,7 +103,7 @@ function ge({
99
103
  U();
100
104
  }
101
105
  )();
102
- }), L;
106
+ }), g;
103
107
  };
104
108
  return a.isLoading || (o ? c.isLoading : !1) || !d || o && !f ? { isLoading: !0, errorHandling: w } : {
105
109
  isLoading: !1,
@@ -116,16 +120,16 @@ function ge({
116
120
  errorHandling: w,
117
121
  form: {
118
122
  Fields: {
119
- Location: ee,
120
- EffectiveDate: i ? T : void 0
123
+ Location: _,
124
+ EffectiveDate: i ? Z : void 0
121
125
  },
122
126
  fieldsMetadata: I,
123
- hookFormInternals: { formMethods: u },
124
- getFormSubmissionValues: Z(u, v)
127
+ hookFormInternals: { formMethods: m },
128
+ getFormSubmissionValues: T(m, v)
125
129
  }
126
130
  };
127
131
  }
128
132
  export {
129
- ge as useWorkAddressForm
133
+ Le as useWorkAddressForm
130
134
  };
131
135
  //# sourceMappingURL=useWorkAddressForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWorkAddressForm.js","sources":["../../../../../../src/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useForm } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Location } from '@gusto/embedded-api/models/components/location'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { useLocationsGet } from '@gusto/embedded-api/react-query/locationsGet'\nimport { useEmployeeAddressesGetWorkAddresses } from '@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses'\nimport { useEmployeeAddressesCreateWorkAddressMutation } from '@gusto/embedded-api/react-query/employeeAddressesCreateWorkAddress'\nimport { useEmployeeAddressesUpdateWorkAddressMutation } from '@gusto/embedded-api/react-query/employeeAddressesUpdateWorkAddress'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport {\n createWorkAddressSchema,\n type WorkAddressOptionalFieldsToRequire,\n type WorkAddressFormData,\n type WorkAddressFormOutputs,\n} from './workAddressSchema'\nimport { LocationField, EffectiveDateField } from './fields'\nimport { useDeriveFieldsMetadata } from '@/partner-hook-utils/form/useDeriveFieldsMetadata'\nimport { createGetFormSubmissionValues } from '@/partner-hook-utils/form/getFormSubmissionValues'\nimport { withOptions } from '@/partner-hook-utils/form/withOptions'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport type {\n BaseFormHookReady,\n FieldsMetadata,\n HookLoadingResult,\n HookSubmitResult,\n} from '@/partner-hook-utils/types'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { addressInline } from '@/helpers/formattedStrings'\n\nexport type { WorkAddressOptionalFieldsToRequire } from './workAddressSchema'\n\nexport interface WorkAddressSubmitCallbacks {\n onWorkAddressCreated?: (workAddress: EmployeeWorkAddress) => void\n onWorkAddressUpdated?: (workAddress: EmployeeWorkAddress) => void\n}\n\nexport interface WorkAddressSubmitOptions {\n employeeId?: string\n effectiveDate?: string\n}\n\nexport interface UseWorkAddressFormProps {\n companyId: string\n employeeId?: string\n withEffectiveDateField?: boolean\n optionalFieldsToRequire?: WorkAddressOptionalFieldsToRequire\n defaultValues?: Partial<WorkAddressFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nexport interface WorkAddressFields {\n Location: typeof LocationField\n EffectiveDate: typeof EffectiveDateField | undefined\n}\n\nexport interface UseWorkAddressFormReady extends BaseFormHookReady<\n FieldsMetadata,\n WorkAddressFormData,\n WorkAddressFields\n> {\n data: {\n workAddress: EmployeeWorkAddress | null\n workAddresses: EmployeeWorkAddress[] | undefined\n companyLocations: Location[] | undefined\n }\n status: { isPending: boolean; mode: 'create' | 'update' }\n actions: {\n onSubmit: (\n callbacks?: WorkAddressSubmitCallbacks,\n options?: WorkAddressSubmitOptions,\n ) => Promise<HookSubmitResult<EmployeeWorkAddress> | undefined>\n }\n}\n\nexport function useWorkAddressForm({\n companyId,\n employeeId,\n withEffectiveDateField = true,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseWorkAddressFormProps): HookLoadingResult | UseWorkAddressFormReady {\n const locationsQuery = useLocationsGet({ companyId })\n const workAddressesQuery = useEmployeeAddressesGetWorkAddresses(\n { employeeId: employeeId ?? '' },\n { enabled: !!employeeId },\n )\n\n const companyLocations = locationsQuery.data?.companyLocationsList\n const workAddresses = workAddressesQuery.data?.employeeWorkAddressesList\n const currentWorkAddress = workAddresses?.find(address => address.active)\n\n const isCreateMode = !currentWorkAddress\n const mode = isCreateMode ? 'create' : 'update'\n\n const [schema, metadataConfig] = useMemo(\n () => createWorkAddressSchema({ mode, optionalFieldsToRequire, withEffectiveDateField }),\n [mode, optionalFieldsToRequire, withEffectiveDateField],\n )\n\n const resolvedDefaults: WorkAddressFormData = {\n locationUuid: currentWorkAddress?.locationUuid ?? partnerDefaults?.locationUuid ?? '',\n effectiveDate: currentWorkAddress?.effectiveDate ?? partnerDefaults?.effectiveDate ?? '',\n }\n\n const formMethods = useForm<WorkAddressFormData, unknown, WorkAddressFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const createWorkAddressMutation = useEmployeeAddressesCreateWorkAddressMutation()\n const updateWorkAddressMutation = useEmployeeAddressesUpdateWorkAddressMutation()\n\n const isPending = createWorkAddressMutation.isPending || updateWorkAddressMutation.isPending\n\n const {\n baseSubmitHandler,\n error: submitError,\n setError: setSubmitError,\n } = useBaseSubmit('WorkAddressForm')\n\n const queries = employeeId ? [locationsQuery, workAddressesQuery] : [locationsQuery]\n const errorHandling = composeErrorHandler(queries, { submitError, setSubmitError })\n\n const locationOptions = (companyLocations ?? []).map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))\n\n const baseMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n const fieldsMetadata = {\n locationUuid: withOptions<Location>(\n baseMetadata.locationUuid,\n locationOptions,\n companyLocations ?? [],\n ),\n effectiveDate: baseMetadata.effectiveDate,\n }\n\n const onSubmit = async (\n callbacks?: WorkAddressSubmitCallbacks,\n options?: WorkAddressSubmitOptions,\n ): Promise<HookSubmitResult<EmployeeWorkAddress> | undefined> => {\n let submitResult: HookSubmitResult<EmployeeWorkAddress> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: WorkAddressFormOutputs) => {\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 work address')\n }\n\n const resolvedEffectiveDate =\n withEffectiveDateField && payload.effectiveDate\n ? payload.effectiveDate\n : options?.effectiveDate\n\n const effectiveDateParam = resolvedEffectiveDate\n ? new RFCDate(new Date(resolvedEffectiveDate))\n : undefined\n\n let updatedWorkAddress: EmployeeWorkAddress\n\n if (isCreateMode) {\n const result = await createWorkAddressMutation.mutateAsync({\n request: {\n employeeId: resolvedEmployeeId,\n requestBody: {\n locationUuid: payload.locationUuid,\n effectiveDate: effectiveDateParam,\n },\n },\n })\n\n if (!result.employeeWorkAddress) {\n throw new SDKInternalError('Work address creation failed')\n }\n\n updatedWorkAddress = result.employeeWorkAddress\n callbacks?.onWorkAddressCreated?.(updatedWorkAddress)\n } else {\n const result = await updateWorkAddressMutation.mutateAsync({\n request: {\n workAddressUuid: currentWorkAddress.uuid,\n requestBody: {\n version: currentWorkAddress.version,\n locationUuid: payload.locationUuid,\n effectiveDate: effectiveDateParam,\n },\n },\n })\n\n if (!result.employeeWorkAddress) {\n throw new SDKInternalError('Work address update failed')\n }\n\n updatedWorkAddress = result.employeeWorkAddress\n callbacks?.onWorkAddressUpdated?.(updatedWorkAddress)\n }\n\n submitResult = {\n mode: isCreateMode ? 'create' : 'update',\n data: updatedWorkAddress,\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading =\n locationsQuery.isLoading || (employeeId ? workAddressesQuery.isLoading : false)\n\n if (isDataLoading || !companyLocations || (employeeId && !workAddresses)) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n workAddress: currentWorkAddress ?? null,\n workAddresses,\n companyLocations,\n },\n status: {\n isPending,\n mode: isCreateMode ? ('create' as const) : ('update' as const),\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n Location: LocationField,\n EffectiveDate: withEffectiveDateField ? EffectiveDateField : undefined,\n },\n fieldsMetadata,\n hookFormInternals: { formMethods },\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseWorkAddressFormResult = HookLoadingResult | UseWorkAddressFormReady\nexport type WorkAddressFieldsMetadata = UseWorkAddressFormReady['form']['fieldsMetadata']\nexport type WorkAddressFormFields = UseWorkAddressFormReady['form']['Fields']\n"],"names":["useWorkAddressForm","companyId","employeeId","withEffectiveDateField","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","locationsQuery","useLocationsGet","workAddressesQuery","useEmployeeAddressesGetWorkAddresses","companyLocations","workAddresses","currentWorkAddress","address","isCreateMode","mode","schema","metadataConfig","useMemo","createWorkAddressSchema","resolvedDefaults","formMethods","useForm","zodResolver","createWorkAddressMutation","useEmployeeAddressesCreateWorkAddressMutation","updateWorkAddressMutation","useEmployeeAddressesUpdateWorkAddressMutation","isPending","baseSubmitHandler","submitError","setSubmitError","useBaseSubmit","errorHandling","composeErrorHandler","locationOptions","location","addressInline","baseMetadata","useDeriveFieldsMetadata","fieldsMetadata","withOptions","onSubmit","callbacks","options","submitResult","resolve","data","payload","resolvedEmployeeId","SDKInternalError","resolvedEffectiveDate","effectiveDateParam","RFCDate","updatedWorkAddress","result","LocationField","EffectiveDateField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;AA8EO,SAASA,GAAmB;AAAA,EACjC,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,wBAAAC,IAAyB;AAAA,EACzB,yBAAAC;AAAA,EACA,eAAeC;AAAA,EACf,gBAAAC,IAAiB;AAAA,EACjB,kBAAAC,IAAmB;AACrB,GAAyE;AACvE,QAAMC,IAAiBC,EAAgB,EAAE,WAAAR,GAAW,GAC9CS,IAAqBC;AAAA,IACzB,EAAE,YAAYT,KAAc,GAAA;AAAA,IAC5B,EAAE,SAAS,CAAC,CAACA,EAAA;AAAA,EAAW,GAGpBU,IAAmBJ,EAAe,MAAM,sBACxCK,IAAgBH,EAAmB,MAAM,2BACzCI,IAAqBD,GAAe,KAAK,CAAAE,MAAWA,EAAQ,MAAM,GAElEC,IAAe,CAACF,GAChBG,IAAOD,IAAe,WAAW,UAEjC,CAACE,GAAQC,CAAc,IAAIC;AAAA,IAC/B,MAAMC,EAAwB,EAAE,MAAAJ,GAAM,yBAAAb,GAAyB,wBAAAD,GAAwB;AAAA,IACvF,CAACc,GAAMb,GAAyBD,CAAsB;AAAA,EAAA,GAGlDmB,IAAwC;AAAA,IAC5C,cAAcR,GAAoB,gBAAgBT,GAAiB,gBAAgB;AAAA,IACnF,eAAeS,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,QAAQ;AAAA,MACN,WAAAkB;AAAA,MACA,MAAMd,IAAgB,WAAsB;AAAA,IAAA;AAAA,IAE9C,SAAS,EAAE,UAAA4B,EAAA;AAAA,IACX,eAAAT;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,UAAUuB;AAAA,QACV,eAAevD,IAAyBwD,IAAqB;AAAA,MAAA;AAAA,MAE/D,gBAAAjB;AAAA,MACA,mBAAmB,EAAE,aAAAnB,EAAA;AAAA,MACrB,yBAAyBqC,EAA8BrC,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { OptionalFieldsToRequire } from '../../form/buildFormSchema';
2
+ import { OptionalFieldsToRequire } from '../../../../../partner-hook-utils/form/buildFormSchema';
3
3
  export declare const WorkAddressErrorCodes: {
4
4
  readonly REQUIRED: "REQUIRED";
5
5
  };
@@ -13,16 +13,14 @@ export type WorkAddressFormData = {
13
13
  [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
14
14
  };
15
15
  export type WorkAddressFormOutputs = WorkAddressFormData;
16
- declare const requiredFieldsConfig: {
17
- effectiveDate: "never";
18
- };
16
+ declare const requiredFieldsConfig: {};
19
17
  export type WorkAddressOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
20
18
  interface WorkAddressSchemaOptions {
21
19
  mode?: 'create' | 'update';
22
20
  optionalFieldsToRequire?: WorkAddressOptionalFieldsToRequire;
23
21
  withEffectiveDateField?: boolean;
24
22
  }
25
- export declare function createWorkAddressSchema(options?: WorkAddressSchemaOptions): import('../../form').BuildFormSchemaResult<{
23
+ export declare function createWorkAddressSchema(options?: WorkAddressSchemaOptions): import('../../../../../partner-hook-utils/form/buildFormSchema').BuildFormSchemaResult<{
26
24
  locationUuid: z.ZodString;
27
25
  effectiveDate: z.ZodISODate;
28
26
  }>;
@@ -1,25 +1,23 @@
1
1
  import { z as r } from "zod";
2
- import { buildFormSchema as s } from "../../form/buildFormSchema.js";
2
+ import { buildFormSchema as s } from "../../../../../partner-hook-utils/form/buildFormSchema.js";
3
3
  const e = {
4
4
  REQUIRED: "REQUIRED"
5
5
  }, c = {
6
6
  locationUuid: r.string().min(1, { message: e.REQUIRED }),
7
7
  effectiveDate: r.iso.date({ error: () => e.REQUIRED })
8
- }, a = {
9
- effectiveDate: "never"
10
- };
11
- function E(o = {}) {
12
- const { mode: t = "create", optionalFieldsToRequire: i, withEffectiveDateField: d = !0 } = o;
8
+ }, a = {};
9
+ function f(o = {}) {
10
+ const { mode: i = "create", optionalFieldsToRequire: t, withEffectiveDateField: d = !0 } = o;
13
11
  return s(c, {
14
12
  requiredFieldsConfig: a,
15
13
  requiredErrorCode: e.REQUIRED,
16
- mode: t,
17
- optionalFieldsToRequire: i,
14
+ mode: i,
15
+ optionalFieldsToRequire: t,
18
16
  excludeFields: d ? [] : ["effectiveDate"]
19
17
  });
20
18
  }
21
19
  export {
22
20
  e as WorkAddressErrorCodes,
23
- E as createWorkAddressSchema
21
+ f as createWorkAddressSchema
24
22
  };
25
23
  //# sourceMappingURL=workAddressSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workAddressSchema.js","sources":["../../../../../../src/components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '@/partner-hook-utils/form/buildFormSchema'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const WorkAddressErrorCodes = {\n REQUIRED: 'REQUIRED',\n} as const\n\nexport type WorkAddressErrorCode =\n (typeof WorkAddressErrorCodes)[keyof typeof WorkAddressErrorCodes]\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst fieldValidators = {\n locationUuid: z.string().min(1, { message: WorkAddressErrorCodes.REQUIRED }),\n effectiveDate: z.iso.date({ error: () => WorkAddressErrorCodes.REQUIRED }),\n}\n\nexport type WorkAddressField = keyof typeof fieldValidators\n\nexport type WorkAddressFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type WorkAddressFormOutputs = WorkAddressFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\nconst requiredFieldsConfig = {} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\nexport type WorkAddressOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\ninterface WorkAddressSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: WorkAddressOptionalFieldsToRequire\n withEffectiveDateField?: boolean\n}\n\nexport function createWorkAddressSchema(options: WorkAddressSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire, withEffectiveDateField = true } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: WorkAddressErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields: withEffectiveDateField ? [] : ['effectiveDate'],\n })\n}\n"],"names":["WorkAddressErrorCodes","fieldValidators","z","requiredFieldsConfig","createWorkAddressSchema","options","mode","optionalFieldsToRequire","withEffectiveDateField","buildFormSchema"],"mappings":";;AASO,MAAMA,IAAwB;AAAA,EACnC,UAAU;AACZ,GAOMC,IAAkB;AAAA,EACtB,cAAcC,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,SAASF,EAAsB,UAAU;AAAA,EAC3E,eAAeE,EAAE,IAAI,KAAK,EAAE,OAAO,MAAMF,EAAsB,SAAA,CAAU;AAC3E,GAWMG,IAAuB,CAAA;AActB,SAASC,EAAwBC,IAAoC,IAAI;AAC9E,QAAM,EAAE,MAAAC,IAAO,UAAU,yBAAAC,GAAyB,wBAAAC,IAAyB,OAASH;AAEpF,SAAOI,EAAgBR,GAAiB;AAAA,IACtC,sBAAAE;AAAA,IACA,mBAAmBH,EAAsB;AAAA,IACzC,MAAAM;AAAA,IACA,yBAAAC;AAAA,IACA,eAAeC,IAAyB,CAAA,IAAK,CAAC,eAAe;AAAA,EAAA,CAC9D;AACH;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
- import { useStateTaxes as r } from "./useStateTaxes.js";
4
- import "../../../shared/constants.js";
5
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
3
+ import { useStateTaxes as s } from "./useStateTaxes.js";
4
+ import { ActionsLayout as r } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function d() {
8
- const { t: o } = i("Employee.StateTaxes"), { isPending: n } = r(), e = m();
9
- return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(e.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
6
+ function x() {
7
+ const { t: o } = i("Employee.StateTaxes"), { isPending: n } = s(), e = m();
8
+ return /* @__PURE__ */ t(r, { children: /* @__PURE__ */ t(e.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
10
9
  }
11
10
  export {
12
- d as Actions
11
+ x as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/StateTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxes } from './useStateTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.StateTaxes')\n const { isPending } = useStateTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useStateTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/StateTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxes } from './useStateTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.StateTaxes')\n const { isPending } = useStateTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useStateTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { useTaxes as r } from "./useTaxes.js";
4
- import "../../../shared/constants.js";
5
- import { ActionsLayout as e } from "../../Common/ActionsLayout/ActionsLayout.js";
2
+ import { useTranslation as e } from "react-i18next";
3
+ import { useTaxes as i } from "./useTaxes.js";
4
+ import { ActionsLayout as r } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const d = () => {
8
- const { t } = i("Employee.Taxes"), { isPending: n } = r(), s = m();
9
- return /* @__PURE__ */ o(e, { children: /* @__PURE__ */ o(s.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
6
+ const x = () => {
7
+ const { t } = e("Employee.Taxes"), { isPending: n } = i(), s = m();
8
+ return /* @__PURE__ */ o(r, { children: /* @__PURE__ */ o(s.Button, { type: "submit", isLoading: n, children: t("submitCta") }) });
10
9
  };
11
10
  export {
12
- d as Actions
11
+ x as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Taxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useTaxes } from './useTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Taxes')\n const { isPending } = useTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,gBAAgB,GACvC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Taxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useTaxes } from './useTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Employee.Taxes')\n const { isPending } = useTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,gBAAgB,GACvC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,WAAW,GAChB,GACF;AAEJ;"}
@@ -1,7 +1,6 @@
1
1
  import { jsxs as l, Fragment as a, jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as s, Trans as m } from "react-i18next";
3
3
  import { z as t } from "zod";
4
- import "../../../shared/constants.js";
5
4
  import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
5
  import { SelectField as d } from "../../Common/Fields/SelectField/SelectField.js";
7
6
  import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
@@ -13,8 +12,8 @@ const c = t.object({
13
12
  otherIncome: t.number().transform(String),
14
13
  deductions: t.number().transform(String),
15
14
  extraWithholding: t.number().transform(String)
16
- }), q = c;
17
- function I() {
15
+ }), R = c;
16
+ function q() {
18
17
  const { t: e } = s("Employee.Taxes"), o = u(), n = [
19
18
  { value: "Single", label: e("filingStatusSingle") },
20
19
  { value: "Married", label: e("filingStatusMarried") },
@@ -103,7 +102,7 @@ function I() {
103
102
  ] });
104
103
  }
105
104
  export {
106
- I as FederalForm,
107
- q as FederalFormSchema
105
+ q as FederalForm,
106
+ R as FederalFormSchema
108
107
  };
109
108
  //# sourceMappingURL=FederalForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/Taxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { NumberInputField, RadioGroupField, SelectField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n})\n\nexport const FederalFormSchema = Rev2020Schema\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.Taxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Components.Text>\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n </Components.Text>\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","FederalFormSchema","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;;AAKA,MAAMA,IAAgBC,EAAE,OAAO;AAAA,EAC7B,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,EACvC,kBAAkBA,EAAE,OAAA,EAAS,UAAU,MAAM;AAC/C,CAAC,GAEYC,IAAoBF;AAK1B,SAASG,IAAc;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gBAAgB,GACvCC,IAAaC,EAAA,GAEbC,IAAsB;AAAA,IAC1B,EAAE,OAAO,UAAU,OAAOJ,EAAE,oBAAoB,EAAA;AAAA,IAChD,EAAE,OAAO,WAAW,OAAOA,EAAE,qBAAqB,EAAA;AAAA,IAClD,EAAE,OAAO,qBAAqB,OAAOA,EAAE,6BAA6B,EAAA;AAAA,IACpE,EAAE,OAAO,2BAA2B,OAAOA,EAAE,mCAAmC,EAAA;AAAA,EAAE;AAGpF,SACE,gBA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AAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,YAAY;AAAA,QACrB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,kBAAkB;AAAA,QAC3B,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
1
+ {"version":3,"file":"FederalForm.js","sources":["../../../../src/components/Employee/Taxes/FederalForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { NumberInputField, RadioGroupField, SelectField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst Rev2020Schema = z.object({\n filingStatus: z.string().min(1),\n twoJobs: z.string().min(1),\n dependentsAmount: z.number().transform(String),\n otherIncome: z.number().transform(String),\n deductions: z.number().transform(String),\n extraWithholding: z.number().transform(String),\n})\n\nexport const FederalFormSchema = Rev2020Schema\n\nexport type FederalFormInputs = z.input<typeof FederalFormSchema>\nexport type FederalFormPayload = z.output<typeof FederalFormSchema>\n\nexport function FederalForm() {\n const { t } = useTranslation('Employee.Taxes')\n const Components = useComponentContext()\n\n const filingStatusOptions = [\n { value: 'Single', label: t('filingStatusSingle') },\n { value: 'Married', label: t('filingStatusMarried') },\n { value: 'Head of Household', label: t('filingStatusHeadOfHousehold') },\n { value: 'Exempt from withholding', label: t('filingStatusExemptFromWithholding') },\n ]\n\n return (\n <>\n <SelectField\n name=\"filingStatus\"\n label={t('federalFilingStatus1c')}\n placeholder={t('federalFilingStatusPlaceholder')}\n options={filingStatusOptions}\n isRequired\n errorMessage={t('validations.federalFilingStatus')}\n />\n <RadioGroupField\n name=\"twoJobs\"\n isRequired\n label={t('multipleJobs2c')}\n errorMessage={t('validations.federalTwoJobs')}\n description={\n <Components.Text>\n <Trans\n i18nKey={'includesSpouseExplanation'}\n t={t}\n components={{\n IrsLink: <Components.Link />,\n }}\n />\n </Components.Text>\n }\n options={[\n { value: 'true', label: t('twoJobYesLabel') },\n { value: 'false', label: t('twoJobNoLabel') },\n ]}\n />\n <NumberInputField\n name=\"dependentsAmount\"\n isRequired\n label={t('dependentsTotalIfApplicable')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"otherIncome\"\n isRequired\n label={t('otherIncome')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"deductions\"\n isRequired\n label={t('deductions')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n <NumberInputField\n name=\"extraWithholding\"\n isRequired\n label={t('extraWithholding')}\n format=\"currency\"\n min={0}\n errorMessage={t('fieldIsRequired')}\n />\n </>\n )\n}\n"],"names":["Rev2020Schema","z","FederalFormSchema","FederalForm","t","useTranslation","Components","useComponentContext","filingStatusOptions","jsxs","Fragment","jsx","SelectField","RadioGroupField","Trans","NumberInputField"],"mappings":";;;;;;;AAKA,MAAMA,IAAgBC,EAAE,OAAO;AAAA,EAC7B,cAAcA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC9B,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,kBAAkBA,EAAE,SAAS,UAAU,MAAM;AAAA,EAC7C,aAAaA,EAAE,SAAS,UAAU,MAAM;AAAA,EACxC,YAAYA,EAAE,SAAS,UAAU,MAAM;AAAA,EACvC,kBAAkBA,EAAE,OAAA,EAAS,UAAU,MAAM;AAC/C,CAAC,GAEYC,IAAoBF;AAK1B,SAASG,IAAc;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gBAAgB,GACvCC,IAAaC,EAAA,GAEbC,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ACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,aAAa;AAAA,QACtB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,YAAY;AAAA,QACrB,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnC,gBAAAO;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOX,EAAE,kBAAkB;AAAA,QAC3B,QAAO;AAAA,QACP,KAAK;AAAA,QACL,cAAcA,EAAE,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnC,GACF;AAEJ;"}
@@ -22,17 +22,17 @@ const K = ({ employeeId: e, companyId: f, dictionary: D }) => {
22
22
  V("Employee.Terminations.TerminateEmployee", D), z("Employee.Terminations.TerminateEmployee");
23
23
  const c = S(), { onEvent: i, baseSubmitHandler: C } = Q(), {
24
24
  data: { employee: u }
25
- } = Y({ employeeId: e }), { data: r } = q({ employeeId: e });
25
+ } = Y({ employeeId: e }), { data: r } = q({ employeeId: e }), { mutateAsync: O, isPending: A } = b(), { mutateAsync: L, isPending: h } = B(), { mutateAsync: N, isPending: M } = G(), { refetch: _ } = k(
26
+ { companyId: f },
27
+ { enabled: !1 }
28
+ );
26
29
  if (u?.terminated && r.terminationList?.[0])
27
30
  return i(n.EMPLOYEE_TERMINATION_VIEW_SUMMARY, {
28
31
  employeeId: e,
29
32
  effectiveDate: r.terminationList[0].effectiveDate,
30
33
  termination: r.terminationList[0]
31
34
  }), null;
32
- const { mutateAsync: O, isPending: A } = b(), { mutateAsync: L, isPending: h } = B(), { mutateAsync: N, isPending: M } = G(), { refetch: _ } = k(
33
- { companyId: f },
34
- { enabled: !1 }
35
- ), R = J({
35
+ const R = J({
36
36
  first_name: u?.firstName,
37
37
  last_name: u?.lastName
38
38
  }), s = r.terminationList?.[0];
@@ -1 +1 @@
1
- {"version":3,"file":"TerminateEmployee.js","sources":["../../../../../src/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.tsx"],"sourcesContent":["import { useQueryClient } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeeEmploymentsGetTerminationsSuspense,\n invalidateAllEmployeeEmploymentsGetTerminations,\n} from '@gusto/embedded-api/react-query/employeeEmploymentsGetTerminations'\nimport { useEmployeeEmploymentsCreateTerminationMutation } from '@gusto/embedded-api/react-query/employeeEmploymentsCreateTermination'\nimport { useEmployeeEmploymentsUpdateTerminationMutation } from '@gusto/embedded-api/react-query/employeeEmploymentsUpdateTermination'\nimport { usePayrollsCreateOffCycleMutation } from '@gusto/embedded-api/react-query/payrollsCreateOffCycle'\nimport {\n usePaySchedulesGetUnprocessedTerminationPeriods,\n invalidateAllPaySchedulesGetUnprocessedTerminationPeriods,\n} from '@gusto/embedded-api/react-query/paySchedulesGetUnprocessedTerminationPeriods'\nimport { invalidateAllPayrollsList } from '@gusto/embedded-api/react-query/payrollsList'\nimport { OffCycleReason } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport type { PayrollOption } from '../types'\nimport { TerminateEmployeePresentation } from './TerminateEmployeePresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\nexport interface TerminateEmployeeProps extends BaseComponentInterface<'Employee.Terminations.TerminateEmployee'> {\n employeeId: string\n companyId: string\n}\n\nexport interface TerminateEmployeeFormData {\n lastDayOfWork: Date\n payrollOption: PayrollOption\n}\n\nexport function TerminateEmployee(props: TerminateEmployeeProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, dictionary }: TerminateEmployeeProps) => {\n useComponentDictionary('Employee.Terminations.TerminateEmployee', dictionary)\n useI18n('Employee.Terminations.TerminateEmployee')\n\n const queryClient = useQueryClient()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n const { data: terminationsData } = useEmployeeEmploymentsGetTerminationsSuspense({ employeeId })\n\n // If employee is already terminated, redirect to summary with existing termination data\n // Don't pass payrollOption to avoid showing the success alert\n if (employee?.terminated && terminationsData.terminationList?.[0]) {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_VIEW_SUMMARY, {\n employeeId,\n effectiveDate: terminationsData.terminationList[0].effectiveDate!,\n termination: terminationsData.terminationList[0],\n })\n return null\n }\n\n const { mutateAsync: createTermination, isPending: isCreatingTermination } =\n useEmployeeEmploymentsCreateTerminationMutation()\n\n const { mutateAsync: updateTermination, isPending: isUpdatingTermination } =\n useEmployeeEmploymentsUpdateTerminationMutation()\n\n const { mutateAsync: createOffCyclePayroll, isPending: isCreatingPayroll } =\n usePayrollsCreateOffCycleMutation()\n\n const { refetch: fetchTerminationPeriods } = usePaySchedulesGetUnprocessedTerminationPeriods(\n { companyId },\n { enabled: false },\n )\n\n const employeeName = firstLastName({\n first_name: employee?.firstName,\n last_name: employee?.lastName,\n })\n\n const existingTermination = terminationsData.terminationList?.[0]\n\n const handleSubmit = async (formData: TerminateEmployeeFormData) => {\n const { lastDayOfWork, payrollOption } = formData\n const effectiveDate = lastDayOfWork.toISOString().split('T')[0]!\n\n await baseSubmitHandler({ effectiveDate, payrollOption }, async () => {\n const runTerminationPayroll = payrollOption === 'dismissalPayroll'\n\n const result = existingTermination\n ? await updateTermination({\n request: {\n employeeId,\n requestBody: {\n version: existingTermination.version!,\n effectiveDate,\n runTerminationPayroll,\n },\n },\n })\n : await createTermination({\n request: {\n employeeId,\n requestBody: {\n effectiveDate,\n runTerminationPayroll,\n },\n },\n })\n\n await invalidateAllEmployeeEmploymentsGetTerminations(queryClient)\n\n let firstPayrollUuid: string | undefined\n\n if (runTerminationPayroll) {\n try {\n const { data: terminationPeriodsData } = await fetchTerminationPeriods()\n\n const employeePeriods =\n terminationPeriodsData?.unprocessedTerminationPayPeriodList?.filter(\n period => period.employeeUuid === employeeId,\n ) ?? []\n\n const createdPayrolls = []\n\n for (const terminationPeriod of employeePeriods) {\n if (terminationPeriod.startDate && terminationPeriod.endDate) {\n const payrollResult = await createOffCyclePayroll({\n request: {\n companyId,\n requestBody: {\n offCycle: true,\n offCycleReason: OffCycleReason.DismissedEmployee,\n startDate: new RFCDate(terminationPeriod.startDate),\n endDate: new RFCDate(terminationPeriod.endDate),\n employeeUuids: [employeeId],\n checkDate: terminationPeriod.checkDate\n ? new RFCDate(terminationPeriod.checkDate)\n : undefined,\n },\n },\n })\n\n if (payrollResult.payrollUnprocessed) {\n createdPayrolls.push(payrollResult.payrollUnprocessed)\n }\n }\n }\n\n if (createdPayrolls.length > 0) {\n firstPayrollUuid = createdPayrolls[0]?.payrollUuid ?? createdPayrolls[0]?.uuid\n\n await invalidateAllPayrollsList(queryClient)\n await invalidateAllPaySchedulesGetUnprocessedTerminationPeriods(queryClient)\n\n onEvent(componentEvents.EMPLOYEE_TERMINATION_PAYROLL_CREATED, {\n payrolls: createdPayrolls,\n })\n }\n } catch (payrollError) {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_PAYROLL_FAILED, {\n error: payrollError,\n employeeId,\n })\n }\n }\n\n const eventType = existingTermination\n ? componentEvents.EMPLOYEE_TERMINATION_UPDATED\n : componentEvents.EMPLOYEE_TERMINATION_CREATED\n\n onEvent(eventType, {\n termination: result.termination,\n payrollOption,\n runTerminationPayroll,\n })\n\n onEvent(componentEvents.EMPLOYEE_TERMINATION_DONE, {\n employeeId,\n effectiveDate,\n payrollOption,\n payrollUuid: firstPayrollUuid,\n termination: result.termination,\n ...(payrollOption === 'anotherWay' && { manualHandling: true }),\n })\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const isPending = isCreatingTermination || isUpdatingTermination || isCreatingPayroll\n\n return (\n <TerminateEmployeePresentation\n employeeName={employeeName}\n existingTermination={existingTermination}\n onSubmit={handleSubmit}\n onCancel={handleCancel}\n isLoading={isPending}\n />\n )\n}\n"],"names":["TerminateEmployee","props","jsx","BaseComponent","Root","employeeId","companyId","dictionary","useComponentDictionary","useI18n","queryClient","useQueryClient","onEvent","baseSubmitHandler","useBase","employee","useEmployeesGetSuspense","terminationsData","useEmployeeEmploymentsGetTerminationsSuspense","componentEvents","createTermination","isCreatingTermination","useEmployeeEmploymentsCreateTerminationMutation","updateTermination","isUpdatingTermination","useEmployeeEmploymentsUpdateTerminationMutation","createOffCyclePayroll","isCreatingPayroll","usePayrollsCreateOffCycleMutation","fetchTerminationPeriods","usePaySchedulesGetUnprocessedTerminationPeriods","employeeName","firstLastName","existingTermination","TerminateEmployeePresentation","formData","lastDayOfWork","payrollOption","effectiveDate","runTerminationPayroll","result","invalidateAllEmployeeEmploymentsGetTerminations","firstPayrollUuid","terminationPeriodsData","employeePeriods","period","createdPayrolls","terminationPeriod","payrollResult","OffCycleReason","RFCDate","invalidateAllPayrollsList","invalidateAllPaySchedulesGetUnprocessedTerminationPeriods","payrollError","eventType"],"mappings":";;;;;;;;;;;;;;;;;AAmCO,SAASA,GAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC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3BJ,IAAmBI,EAAgB,CAAC,GAAG,eAAeA,EAAgB,CAAC,GAAG,MAE1E,MAAMK,EAA0BzC,CAAW,GAC3C,MAAM0C,EAA0D1C,CAAW,GAE3EE,EAAQO,EAAgB,sCAAsC;AAAA,gBAC5D,UAAU2B;AAAA,cAAA,CACX;AAAA,YAEL,SAASO,GAAc;AACrB,cAAAzC,EAAQO,EAAgB,qCAAqC;AAAA,gBAC3D,OAAOkC;AAAA,gBACP,YAAAhD;AAAA,cAAA,CACD;AAAA,YACH;AAGF,gBAAMiD,IAAYrB,IACdd,EAAgB,+BAChBA,EAAgB;AAEpB,UAAAP,EAAQ0C,GAAW;AAAA,YACjB,aAAad,EAAO;AAAA,YACpB,eAAAH;AAAA,YACA,uBAAAE;AAAA,UAAA,CACD,GAED3B,EAAQO,EAAgB,2BAA2B;AAAA,YACjD,YAAAd;AAAA,YACA,eAAAiC;AAAA,YACA,eAAAD;AAAA,YACA,aAAaK;AAAA,YACb,aAAaF,EAAO;AAAA,YACpB,GAAIH,MAAkB,gBAAgB,EAAE,gBAAgB,GAAA;AAAA,UAAK,CAC9D;AAAA,QACH,CAAC;AAAA,MACH;AAAA,MAaI,UAXiB,MAAM;AACzB,QAAAzB,EAAQO,EAAgB,MAAM;AAAA,MAChC;AAAA,MAUI,WARcE,KAAyBG,KAAyBG;AAAA,IAQrD;AAAA,EAAA;AAGjB;"}
1
+ {"version":3,"file":"TerminateEmployee.js","sources":["../../../../../src/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.tsx"],"sourcesContent":["import { useQueryClient } from '@tanstack/react-query'\nimport { useEmployeesGetSuspense } from '@gusto/embedded-api/react-query/employeesGet'\nimport {\n useEmployeeEmploymentsGetTerminationsSuspense,\n invalidateAllEmployeeEmploymentsGetTerminations,\n} from '@gusto/embedded-api/react-query/employeeEmploymentsGetTerminations'\nimport { useEmployeeEmploymentsCreateTerminationMutation } from '@gusto/embedded-api/react-query/employeeEmploymentsCreateTermination'\nimport { useEmployeeEmploymentsUpdateTerminationMutation } from '@gusto/embedded-api/react-query/employeeEmploymentsUpdateTermination'\nimport { usePayrollsCreateOffCycleMutation } from '@gusto/embedded-api/react-query/payrollsCreateOffCycle'\nimport {\n usePaySchedulesGetUnprocessedTerminationPeriods,\n invalidateAllPaySchedulesGetUnprocessedTerminationPeriods,\n} from '@gusto/embedded-api/react-query/paySchedulesGetUnprocessedTerminationPeriods'\nimport { invalidateAllPayrollsList } from '@gusto/embedded-api/react-query/payrollsList'\nimport { OffCycleReason } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport type { PayrollOption } from '../types'\nimport { TerminateEmployeePresentation } from './TerminateEmployeePresentation'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { firstLastName } from '@/helpers/formattedStrings'\n\nexport interface TerminateEmployeeProps extends BaseComponentInterface<'Employee.Terminations.TerminateEmployee'> {\n employeeId: string\n companyId: string\n}\n\nexport interface TerminateEmployeeFormData {\n lastDayOfWork: Date\n payrollOption: PayrollOption\n}\n\nexport function TerminateEmployee(props: TerminateEmployeeProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ employeeId, companyId, dictionary }: TerminateEmployeeProps) => {\n useComponentDictionary('Employee.Terminations.TerminateEmployee', dictionary)\n useI18n('Employee.Terminations.TerminateEmployee')\n\n const queryClient = useQueryClient()\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { employee },\n } = useEmployeesGetSuspense({ employeeId })\n\n const { data: terminationsData } = useEmployeeEmploymentsGetTerminationsSuspense({ employeeId })\n\n const { mutateAsync: createTermination, isPending: isCreatingTermination } =\n useEmployeeEmploymentsCreateTerminationMutation()\n\n const { mutateAsync: updateTermination, isPending: isUpdatingTermination } =\n useEmployeeEmploymentsUpdateTerminationMutation()\n\n const { mutateAsync: createOffCyclePayroll, isPending: isCreatingPayroll } =\n usePayrollsCreateOffCycleMutation()\n\n const { refetch: fetchTerminationPeriods } = usePaySchedulesGetUnprocessedTerminationPeriods(\n { companyId },\n { enabled: false },\n )\n\n // If employee is already terminated, redirect to summary with existing termination data\n // Don't pass payrollOption to avoid showing the success alert\n if (employee?.terminated && terminationsData.terminationList?.[0]) {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_VIEW_SUMMARY, {\n employeeId,\n effectiveDate: terminationsData.terminationList[0].effectiveDate!,\n termination: terminationsData.terminationList[0],\n })\n return null\n }\n\n const employeeName = firstLastName({\n first_name: employee?.firstName,\n last_name: employee?.lastName,\n })\n\n const existingTermination = terminationsData.terminationList?.[0]\n\n const handleSubmit = async (formData: TerminateEmployeeFormData) => {\n const { lastDayOfWork, payrollOption } = formData\n const effectiveDate = lastDayOfWork.toISOString().split('T')[0]!\n\n await baseSubmitHandler({ effectiveDate, payrollOption }, async () => {\n const runTerminationPayroll = payrollOption === 'dismissalPayroll'\n\n const result = existingTermination\n ? await updateTermination({\n request: {\n employeeId,\n requestBody: {\n version: existingTermination.version!,\n effectiveDate,\n runTerminationPayroll,\n },\n },\n })\n : await createTermination({\n request: {\n employeeId,\n requestBody: {\n effectiveDate,\n runTerminationPayroll,\n },\n },\n })\n\n await invalidateAllEmployeeEmploymentsGetTerminations(queryClient)\n\n let firstPayrollUuid: string | undefined\n\n if (runTerminationPayroll) {\n try {\n const { data: terminationPeriodsData } = await fetchTerminationPeriods()\n\n const employeePeriods =\n terminationPeriodsData?.unprocessedTerminationPayPeriodList?.filter(\n period => period.employeeUuid === employeeId,\n ) ?? []\n\n const createdPayrolls = []\n\n for (const terminationPeriod of employeePeriods) {\n if (terminationPeriod.startDate && terminationPeriod.endDate) {\n const payrollResult = await createOffCyclePayroll({\n request: {\n companyId,\n requestBody: {\n offCycle: true,\n offCycleReason: OffCycleReason.DismissedEmployee,\n startDate: new RFCDate(terminationPeriod.startDate),\n endDate: new RFCDate(terminationPeriod.endDate),\n employeeUuids: [employeeId],\n checkDate: terminationPeriod.checkDate\n ? new RFCDate(terminationPeriod.checkDate)\n : undefined,\n },\n },\n })\n\n if (payrollResult.payrollUnprocessed) {\n createdPayrolls.push(payrollResult.payrollUnprocessed)\n }\n }\n }\n\n if (createdPayrolls.length > 0) {\n firstPayrollUuid = createdPayrolls[0]?.payrollUuid ?? createdPayrolls[0]?.uuid\n\n await invalidateAllPayrollsList(queryClient)\n await invalidateAllPaySchedulesGetUnprocessedTerminationPeriods(queryClient)\n\n onEvent(componentEvents.EMPLOYEE_TERMINATION_PAYROLL_CREATED, {\n payrolls: createdPayrolls,\n })\n }\n } catch (payrollError) {\n onEvent(componentEvents.EMPLOYEE_TERMINATION_PAYROLL_FAILED, {\n error: payrollError,\n employeeId,\n })\n }\n }\n\n const eventType = existingTermination\n ? componentEvents.EMPLOYEE_TERMINATION_UPDATED\n : componentEvents.EMPLOYEE_TERMINATION_CREATED\n\n onEvent(eventType, {\n termination: result.termination,\n payrollOption,\n runTerminationPayroll,\n })\n\n onEvent(componentEvents.EMPLOYEE_TERMINATION_DONE, {\n employeeId,\n effectiveDate,\n payrollOption,\n payrollUuid: firstPayrollUuid,\n termination: result.termination,\n ...(payrollOption === 'anotherWay' && { manualHandling: true }),\n })\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const isPending = isCreatingTermination || isUpdatingTermination || isCreatingPayroll\n\n return (\n <TerminateEmployeePresentation\n employeeName={employeeName}\n existingTermination={existingTermination}\n onSubmit={handleSubmit}\n onCancel={handleCancel}\n isLoading={isPending}\n />\n )\n}\n"],"names":["TerminateEmployee","props","jsx","BaseComponent","Root","employeeId","companyId","dictionary","useComponentDictionary","useI18n","queryClient","useQueryClient","onEvent","baseSubmitHandler","useBase","employee","useEmployeesGetSuspense","terminationsData","useEmployeeEmploymentsGetTerminationsSuspense","createTermination","isCreatingTermination","useEmployeeEmploymentsCreateTerminationMutation","updateTermination","isUpdatingTermination","useEmployeeEmploymentsUpdateTerminationMutation","createOffCyclePayroll","isCreatingPayroll","usePayrollsCreateOffCycleMutation","fetchTerminationPeriods","usePaySchedulesGetUnprocessedTerminationPeriods","componentEvents","employeeName","firstLastName","existingTermination","TerminateEmployeePresentation","formData","lastDayOfWork","payrollOption","effectiveDate","runTerminationPayroll","result","invalidateAllEmployeeEmploymentsGetTerminations","firstPayrollUuid","terminationPeriodsData","employeePeriods","period","createdPayrolls","terminationPeriod","payrollResult","OffCycleReason","RFCDate","invalidateAllPayrollsList","invalidateAllPaySchedulesGetUnprocessedTerminationPeriods","payrollError","eventType"],"mappings":";;;;;;;;;;;;;;;;;AAmCO,SAASA,GAAkBC,GAA+B;AAC/D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,YAAAC,QAAyC;AAC9E,EAAAC,EAAuB,2CAA2CD,CAAU,GAC5EE,EAAQ,yCAAyC;AAEjD,QAAMC,IAAcC,EAAA,GACd,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAAwB,EAAE,YAAAX,GAAY,GAEpC,EAAE,MAAMY,EAAA,IAAqBC,EAA8C,EAAE,YAAAb,GAAY,GAEzF,EAAE,aAAac,GAAmB,WAAWC,EAAA,IACjDC,EAAA,GAEI,EAAE,aAAaC,GAAmB,WAAWC,EAAA,IACjDC,EAAA,GAEI,EAAE,aAAaC,GAAuB,WAAWC,EAAA,IACrDC,EAAA,GAEI,EAAE,SAASC,EAAA,IAA4BC;AAAA,IAC3C,EAAE,WAAAvB,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A,aAAaK;AAAA,YACb,aAAaF,EAAO;AAAA,YACpB,GAAIH,MAAkB,gBAAgB,EAAE,gBAAgB,GAAA;AAAA,UAAK,CAC9D;AAAA,QACH,CAAC;AAAA,MACH;AAAA,MAaI,UAXiB,MAAM;AACzB,QAAAzB,EAAQkB,EAAgB,MAAM;AAAA,MAChC;AAAA,MAUI,WARcV,KAAyBG,KAAyBG;AAAA,IAQrD;AAAA,EAAA;AAGjB;"}
@@ -5,11 +5,11 @@ import { useForm as D, FormProvider as g } from "react-hook-form";
5
5
  import { zodResolver as E } from "@hookform/resolvers/zod";
6
6
  import { Flex as a } from "../../../Common/Flex/Flex.js";
7
7
  import { ActionsLayout as R } from "../../../Common/ActionsLayout/ActionsLayout.js";
8
- import { DatePickerField as x } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
9
- import { Form as F } from "../../../Common/Form/Form.js";
10
- import { useComponentContext as W } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { useI18n as q } from "../../../../i18n/I18n.js";
12
- import { RadioGroupField as T } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
+ import { Form as x } from "../../../Common/Form/Form.js";
9
+ import { useComponentContext as F } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { useI18n as W } from "../../../../i18n/I18n.js";
11
+ import { RadioGroupField as q } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
12
+ import { DatePickerField as T } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
13
13
  const k = t.object({
14
14
  lastDayOfWork: t.date({ error: "validation.lastDayRequired" }),
15
15
  payrollOption: t.enum(["dismissalPayroll", "regularPayroll", "anotherWay"], {
@@ -23,8 +23,8 @@ function I({
23
23
  onCancel: y,
24
24
  isLoading: s
25
25
  }) {
26
- const { Alert: u, Heading: f, Text: p, Button: m } = W();
27
- q("Employee.Terminations.TerminateEmployee");
26
+ const { Alert: u, Heading: f, Text: p, Button: m } = F();
27
+ W("Employee.Terminations.TerminateEmployee");
28
28
  const { t: o } = v("Employee.Terminations.TerminateEmployee"), O = (P) => P.runTerminationPayroll === !0 ? "dismissalPayroll" : "regularPayroll", h = {
29
29
  lastDayOfWork: l?.effectiveDate ? new Date(l.effectiveDate) : void 0,
30
30
  payrollOption: l ? O(l) : "dismissalPayroll"
@@ -48,14 +48,14 @@ function I({
48
48
  description: o("form.payrollOption.options.anotherWay.description")
49
49
  }
50
50
  ];
51
- return /* @__PURE__ */ r(g, { ...i, children: /* @__PURE__ */ r(F, { onSubmit: i.handleSubmit(d), children: /* @__PURE__ */ e(a, { flexDirection: "column", gap: 24, children: [
51
+ return /* @__PURE__ */ r(g, { ...i, children: /* @__PURE__ */ r(x, { onSubmit: i.handleSubmit(d), children: /* @__PURE__ */ e(a, { flexDirection: "column", gap: 24, children: [
52
52
  /* @__PURE__ */ e(a, { flexDirection: "column", gap: 4, children: [
53
53
  /* @__PURE__ */ r(f, { as: "h2", children: o("title", { employeeName: n }) }),
54
54
  /* @__PURE__ */ r(p, { variant: "supporting", children: o("subtitle") })
55
55
  ] }),
56
56
  /* @__PURE__ */ e(a, { flexDirection: "column", gap: 24, children: [
57
57
  /* @__PURE__ */ r(
58
- x,
58
+ T,
59
59
  {
60
60
  name: "lastDayOfWork",
61
61
  label: o("form.lastDayOfEmployment.label"),
@@ -65,7 +65,7 @@ function I({
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ r(
68
- T,
68
+ q,
69
69
  {
70
70
  name: "payrollOption",
71
71
  label: o("form.payrollOption.label"),
@@ -1,4 +1,4 @@
1
- import { BaseComponentInterface, CommonComponentInterface } from '../../Base/Base';
1
+ import { BaseComponentInterface, CommonComponentInterface } from '../../../Base/Base';
2
2
  type EmployeeTab = 'active' | 'onboarding' | 'dismissed';
3
3
  interface ManagementEmployeeListProps extends CommonComponentInterface<'Employee.ManagementEmployeeList'> {
4
4
  companyId: string;