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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/UNSTABLE_Hooks.d.ts +1 -1
  3. package/dist/UNSTABLE_Hooks.js +6 -6
  4. package/dist/components/Base/Base.d.ts +8 -10
  5. package/dist/components/Base/Base.js +121 -100
  6. package/dist/components/Base/Base.js.map +1 -1
  7. package/dist/components/Base/index.d.ts +1 -1
  8. package/dist/components/Base/useBase.d.ts +3 -7
  9. package/dist/components/Base/useBase.js.map +1 -1
  10. package/dist/components/Base/useBaseSubmit.d.ts +3 -5
  11. package/dist/components/Base/useBaseSubmit.js +27 -50
  12. package/dist/components/Base/useBaseSubmit.js.map +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  15. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  16. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
  17. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  18. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +6 -5
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -8
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -4
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -8
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -10
  28. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  29. package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -8
  30. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  31. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -8
  32. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  33. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +6 -8
  34. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  35. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -13
  36. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  37. package/dist/components/Company/Industry/Context.js +9 -11
  38. package/dist/components/Company/Industry/Context.js.map +1 -1
  39. package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
  40. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  41. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -8
  42. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  43. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -8
  44. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  45. package/dist/components/Company/OnboardingOverview/context.js +6 -8
  46. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  47. package/dist/components/Company/PaySchedule/PaySchedule.js +60 -60
  48. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  49. package/dist/components/Company/PaySchedule/_parts/Edit.js +10 -9
  50. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  51. package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -10
  52. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  53. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -8
  54. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  55. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -8
  56. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  57. package/dist/components/Contractor/Address/Form.js +7 -6
  58. package/dist/components/Contractor/Address/Form.js.map +1 -1
  59. package/dist/components/Contractor/Address/useAddress.js +8 -10
  60. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  61. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
  62. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  63. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  64. package/dist/components/Contractor/Profile/useContractorProfile.js +26 -28
  65. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  66. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +13 -15
  67. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  68. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +5 -7
  69. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  70. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +5 -7
  71. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  72. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
  73. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  74. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +6 -8
  75. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  76. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +6 -8
  77. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  78. package/dist/components/Employee/EmployeeList/useEmployeeList.js +6 -8
  79. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  80. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +42 -42
  81. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  82. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +6 -8
  83. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  84. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +8 -10
  85. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  86. package/dist/components/Employee/Profile/HomeAddress.js +9 -8
  87. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  88. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +15 -14
  89. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  90. package/dist/components/Employee/Profile/Profile.js +30 -29
  91. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  92. package/dist/components/Employee/Profile/useProfile.js +6 -8
  93. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  94. package/dist/components/Employee/StateTaxes/StateTaxes.js +50 -50
  95. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  96. package/dist/components/Employee/StateTaxes/useStateTaxes.js +6 -8
  97. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  98. package/dist/components/Employee/Taxes/Taxes.js +53 -53
  99. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  100. package/dist/components/Employee/Taxes/useTaxes.js +6 -8
  101. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  102. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +11 -0
  103. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +123 -0
  104. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -0
  105. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +11 -0
  106. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +92 -0
  107. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -0
  108. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +2 -0
  109. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +30 -0
  110. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -0
  111. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +23 -0
  112. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +72 -0
  113. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -0
  114. package/dist/components/Employee/Terminations/TerminationFlow/index.d.ts +3 -0
  115. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +7 -0
  116. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +165 -0
  117. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -0
  118. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts +1 -0
  119. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +9 -0
  120. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +86 -0
  121. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -0
  122. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +20 -0
  123. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +103 -0
  124. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -0
  125. package/dist/components/Employee/Terminations/TerminationsData.d.ts +6 -0
  126. package/dist/components/Employee/Terminations/index.d.ts +8 -0
  127. package/dist/components/Employee/Terminations/types.d.ts +1 -0
  128. package/dist/components/Employee/index.d.ts +7 -0
  129. package/dist/components/Employee/index.js +34 -28
  130. package/dist/components/Employee/index.js.map +1 -1
  131. package/dist/components/InformationRequests/InformationRequests.js +31 -31
  132. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  133. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +41 -41
  134. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  135. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +2 -0
  136. package/dist/components/Payroll/Dismissal/DismissalFlow.js +32 -0
  137. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -0
  138. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +16 -0
  139. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +52 -0
  140. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -0
  141. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +6 -0
  142. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +69 -0
  143. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -0
  144. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +9 -0
  145. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +53 -0
  146. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -0
  147. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +3 -0
  148. package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +6 -0
  149. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +51 -0
  150. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -0
  151. package/dist/components/Payroll/Dismissal/dismissalStateMachine.test.d.ts +1 -0
  152. package/dist/components/Payroll/Dismissal/index.d.ts +3 -0
  153. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -3
  154. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
  155. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +19 -18
  156. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  157. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +3 -0
  158. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +32 -24
  159. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  160. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +45 -45
  161. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  162. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  163. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +75 -66
  164. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  165. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js +8 -0
  166. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js.map +1 -0
  167. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +0 -1
  168. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
  169. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +2 -2
  170. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
  171. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -0
  172. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +1 -0
  173. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
  174. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +186 -159
  175. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  176. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -3
  177. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +71 -70
  178. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  179. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +3 -2
  180. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +8 -8
  181. package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
  182. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -3
  183. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +76 -70
  184. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  185. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -42
  186. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  187. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +4 -2
  188. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +225 -194
  189. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  190. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
  191. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +12 -0
  192. package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -0
  193. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
  194. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  195. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
  196. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +21 -0
  197. package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -0
  198. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  199. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +95 -64
  200. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  201. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +53 -47
  202. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  203. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +8 -8
  204. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  205. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +25 -23
  206. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  207. package/dist/components/Payroll/PayrollList/PayrollList.js +40 -32
  208. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  209. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
  210. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +110 -93
  211. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  212. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +12 -8
  213. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  214. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
  215. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  216. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +2 -0
  217. package/dist/components/Payroll/Transition/TransitionFlow.js +38 -0
  218. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -0
  219. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +19 -0
  220. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +54 -0
  221. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -0
  222. package/dist/components/Payroll/Transition/index.d.ts +3 -0
  223. package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +6 -0
  224. package/dist/components/Payroll/Transition/transitionStateMachine.js +58 -0
  225. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -0
  226. package/dist/components/Payroll/Transition/transitionStateMachine.test.d.ts +1 -0
  227. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +2 -0
  228. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +92 -0
  229. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -0
  230. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +2 -0
  231. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +111 -0
  232. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -0
  233. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js +8 -0
  234. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js.map +1 -0
  235. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +28 -0
  236. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +21 -0
  237. package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -0
  238. package/dist/components/Payroll/TransitionCreation/index.d.ts +3 -0
  239. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +8 -0
  240. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +83 -0
  241. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -0
  242. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +16 -0
  243. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +100 -0
  244. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -0
  245. package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +2 -0
  246. package/dist/components/Payroll/helpers.d.ts +2 -1
  247. package/dist/components/Payroll/helpers.js +98 -87
  248. package/dist/components/Payroll/helpers.js.map +1 -1
  249. package/dist/components/Payroll/index.d.ts +6 -0
  250. package/dist/components/Payroll/index.js +32 -26
  251. package/dist/components/Payroll/index.js.map +1 -1
  252. package/dist/components/Payroll/payrollTypes.d.ts +21 -0
  253. package/dist/components/Payroll/payrollTypes.js +27 -0
  254. package/dist/components/Payroll/payrollTypes.js.map +1 -0
  255. package/dist/components/Payroll/usePreparedPayrollData.js +5 -7
  256. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  257. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +8 -0
  258. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +13 -0
  259. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -0
  260. package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +10 -0
  261. package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +18 -0
  262. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +3 -0
  263. package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts +1 -0
  264. package/dist/components/UNSTABLE_Hooks/form/index.d.ts +9 -0
  265. package/dist/components/UNSTABLE_Hooks/form/types.d.ts +15 -0
  266. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -0
  267. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +15 -0
  268. package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -0
  269. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +4 -0
  270. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +9 -0
  271. package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
  272. package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +5 -0
  273. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +3 -0
  274. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +16 -0
  275. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +7 -0
  276. package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -0
  277. package/dist/components/UNSTABLE_Hooks/index.d.ts +5 -0
  278. package/dist/components/UNSTABLE_Hooks/types.d.ts +46 -0
  279. package/dist/contexts/ApiProvider/ApiProvider.js +11 -11
  280. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  281. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +43 -47
  282. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  283. package/dist/contexts/ObservabilityProvider/index.d.ts +1 -1
  284. package/dist/contexts/ObservabilityProvider/sanitization.d.ts +0 -14
  285. package/dist/contexts/ObservabilityProvider/sanitization.js +51 -51
  286. package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
  287. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +0 -3
  288. package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -1
  289. package/dist/i18n/I18n.js +11 -11
  290. package/dist/i18n/I18n.js.map +1 -1
  291. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js +18 -0
  292. package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js.map +1 -0
  293. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js +12 -0
  294. package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js.map +1 -0
  295. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js +20 -0
  296. package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js.map +1 -0
  297. package/dist/i18n/en/Payroll.Dismissal.json.js +22 -0
  298. package/dist/i18n/en/Payroll.Dismissal.json.js.map +1 -0
  299. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +15 -11
  300. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  301. package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +1 -1
  302. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +20 -18
  303. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  304. package/dist/i18n/en/Payroll.PayrollList.json.js +20 -18
  305. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  306. package/dist/i18n/en/Payroll.Transition.json.js +8 -0
  307. package/dist/i18n/en/Payroll.Transition.json.js.map +1 -0
  308. package/dist/i18n/en/Payroll.TransitionCreation.json.js +26 -0
  309. package/dist/i18n/en/Payroll.TransitionCreation.json.js.map +1 -0
  310. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +18 -0
  311. package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js.map +1 -0
  312. package/dist/i18n/en/common.json.d.ts +2 -1
  313. package/dist/i18n/en/common.json.js +9 -9
  314. package/dist/index.d.ts +3 -2
  315. package/dist/index.js +14 -13
  316. package/dist/shared/constants.d.ts +32 -0
  317. package/dist/shared/constants.js +83 -65
  318. package/dist/shared/constants.js.map +1 -1
  319. package/dist/style.css +1 -1
  320. package/dist/types/i18next.d.ts +163 -1
  321. package/dist/types/observability.d.ts +31 -65
  322. package/dist/types/sdkError.d.ts +91 -0
  323. package/dist/types/sdkError.js +95 -0
  324. package/dist/types/sdkError.js.map +1 -0
  325. package/dist/types/sdkError.test.d.ts +1 -0
  326. package/docs/reference/endpoint-inventory.json +120 -14
  327. package/package.json +13 -13
  328. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +0 -6
  329. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +0 -70
  330. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +0 -1
  331. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +0 -7
  332. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +0 -6
  333. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +0 -1
  334. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +0 -9
  335. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +0 -40
  336. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +0 -1
  337. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +0 -5
  338. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +0 -2
  339. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +0 -12
  340. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +0 -1
  341. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +0 -2
  342. package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +0 -5
  343. package/dist/contexts/ObservabilityProvider/observabilityUtils.js +0 -45
  344. package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +0 -1
@@ -1,296 +1,327 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import { useForm as K, useWatch as X, FormProvider as Q } from "react-hook-form";
3
- import { useRef as Z, useMemo as J } from "react";
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
+ import { useForm as Z, useWatch as J, FormProvider as ee } from "react-hook-form";
3
+ import { useRef as ne, useMemo as te } from "react";
4
4
  import { PayrollEmployeeCompensationsTypePaymentMethod as S } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype";
5
- import { useTranslation as ee } from "react-i18next";
6
- import { z as m } from "zod";
7
- import { zodResolver as te } from "@hookform/resolvers/zod";
5
+ import { useTranslation as oe } from "react-i18next";
6
+ import { z as s } from "zod";
7
+ import { zodResolver as ie } from "@hookform/resolvers/zod";
8
8
  import u from "./PayrollEditEmployeePresentation.module.scss.js";
9
- import { TimeOffField as ne } from "./TimeOffField.js";
9
+ import { TimeOffField as se } from "./TimeOffField.js";
10
10
  import { Flex as x } from "../../Common/Flex/Flex.js";
11
- import { Grid as P } from "../../Common/Grid/Grid.js";
12
- import { RadioGroupField as re } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
13
- import { TextInputField as oe } from "../../Common/Fields/TextInputField/TextInputField.js";
14
- import { NumberInputField as G } from "../../Common/Fields/NumberInputField/NumberInputField.js";
15
- import { useComponentContext as ie } from "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import { useI18n as se } from "../../../i18n/I18n.js";
17
- import { Form as ae } from "../../Common/Form/Form.js";
18
- import { firstLastName as me, formatNumberAsCurrency as le } from "../../../helpers/formattedStrings.js";
19
- import { getAdditionalEarningsCompensations as de, getReimbursementCompensation as ue, calculateGrossPay as k } from "../helpers.js";
20
- import { HOURS_COMPENSATION_NAMES as w, EXCLUDED_ADDITIONAL_EARNINGS as ce, COMPENSATION_NAME_DOUBLE_OVERTIME as pe, COMPENSATION_NAME_OVERTIME as fe, COMPENSATION_NAME_REGULAR_HOURS as he, COMPENSATION_NAME_REIMBURSEMENT as Ce, COMPENSATION_NAME_CASH_TIPS as Ne, COMPENSATION_NAME_COMMISSION as Ee, COMPENSATION_NAME_CORRECTION_PAYMENT as ge, COMPENSATION_NAME_PAYCHECK_TIPS as be, COMPENSATION_NAME_BONUS as Me } from "../../../shared/constants.js";
11
+ import { Grid as A } from "../../Common/Grid/Grid.js";
12
+ import "classnames";
13
+ import { RadioGroupField as ae } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
14
+ import { TextInputField as G } from "../../Common/Fields/TextInputField/TextInputField.js";
15
+ import { NumberInputField as H } from "../../Common/Fields/NumberInputField/NumberInputField.js";
16
+ import { useComponentContext as re } from "../../../contexts/ComponentAdapter/useComponentContext.js";
17
+ import { useI18n as me } from "../../../i18n/I18n.js";
18
+ import { Form as le } from "../../Common/Form/Form.js";
19
+ import { firstLastName as ue, formatNumberAsCurrency as de } from "../../../helpers/formattedStrings.js";
20
+ import { getAdditionalEarningsCompensations as ce, getReimbursementCompensation as pe, calculateGrossPay as k } from "../helpers.js";
21
+ import { PayrollCategory as w } from "../payrollTypes.js";
22
+ import { HOURS_COMPENSATION_NAMES as $, EXCLUDED_ADDITIONAL_EARNINGS as fe, COMPENSATION_NAME_DOUBLE_OVERTIME as he, COMPENSATION_NAME_OVERTIME as Ce, COMPENSATION_NAME_REGULAR_HOURS as Ne, COMPENSATION_NAME_REIMBURSEMENT as ge, COMPENSATION_NAME_CASH_TIPS as Ee, COMPENSATION_NAME_COMMISSION as be, COMPENSATION_NAME_CORRECTION_PAYMENT as ye, COMPENSATION_NAME_PAYCHECK_TIPS as Me, COMPENSATION_NAME_BONUS as Pe } from "../../../shared/constants.js";
21
23
  import Oe from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
22
- const Te = m.object({
23
- hourlyCompensations: m.record(m.string(), m.record(m.string(), m.string().optional())),
24
- timeOffCompensations: m.record(m.string(), m.string().optional()),
25
- fixedCompensations: m.record(m.string(), m.number().optional()),
26
- paymentMethod: m.enum(S).optional()
27
- }), H = (E, y, l, i) => {
28
- const g = {
29
- ...y,
30
- paymentMethod: E.paymentMethod
24
+ const Te = s.object({
25
+ hourlyCompensations: s.record(s.string(), s.record(s.string(), s.string().optional())),
26
+ timeOffCompensations: s.record(s.string(), s.string().optional()),
27
+ finalPayoutCompensations: s.record(s.string(), s.string().optional()),
28
+ fixedCompensations: s.record(s.string(), s.number().optional()),
29
+ paymentMethod: s.enum(S).optional()
30
+ }), q = (N, T, d, a) => {
31
+ const y = {
32
+ ...T,
33
+ paymentMethod: N.paymentMethod
31
34
  };
32
- g.hourlyCompensations = y?.hourlyCompensations?.map(
33
- (o) => {
34
- const d = o.jobUuid && o.name ? E.hourlyCompensations[o.jobUuid]?.[o.name] : void 0;
35
- return d ? {
36
- ...o,
37
- hours: d
38
- } : o;
35
+ y.hourlyCompensations = T?.hourlyCompensations?.map(
36
+ (i) => {
37
+ const m = i.jobUuid && i.name ? N.hourlyCompensations[i.jobUuid]?.[i.name] : void 0;
38
+ return m ? {
39
+ ...i,
40
+ hours: m
41
+ } : i;
39
42
  }
40
- ), g.paidTimeOff = l.map((o) => ({
41
- ...o,
42
- hours: E.timeOffCompensations[o.name]
43
- }));
44
- const b = [];
45
- return Object.entries(E.fixedCompensations).forEach(([o, d]) => {
46
- const C = y?.fixedCompensations?.find(
47
- (M) => M.name?.toLowerCase() === o.toLowerCase()
43
+ ), y.paidTimeOff = d.map((i) => {
44
+ const m = N.finalPayoutCompensations[i.name] ?? i.finalPayoutUnusedHoursInput;
45
+ return {
46
+ ...i,
47
+ hours: N.timeOffCompensations[i.name],
48
+ ...m != null ? { finalPayoutUnusedHoursInput: m } : {}
49
+ };
50
+ });
51
+ const M = [];
52
+ return Object.entries(N.fixedCompensations).forEach(([i, m]) => {
53
+ const h = T?.fixedCompensations?.find(
54
+ (P) => P.name?.toLowerCase() === i.toLowerCase()
48
55
  );
49
- if (d !== void 0) {
50
- const M = d.toString();
51
- C ? b.push({
52
- name: C.name,
53
- jobUuid: C.jobUuid,
54
- amount: M
55
- }) : d !== 0 && b.push({
56
- name: o,
57
- jobUuid: i,
58
- amount: M
56
+ if (m !== void 0) {
57
+ const P = m.toString();
58
+ h ? M.push({
59
+ name: h.name,
60
+ jobUuid: h.jobUuid,
61
+ amount: P
62
+ }) : m !== 0 && M.push({
63
+ name: i,
64
+ jobUuid: a,
65
+ amount: P
59
66
  });
60
67
  }
61
- }), g.fixedCompensations = b, g;
62
- }, ze = ({
63
- onSave: E,
64
- onCancel: y,
65
- employee: l,
66
- employeeCompensation: i,
67
- isPending: g = !1,
68
- fixedCompensationTypes: b,
69
- payPeriodStartDate: o,
70
- paySchedule: d,
71
- isOffCycle: C = !1,
72
- withReimbursements: M = !0,
73
- hasDirectDepositSetup: $ = !0
68
+ }), y.fixedCompensations = M, y;
69
+ }, Xe = ({
70
+ onSave: N,
71
+ onCancel: T,
72
+ employee: d,
73
+ employeeCompensation: a,
74
+ isPending: y = !1,
75
+ fixedCompensationTypes: M,
76
+ payPeriodStartDate: i,
77
+ paySchedule: m,
78
+ payrollCategory: h = w.Regular,
79
+ withReimbursements: P = !0,
80
+ hasDirectDepositSetup: B = !0
74
81
  }) => {
75
- const { Button: v, Heading: c, Text: B } = ie(), { t } = ee("Payroll.PayrollEditEmployee");
76
- se("Payroll.PayrollEditEmployee");
77
- const f = l.jobs?.find((e) => e.primary), O = f ? [f] : [], F = Z(null), p = Oe({
78
- ref: F
82
+ const { Button: v, Heading: c, Text: V } = re(), { t } = oe("Payroll.PayrollEditEmployee");
83
+ me("Payroll.PayrollEditEmployee");
84
+ const p = d.jobs?.find((e) => e.primary), z = a?.hourlyCompensations?.some(
85
+ (e) => e.jobUuid === p?.uuid
86
+ ), O = p && z ? [p] : [], R = ne(null), f = Oe({
87
+ ref: R
79
88
  }).includes("small");
80
- i?.hourlyCompensations?.forEach((e) => {
81
- const n = l.jobs?.find((s) => s.uuid === e.jobUuid);
82
- n && !O.find((s) => s.uuid === n.uuid) && O.push(n);
89
+ a?.hourlyCompensations?.forEach((e) => {
90
+ const n = d.jobs?.find((l) => l.uuid === e.jobUuid);
91
+ n && !O.find((l) => l.uuid === n.uuid) && O.push(n);
83
92
  });
84
- const A = (i?.paidTimeOff || []).filter((e) => e.name), _ = de({
85
- flsaStatus: f?.compensations?.[0]?.flsaStatus,
86
- existingFixedCompensations: i?.fixedCompensations || [],
87
- primaryJobUuid: f?.uuid,
88
- fixedCompensationTypes: b,
89
- excludedTypes: ce
90
- }), N = M ? ue(
91
- i?.fixedCompensations || [],
92
- b,
93
- f?.uuid
94
- ) : null, R = (e, n) => i?.hourlyCompensations?.find(
95
- (s) => s.jobUuid === e && s.name?.toLowerCase() === n.toLowerCase()
96
- ), q = (e) => {
93
+ const g = (a?.paidTimeOff || []).filter((e) => e.name), _ = ce({
94
+ flsaStatus: p?.compensations?.[0]?.flsaStatus,
95
+ existingFixedCompensations: a?.fixedCompensations || [],
96
+ primaryJobUuid: p?.uuid,
97
+ fixedCompensationTypes: M,
98
+ excludedTypes: fe
99
+ }), E = P ? pe(
100
+ a?.fixedCompensations || [],
101
+ M,
102
+ p?.uuid
103
+ ) : null, U = (e, n) => a?.hourlyCompensations?.find(
104
+ (l) => l.jobUuid === e && l.name?.toLowerCase() === n.toLowerCase()
105
+ ), W = (e) => {
97
106
  switch (e) {
98
- case he:
107
+ case Ne:
99
108
  return t("compensationNames.regularHours");
100
- case fe:
109
+ case Ce:
101
110
  return t("compensationNames.overtime");
102
- case pe:
111
+ case he:
103
112
  return t("compensationNames.doubleOvertime");
104
113
  default:
105
114
  return e;
106
115
  }
107
- }, j = (e) => {
116
+ }, F = (e) => {
108
117
  switch (e) {
109
- case Me:
118
+ case Pe:
110
119
  return t("fixedCompensationNames.bonus");
111
- case be:
120
+ case Me:
112
121
  return t("fixedCompensationNames.paycheckTips");
113
- case ge:
122
+ case ye:
114
123
  return t("fixedCompensationNames.correctionPayment");
115
- case Ee:
124
+ case be:
116
125
  return t("fixedCompensationNames.commission");
117
- case Ne:
126
+ case Ee:
118
127
  return t("fixedCompensationNames.cashTips");
119
- case Ce:
128
+ case ge:
120
129
  return t("fixedCompensationNames.reimbursement");
121
130
  default:
122
131
  return e;
123
132
  }
124
- }, V = {
133
+ }, Y = {
125
134
  hourlyCompensations: (() => {
126
135
  const e = {};
127
136
  return O.forEach((n) => {
128
- w.forEach((s) => {
129
- const h = R(n.uuid, s);
130
- h && (e[n.uuid] || (e[n.uuid] = {}), e[n.uuid][h.name] = h.hours ? parseFloat(h.hours).toString() : "");
137
+ $.forEach((l) => {
138
+ const C = U(n.uuid, l);
139
+ C && (e[n.uuid] || (e[n.uuid] = {}), e[n.uuid][C.name] = C.hours ? parseFloat(C.hours).toString() : "");
131
140
  });
132
141
  }), e;
133
142
  })(),
134
143
  timeOffCompensations: (() => {
135
144
  const e = {};
136
- return A.forEach((n) => {
145
+ return g.forEach((n) => {
137
146
  e[n.name] = n.hours ? parseFloat(n.hours).toString() : "";
138
147
  }), e;
139
148
  })(),
149
+ finalPayoutCompensations: (() => {
150
+ const e = {};
151
+ return g.forEach((n) => {
152
+ e[n.name] = n.finalPayoutUnusedHoursInput ?? "0";
153
+ }), e;
154
+ })(),
140
155
  fixedCompensations: (() => {
141
156
  const e = {};
142
157
  return _.forEach((n) => {
143
158
  e[n.name] = n.amount ? parseFloat(n.amount) : void 0;
144
- }), N && (e[N.name] = N.amount ? parseFloat(N.amount) : void 0), e;
159
+ }), E && (e[E.name] = E.amount ? parseFloat(E.amount) : void 0), e;
145
160
  })(),
146
- paymentMethod: i?.paymentMethod || S.DirectDeposit
147
- }, I = K({
148
- resolver: te(Te),
149
- defaultValues: V
150
- }), T = X({
161
+ paymentMethod: a?.paymentMethod || S.DirectDeposit
162
+ }, I = Z({
163
+ resolver: ie(Te),
164
+ defaultValues: Y
165
+ }), b = J({
151
166
  control: I.control
152
- }), z = J(() => {
167
+ }), K = te(() => {
153
168
  try {
154
169
  const e = {};
155
- T.hourlyCompensations && Object.entries(T.hourlyCompensations).forEach(([h, D]) => {
156
- D && (e[h] = D);
170
+ b.hourlyCompensations && Object.entries(b.hourlyCompensations).forEach(([C, D]) => {
171
+ D && (e[C] = D);
157
172
  });
158
173
  const n = {
159
174
  hourlyCompensations: e,
160
- timeOffCompensations: T.timeOffCompensations || {},
161
- fixedCompensations: T.fixedCompensations || {},
162
- paymentMethod: T.paymentMethod
163
- }, s = H(
175
+ timeOffCompensations: b.timeOffCompensations || {},
176
+ finalPayoutCompensations: b.finalPayoutCompensations || {},
177
+ fixedCompensations: b.fixedCompensations || {},
178
+ paymentMethod: b.paymentMethod
179
+ }, l = q(
164
180
  n,
165
- i,
166
- (i?.paidTimeOff || []).filter((h) => h.name),
167
- f?.uuid
181
+ a,
182
+ (a?.paidTimeOff || []).filter((C) => C.name),
183
+ p?.uuid
168
184
  );
169
185
  return k(
170
- s,
171
186
  l,
172
- o,
173
187
  d,
174
- C
188
+ i,
189
+ m,
190
+ h
175
191
  );
176
192
  } catch {
177
- return i ? k(
178
- i,
179
- l,
180
- o,
193
+ return a ? k(
194
+ a,
181
195
  d,
182
- C
196
+ i,
197
+ m,
198
+ h
183
199
  ) : 0;
184
200
  }
185
201
  }, [
186
- T,
187
- i,
188
- f?.uuid,
189
- l,
190
- o,
202
+ b,
203
+ a,
204
+ p?.uuid,
191
205
  d,
192
- C
193
- ]), W = me({
194
- first_name: l.firstName,
195
- last_name: l.lastName
196
- }), Y = (e) => {
197
- const n = H(
206
+ i,
207
+ m,
208
+ h
209
+ ]), X = ue({
210
+ first_name: d.firstName,
211
+ last_name: d.lastName
212
+ }), Q = (e) => {
213
+ const n = q(
198
214
  e,
199
- i,
200
- A,
201
- f?.uuid
215
+ a,
216
+ g,
217
+ p?.uuid
202
218
  );
203
- E(n);
204
- }, L = le(z || 0), U = /* @__PURE__ */ a(
219
+ N(n);
220
+ }, j = de(K || 0), L = /* @__PURE__ */ r(
205
221
  x,
206
222
  {
207
- flexDirection: p ? "row" : "column",
208
- justifyContent: p ? "flex-end" : "normal",
209
- alignItems: p ? "flex-start" : "stretch",
223
+ flexDirection: f ? "row" : "column",
224
+ justifyContent: f ? "flex-end" : "normal",
225
+ alignItems: f ? "flex-start" : "stretch",
210
226
  gap: 12,
211
227
  children: [
212
- /* @__PURE__ */ r(v, { variant: "secondary", onClick: y, title: t("cancelCta"), children: t("cancelCta") }),
213
- /* @__PURE__ */ r(
228
+ /* @__PURE__ */ o(v, { variant: "secondary", onClick: T, title: t("cancelCta"), children: t("cancelCta") }),
229
+ /* @__PURE__ */ o(
214
230
  v,
215
231
  {
216
- onClick: I.handleSubmit(Y),
232
+ onClick: I.handleSubmit(Q),
217
233
  title: t("saveCta"),
218
- isLoading: g,
234
+ isLoading: y,
219
235
  children: t("saveCta")
220
236
  }
221
237
  )
222
238
  ]
223
239
  }
224
240
  );
225
- return /* @__PURE__ */ a("div", { ref: F, className: u.container, children: [
226
- /* @__PURE__ */ r(
241
+ return /* @__PURE__ */ r("div", { ref: R, className: u.container, children: [
242
+ /* @__PURE__ */ o(
227
243
  "div",
228
244
  {
229
- className: `${u.headerSection} ${p ? "" : u.headerSectionSticky}`,
230
- children: /* @__PURE__ */ a(x, { justifyContent: "space-between", children: [
231
- /* @__PURE__ */ a(x, { flexDirection: "column", gap: p ? 8 : 2, children: [
232
- /* @__PURE__ */ r(c, { as: "h1", styledAs: p ? "h2" : "h4", children: t("pageTitle", { employeeName: W }) }),
233
- p ? /* @__PURE__ */ a(x, { flexDirection: "column", gap: 6, children: [
234
- /* @__PURE__ */ r(c, { as: "h2", styledAs: "h3", children: L }),
235
- /* @__PURE__ */ r(B, { className: u.grossPayLabel, children: t("grossPayLabel") })
236
- ] }) : /* @__PURE__ */ r(c, { as: "h2", styledAs: "h6", className: u.grossPayLabel, children: t("grossPayLabelMobile", { grossPay: L }) })
245
+ className: `${u.headerSection} ${f ? "" : u.headerSectionSticky}`,
246
+ children: /* @__PURE__ */ r(x, { justifyContent: "space-between", children: [
247
+ /* @__PURE__ */ r(x, { flexDirection: "column", gap: f ? 8 : 2, children: [
248
+ /* @__PURE__ */ o(c, { as: "h1", styledAs: f ? "h2" : "h4", children: t("pageTitle", { employeeName: X }) }),
249
+ f ? /* @__PURE__ */ r(x, { flexDirection: "column", gap: 6, children: [
250
+ /* @__PURE__ */ o(c, { as: "h2", styledAs: "h3", children: j }),
251
+ /* @__PURE__ */ o(V, { className: u.grossPayLabel, children: t("grossPayLabel") })
252
+ ] }) : /* @__PURE__ */ o(c, { as: "h2", styledAs: "h6", className: u.grossPayLabel, children: t("grossPayLabelMobile", { grossPay: j }) })
237
253
  ] }),
238
- p && U
254
+ f && L
239
255
  ] })
240
256
  }
241
257
  ),
242
- /* @__PURE__ */ a(Q, { ...I, children: [
243
- /* @__PURE__ */ a(ae, { children: [
244
- O.length > 0 && /* @__PURE__ */ a("div", { className: u.fieldGroup, children: [
245
- /* @__PURE__ */ r(c, { as: "h3", children: t("regularHoursTitle") }),
246
- O.map((e) => /* @__PURE__ */ a(x, { flexDirection: "column", gap: 8, children: [
247
- O.length > 1 && /* @__PURE__ */ r(c, { as: "h4", children: e.title }),
248
- /* @__PURE__ */ r(P, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: w.map((n) => {
249
- const s = R(
258
+ /* @__PURE__ */ r(ee, { ...I, children: [
259
+ /* @__PURE__ */ r(le, { children: [
260
+ O.length > 0 && /* @__PURE__ */ r("div", { className: u.fieldGroup, children: [
261
+ /* @__PURE__ */ o(c, { as: "h3", children: t("regularHoursTitle") }),
262
+ O.map((e) => /* @__PURE__ */ r(x, { flexDirection: "column", gap: 8, children: [
263
+ O.length > 1 && /* @__PURE__ */ o(c, { as: "h4", children: e.title }),
264
+ /* @__PURE__ */ o(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: $.map((n) => {
265
+ const l = U(
250
266
  e.uuid,
251
267
  n
252
268
  );
253
- if (s)
254
- return /* @__PURE__ */ r(
255
- oe,
269
+ if (l)
270
+ return /* @__PURE__ */ o(
271
+ G,
256
272
  {
257
273
  type: "number",
258
274
  min: 0,
259
275
  adornmentEnd: t("hoursUnit"),
260
276
  isRequired: !0,
261
- label: q(n),
262
- name: `hourlyCompensations.${e.uuid}.${s.name}`
277
+ label: W(n),
278
+ name: `hourlyCompensations.${e.uuid}.${l.name}`
263
279
  },
264
280
  n
265
281
  );
266
282
  }) })
267
283
  ] }, e.uuid))
268
284
  ] }),
269
- A.length > 0 && /* @__PURE__ */ a("div", { className: u.fieldGroup, children: [
270
- /* @__PURE__ */ r(c, { as: "h4", children: t("timeOffTitle") }),
271
- /* @__PURE__ */ r(P, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: A.map((e) => /* @__PURE__ */ r(
272
- ne,
285
+ g.length > 0 && /* @__PURE__ */ r("div", { className: u.fieldGroup, children: [
286
+ /* @__PURE__ */ o(c, { as: "h4", children: t("timeOffTitle") }),
287
+ /* @__PURE__ */ o(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: g.map((e) => /* @__PURE__ */ o(
288
+ se,
273
289
  {
274
290
  timeOff: e,
275
- employee: l
291
+ employee: d
276
292
  },
277
293
  e.name
278
294
  )) })
279
295
  ] }),
280
- _.length > 0 && /* @__PURE__ */ a("div", { className: u.fieldGroup, children: [
281
- /* @__PURE__ */ r(c, { as: "h4", children: t("additionalEarningsTitle") }),
282
- /* @__PURE__ */ r(
283
- P,
296
+ h === w.Dismissal && g.length > 0 && /* @__PURE__ */ r("div", { className: u.fieldGroup, children: [
297
+ /* @__PURE__ */ o(c, { as: "h4", children: t("finalPayoutTitle") }),
298
+ /* @__PURE__ */ o(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: g.map((e) => /* @__PURE__ */ o(
299
+ G,
300
+ {
301
+ name: `finalPayoutCompensations.${e.name}`,
302
+ type: "number",
303
+ min: 0,
304
+ adornmentEnd: t("hoursUnit"),
305
+ isRequired: !0,
306
+ label: e.name
307
+ },
308
+ `payout-${e.name}`
309
+ )) })
310
+ ] }),
311
+ _.length > 0 && /* @__PURE__ */ r("div", { className: u.fieldGroup, children: [
312
+ /* @__PURE__ */ o(c, { as: "h4", children: t("additionalEarningsTitle") }),
313
+ /* @__PURE__ */ o(
314
+ A,
284
315
  {
285
316
  gridTemplateColumns: { base: "1fr", small: [320, 320], large: [320, 320, 320] },
286
317
  gap: 20,
287
- children: _.map((e) => /* @__PURE__ */ r(
288
- G,
318
+ children: _.map((e) => /* @__PURE__ */ o(
319
+ H,
289
320
  {
290
321
  format: "currency",
291
322
  min: 0,
292
323
  isRequired: !0,
293
- label: j(e.name),
324
+ label: F(e.name),
294
325
  name: `fixedCompensations.${e.name}`
295
326
  },
296
327
  e.name
@@ -298,23 +329,23 @@ const Te = m.object({
298
329
  }
299
330
  )
300
331
  ] }),
301
- N && /* @__PURE__ */ a("div", { className: u.fieldGroup, children: [
302
- /* @__PURE__ */ r(c, { as: "h4", children: t("reimbursementTitle") }),
303
- /* @__PURE__ */ r(P, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ r(
304
- G,
332
+ E && /* @__PURE__ */ r("div", { className: u.fieldGroup, children: [
333
+ /* @__PURE__ */ o(c, { as: "h4", children: t("reimbursementTitle") }),
334
+ /* @__PURE__ */ o(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ o(
335
+ H,
305
336
  {
306
337
  format: "currency",
307
338
  min: 0,
308
339
  isRequired: !0,
309
- label: j(N.name),
310
- name: `fixedCompensations.${N.name}`
340
+ label: F(E.name),
341
+ name: `fixedCompensations.${E.name}`
311
342
  }
312
343
  ) })
313
344
  ] }),
314
- $ && /* @__PURE__ */ a("div", { className: u.fieldGroup, children: [
315
- /* @__PURE__ */ r(c, { as: "h4", children: t("paymentMethodTitle") }),
316
- /* @__PURE__ */ r(
317
- re,
345
+ B && /* @__PURE__ */ r("div", { className: u.fieldGroup, children: [
346
+ /* @__PURE__ */ o(c, { as: "h4", children: t("paymentMethodTitle") }),
347
+ /* @__PURE__ */ o(
348
+ ae,
318
349
  {
319
350
  name: "paymentMethod",
320
351
  isRequired: !0,
@@ -334,12 +365,12 @@ const Te = m.object({
334
365
  )
335
366
  ] })
336
367
  ] }),
337
- !p && U
368
+ !f && L
338
369
  ] })
339
370
  ] });
340
371
  };
341
372
  export {
342
373
  Te as PayrollEditEmployeeFormSchema,
343
- ze as PayrollEditEmployeePresentation
374
+ Xe as PayrollEditEmployeePresentation
344
375
  };
345
376
  //# sourceMappingURL=PayrollEditEmployeePresentation.js.map