@gusto/embedded-react-sdk 0.48.3 → 0.49.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 (637) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +8 -8
  3. package/dist/components/Base/Base.d.ts +11 -3
  4. package/dist/components/Base/Base.js.map +1 -1
  5. package/dist/components/Base/index.d.ts +1 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +21 -21
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +16 -15
  9. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  10. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +1 -0
  11. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  12. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
  13. package/dist/components/Common/PaginationControl/PaginationControl.js +9 -8
  14. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  15. package/dist/components/Common/TaxInputs/TaxInputs.js +104 -102
  16. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  17. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  18. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  19. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  20. package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
  21. package/dist/components/Common/UI/NumberInput/NumberInput.d.ts +1 -1
  22. package/dist/components/Common/UI/NumberInput/NumberInput.js +87 -80
  23. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  24. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +4 -0
  25. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  26. package/dist/components/Common/UI/Select/Select.js +28 -28
  27. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  28. package/dist/components/Common/UI/Select/SelectTypes.d.ts +3 -2
  29. package/dist/components/Common/UI/Tabs/Tabs.js +9 -8
  30. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +1 -0
  32. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +4 -4
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  36. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +4 -3
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/TitleSelect.js +9 -8
  42. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  43. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  44. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccount.d.ts +3 -2
  46. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +3 -3
  48. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  50. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +3 -3
  52. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  53. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +3 -3
  54. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -2
  56. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/index.d.ts +1 -1
  58. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  59. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  60. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +6 -5
  61. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  62. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +1 -0
  63. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  64. package/dist/components/Company/DocumentSigner/assignSignatoryState.js +4 -6
  65. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
  66. package/dist/components/Company/DocumentSigner/index.d.ts +1 -1
  67. package/dist/components/Company/DocumentSigner/stateMachine.js +12 -18
  68. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  69. package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +15 -6
  70. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  71. package/dist/components/Company/FederalTaxes/Form.js +23 -21
  72. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  73. package/dist/components/Company/FederalTaxes/index.d.ts +2 -0
  74. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +10 -6
  75. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  76. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  77. package/dist/components/Company/Industry/Context.js +6 -7
  78. package/dist/components/Company/Industry/Context.js.map +1 -1
  79. package/dist/components/Company/Industry/Industry.d.ts +5 -7
  80. package/dist/components/Company/Industry/Industry.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +11 -4
  82. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationForm/index.d.ts +1 -0
  84. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  85. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  86. package/dist/components/Company/Locations/Locations.d.ts +1 -0
  87. package/dist/components/Company/Locations/Locations.js.map +1 -1
  88. package/dist/components/Company/Locations/LocationsList/List.js +20 -20
  89. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  90. package/dist/components/Company/Locations/LocationsList/List.module.scss.js +1 -1
  91. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +2 -1
  92. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  93. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  94. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  95. package/dist/components/Company/Locations/stateMachine.js +4 -6
  96. package/dist/components/Company/Locations/stateMachine.js.map +1 -1
  97. package/dist/components/Company/OnboardingFlow/OnboardingFlow.d.ts +38 -1
  98. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  99. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +14 -3
  100. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +30 -23
  101. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  102. package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +10 -4
  103. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  104. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  105. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  106. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +4 -3
  107. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  108. package/dist/components/Company/PaySchedule/PayScheduleForm.js +6 -4
  109. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  110. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +10 -14
  111. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
  112. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +1 -0
  113. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  114. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +29 -25
  115. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  116. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +11 -4
  117. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +55 -54
  118. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  119. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.d.ts +10 -0
  120. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js +11 -0
  121. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +1 -0
  122. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.test.d.ts +1 -0
  123. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  124. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  125. package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +1 -1
  126. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +2 -3
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +7 -2
  129. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  130. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  131. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  132. package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +1 -1
  133. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +5 -7
  134. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  135. package/dist/components/Company/exports/companyOnboarding.d.ts +11 -11
  136. package/dist/components/Contractor/Address/Address.d.ts +14 -8
  137. package/dist/components/Contractor/Address/Address.js +83 -64
  138. package/dist/components/Contractor/Address/Address.js.map +1 -1
  139. package/dist/components/Contractor/Address/Address.module.scss.js +8 -0
  140. package/dist/components/Contractor/Address/Address.module.scss.js.map +1 -0
  141. package/dist/components/Contractor/Address/index.d.ts +1 -0
  142. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +59 -0
  143. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js +32 -0
  144. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.js.map +1 -0
  145. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.d.ts +111 -0
  146. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js +26 -0
  147. package/dist/components/Contractor/Address/shared/useContractorAddressForm/fields.js.map +1 -0
  148. package/dist/components/Contractor/Address/shared/useContractorAddressForm/index.d.ts +6 -0
  149. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +112 -0
  150. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +133 -0
  151. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -0
  152. package/dist/components/Contractor/Address/types.d.ts +8 -0
  153. package/dist/components/Contractor/ContractorList/index.d.ts +4 -4
  154. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  155. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.d.ts +29 -0
  156. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +71 -0
  157. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -0
  158. package/dist/components/Contractor/Documents/DocumentsList/index.d.ts +3 -0
  159. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/index.d.ts +2 -0
  160. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.d.ts +59 -0
  161. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js +20 -0
  162. package/dist/components/Contractor/Documents/DocumentsList/useContractorDocumentsList/useContractorDocumentsList.js.map +1 -0
  163. package/dist/components/Contractor/Landing/Landing.d.ts +19 -0
  164. package/dist/components/Contractor/Landing/Landing.js +73 -0
  165. package/dist/components/Contractor/Landing/Landing.js.map +1 -0
  166. package/dist/components/Contractor/Landing/index.d.ts +2 -0
  167. package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +1 -0
  168. package/dist/components/Contractor/NewHireReport/NewHireReport.js +7 -7
  169. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  170. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +20 -8
  171. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  172. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +4 -4
  173. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  174. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.d.ts +23 -0
  175. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +36 -0
  176. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -0
  177. package/dist/components/Contractor/OnboardingSummary/index.d.ts +2 -0
  178. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +1 -1
  179. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  180. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +11 -1
  181. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  182. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +59 -53
  183. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  184. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +70 -91
  185. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  186. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +62 -56
  187. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  188. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +11 -2
  189. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
  190. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +1 -1
  191. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  192. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +7 -0
  193. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  194. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +54 -51
  195. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  196. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +20 -22
  197. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  198. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
  199. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  200. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +109 -102
  201. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  202. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +1 -1
  203. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  204. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +86 -65
  205. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  206. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.d.ts +8 -0
  207. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +79 -0
  208. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -0
  209. package/dist/components/Contractor/Profile/ContractorProfile.d.ts +52 -10
  210. package/dist/components/Contractor/Profile/ContractorProfile.js +205 -31
  211. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  212. package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js +8 -0
  213. package/dist/components/Contractor/Profile/ContractorProfile.module.scss.js.map +1 -0
  214. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.d.ts +8 -0
  215. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +96 -0
  216. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -0
  217. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.d.ts +22 -0
  218. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js +40 -0
  219. package/dist/components/Contractor/Profile/SelfOnboardingContractorProfile.js.map +1 -0
  220. package/dist/components/Contractor/Profile/index.d.ts +1 -1
  221. package/dist/components/Contractor/Profile/shared/index.d.ts +2 -0
  222. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +125 -0
  223. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +73 -0
  224. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -0
  225. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.test.d.ts +1 -0
  226. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.d.ts +312 -0
  227. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +87 -0
  228. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js.map +1 -0
  229. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/index.d.ts +6 -0
  230. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +151 -0
  231. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +188 -0
  232. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -0
  233. package/dist/components/Contractor/Submit/Submit.d.ts +4 -4
  234. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  235. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +6 -3
  236. package/dist/components/Contractor/exports/contractorOnboarding.js +14 -8
  237. package/dist/components/Contractor/exports/contractorOnboarding.js.map +1 -1
  238. package/dist/components/Employee/Compensation/management/Compensation.d.ts +4 -7
  239. package/dist/components/Employee/Compensation/management/Compensation.js +1 -5
  240. package/dist/components/Employee/Compensation/management/Compensation.js.map +1 -1
  241. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.d.ts +1 -0
  242. package/dist/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.js.map +1 -1
  243. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.d.ts +1 -0
  244. package/dist/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.js.map +1 -1
  245. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.d.ts +1 -0
  246. package/dist/components/Employee/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
  247. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.d.ts +1 -0
  248. package/dist/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.js.map +1 -1
  249. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +13 -10
  250. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  251. package/dist/components/Employee/Compensation/management/compensationStateMachine.js +23 -31
  252. package/dist/components/Employee/Compensation/management/compensationStateMachine.js.map +1 -1
  253. package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +1 -0
  254. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  255. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +1 -0
  256. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  257. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.d.ts +3 -3
  258. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -1
  259. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js +20 -28
  260. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -1
  261. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +13 -10
  262. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  263. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  264. package/dist/components/Employee/Dashboard/Dashboard.d.ts +29 -4
  265. package/dist/components/Employee/Dashboard/Dashboard.js +1 -4
  266. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  267. package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +20 -14
  268. package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -1
  269. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +78 -108
  270. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  271. package/dist/components/Employee/Deductions/management/Deductions.d.ts +4 -7
  272. package/dist/components/Employee/Deductions/management/Deductions.js +1 -5
  273. package/dist/components/Employee/Deductions/management/Deductions.js.map +1 -1
  274. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.d.ts +1 -0
  275. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
  276. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.d.ts +4 -3
  277. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js +1 -4
  278. package/dist/components/Employee/Deductions/management/DeductionsEditForm/DeductionsEditForm.js.map +1 -1
  279. package/dist/components/Employee/Deductions/management/deductionsStateMachine.js +17 -23
  280. package/dist/components/Employee/Deductions/management/deductionsStateMachine.js.map +1 -1
  281. package/dist/components/Employee/Deductions/onboarding/Deductions.d.ts +1 -0
  282. package/dist/components/Employee/Deductions/onboarding/Deductions.js.map +1 -1
  283. package/dist/components/Employee/Deductions/onboarding/stateMachine.js +25 -35
  284. package/dist/components/Employee/Deductions/onboarding/stateMachine.js.map +1 -1
  285. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +40 -37
  286. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  287. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js +1 -0
  288. package/dist/components/Employee/Deductions/shared/DeductionsForm/DeductionsForm.js.map +1 -1
  289. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  290. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  291. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +19 -4
  292. package/dist/components/Employee/Documents/management/DocumentManager.js +4 -1
  293. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  294. package/dist/components/Employee/Documents/management/Documents.d.ts +4 -7
  295. package/dist/components/Employee/Documents/management/Documents.js +1 -5
  296. package/dist/components/Employee/Documents/management/Documents.js.map +1 -1
  297. package/dist/components/Employee/Documents/management/documentsStateMachine.js +5 -7
  298. package/dist/components/Employee/Documents/management/documentsStateMachine.js.map +1 -1
  299. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +2 -1
  300. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  301. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  302. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  303. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +8 -1
  304. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  305. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.d.ts +1 -0
  306. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  307. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +3 -2
  308. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  309. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.d.ts +1 -4
  310. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  311. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.d.ts +3 -2
  312. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  313. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.d.ts +5 -8
  314. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  315. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.d.ts +18 -3
  316. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js +21 -18
  317. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -1
  318. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.d.ts +2 -1
  319. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +47 -46
  320. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
  321. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  322. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +8 -2
  323. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
  324. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +1 -1
  325. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -1
  326. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +5 -7
  327. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -1
  328. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +4 -7
  329. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +1 -5
  330. package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -1
  331. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.d.ts +4 -5
  332. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +1 -4
  333. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  334. package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js +14 -20
  335. package/dist/components/Employee/FederalTaxes/management/federalTaxesStateMachine.js.map +1 -1
  336. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +4 -3
  337. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +1 -4
  338. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  339. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  340. package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +7 -11
  341. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +1 -5
  342. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  343. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.d.ts +1 -0
  344. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
  345. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.d.ts +7 -9
  346. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js +1 -4
  347. package/dist/components/Employee/HomeAddress/management/HomeAddressEditForm.js.map +1 -1
  348. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +2 -0
  349. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  350. package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js +8 -12
  351. package/dist/components/Employee/HomeAddress/management/homeAddressStateMachine.js.map +1 -1
  352. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  353. package/dist/components/Employee/Landing/Landing.d.ts +10 -4
  354. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  355. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.d.ts +19 -5
  356. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlow.js.map +1 -1
  357. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.d.ts +1 -0
  358. package/dist/components/Employee/OnboardingExecutionFlow/OnboardingExecutionFlowComponents.js.map +1 -1
  359. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
  360. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +32 -12
  361. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +19 -17
  362. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  363. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +23 -16
  364. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  365. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +11 -15
  366. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  367. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +10 -4
  368. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  369. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +3 -7
  370. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +1 -5
  371. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -1
  372. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.d.ts +1 -0
  373. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
  374. package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.d.ts +1 -0
  375. package/dist/components/Employee/PaymentMethod/management/PaymentMethodCard.js.map +1 -1
  376. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -1
  377. package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.d.ts +1 -0
  378. package/dist/components/Employee/PaymentMethod/management/PaymentMethodSplitForm.js.map +1 -1
  379. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +15 -21
  380. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -1
  381. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +4 -7
  382. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +1 -5
  383. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -1
  384. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +24 -36
  385. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -1
  386. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
  387. package/dist/components/Employee/Profile/management/Profile.d.ts +5 -8
  388. package/dist/components/Employee/Profile/management/Profile.js +1 -5
  389. package/dist/components/Employee/Profile/management/Profile.js.map +1 -1
  390. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.d.ts +1 -0
  391. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
  392. package/dist/components/Employee/Profile/management/ProfileEditForm.d.ts +5 -6
  393. package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -4
  394. package/dist/components/Employee/Profile/management/ProfileEditForm.js.map +1 -1
  395. package/dist/components/Employee/Profile/management/profileStateMachine.js +14 -20
  396. package/dist/components/Employee/Profile/management/profileStateMachine.js.map +1 -1
  397. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +55 -54
  398. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  399. package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js +3 -5
  400. package/dist/components/Employee/Profile/onboarding/AdminProfile.module.scss.js.map +1 -1
  401. package/dist/components/Employee/Profile/onboarding/Profile.d.ts +11 -12
  402. package/dist/components/Employee/Profile/onboarding/Profile.js +1 -5
  403. package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -1
  404. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
  405. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js.map +1 -1
  406. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
  407. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +1 -1
  408. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  409. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +19 -5
  410. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  411. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js +12 -18
  412. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
  413. package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +4 -9
  414. package/dist/components/Employee/StateTaxes/management/StateTaxes.js +1 -5
  415. package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -1
  416. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.d.ts +1 -0
  417. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  418. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.d.ts +5 -8
  419. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +1 -4
  420. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
  421. package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js +14 -20
  422. package/dist/components/Employee/StateTaxes/management/stateTaxesStateMachine.js.map +1 -1
  423. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +5 -8
  424. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +1 -4
  425. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
  426. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +29 -29
  427. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -1
  428. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +1 -1
  429. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  430. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +1 -0
  431. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  432. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +16 -5
  433. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
  434. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -1
  435. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  436. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +5 -7
  437. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
  438. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +1 -0
  439. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
  440. package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +7 -11
  441. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +1 -5
  442. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  443. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.d.ts +1 -0
  444. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
  445. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.d.ts +7 -9
  446. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js +1 -4
  447. package/dist/components/Employee/WorkAddress/management/WorkAddressEditForm.js.map +1 -1
  448. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +97 -95
  449. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  450. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  451. package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js +8 -12
  452. package/dist/components/Employee/WorkAddress/management/workAddressStateMachine.js.map +1 -1
  453. package/dist/components/Employee/WorkAddress/shared/useEmployeeWorkAddressSummary/useEmployeeWorkAddressSummary.js.map +1 -1
  454. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  455. package/dist/components/Flow/Flow.js +1 -1
  456. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +1 -0
  457. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  458. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +1 -0
  459. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  460. package/dist/components/InformationRequests/InformationRequests.d.ts +26 -1
  461. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  462. package/dist/components/InformationRequests/informationRequestsStateMachine.js +10 -14
  463. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -1
  464. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +3 -4
  465. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +2 -11
  466. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  467. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +0 -1
  468. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +1 -0
  469. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  470. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +11 -17
  471. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
  472. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +1 -3
  473. package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +25 -1
  474. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  475. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +1 -0
  476. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
  477. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  478. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  479. package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +18 -4
  480. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  481. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +1 -1
  482. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  483. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -0
  484. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  485. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +1 -0
  486. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  487. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +21 -20
  488. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  489. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -1
  490. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  491. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +2 -2
  492. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  493. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +28 -3
  494. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  495. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -46
  496. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  497. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +25 -24
  498. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  499. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +13 -3
  500. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  501. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +2 -2
  502. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  503. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +34 -44
  504. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  505. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +1 -0
  506. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  507. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +12 -2
  508. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  509. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +8 -10
  510. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  511. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +2 -1
  512. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  513. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -0
  514. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +112 -112
  515. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  516. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  517. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +4 -6
  518. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  519. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +2 -1
  520. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +5 -9
  521. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  522. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +0 -1
  523. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  524. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +0 -1
  525. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  526. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +10 -14
  527. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -1
  528. package/dist/components/Payroll/Transition/TransitionFlow.d.ts +27 -1
  529. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  530. package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +1 -1
  531. package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
  532. package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
  533. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  534. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +2 -2
  535. package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  536. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +2 -1
  537. package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  538. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +1 -1
  539. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  540. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +2 -2
  541. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  542. package/dist/components/TimeOff/PolicyList/PolicyList.d.ts +1 -1
  543. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  544. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +2 -1
  545. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  546. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +1 -0
  547. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
  548. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.d.ts +28 -1
  549. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -1
  550. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  551. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  552. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +128 -174
  553. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  554. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
  555. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  556. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +9 -7
  557. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  558. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +2 -1
  559. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  560. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +2 -1
  561. package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -1
  562. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +2 -2
  563. package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -1
  564. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +2 -2
  565. package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -1
  566. package/dist/components/index.d.ts +9 -0
  567. package/dist/contexts/ThemeProvider/types.d.ts +19 -0
  568. package/dist/i18n/I18n.js +5 -2
  569. package/dist/i18n/I18n.js.map +1 -1
  570. package/dist/i18n/en/Company.AssignSignatory.json.js +1 -1
  571. package/dist/i18n/en/Company.FederalTaxes.json.js +27 -23
  572. package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
  573. package/dist/i18n/en/Company.PaySchedule.json.js +1 -1
  574. package/dist/i18n/en/Contractor.Address.json.js +13 -13
  575. package/dist/i18n/en/Contractor.DocumentsList.json.js +28 -0
  576. package/dist/i18n/en/Contractor.DocumentsList.json.js.map +1 -0
  577. package/dist/i18n/en/Contractor.Landing.json.js +18 -0
  578. package/dist/i18n/en/Contractor.Landing.json.js.map +1 -0
  579. package/dist/i18n/en/Contractor.NewHireReport.json.js +12 -10
  580. package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
  581. package/dist/i18n/en/Contractor.OnboardingSummary.json.js +12 -0
  582. package/dist/i18n/en/Contractor.OnboardingSummary.json.js.map +1 -0
  583. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +13 -13
  584. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +10 -6
  585. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -1
  586. package/dist/i18n/en/Contractor.Profile.json.js +8 -6
  587. package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
  588. package/dist/i18n/en/Employee.Compensation.json.js +56 -50
  589. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  590. package/dist/i18n/en/Employee.DeductionsForm.json.js +8 -8
  591. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +1 -1
  592. package/dist/i18n/en/Employee.Management.Compensation.json.js +48 -42
  593. package/dist/i18n/en/Employee.Management.Compensation.json.js.map +1 -1
  594. package/dist/i18n/en/Employee.Management.HomeAddress.json.js +1 -1
  595. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +1 -1
  596. package/dist/i18n/en/Payroll.PayrollOverview.json.js +40 -38
  597. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  598. package/dist/i18n/en/common.json.d.ts +1 -0
  599. package/dist/i18n/en/common.json.js +34 -32
  600. package/dist/i18n/en/common.json.js.map +1 -1
  601. package/dist/index.d.ts +17 -1
  602. package/dist/index.js +239 -205
  603. package/dist/index.js.map +1 -1
  604. package/dist/models/external.d.ts +293 -0
  605. package/dist/partner-hook-utils/form/FormFieldsMetadataContext.js +3 -3
  606. package/dist/partner-hook-utils/form/buildFormSchema.d.ts +14 -1
  607. package/dist/partner-hook-utils/form/buildFormSchema.js +41 -40
  608. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  609. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  610. package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
  611. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  612. package/dist/shared/constants.d.ts +10 -1
  613. package/dist/shared/constants.js +9 -5
  614. package/dist/shared/constants.js.map +1 -1
  615. package/dist/style.css +1 -1
  616. package/dist/types/Helpers.d.ts +19 -2
  617. package/dist/types/i18next.d.ts +66 -5
  618. package/docs/{reference → appendix}/endpoint-inventory.json +27 -0
  619. package/package.json +21 -22
  620. package/dist/components/Contractor/Address/Actions.d.ts +0 -2
  621. package/dist/components/Contractor/Address/Actions.js +0 -13
  622. package/dist/components/Contractor/Address/Actions.js.map +0 -1
  623. package/dist/components/Contractor/Address/Form.d.ts +0 -2
  624. package/dist/components/Contractor/Address/Form.js +0 -51
  625. package/dist/components/Contractor/Address/Form.js.map +0 -1
  626. package/dist/components/Contractor/Address/Head.d.ts +0 -2
  627. package/dist/components/Contractor/Address/Head.js +0 -17
  628. package/dist/components/Contractor/Address/Head.js.map +0 -1
  629. package/dist/components/Contractor/Address/useAddress.d.ts +0 -28
  630. package/dist/components/Contractor/Address/useAddress.js +0 -31
  631. package/dist/components/Contractor/Address/useAddress.js.map +0 -1
  632. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +0 -9
  633. package/dist/components/Contractor/Profile/ContractorProfileForm.js +0 -143
  634. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +0 -1
  635. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +0 -205
  636. package/dist/components/Contractor/Profile/useContractorProfile.js +0 -237
  637. package/dist/components/Contractor/Profile/useContractorProfile.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Compensation.js","sources":["../../../../../src/components/Employee/Compensation/management/Compensation.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n CompensationCardContextual,\n type CompensationContextInterface,\n} from './CompensationComponents'\nimport { compensationStateMachine } from './compensationStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport {\n BaseBoundaries,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { useI18n } from '@/i18n'\nimport type { OnEventType } from '@/components/Base/useBase'\n\n/**\n * Props for {@link Compensation}.\n *\n * @public\n */\nexport interface CompensationProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the block emits an event. See the events table on {@link Compensation} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\nfunction CompensationFlow({ employeeId, onEvent }: CompensationProps) {\n useI18n('Employee.Management.Compensation')\n\n const machine = useMemo(\n () =>\n createMachine('card', compensationStateMachine, (ctx: CompensationContextInterface) => ({\n ...ctx,\n component: CompensationCardContextual,\n employeeId,\n successAlert: null,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n\n/**\n * Self-contained block for viewing and managing an employee's jobs and compensation — the same experience the dashboard surfaces, but as a drop-in component that doesn't require the surrounding dashboard chrome.\n *\n * @remarks\n * Renders a read-only card showing the employee's job(s), pay type, wage, and effective date, along with affordances to edit a job's compensation, add a first job from the empty state, add another job (when the primary job is Nonexempt), delete a non-primary job, and cancel a scheduled future-dated change. Choosing to edit or add a job swaps the card for the corresponding form; a successful add returns to the card with a dismissible \"Job successfully added.\" alert, an edit returns to the card without an alert, and cancelling returns without saving. Wraps everything in error and suspense boundaries.\n *\n * The card and form surfaces ({@link CompensationCard}, {@link CompensationEditForm}, {@link CompensationAddJobForm}, {@link CompensationAddAnotherJobForm}) are also exported individually for cases where that orchestration is the wrong fit — for example, when a form needs to render in a modal or drawer, when the card needs to appear read-only with no edit/add affordances, or when the swap is driven by a router. Using them directly means owning the swap, the alert, and any cross-component state yourself.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job; the block opens the edit form for that job | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when the \"Add job\" CTA is clicked from the card's empty state; the block opens the add-first-job form | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when the \"Add another job\" CTA is clicked; the block opens the add-another-job form | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog; the block stays on the card | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card; the block stays on the card | `{ employeeId: string, compensationId: string }` |\n * | `employee/management/compensation/editForm/submitted` | Fired after an edit-compensation save completes; the block returns to the card view | Updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user cancels the edit form; the block returns to the card view | — |\n * | `employee/management/compensation/addJobForm/submitted` | Fired after the first job + compensation are saved; the block returns to the card and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addJobForm/cancelled` | Fired when the user cancels the add-job form; the block returns to the card view | — |\n * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after a secondary job + compensation are saved; the block returns to the card and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addAnotherJobForm/cancelled` | Fired when the user cancels the add-another-job form; the block returns to the card view | — |\n * | `employee/management/compensation/alertDismissed` | Fired when the user dismisses the \"Job added\" success alert above the card | `null` |\n *\n * @param props - See {@link CompensationProps}.\n * @returns The rendered compensation block.\n * @public\n * @group Block Components\n */\nexport function Compensation({\n dictionary,\n FallbackComponent,\n ...props\n}: CompensationProps & BaseComponentInterface<'Employee.Management.Compensation'>) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Compensation\"\n FallbackComponent={FallbackComponent}\n >\n <CompensationFlow {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["CompensationFlow","employeeId","onEvent","useI18n","machine","useMemo","createMachine","compensationStateMachine","ctx","CompensationCardContextual","jsx","Flow","Compensation","dictionary","FallbackComponent","props","useComponentDictionary","BaseBoundaries"],"mappings":";;;;;;;;;AA8BA,SAASA,EAAiB,EAAE,YAAAC,GAAY,SAAAC,KAA8B;AACpE,EAAAC,EAAQ,kCAAkC;AAE1C,QAAMC,IAAUC;AAAA,IACd,MACEC,EAAc,QAAQC,GAA0B,CAACC,OAAuC;AAAA,MACtF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,MACA,cAAc;AAAA,IAAA,EACd;AAAA,IACJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAAAP,GAAkB,SAAAF,EAAA,CAAkB;AACnD;AA8BO,SAASU,EAAa;AAAA,EAC3B,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,GAAGC;AACL,GAAmF;AACjF,SAAAC,EAAuB,oCAAoCH,CAAU,GAEnE,gBAAAH;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAH;AAAA,MAEA,UAAA,gBAAAJ,EAACV,GAAA,EAAkB,GAAGe,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
1
+ {"version":3,"file":"Compensation.js","sources":["../../../../../src/components/Employee/Compensation/management/Compensation.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport {\n CompensationCardContextual,\n type CompensationContextInterface,\n} from './CompensationComponents'\nimport { compensationStateMachine } from './compensationStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport { BaseBoundaries, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { useI18n } from '@/i18n'\n\n/**\n * Props for {@link Compensation}.\n *\n * @public\n */\nexport interface CompensationProps extends BaseComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n}\n\nfunction CompensationFlow({ employeeId, onEvent }: CompensationProps) {\n useI18n('Employee.Management.Compensation')\n\n const machine = useMemo(\n () =>\n createMachine('card', compensationStateMachine, (ctx: CompensationContextInterface) => ({\n ...ctx,\n component: CompensationCardContextual,\n employeeId,\n successAlert: null,\n })),\n [employeeId],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n\n/**\n * Self-contained block for viewing and managing an employee's jobs and compensation — the same experience the dashboard surfaces, but as a drop-in component that doesn't require the surrounding dashboard chrome.\n *\n * @remarks\n * Renders a read-only card showing the employee's job(s), pay type, wage, and effective date, along with affordances to edit a job's compensation, add a first job from the empty state, add another job (when the primary job is Nonexempt), delete a non-primary job, and cancel a scheduled future-dated change. Choosing to edit or add a job swaps the card for the corresponding form; a successful add returns to the card with a dismissible \"Job successfully added.\" alert, an edit returns to the card without an alert, and cancelling returns without saving. Wraps everything in error and suspense boundaries.\n *\n * The card and form surfaces ({@link CompensationCard}, {@link CompensationEditForm}, {@link CompensationAddJobForm}, {@link CompensationAddAnotherJobForm}) are also exported individually for cases where that orchestration is the wrong fit — for example, when a form needs to render in a modal or drawer, when the card needs to appear read-only with no edit/add affordances, or when the swap is driven by a router. Using them directly means owning the swap, the alert, and any cross-component state yourself.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job; the block opens the edit form for that job | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when the \"Add job\" CTA is clicked from the card's empty state; the block opens the add-first-job form | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when the \"Add another job\" CTA is clicked; the block opens the add-another-job form | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog; the block stays on the card | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card; the block stays on the card | `{ employeeId: string, compensationId: string }` |\n * | `employee/management/compensation/editForm/submitted` | Fired after an edit-compensation save completes; the block returns to the card view | Updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user cancels the edit form; the block returns to the card view | — |\n * | `employee/management/compensation/addJobForm/submitted` | Fired after the first job + compensation are saved; the block returns to the card and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addJobForm/cancelled` | Fired when the user cancels the add-job form; the block returns to the card view | — |\n * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after a secondary job + compensation are saved; the block returns to the card and surfaces the \"Job added\" alert | Updated `Compensation` entity |\n * | `employee/management/compensation/addAnotherJobForm/cancelled` | Fired when the user cancels the add-another-job form; the block returns to the card view | — |\n * | `employee/management/compensation/alertDismissed` | Fired when the user dismisses the \"Job added\" success alert above the card | `null` |\n *\n * @param props - See {@link CompensationProps}.\n * @returns The rendered compensation block.\n * @public\n * @group Block Components\n */\nexport function Compensation({ dictionary, FallbackComponent, ...props }: CompensationProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries\n componentName=\"Employee.Management.Compensation\"\n FallbackComponent={FallbackComponent}\n >\n <CompensationFlow {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["CompensationFlow","employeeId","onEvent","useI18n","machine","useMemo","createMachine","compensationStateMachine","ctx","CompensationCardContextual","jsx","Flow","Compensation","dictionary","FallbackComponent","props","useComponentDictionary","BaseBoundaries"],"mappings":";;;;;;;;;AAsBA,SAASA,EAAiB,EAAE,YAAAC,GAAY,SAAAC,KAA8B;AACpE,EAAAC,EAAQ,kCAAkC;AAE1C,QAAMC,IAAUC;AAAA,IACd,MACEC,EAAc,QAAQC,GAA0B,CAACC,OAAuC;AAAA,MACtF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,MACA,cAAc;AAAA,IAAA,EACd;AAAA,IACJ,CAACA,CAAU;AAAA,EAAA;AAGb,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAAAP,GAAkB,SAAAF,EAAA,CAAkB;AACnD;AA+BO,SAASU,EAAa,EAAE,YAAAC,GAAY,mBAAAC,GAAmB,GAAGC,KAA4B;AAC3F,SAAAC,EAAuB,oCAAoCH,CAAU,GAEnE,gBAAAH;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAH;AAAA,MAEA,UAAA,gBAAAJ,EAACV,GAAA,EAAkB,GAAGe,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
@@ -18,6 +18,7 @@ export interface CompensationAddAnotherJobFormProps extends CommonComponentInter
18
18
  * @remarks
19
19
  * Routed from {@link CompensationCard}'s `employee/management/compensation/card/addAnotherRequested` event. Emits its own scoped `submitted` and `cancelled` events — both are your cue to return to the card. {@link Compensation} bundles the card, this form, and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit.
20
20
  *
21
+ * @events
21
22
  * | Event | Description | Data |
22
23
  * | ----- | ----------- | ---- |
23
24
  * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after the secondary job and compensation are saved; use it to return to the card | Saved `Compensation` entity |
@@ -1 +1 @@
1
- {"version":3,"file":"CompensationAddAnotherJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useJobForm } from '../../shared/useJobForm'\nimport { useCompensationForm } from '../../shared/useCompensationForm'\nimport { AddCompensationFormBody } from '../../shared/AddCompensationFormBody'\nimport { useManagementCompensationDictionary } from '../useManagementCompensationDictionary'\nimport styles from './CompensationAddAnotherJobForm.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationAddAnotherJobForm}.\n *\n * @public\n */\nexport interface CompensationAddAnotherJobFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationAddAnotherJobForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form for adding a secondary job and compensation to an employee from the management surface.\n *\n * @remarks\n * Routed from {@link CompensationCard}'s `employee/management/compensation/card/addAnotherRequested` event. Emits its own scoped `submitted` and `cancelled` events — both are your cue to return to the card. {@link Compensation} bundles the card, this form, and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after the secondary job and compensation are saved; use it to return to the card | Saved `Compensation` entity |\n * | `employee/management/compensation/addAnotherJobForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationAddAnotherJobFormProps}.\n * @returns The rendered add-another-job form.\n * @public\n * @group Block Components\n */\nexport function CompensationAddAnotherJobForm({\n dictionary,\n ...props\n}: CompensationAddAnotherJobFormProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <Root {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction Root({\n employeeId,\n className,\n onEvent,\n}: Omit<CompensationAddAnotherJobFormProps, 'dictionary'>) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const formDictionary = useManagementCompensationDictionary()\n\n // Track jobId locally so a partial-failure submit chain (job POST succeeds,\n // comp PUT fails) doesn't re-POST and create a duplicate job on retry.\n const [resolvedJobId, setResolvedJobId] = useState<string | undefined>(undefined)\n\n const jobForm = useJobForm({\n employeeId,\n jobId: resolvedJobId,\n withHireDateField: false,\n optionalFieldsToRequire: { update: ['title'] },\n shouldFocusError: false,\n })\n\n const resolvedCompensationId = jobForm.isLoading\n ? undefined\n : (jobForm.data.currentJob?.currentCompensationUuid ?? undefined)\n\n const compensationForm = useCompensationForm({\n employeeId,\n jobId: resolvedJobId,\n compensationId: resolvedCompensationId,\n withEffectiveDateField: true,\n optionalFieldsToRequire: { update: ['flsaStatus', 'rate', 'paymentUnit'] },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n // The API defaults a secondary job's hire_date to the primary job's hire_date\n // when omitted. We pass it explicitly to satisfy the SDK hook's requirement\n // and mirror the API's own default behavior. React Query dedupes this query\n // since useJobForm has already loaded it.\n const primaryHireDate = jobForm.data.jobs?.find(j => j.primary)?.hireDate ?? undefined\n\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n const jobResult = await jobForm.actions.onSubmit({ employeeId, hireDate: primaryHireDate })\n if (!jobResult) return\n\n const stubCompensation = jobResult.data.compensations?.find(\n c => c.uuid === jobResult.data.currentCompensationUuid,\n )\n\n const compensationResult = await compensationForm.actions.onSubmit({\n jobId: jobResult.data.uuid,\n compensationId: jobResult.data.currentCompensationUuid ?? undefined,\n compensationVersion: stubCompensation?.version ?? undefined,\n })\n if (!compensationResult) {\n setResolvedJobId(jobResult.data.uuid)\n return\n }\n\n onEvent(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_SUBMITTED,\n compensationResult.data,\n )\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <AddCompensationFormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n title={t('addAnotherJobTitle')}\n submitCtaLabel={t('saveNewJobCta')}\n isPending={isPending}\n onCancel={() => {\n onEvent(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_CANCELLED,\n )\n }}\n dictionary={formDictionary}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["CompensationAddAnotherJobForm","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","Root","employeeId","className","onEvent","useI18n","t","useTranslation","formDictionary","useManagementCompensationDictionary","resolvedJobId","setResolvedJobId","useState","jobForm","useJobForm","resolvedCompensationId","compensationForm","useCompensationForm","loadingErrorHandling","composeErrorHandler","BaseLayout","primaryHireDate","j","submitResult","composeSubmitHandler","jobResult","stubCompensation","c","compensationResult","componentEvents","errorHandling","isPending","classNames","styles","Form","AddCompensationFormBody"],"mappings":";;;;;;;;;;;;;;;;AA4CO,SAASA,EAA8B;AAAA,EAC5C,YAAAC;AAAA,EACA,GAAGC;AACL,GAAuC;AACrC,SAAAC,EAAuB,oCAAoCF,CAAU,GAEnE,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAAM,GAAGJ,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASI,EAAK;AAAA,EACZ,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,GAA2D;AACzD,EAAAC,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAiBC,EAAA,GAIjB,CAACC,GAAeC,CAAgB,IAAIC,EAA6B,MAAS,GAE1EC,IAAUC,EAAW;AAAA,IACzB,YAAAZ;AAAA,IACA,OAAOQ;AAAA,IACP,mBAAmB;AAAA,IACnB,yBAAyB,EAAE,QAAQ,CAAC,OAAO,EAAA;AAAA,IAC3C,kBAAkB;AAAA,EAAA,CACnB,GAEKK,IAAyBF,EAAQ,YACnC,SACCA,EAAQ,KAAK,YAAY,2BAA2B,QAEnDG,IAAmBC,EAAoB;AAAA,IAC3C,YAAAf;AAAA,IACA,O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AAA,EAAK,UAAUX,EAAa,cAC3B,UAAA,gBAAAxB;AAAA,IAACoC;AAAA,IAAA;AAAA,MACC,SAAAtB;AAAA,MACA,kBAAAG;AAAA,MACA,OAAOV,EAAE,oBAAoB;AAAA,MAC7B,gBAAgBA,EAAE,eAAe;AAAA,MACjC,WAAAyB;AAAA,MACA,UAAU,MAAM;AACd,QAAA3B;AAAA,UACEyB,EAAgB;AAAA,QAAA;AAAA,MAEpB;AAAA,MACA,YAAYrB;AAAA,IAAA;AAAA,EAAA,EACd,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"CompensationAddAnotherJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationAddAnotherJobForm/CompensationAddAnotherJobForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useJobForm } from '../../shared/useJobForm'\nimport { useCompensationForm } from '../../shared/useCompensationForm'\nimport { AddCompensationFormBody } from '../../shared/AddCompensationFormBody'\nimport { useManagementCompensationDictionary } from '../useManagementCompensationDictionary'\nimport styles from './CompensationAddAnotherJobForm.module.scss'\nimport { BaseBoundaries, BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { Form } from '@/components/Common/Form'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { composeSubmitHandler } from '@/partner-hook-utils/form/composeSubmitHandler'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationAddAnotherJobForm}.\n *\n * @public\n */\nexport interface CompensationAddAnotherJobFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationAddAnotherJobForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form for adding a secondary job and compensation to an employee from the management surface.\n *\n * @remarks\n * Routed from {@link CompensationCard}'s `employee/management/compensation/card/addAnotherRequested` event. Emits its own scoped `submitted` and `cancelled` events — both are your cue to return to the card. {@link Compensation} bundles the card, this form, and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/addAnotherJobForm/submitted` | Fired after the secondary job and compensation are saved; use it to return to the card | Saved `Compensation` entity |\n * | `employee/management/compensation/addAnotherJobForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationAddAnotherJobFormProps}.\n * @returns The rendered add-another-job form.\n * @public\n * @group Block Components\n */\nexport function CompensationAddAnotherJobForm({\n dictionary,\n ...props\n}: CompensationAddAnotherJobFormProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <Root {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction Root({\n employeeId,\n className,\n onEvent,\n}: Omit<CompensationAddAnotherJobFormProps, 'dictionary'>) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const formDictionary = useManagementCompensationDictionary()\n\n // Track jobId locally so a partial-failure submit chain (job POST succeeds,\n // comp PUT fails) doesn't re-POST and create a duplicate job on retry.\n const [resolvedJobId, setResolvedJobId] = useState<string | undefined>(undefined)\n\n const jobForm = useJobForm({\n employeeId,\n jobId: resolvedJobId,\n withHireDateField: false,\n optionalFieldsToRequire: { update: ['title'] },\n shouldFocusError: false,\n })\n\n const resolvedCompensationId = jobForm.isLoading\n ? undefined\n : (jobForm.data.currentJob?.currentCompensationUuid ?? undefined)\n\n const compensationForm = useCompensationForm({\n employeeId,\n jobId: resolvedJobId,\n compensationId: resolvedCompensationId,\n withEffectiveDateField: true,\n optionalFieldsToRequire: { update: ['flsaStatus', 'rate', 'paymentUnit'] },\n shouldFocusError: false,\n })\n\n if (jobForm.isLoading || compensationForm.isLoading) {\n const loadingErrorHandling = composeErrorHandler([jobForm, compensationForm])\n return <BaseLayout isLoading error={loadingErrorHandling.errors} />\n }\n\n // The API defaults a secondary job's hire_date to the primary job's hire_date\n // when omitted. We pass it explicitly to satisfy the SDK hook's requirement\n // and mirror the API's own default behavior. React Query dedupes this query\n // since useJobForm has already loaded it.\n const primaryHireDate = jobForm.data.jobs?.find(j => j.primary)?.hireDate ?? undefined\n\n const submitResult = composeSubmitHandler([jobForm, compensationForm], async () => {\n const jobResult = await jobForm.actions.onSubmit({ employeeId, hireDate: primaryHireDate })\n if (!jobResult) return\n\n const stubCompensation = jobResult.data.compensations?.find(\n c => c.uuid === jobResult.data.currentCompensationUuid,\n )\n\n const compensationResult = await compensationForm.actions.onSubmit({\n jobId: jobResult.data.uuid,\n compensationId: jobResult.data.currentCompensationUuid ?? undefined,\n compensationVersion: stubCompensation?.version ?? undefined,\n })\n if (!compensationResult) {\n setResolvedJobId(jobResult.data.uuid)\n return\n }\n\n onEvent(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_SUBMITTED,\n compensationResult.data,\n )\n })\n\n const errorHandling = composeErrorHandler([submitResult])\n const isPending = jobForm.status.isPending || compensationForm.status.isPending\n\n return (\n <section className={classNames(styles.container, className)}>\n <BaseLayout error={errorHandling.errors}>\n <Form onSubmit={submitResult.handleSubmit}>\n <AddCompensationFormBody\n jobForm={jobForm}\n compensationForm={compensationForm}\n title={t('addAnotherJobTitle')}\n submitCtaLabel={t('saveNewJobCta')}\n isPending={isPending}\n onCancel={() => {\n onEvent(\n componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_ANOTHER_JOB_FORM_CANCELLED,\n )\n }}\n dictionary={formDictionary}\n />\n </Form>\n </BaseLayout>\n </section>\n )\n}\n"],"names":["CompensationAddAnotherJobForm","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","Root","employeeId","className","onEvent","useI18n","t","useTranslation","formDictionary","useManagementCompensationDictionary","resolvedJobId","setResolvedJobId","useState","jobForm","useJobForm","resolvedCompensationId","compensationForm","useCompensationForm","loadingErrorHandling","composeErrorHandler","BaseLayout","primaryHireDate","j","submitResult","composeSubmitHandler","jobResult","stubCompensation","c","compensationResult","componentEvents","errorHandling","isPending","classNames","styles","Form","AddCompensationFormBody"],"mappings":";;;;;;;;;;;;;;;;AA6CO,SAASA,EAA8B;AAAA,EAC5C,YAAAC;AAAA,EACA,GAAGC;AACL,GAAuC;AACrC,SAAAC,EAAuB,oCAAoCF,CAAU,GAEnE,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAAM,GAAGJ,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASI,EAAK;AAAA,EACZ,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,GAA2D;AACzD,EAAAC,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAiBC,EAAA,GAIjB,CAACC,GAAeC,CAAgB,IAAIC,EAA6B,MAAS,GAE1EC,IAAUC,EAAW;AAAA,IACzB,YAAAZ;AAAA,IACA,OAAOQ;AAAA,IACP,mBAAmB;AAAA,IACnB,yBAAyB,EAAE,QAAQ,CAAC,OAAO,EAAA;AAAA,IAC3C,kBAAkB;AAAA,EAAA,CACnB,GAEKK,IAAyBF,EAAQ,YACnC,SACCA,EAAQ,KAAK,YAAY,2BAA2B,QAEnDG,IAAmBC,EAAoB;AAAA,IAC3C,YAAAf;AAAA,IACA,OAAOQ;AAAA,IACP,gBAAgBK;AAAA,IAChB,wBAAwB;AAAA,IACxB,yBAAyB,EAAE,QAAQ,CAAC,cAAc,QAAQ,aAAa,EAAA;AAAA,IACvE,kBAAkB;AAAA,EAAA,CACnB;AAED,MAAIF,EAAQ,aAAaG,EAAiB,WAAW;AACnD,UAAME,IAAuBC,EAAoB,CAACN,GAASG,CAAgB,CAAC;AAC5E,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gB;AAAA,QAAA;AAAA,MAEpB;AAAA,MACA,YAAYrB;AAAA,IAAA;AAAA,EAAA,EACd,CACF,GACF,GACF;AAEJ;"}
@@ -18,6 +18,7 @@ export interface CompensationAddJobFormProps extends CommonComponentInterface<'E
18
18
  * @remarks
19
19
  * Routed from {@link CompensationCard}'s `employee/management/compensation/card/addRequested` event. Emits its own scoped `submitted` and `cancelled` events — both are your cue to return to the card. {@link Compensation} bundles the card, this form, and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit.
20
20
  *
21
+ * @events
21
22
  * | Event | Description | Data |
22
23
  * | ----- | ----------- | ---- |
23
24
  * | `employee/management/compensation/addJobForm/submitted` | Fired after the job and compensation are saved; use it to return to the card | Saved `Compensation` entity |
@@ -1 +1 @@
1
- {"version":3,"file":"CompensationAddJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { EditCompensation } from '../../onboarding/EditCompensation/EditCompensation'\nimport { useManagementCompensationDictionary } from '../useManagementCompensationDictionary'\nimport { BaseBoundaries, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationAddJobForm}.\n *\n * @public\n */\nexport interface CompensationAddJobFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationAddJobForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form for adding an employee's first job and compensation from the management surface.\n *\n * @remarks\n * Routed from {@link CompensationCard}'s `employee/management/compensation/card/addRequested` event. Emits its own scoped `submitted` and `cancelled` events — both are your cue to return to the card. {@link Compensation} bundles the card, this form, and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/addJobForm/submitted` | Fired after the job and compensation are saved; use it to return to the card | Saved `Compensation` entity |\n * | `employee/management/compensation/addJobForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationAddJobFormProps}.\n * @returns The rendered add-job form.\n * @public\n * @group Block Components\n */\nexport function CompensationAddJobForm({ dictionary, ...props }: CompensationAddJobFormProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <Root {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction Root({ employeeId, onEvent }: Omit<CompensationAddJobFormProps, 'dictionary'>) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const editCompensationDictionary = useManagementCompensationDictionary()\n\n return (\n <EditCompensation\n employeeId={employeeId}\n title={t('addJobTitle')}\n submitCtaLabel={t('saveNewJobCta')}\n dictionary={editCompensationDictionary}\n onEvent={(type, data) => {\n // The onboarding EditCompensation fires its own job/compensation events;\n // the management block exposes a single scoped \"submitted\" event keyed off\n // the compensation save (the terminal step of the create chain).\n if (type === componentEvents.EMPLOYEE_COMPENSATION_UPDATED) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_SUBMITTED, data)\n }\n }}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_CANCELLED)\n }}\n />\n )\n}\n"],"names":["CompensationAddJobForm","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","Root","employeeId","onEvent","useI18n","t","useTranslation","editCompensationDictionary","useManagementCompensationDictionary","EditCompensation","type","data","componentEvents"],"mappings":";;;;;;;;AAoCO,SAASA,EAAuB,EAAE,YAAAC,GAAY,GAAGC,KAAsC;AAC5F,SAAAC,EAAuB,oCAAoCF,CAAU,GAEnE,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAAM,GAAGJ,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASI,EAAK,EAAE,YAAAC,GAAY,SAAAC,KAA4D;AACtF,EAAAC,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAA6BC,EAAA;AAEnC,SACE,gBAAAT;AAAA,IAACU;AAAA,IAAA;AAAA,MACC,YAAAP;AAAA,MACA,OAAOG,EAAE,aAAa;AAAA,MACtB,gBAAgBA,EAAE,eAAe;AAAA,MACjC,YAAYE;AAAA,MACZ,SAAS,CAACG,GAAMC,MAAS;AAIvB,QAAID,MAASE,EAAgB,iCAC3BT,EAAQS,EAAgB,yDAAyDD,CAAI;AAAA,MAEzF;AAAA,MACA,UAAU,MAAM;AACd,QAAAR,EAAQS,EAAgB,uDAAuD;AAAA,MACjF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"CompensationAddJobForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationAddJobForm/CompensationAddJobForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { EditCompensation } from '../../onboarding/EditCompensation/EditCompensation'\nimport { useManagementCompensationDictionary } from '../useManagementCompensationDictionary'\nimport { BaseBoundaries, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { componentEvents, type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationAddJobForm}.\n *\n * @public\n */\nexport interface CompensationAddJobFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationAddJobForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form for adding an employee's first job and compensation from the management surface.\n *\n * @remarks\n * Routed from {@link CompensationCard}'s `employee/management/compensation/card/addRequested` event. Emits its own scoped `submitted` and `cancelled` events — both are your cue to return to the card. {@link Compensation} bundles the card, this form, and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit.\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/addJobForm/submitted` | Fired after the job and compensation are saved; use it to return to the card | Saved `Compensation` entity |\n * | `employee/management/compensation/addJobForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationAddJobFormProps}.\n * @returns The rendered add-job form.\n * @public\n * @group Block Components\n */\nexport function CompensationAddJobForm({ dictionary, ...props }: CompensationAddJobFormProps) {\n useComponentDictionary('Employee.Management.Compensation', dictionary)\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <Root {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction Root({ employeeId, onEvent }: Omit<CompensationAddJobFormProps, 'dictionary'>) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const editCompensationDictionary = useManagementCompensationDictionary()\n\n return (\n <EditCompensation\n employeeId={employeeId}\n title={t('addJobTitle')}\n submitCtaLabel={t('saveNewJobCta')}\n dictionary={editCompensationDictionary}\n onEvent={(type, data) => {\n // The onboarding EditCompensation fires its own job/compensation events;\n // the management block exposes a single scoped \"submitted\" event keyed off\n // the compensation save (the terminal step of the create chain).\n if (type === componentEvents.EMPLOYEE_COMPENSATION_UPDATED) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_SUBMITTED, data)\n }\n }}\n onCancel={() => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_ADD_JOB_FORM_CANCELLED)\n }}\n />\n )\n}\n"],"names":["CompensationAddJobForm","dictionary","props","useComponentDictionary","jsx","BaseBoundaries","Root","employeeId","onEvent","useI18n","t","useTranslation","editCompensationDictionary","useManagementCompensationDictionary","EditCompensation","type","data","componentEvents"],"mappings":";;;;;;;;AAqCO,SAASA,EAAuB,EAAE,YAAAC,GAAY,GAAGC,KAAsC;AAC5F,SAAAC,EAAuB,oCAAoCF,CAAU,GAEnE,gBAAAG,EAACC,KAAe,eAAc,oCAC5B,4BAACC,GAAA,EAAM,GAAGJ,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASI,EAAK,EAAE,YAAAC,GAAY,SAAAC,KAA4D;AACtF,EAAAC,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAA6BC,EAAA;AAEnC,SACE,gBAAAT;AAAA,IAACU;AAAA,IAAA;AAAA,MACC,YAAAP;AAAA,MACA,OAAOG,EAAE,aAAa;AAAA,MACtB,gBAAgBA,EAAE,eAAe;AAAA,MACjC,YAAYE;AAAA,MACZ,SAAS,CAACG,GAAMC,MAAS;AAIvB,QAAID,MAASE,EAAgB,iCAC3BT,EAAQS,EAAgB,yDAAyDD,CAAI;AAAA,MAEzF;AAAA,MACA,UAAU,MAAM;AACd,QAAAR,EAAQS,EAAgB,uDAAuD;AAAA,MACjF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -17,6 +17,7 @@ export interface CompensationCardProps {
17
17
  * @remarks
18
18
  * The card owns its own data fetch, the pending-change alerts and review modal, and the delete-job confirm dialog. It does not render the compensation edit or add-job forms — instead, it emits a distinct request event for each action, and the consumer routes those to {@link CompensationEditForm}, {@link CompensationAddJobForm}, or {@link CompensationAddAnotherJobForm} and renders any post-save success alerts. {@link Compensation} bundles the card, the three form surfaces, and the swap and alert wiring as a single drop-in; reach for the card directly only when that orchestration is the wrong fit (for example, when a form needs to render in a modal or drawer, or when the swap is driven by a router).
19
19
  *
20
+ * @events
20
21
  * | Event | Description | Data |
21
22
  * | ----- | ----------- | ---- |
22
23
  * | `employee/management/compensation/card/editRequested` | Fired when an "Edit" CTA is clicked for a job | `{ employeeId: string, jobId: string }` |
@@ -1 +1 @@
1
- {"version":3,"file":"CompensationCard.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationCard/CompensationCard.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsDeleteMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsDelete'\nimport type { Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job'\nimport {\n useCompensationManagement,\n type UseCompensationManagementReady,\n} from '../../shared/useCompensationManagement'\nimport type { PendingCompensationChange } from '../../shared/getPendingCompensationChanges'\nimport { usePendingChangeDetailRenderer } from '../../shared/usePendingChangeDetailRenderer'\nimport { PendingChangesReviewModal } from '../../shared/PendingChangesReviewModal'\nimport styles from './CompensationCard.module.scss'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { DataView, useDataView, EmptyData, Loading, VisuallyHidden } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { formatDateLongWithYear, formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useFormatCompensationRate } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, FlsaStatus, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\nfunction parseJobRate(rate: Job['rate']): number | null {\n if (rate === undefined) return null\n const numericRate = parseFloat(rate)\n return Number.isFinite(numericRate) ? numericRate : null\n}\n\n/**\n * Props for {@link CompensationCard}.\n *\n * @public\n */\nexport interface CompensationCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link CompensationCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone \"Compensation\" management card that displays an employee's current jobs and compensation, surfaces pending future-dated changes, and exposes edit, add, and delete affordances.\n *\n * @remarks\n * The card owns its own data fetch, the pending-change alerts and review modal, and the delete-job confirm dialog. It does not render the compensation edit or add-job forms — instead, it emits a distinct request event for each action, and the consumer routes those to {@link CompensationEditForm}, {@link CompensationAddJobForm}, or {@link CompensationAddAnotherJobForm} and renders any post-save success alerts. {@link Compensation} bundles the card, the three form surfaces, and the swap and alert wiring as a single drop-in; reach for the card directly only when that orchestration is the wrong fit (for example, when a form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when the \"Add job\" CTA is clicked from the empty state | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when the \"Add another job\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card | `{ employeeId: string, compensationId: string }` |\n *\n * @param props - See {@link CompensationCardProps}.\n * @returns The rendered compensation card.\n * @public\n * @group Block Components\n */\nexport function CompensationCard(props: CompensationCardProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <CompensationCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction CompensationCardContent({ employeeId, onEvent }: CompensationCardProps) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n\n const compensation = useCompensationManagement({ employeeId })\n\n if (compensation.isLoading) {\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box header={<Components.BoxHeader title={t('card.title')} />}>\n <Loading />\n </Components.Box>\n </BaseLayout>\n )\n }\n\n return (\n <CompensationCardReady employeeId={employeeId} onEvent={onEvent} compensation={compensation} />\n )\n}\n\ninterface CompensationCardReadyProps extends CompensationCardProps {\n compensation: UseCompensationManagementReady\n}\n\nfunction CompensationCardReady({ employeeId, onEvent, compensation }: CompensationCardReadyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const formatCompensationRate = useFormatCompensationRate()\n\n const { jobs, primaryFlsaStatus, pendingChanges, hasMultipleJobs, employeeFirstName } =\n compensation.data\n const { cancellingCompensationUuid } = compensation.status\n\n const handleCancelChange = useCallback(\n async (pendingChange: PendingCompensationChange) => {\n const result = await compensation.actions.cancelPendingChange(pendingChange)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_CHANGE_CANCELLED, {\n employeeId,\n compensationId: pendingChange.compensationUuid,\n })\n }\n },\n [compensation, onEvent, employeeId],\n )\n\n const [pendingDeleteJob, setPendingDeleteJob] = useState<{\n uuid: string\n title: string\n } | null>(null)\n\n const { mutateAsync: deleteEmployeeJob, isPending: isDeletingJob } =\n useJobsAndCompensationsDeleteMutation()\n\n const handleConfirmDeleteJob = async () => {\n if (!pendingDeleteJob) return\n const jobId = pendingDeleteJob.uuid\n await deleteEmployeeJob({ request: { jobId } })\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_JOB_DELETED, {\n employeeId,\n jobId,\n })\n setPendingDeleteJob(null)\n }\n\n const singleJob = jobs.length === 1 ? jobs[0]! : undefined\n // Block adding a secondary if the primary already has a future-dated\n // compensation that isn't Nonexempt — that comp will delete secondary jobs\n // at its effective date, matching the gws-flows guard on the new-job action.\n const localTodayISO = formatDateToStringDate(new Date()) ?? ''\n const primaryJob = jobs.find(j => j.primary)\n const hasFutureNonNonexemptComp =\n primaryJob?.compensations?.some(\n c =>\n c.effectiveDate !== undefined &&\n c.effectiveDate > localTodayISO &&\n c.flsaStatus !== FlsaStatus.NONEXEMPT,\n ) ?? false\n const canAddAnotherJob =\n jobs.length >= 1 && primaryFlsaStatus === FlsaStatus.NONEXEMPT && !hasFutureNonNonexemptComp\n const singleJobNumericRate = singleJob ? parseJobRate(singleJob.rate) : null\n const singleJobCurrentComp = singleJob?.compensations?.find(\n c => c.uuid === singleJob.currentCompensationUuid,\n )\n const emptyPlaceholder = <span aria-label={t('card.listEmptyPlaceholder')}>–</span>\n const singleJobPaymentTypeLabel = singleJob?.paymentUnit\n ? singleJob.paymentUnit === 'Hour'\n ? t('card.types.hourly')\n : singleJob.paymentUnit === 'Salary' || singleJob.paymentUnit === 'Year'\n ? t('card.types.salary')\n : singleJob.paymentUnit\n : null\n\n const [isReviewOpen, setIsReviewOpen] = useState(false)\n const renderDetail = usePendingChangeDetailRenderer(employeeFirstName)\n\n // Split pending changes: \"new job\" (job hasn't started yet, no current comp)\n // vs \"update\" (existing comp with a scheduled future change).\n const newJobPendingChanges = pendingChanges.filter(c => c.isNewJob)\n const updatePendingChanges = pendingChanges.filter(c => !c.isNewJob)\n\n useEffect(() => {\n if (updatePendingChanges.length === 0) {\n setIsReviewOpen(false)\n }\n }, [updatePendingChanges.length])\n\n const pendingNewJobUuids = new Set(newJobPendingChanges.map(c => c.jobUuid))\n const singleJobIsPendingNew = singleJob ? pendingNewJobUuids.has(singleJob.uuid) : false\n const hasAnyPendingNewJobs = pendingNewJobUuids.size > 0\n\n // Jobs with a future-dated comp stacked on a current comp (\"pending update\").\n // Editing while one is queued would stack another future comp on top —\n // hide Edit until the existing pending change is cancelled or goes into effect.\n const pendingUpdateJobUuids = new Set(updatePendingChanges.map(c => c.jobUuid))\n const singleJobHasPendingUpdate = singleJob ? pendingUpdateJobUuids.has(singleJob.uuid) : false\n\n const hasPendingUpdates = updatePendingChanges.length > 0\n const showSummaryAlert = hasMultipleJobs && updatePendingChanges.length > 1\n const showInlineAlert = hasPendingUpdates && !showSummaryAlert\n const nextChange = updatePendingChanges[0]\n\n const handleEdit = (job: Job) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED, {\n employeeId,\n jobId: job.uuid,\n })\n }\n const handleAddJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleAddAnotherJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED, {\n employeeId,\n })\n }\n\n const jobsColumns = [\n {\n key: 'jobTitle',\n title: t('card.columns.jobTitle'),\n render: (job: Job) => {\n // Title lives on compensation in the API — `job.title` is a\n // denormalized snapshot that can lag behind comp-level edits on\n // pending jobs, so read from the comp pointed to by\n // `currentCompensationUuid`.\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n const numericRate = parseJobRate(job.rate)\n return (\n <>\n {currentComp?.title || '-'}\n {numericRate !== null && job.paymentUnit ? (\n <Components.Text variant=\"supporting\" size=\"sm\">\n {formatCompensationRate(numericRate, job.paymentUnit)}\n </Components.Text>\n ) : null}\n </>\n )\n },\n },\n {\n key: 'payType',\n title: t('card.columns.payType'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : '-'\n },\n },\n {\n key: 'effectiveDate',\n title: t('card.columns.effectiveDate'),\n render: (job: Job) => {\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n return currentComp?.effectiveDate ? formatDateLongWithYear(currentComp.effectiveDate) : '-'\n },\n },\n ...(hasAnyPendingNewJobs\n ? [\n {\n key: 'status',\n title: <VisuallyHidden>{t('card.columns.status')}</VisuallyHidden>,\n render: (job: Job) =>\n pendingNewJobUuids.has(job.uuid) ? (\n <Components.Badge status=\"warning\">{t('card.pendingStatus')}</Components.Badge>\n ) : null,\n },\n ]\n : []),\n ]\n\n const jobsDataView = useDataView({\n data: jobs,\n columns: jobsColumns,\n itemMenu: (job: Job) => {\n const jobHasPendingUpdate = pendingUpdateJobUuids.has(job.uuid)\n const items = [\n ...(jobHasPendingUpdate\n ? []\n : [\n {\n label: t('card.editJobCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job)\n },\n },\n ]),\n ...(!job.primary\n ? [\n {\n label: t('card.deleteJobCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n const currentComp = job.compensations?.find(\n c => c.uuid === job.currentCompensationUuid,\n )\n setPendingDeleteJob({ uuid: job.uuid, title: currentComp?.title ?? '' })\n },\n },\n ]\n : []),\n ]\n if (items.length === 0) return null\n return (\n <HamburgerMenu\n triggerLabel={t('card.hamburgerTitle')}\n isLoading={isDeletingJob}\n items={items}\n />\n )\n },\n })\n\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box\n withPadding={!hasMultipleJobs}\n header={\n <Components.BoxHeader\n title={t('card.title')}\n action={\n hasMultipleJobs ? null : singleJob ? (\n singleJobHasPendingUpdate ? null : (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleEdit(singleJob)\n }}\n >\n {t('card.editCta')}\n </Components.Button>\n )\n ) : (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addJobCta')}\n </Components.Button>\n )\n }\n />\n }\n footer={\n canAddAnotherJob ? (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddAnotherJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addAnotherJobCta')}\n </Components.Button>\n ) : undefined\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {hasPendingUpdates && (\n <div\n className={[styles.alertWrapper, hasMultipleJobs && styles.alertWrapperPadded]\n .filter(Boolean)\n .join(' ')}\n >\n <Flex flexDirection=\"column\" gap={16}>\n {showInlineAlert && nextChange && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={\n hasMultipleJobs\n ? t('card.pendingChange.alertLabelWithJob', {\n jobTitle: nextChange.jobTitle,\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n : t('card.pendingChange.alertLabel', {\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n }\n >\n <Flex flexDirection=\"column\" gap={12}>\n <Components.UnorderedList\n items={nextChange.details.map(detail => renderDetail(detail))}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n isLoading={cancellingCompensationUuid === nextChange.compensationUuid}\n onClick={() => {\n void handleCancelChange(nextChange)\n }}\n >\n {t('card.pendingChange.cancelCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )}\n {showSummaryAlert && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={t('card.pendingChange.summaryLabel', {\n name: employeeFirstName ?? '',\n })}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n setIsReviewOpen(true)\n }}\n >\n {t('card.pendingChange.reviewCta')}\n </Components.Button>\n }\n />\n )}\n </Flex>\n </div>\n )}\n {hasMultipleJobs ? (\n <DataView label={t('card.tableLabel')} isWithinBox {...jobsDataView} />\n ) : singleJob ? (\n <Components.DescriptionList\n items={[\n {\n term: t('card.jobTitle'),\n description: singleJob.title || emptyPlaceholder,\n },\n {\n term: t('card.type'),\n description: singleJobPaymentTypeLabel || emptyPlaceholder,\n },\n {\n term: t('card.wage'),\n description:\n singleJobNumericRate !== null && singleJob.paymentUnit\n ? formatCompensationRate(singleJobNumericRate, singleJob.paymentUnit)\n : emptyPlaceholder,\n },\n {\n term: t('card.effectiveDate'),\n description: singleJobCurrentComp?.effectiveDate\n ? formatDateLongWithYear(singleJobCurrentComp.effectiveDate)\n : emptyPlaceholder,\n },\n ...(singleJobIsPendingNew\n ? [\n {\n term: t('card.columns.status'),\n description: (\n <Components.Badge status=\"warning\">\n {t('card.pendingStatus')}\n </Components.Badge>\n ),\n },\n ]\n : []),\n ]}\n />\n ) : (\n <EmptyData\n title={t('card.emptyState.title')}\n description={t('card.emptyState.description')}\n />\n )}\n </Flex>\n </Components.Box>\n\n <PendingChangesReviewModal\n isOpen={isReviewOpen}\n pendingChanges={updatePendingChanges}\n employeeFirstName={employeeFirstName}\n cancellingCompensationUuid={cancellingCompensationUuid}\n onClose={() => {\n setIsReviewOpen(false)\n }}\n onCancelChange={change => {\n void handleCancelChange(change)\n }}\n />\n\n <Components.Dialog\n isOpen={pendingDeleteJob !== null}\n onClose={() => {\n setPendingDeleteJob(null)\n }}\n onPrimaryActionClick={() => {\n void handleConfirmDeleteJob()\n }}\n isPrimaryActionLoading={isDeletingJob}\n isDestructive\n title={t('card.deleteJobDialog.title')}\n primaryActionLabel={t('card.deleteJobDialog.confirmCta')}\n closeActionLabel={t('card.deleteJobDialog.cancelCta')}\n >\n {pendingDeleteJob\n ? t('card.deleteJobDialog.description', {\n jobTitle: pendingDeleteJob.title,\n })\n : null}\n </Components.Dialog>\n </BaseLayout>\n )\n}\n"],"names":["parseJobRate","rate","numericRate","CompensationCard","props","jsx","BaseBoundaries","CompensationCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","compensation","useCompensationManagement","BaseLayout","Loading","CompensationCardReady","formatCompensationRate","useFormatCompensationRate","jobs","primaryFlsaStatus","pendingChanges","hasMultipleJobs","employeeFirstName","cancellingCompensationUuid","handleCancelChange","useCallback","pendingChange","componentEvents","pendingDeleteJob","setPendingDeleteJob","useState","deleteEmployeeJob","isDeletingJob","useJobsAndCompensationsDeleteMutation","handleConfirmDeleteJob","jobId","singleJob","localTodayISO","formatDateToStringDate","hasFutureNonNonexemptComp","j","c","FlsaStatus","canAddAnotherJob","singleJobNumericRate","singleJobCurrentComp","emptyPlaceholder","singleJobPaymentTypeLabel","isReviewOpen","setIsReviewOpen","renderDetail","usePendingChangeDetailRenderer","newJobPendingChanges","updatePendingChanges","useEffect","pendingNewJobUuids","singleJobIsPendingNew","hasAnyPendingNewJobs","pendingUpdateJobUuids","singleJobHasPendingUpdate","hasPendingUpdates","showSummaryAlert","showInlineAlert","nextChange","handleEdit","job","handleAddJob","handleAddAnotherJob","jobsColumns","currentComp","jsxs","Fragment","flsaStatus","comp","formatDateLongWithYear","VisuallyHidden","jobsDataView","useDataView","items","PencilSvg","TrashCanSvg","HamburgerMenu","PlusCircleIcon","Flex","styles","detail","DataView","EmptyData","PendingChangesReviewModal","change"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASA,EAAaC,GAAkC;AACtD,MAAIA,MAAS,OAAW,QAAO;AAC/B,QAAMC,IAAc,WAAWD,CAAI;AACnC,SAAO,OAAO,SAASC,CAAW,IAAIA,IAAc;AACtD;AAiCO,SAASC,GAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,MAAe,eAAc,oCAC5B,4BAACC,IAAA,EAAyB,GAAGH,GAAO,EAAA,CACtC;AAEJ;AAEA,SAASG,GAAwB,EAAE,YAAAC,GAAY,SAAAC,KAAkC;AAC/E,EAAAC,GAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GAEbC,IAAeC,GAA0B,EAAE,YAAAR,GAAY;AAE7D,SAAIO,EAAa,YAEb,gBAAAV,EAACY,KAAW,OAAOF,EAAa,cAAc,QAC5C,UAAA,gBAAAV,EAACQ,EAAW,KAAX,EAAe,0BAASA,EAAW,WAAX,EAAqB,OAAOF,EAAE,YAAY,GAAG,GACpE,UAAA,gBAAAN,EAACa,IAAA,EAAQ,EAAA,CACX,EAAA,CACF,IAKF,gBAAAb,EAACc,IAAA,EAAsB,YAAAX,GAAwB,SAAAC,GAAkB,cAAAM,EAAA,CAA4B;AAEjG;AAMA,SAASI,GAAsB,EAAE,YAAAX,GAAY,SAAAC,GAAS,cAAAM,KAA4C;AAChG,QAAM,EAAE,EAAA,IAAMH,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GACbM,IAAyBC,GAAA,GAEzB,EAAE,MAAAC,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MAACQ,EAAW;AAAA,MAAX;AAAA,QACC,QAAQmB,MAAqB;AAAA,QAC7B,SAAS,MAAM;AACb,UAAAC,EAAoB,IAAI;AAAA,QAC1B;AAAA,QACA,sBAAsB,MAAM;AAC1B,UAAKK,EAAA;AAAA,QACP;AAAA,QACA,wBAAwBF;AAAA,QACxB,eAAa;AAAA,QACb,OAAO,EAAE,4BAA4B;AAAA,QACrC,oBAAoB,EAAE,iCAAiC;AAAA,QACvD,kBAAkB,EAAE,gCAAgC;AAAA,QAEnD,UAAAJ,IACG,EAAE,oCAAoC;AAAA,UACpC,UAAUA,EAAiB;AAAA,QAAA,CAC5B,IACD;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
1
+ {"version":3,"file":"CompensationCard.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationCard/CompensationCard.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useJobsAndCompensationsDeleteMutation } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsDelete'\nimport type { Job } from '@gusto/embedded-api-v-2025-11-15/models/components/job'\nimport {\n useCompensationManagement,\n type UseCompensationManagementReady,\n} from '../../shared/useCompensationManagement'\nimport type { PendingCompensationChange } from '../../shared/getPendingCompensationChanges'\nimport { usePendingChangeDetailRenderer } from '../../shared/usePendingChangeDetailRenderer'\nimport { PendingChangesReviewModal } from '../../shared/PendingChangesReviewModal'\nimport styles from './CompensationCard.module.scss'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { DataView, useDataView, EmptyData, Loading, VisuallyHidden } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base/Base'\nimport { formatDateLongWithYear, formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { useFormatCompensationRate } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { componentEvents, FlsaStatus, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\n\nfunction parseJobRate(rate: Job['rate']): number | null {\n if (rate === undefined) return null\n const numericRate = parseFloat(rate)\n return Number.isFinite(numericRate) ? numericRate : null\n}\n\n/**\n * Props for {@link CompensationCard}.\n *\n * @public\n */\nexport interface CompensationCardProps {\n /** The associated employee identifier. */\n employeeId: string\n /** Callback invoked when the card emits an event. See the events table on {@link CompensationCard} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone \"Compensation\" management card that displays an employee's current jobs and compensation, surfaces pending future-dated changes, and exposes edit, add, and delete affordances.\n *\n * @remarks\n * The card owns its own data fetch, the pending-change alerts and review modal, and the delete-job confirm dialog. It does not render the compensation edit or add-job forms — instead, it emits a distinct request event for each action, and the consumer routes those to {@link CompensationEditForm}, {@link CompensationAddJobForm}, or {@link CompensationAddAnotherJobForm} and renders any post-save success alerts. {@link Compensation} bundles the card, the three form surfaces, and the swap and alert wiring as a single drop-in; reach for the card directly only when that orchestration is the wrong fit (for example, when a form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/card/editRequested` | Fired when an \"Edit\" CTA is clicked for a job | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/addRequested` | Fired when the \"Add job\" CTA is clicked from the empty state | `{ employeeId: string }` |\n * | `employee/management/compensation/card/addAnotherRequested` | Fired when the \"Add another job\" CTA is clicked | `{ employeeId: string }` |\n * | `employee/management/compensation/card/jobDeleted` | Fired after a non-primary job is deleted via the card's confirm dialog | `{ employeeId: string, jobId: string }` |\n * | `employee/management/compensation/card/changeCancelled` | Fired after a scheduled future-dated change is cancelled from the card | `{ employeeId: string, compensationId: string }` |\n *\n * @param props - See {@link CompensationCardProps}.\n * @returns The rendered compensation card.\n * @public\n * @group Block Components\n */\nexport function CompensationCard(props: CompensationCardProps) {\n return (\n <BaseBoundaries componentName=\"Employee.Management.Compensation\">\n <CompensationCardContent {...props} />\n </BaseBoundaries>\n )\n}\n\nfunction CompensationCardContent({ employeeId, onEvent }: CompensationCardProps) {\n useI18n('Employee.Management.Compensation')\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n\n const compensation = useCompensationManagement({ employeeId })\n\n if (compensation.isLoading) {\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box header={<Components.BoxHeader title={t('card.title')} />}>\n <Loading />\n </Components.Box>\n </BaseLayout>\n )\n }\n\n return (\n <CompensationCardReady employeeId={employeeId} onEvent={onEvent} compensation={compensation} />\n )\n}\n\ninterface CompensationCardReadyProps extends CompensationCardProps {\n compensation: UseCompensationManagementReady\n}\n\nfunction CompensationCardReady({ employeeId, onEvent, compensation }: CompensationCardReadyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const formatCompensationRate = useFormatCompensationRate()\n\n const { jobs, primaryFlsaStatus, pendingChanges, hasMultipleJobs, employeeFirstName } =\n compensation.data\n const { cancellingCompensationUuid } = compensation.status\n\n const handleCancelChange = useCallback(\n async (pendingChange: PendingCompensationChange) => {\n const result = await compensation.actions.cancelPendingChange(pendingChange)\n if (result) {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_CHANGE_CANCELLED, {\n employeeId,\n compensationId: pendingChange.compensationUuid,\n })\n }\n },\n [compensation, onEvent, employeeId],\n )\n\n const [pendingDeleteJob, setPendingDeleteJob] = useState<{\n uuid: string\n title: string\n } | null>(null)\n\n const { mutateAsync: deleteEmployeeJob, isPending: isDeletingJob } =\n useJobsAndCompensationsDeleteMutation()\n\n const handleConfirmDeleteJob = async () => {\n if (!pendingDeleteJob) return\n const jobId = pendingDeleteJob.uuid\n await deleteEmployeeJob({ request: { jobId } })\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_JOB_DELETED, {\n employeeId,\n jobId,\n })\n setPendingDeleteJob(null)\n }\n\n const singleJob = jobs.length === 1 ? jobs[0]! : undefined\n // Block adding a secondary if the primary already has a future-dated\n // compensation that isn't Nonexempt — that comp will delete secondary jobs\n // at its effective date, matching the gws-flows guard on the new-job action.\n const localTodayISO = formatDateToStringDate(new Date()) ?? ''\n const primaryJob = jobs.find(j => j.primary)\n const hasFutureNonNonexemptComp =\n primaryJob?.compensations?.some(\n c =>\n c.effectiveDate !== undefined &&\n c.effectiveDate > localTodayISO &&\n c.flsaStatus !== FlsaStatus.NONEXEMPT,\n ) ?? false\n const canAddAnotherJob =\n jobs.length >= 1 && primaryFlsaStatus === FlsaStatus.NONEXEMPT && !hasFutureNonNonexemptComp\n const singleJobNumericRate = singleJob ? parseJobRate(singleJob.rate) : null\n const singleJobCurrentComp = singleJob?.compensations?.find(\n c => c.uuid === singleJob.currentCompensationUuid,\n )\n const emptyPlaceholder = <span aria-label={t('card.listEmptyPlaceholder')}>–</span>\n const singleJobPaymentTypeLabel = singleJob?.paymentUnit\n ? singleJob.paymentUnit === 'Hour'\n ? t('card.types.hourly')\n : singleJob.paymentUnit === 'Salary' || singleJob.paymentUnit === 'Year'\n ? t('card.types.salary')\n : singleJob.paymentUnit\n : null\n\n const [isReviewOpen, setIsReviewOpen] = useState(false)\n const renderDetail = usePendingChangeDetailRenderer(employeeFirstName)\n\n // Split pending changes: \"new job\" (job hasn't started yet, no current comp)\n // vs \"update\" (existing comp with a scheduled future change).\n const newJobPendingChanges = pendingChanges.filter(c => c.isNewJob)\n const updatePendingChanges = pendingChanges.filter(c => !c.isNewJob)\n\n useEffect(() => {\n if (updatePendingChanges.length === 0) {\n setIsReviewOpen(false)\n }\n }, [updatePendingChanges.length])\n\n const pendingNewJobUuids = new Set(newJobPendingChanges.map(c => c.jobUuid))\n const singleJobIsPendingNew = singleJob ? pendingNewJobUuids.has(singleJob.uuid) : false\n const hasAnyPendingNewJobs = pendingNewJobUuids.size > 0\n\n // Jobs with a future-dated comp stacked on a current comp (\"pending update\").\n // Editing while one is queued would stack another future comp on top —\n // hide Edit until the existing pending change is cancelled or goes into effect.\n const pendingUpdateJobUuids = new Set(updatePendingChanges.map(c => c.jobUuid))\n const singleJobHasPendingUpdate = singleJob ? pendingUpdateJobUuids.has(singleJob.uuid) : false\n\n const hasPendingUpdates = updatePendingChanges.length > 0\n const showSummaryAlert = hasMultipleJobs && updatePendingChanges.length > 1\n const showInlineAlert = hasPendingUpdates && !showSummaryAlert\n const nextChange = updatePendingChanges[0]\n\n const handleEdit = (job: Job) => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED, {\n employeeId,\n jobId: job.uuid,\n })\n }\n const handleAddJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED, { employeeId })\n }\n const handleAddAnotherJob = () => {\n onEvent(componentEvents.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED, {\n employeeId,\n })\n }\n\n const jobsColumns = [\n {\n key: 'jobTitle',\n title: t('card.columns.jobTitle'),\n render: (job: Job) => {\n // Title lives on compensation in the API — `job.title` is a\n // denormalized snapshot that can lag behind comp-level edits on\n // pending jobs, so read from the comp pointed to by\n // `currentCompensationUuid`.\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n const numericRate = parseJobRate(job.rate)\n return (\n <>\n {currentComp?.title || '-'}\n {numericRate !== null && job.paymentUnit ? (\n <Components.Text variant=\"supporting\" size=\"sm\">\n {formatCompensationRate(numericRate, job.paymentUnit)}\n </Components.Text>\n ) : null}\n </>\n )\n },\n },\n {\n key: 'payType',\n title: t('card.columns.payType'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : '-'\n },\n },\n {\n key: 'effectiveDate',\n title: t('card.columns.effectiveDate'),\n render: (job: Job) => {\n const currentComp = job.compensations?.find(c => c.uuid === job.currentCompensationUuid)\n return currentComp?.effectiveDate ? formatDateLongWithYear(currentComp.effectiveDate) : '-'\n },\n },\n ...(hasAnyPendingNewJobs\n ? [\n {\n key: 'status',\n title: <VisuallyHidden>{t('card.columns.status')}</VisuallyHidden>,\n render: (job: Job) =>\n pendingNewJobUuids.has(job.uuid) ? (\n <Components.Badge status=\"warning\">{t('card.pendingStatus')}</Components.Badge>\n ) : null,\n },\n ]\n : []),\n ]\n\n const jobsDataView = useDataView({\n data: jobs,\n columns: jobsColumns,\n itemMenu: (job: Job) => {\n const jobHasPendingUpdate = pendingUpdateJobUuids.has(job.uuid)\n const items = [\n ...(jobHasPendingUpdate\n ? []\n : [\n {\n label: t('card.editJobCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job)\n },\n },\n ]),\n ...(!job.primary\n ? [\n {\n label: t('card.deleteJobCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n const currentComp = job.compensations?.find(\n c => c.uuid === job.currentCompensationUuid,\n )\n setPendingDeleteJob({ uuid: job.uuid, title: currentComp?.title ?? '' })\n },\n },\n ]\n : []),\n ]\n if (items.length === 0) return null\n return (\n <HamburgerMenu\n triggerLabel={t('card.hamburgerTitle')}\n isLoading={isDeletingJob}\n items={items}\n />\n )\n },\n })\n\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <Components.Box\n withPadding={!hasMultipleJobs}\n header={\n <Components.BoxHeader\n title={t('card.title')}\n action={\n hasMultipleJobs ? null : singleJob ? (\n singleJobHasPendingUpdate ? null : (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleEdit(singleJob)\n }}\n >\n {t('card.editCta')}\n </Components.Button>\n )\n ) : (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addJobCta')}\n </Components.Button>\n )\n }\n />\n }\n footer={\n canAddAnotherJob ? (\n <Components.Button\n variant=\"secondary\"\n onClick={handleAddAnotherJob}\n icon={<PlusCircleIcon />}\n >\n {t('card.addAnotherJobCta')}\n </Components.Button>\n ) : undefined\n }\n >\n <Flex flexDirection=\"column\" gap={16}>\n {hasPendingUpdates && (\n <div\n className={[styles.alertWrapper, hasMultipleJobs && styles.alertWrapperPadded]\n .filter(Boolean)\n .join(' ')}\n >\n <Flex flexDirection=\"column\" gap={16}>\n {showInlineAlert && nextChange && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={\n hasMultipleJobs\n ? t('card.pendingChange.alertLabelWithJob', {\n jobTitle: nextChange.jobTitle,\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n : t('card.pendingChange.alertLabel', {\n date: formatDateLongWithYear(nextChange.effectiveDate),\n })\n }\n >\n <Flex flexDirection=\"column\" gap={12}>\n <Components.UnorderedList\n items={nextChange.details.map(detail => renderDetail(detail))}\n />\n <div>\n <Components.Button\n variant=\"secondary\"\n isLoading={cancellingCompensationUuid === nextChange.compensationUuid}\n onClick={() => {\n void handleCancelChange(nextChange)\n }}\n >\n {t('card.pendingChange.cancelCta')}\n </Components.Button>\n </div>\n </Flex>\n </Components.Alert>\n )}\n {showSummaryAlert && (\n <Components.Alert\n status=\"warning\"\n disableScrollIntoView\n label={t('card.pendingChange.summaryLabel', {\n name: employeeFirstName ?? '',\n })}\n action={\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n setIsReviewOpen(true)\n }}\n >\n {t('card.pendingChange.reviewCta')}\n </Components.Button>\n }\n />\n )}\n </Flex>\n </div>\n )}\n {hasMultipleJobs ? (\n <DataView label={t('card.tableLabel')} isWithinBox {...jobsDataView} />\n ) : singleJob ? (\n <Components.DescriptionList\n items={[\n {\n term: t('card.jobTitle'),\n description: singleJob.title || emptyPlaceholder,\n },\n {\n term: t('card.type'),\n description: singleJobPaymentTypeLabel || emptyPlaceholder,\n },\n {\n term: t('card.wage'),\n description:\n singleJobNumericRate !== null && singleJob.paymentUnit\n ? formatCompensationRate(singleJobNumericRate, singleJob.paymentUnit)\n : emptyPlaceholder,\n },\n {\n term: t('card.effectiveDate'),\n description: singleJobCurrentComp?.effectiveDate\n ? formatDateLongWithYear(singleJobCurrentComp.effectiveDate)\n : emptyPlaceholder,\n },\n ...(singleJobIsPendingNew\n ? [\n {\n term: t('card.columns.status'),\n description: (\n <Components.Badge status=\"warning\">\n {t('card.pendingStatus')}\n </Components.Badge>\n ),\n },\n ]\n : []),\n ]}\n />\n ) : (\n <EmptyData\n title={t('card.emptyState.title')}\n description={t('card.emptyState.description')}\n />\n )}\n </Flex>\n </Components.Box>\n\n <PendingChangesReviewModal\n isOpen={isReviewOpen}\n pendingChanges={updatePendingChanges}\n employeeFirstName={employeeFirstName}\n cancellingCompensationUuid={cancellingCompensationUuid}\n onClose={() => {\n setIsReviewOpen(false)\n }}\n onCancelChange={change => {\n void handleCancelChange(change)\n }}\n />\n\n <Components.Dialog\n isOpen={pendingDeleteJob !== null}\n onClose={() => {\n setPendingDeleteJob(null)\n }}\n onPrimaryActionClick={() => {\n void handleConfirmDeleteJob()\n }}\n isPrimaryActionLoading={isDeletingJob}\n isDestructive\n title={t('card.deleteJobDialog.title')}\n primaryActionLabel={t('card.deleteJobDialog.confirmCta')}\n closeActionLabel={t('card.deleteJobDialog.cancelCta')}\n >\n {pendingDeleteJob\n ? t('card.deleteJobDialog.description', {\n jobTitle: pendingDeleteJob.title,\n })\n : null}\n </Components.Dialog>\n </BaseLayout>\n )\n}\n"],"names":["parseJobRate","rate","numericRate","CompensationCard","props","jsx","BaseBoundaries","CompensationCardContent","employeeId","onEvent","useI18n","t","useTranslation","Components","useComponentContext","compensation","useCompensationManagement","BaseLayout","Loading","CompensationCardReady","formatCompensationRate","useFormatCompensationRate","jobs","primaryFlsaStatus","pendingChanges","hasMultipleJobs","employeeFirstName","cancellingCompensationUuid","handleCancelChange","useCallback","pendingChange","componentEvents","pendingDeleteJob","setPendingDeleteJob","useState","deleteEmployeeJob","isDeletingJob","useJobsAndCompensationsDeleteMutation","handleConfirmDeleteJob","jobId","singleJob","localTodayISO","formatDateToStringDate","hasFutureNonNonexemptComp","j","c","FlsaStatus","canAddAnotherJob","singleJobNumericRate","singleJobCurrentComp","emptyPlaceholder","singleJobPaymentTypeLabel","isReviewOpen","setIsReviewOpen","renderDetail","usePendingChangeDetailRenderer","newJobPendingChanges","updatePendingChanges","useEffect","pendingNewJobUuids","singleJobIsPendingNew","hasAnyPendingNewJobs","pendingUpdateJobUuids","singleJobHasPendingUpdate","hasPendingUpdates","showSummaryAlert","showInlineAlert","nextChange","handleEdit","job","handleAddJob","handleAddAnotherJob","jobsColumns","currentComp","jsxs","Fragment","flsaStatus","comp","formatDateLongWithYear","VisuallyHidden","jobsDataView","useDataView","items","PencilSvg","TrashCanSvg","HamburgerMenu","PlusCircleIcon","Flex","styles","detail","DataView","EmptyData","PendingChangesReviewModal","change"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASA,EAAaC,GAAkC;AACtD,MAAIA,MAAS,OAAW,QAAO;AAC/B,QAAMC,IAAc,WAAWD,CAAI;AACnC,SAAO,OAAO,SAASC,CAAW,IAAIA,IAAc;AACtD;AAkCO,SAASC,GAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,MAAe,eAAc,oCAC5B,4BAACC,IAAA,EAAyB,GAAGH,GAAO,EAAA,CACtC;AAEJ;AAEA,SAASG,GAAwB,EAAE,YAAAC,GAAY,SAAAC,KAAkC;AAC/E,EAAAC,GAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GAEbC,IAAeC,GAA0B,EAAE,YAAAR,GAAY;AAE7D,SAAIO,EAAa,YAEb,gBAA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AA;AAAA,cACC,OAAO,EAAE,uBAAuB;AAAA,cAChC,aAAa,EAAE,6BAA6B;AAAA,YAAA;AAAA,UAAA;AAAA,QAC9C,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAtF;AAAA,MAACuF;AAAA,MAAA;AAAA,QACC,QAAQxC;AAAA,QACR,gBAAgBK;AAAA,QAChB,mBAAA/B;AAAA,QACA,4BAAAC;AAAA,QACA,SAAS,MAAM;AACb,UAAA0B,EAAgB,EAAK;AAAA,QACvB;AAAA,QACA,gBAAgB,CAAAwC,MAAU;AACxB,UAAKjE,EAAmBiE,CAAM;AAAA,QAChC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAxF;AAAA,MAACQ,EAAW;AAAA,MAAX;AAAA,QACC,QAAQmB,MAAqB;AAAA,QAC7B,SAAS,MAAM;AACb,UAAAC,EAAoB,IAAI;AAAA,QAC1B;AAAA,QACA,sBAAsB,MAAM;AAC1B,UAAKK,EAAA;AAAA,QACP;AAAA,QACA,wBAAwBF;AAAA,QACxB,eAAa;AAAA,QACb,OAAO,EAAE,4BAA4B;AAAA,QACrC,oBAAoB,EAAE,iCAAiC;AAAA,QACvD,kBAAkB,EAAE,gCAAgC;AAAA,QAEnD,UAAAJ,IACG,EAAE,oCAAoC;AAAA,UACpC,UAAUA,EAAiB;AAAA,QAAA,CAC5B,IACD;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
@@ -25,6 +25,7 @@ export interface CompensationEditFormProps extends CommonComponentInterface<'Emp
25
25
  * @remarks
26
26
  * Pair with {@link CompensationCard} to route its `employee/management/compensation/card/editRequested` event to this form. {@link Compensation} bundles the card, the three form surfaces (edit, add job, add another job), and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit (for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router).
27
27
  *
28
+ * @events
28
29
  * | Event | Description | Data |
29
30
  * | ----- | ----------- | ---- |
30
31
  * | `employee/management/compensation/editForm/submitted` | Fired after the compensation change is saved; use it to return to the card | The updated `Compensation` entity |
@@ -1 +1 @@
1
- {"version":3,"file":"CompensationEditForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.tsx"],"sourcesContent":["import { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs'\nimport { getPendingCompensationChanges } from '../../shared/getPendingCompensationChanges'\nimport { CompensationEditJobForm } from '../CompensationEditJobForm/CompensationEditJobForm'\nimport { CompensationEditPendingJobForm } from '../CompensationEditPendingJobForm/CompensationEditPendingJobForm'\nimport { BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationEditForm}.\n *\n * @public\n */\nexport interface CompensationEditFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /**\n * The id of the job whose compensation is being edited (for example, the `jobId` from the\n * {@link CompensationCard} `employee/management/compensation/card/editRequested` payload).\n * The form inspects the job's compensations to decide whether to edit the current\n * compensation or an already-scheduled future-dated change.\n */\n jobId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationEditForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form that edits the compensation for a single job, branching automatically between editing the current compensation and an already-scheduled future-dated change.\n *\n * @remarks\n * Pair with {@link CompensationCard} to route its `employee/management/compensation/card/editRequested` event to this form. {@link Compensation} bundles the card, the three form surfaces (edit, add job, add another job), and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit (for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/editForm/submitted` | Fired after the compensation change is saved; use it to return to the card | The updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationEditFormProps}.\n * @returns The rendered compensation edit form.\n * @public\n * @group Block Components\n */\nexport function CompensationEditForm({\n employeeId,\n jobId,\n onEvent,\n dictionary,\n}: CompensationEditFormProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n\n // The API does not guarantee ordering of job.compensations, so rely on the\n // same sorted helper that drives the card display (ascending by effectiveDate)\n // to find the nearest pending change.\n const nearestPending = getPendingCompensationChanges(job ? [job] : [])[0]\n\n if (nearestPending) {\n return (\n <CompensationEditPendingJobForm\n employeeId={employeeId}\n jobId={jobId}\n compensationId={nearestPending.compensationUuid}\n isNewJob={nearestPending.isNewJob}\n isPrimaryJob={job?.primary ?? false}\n onEvent={onEvent}\n dictionary={dictionary}\n />\n )\n }\n\n return (\n <CompensationEditJobForm\n employeeId={employeeId}\n jobId={jobId}\n onEvent={onEvent}\n dictionary={dictionary}\n />\n )\n}\n"],"names":["CompensationEditForm","employeeId","jobId","onEvent","dictionary","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","nearestPending","getPendingCompensationChanges","jsx","CompensationEditPendingJobForm","CompensationEditJobForm"],"mappings":";;;;;;;;AA4CO,SAASA,EAAqB;AAAA,EACnC,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,GAA8B;AAC5B,QAAMC,IAAYC,EAA+B,EAAE,YAAAL,EAAA,GAAc,EAAE,SAAS,CAAC,CAACA,GAAY;AAE1F,MAAII,EAAU,aAAa,CAACA,EAAU,MAAM;AAC1C,UAAME,IAAgBC,EAAoB,CAACH,CAAS,CAAC;AACrD,6BAAQI,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAc,QAAQ;AAAA,EAC5D;AAEA,QAAMG,IAAML,EAAU,KAAK,MAAM,KAAK,CAAAM,MAAKA,EAAE,SAAST,CAAK,GAKrDU,IAAiBC,EAA8BH,IAAM,CAACA,CAAG,IAAI,CAAA,CAAE,EAAE,CAAC;AAExE,SAAIE,IAEA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAAd;AAAA,MACA,OAAAC;AAAA,MACA,gBAAgBU,EAAe;AAAA,MAC/B,UAAUA,EAAe;AAAA,MACzB,cAAcF,GAAK,WAAW;AAAA,MAC9B,SAAAP;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,EAAA,IAMJ,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,YAAAf;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"CompensationEditForm.js","sources":["../../../../../../src/components/Employee/Compensation/management/CompensationEditForm/CompensationEditForm.tsx"],"sourcesContent":["import { useJobsAndCompensationsGetJobs } from '@gusto/embedded-api-v-2025-11-15/react-query/jobsAndCompensationsGetJobs'\nimport { getPendingCompensationChanges } from '../../shared/getPendingCompensationChanges'\nimport { CompensationEditJobForm } from '../CompensationEditJobForm/CompensationEditJobForm'\nimport { CompensationEditPendingJobForm } from '../CompensationEditPendingJobForm/CompensationEditPendingJobForm'\nimport { BaseLayout, type CommonComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { composeErrorHandler } from '@/partner-hook-utils/composeErrorHandler'\nimport { type EventType } from '@/shared/constants'\n\n/**\n * Props for {@link CompensationEditForm}.\n *\n * @public\n */\nexport interface CompensationEditFormProps extends CommonComponentInterface<'Employee.Management.Compensation'> {\n /** The associated employee identifier. */\n employeeId: string\n /**\n * The id of the job whose compensation is being edited (for example, the `jobId` from the\n * {@link CompensationCard} `employee/management/compensation/card/editRequested` payload).\n * The form inspects the job's compensations to decide whether to edit the current\n * compensation or an already-scheduled future-dated change.\n */\n jobId: string\n /** Callback invoked when the form emits an event. See the events table on {@link CompensationEditForm} for the available event types and payloads. */\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**\n * Standalone form that edits the compensation for a single job, branching automatically between editing the current compensation and an already-scheduled future-dated change.\n *\n * @remarks\n * Pair with {@link CompensationCard} to route its `employee/management/compensation/card/editRequested` event to this form. {@link Compensation} bundles the card, the three form surfaces (edit, add job, add another job), and the swap and alert wiring as a single drop-in; reach for this form directly only when that orchestration is the wrong fit (for example, when the form needs to render in a modal or drawer, or when the swap is driven by a router).\n *\n * @events\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `employee/management/compensation/editForm/submitted` | Fired after the compensation change is saved; use it to return to the card | The updated `Compensation` entity |\n * | `employee/management/compensation/editForm/cancelled` | Fired when the user clicks Cancel; use it to return to the card | — |\n *\n * @param props - See {@link CompensationEditFormProps}.\n * @returns The rendered compensation edit form.\n * @public\n * @group Block Components\n */\nexport function CompensationEditForm({\n employeeId,\n jobId,\n onEvent,\n dictionary,\n}: CompensationEditFormProps) {\n const jobsQuery = useJobsAndCompensationsGetJobs({ employeeId }, { enabled: !!employeeId })\n\n if (jobsQuery.isLoading || !jobsQuery.data) {\n const errorHandling = composeErrorHandler([jobsQuery])\n return <BaseLayout isLoading error={errorHandling.errors} />\n }\n\n const job = jobsQuery.data.jobs?.find(j => j.uuid === jobId)\n\n // The API does not guarantee ordering of job.compensations, so rely on the\n // same sorted helper that drives the card display (ascending by effectiveDate)\n // to find the nearest pending change.\n const nearestPending = getPendingCompensationChanges(job ? [job] : [])[0]\n\n if (nearestPending) {\n return (\n <CompensationEditPendingJobForm\n employeeId={employeeId}\n jobId={jobId}\n compensationId={nearestPending.compensationUuid}\n isNewJob={nearestPending.isNewJob}\n isPrimaryJob={job?.primary ?? false}\n onEvent={onEvent}\n dictionary={dictionary}\n />\n )\n }\n\n return (\n <CompensationEditJobForm\n employeeId={employeeId}\n jobId={jobId}\n onEvent={onEvent}\n dictionary={dictionary}\n />\n )\n}\n"],"names":["CompensationEditForm","employeeId","jobId","onEvent","dictionary","jobsQuery","useJobsAndCompensationsGetJobs","errorHandling","composeErrorHandler","BaseLayout","job","j","nearestPending","getPendingCompensationChanges","jsx","CompensationEditPendingJobForm","CompensationEditJobForm"],"mappings":";;;;;;;;AA6CO,SAASA,EAAqB;AAAA,EACnC,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AACF,GAA8B;AAC5B,QAAMC,IAAYC,EAA+B,EAAE,YAAAL,EAAA,GAAc,EAAE,SAAS,CAAC,CAACA,GAAY;AAE1F,MAAII,EAAU,aAAa,CAACA,EAAU,MAAM;AAC1C,UAAME,IAAgBC,EAAoB,CAACH,CAAS,CAAC;AACrD,6BAAQI,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAc,QAAQ;AAAA,EAC5D;AAEA,QAAMG,IAAML,EAAU,KAAK,MAAM,KAAK,CAAAM,MAAKA,EAAE,SAAST,CAAK,GAKrDU,IAAiBC,EAA8BH,IAAM,CAACA,CAAG,IAAI,CAAA,CAAE,EAAE,CAAC;AAExE,SAAIE,IAEA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAAd;AAAA,MACA,OAAAC;AAAA,MACA,gBAAgBU,EAAe;AAAA,MAC/B,UAAUA,EAAe;AAAA,MACzB,cAAcF,GAAK,WAAW;AAAA,MAC9B,SAAAP;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,EAAA,IAMJ,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,YAAAf;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,5 +1,5 @@
1
- import { jsxs as r, jsx as t, Fragment as E } from "react/jsx-runtime";
2
- import { useTranslation as h, Trans as d } from "react-i18next";
1
+ import { jsxs as r, jsx as t, Fragment as h } from "react/jsx-runtime";
2
+ import { useTranslation as E, Trans as m } from "react-i18next";
3
3
  import { Flex as c } from "../../../Common/Flex/Flex.js";
4
4
  import { ActionsLayout as R } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
5
  import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
@@ -14,7 +14,7 @@ function S({
14
14
  isPending: u,
15
15
  onCancel: f
16
16
  }) {
17
- const { t: e } = h("Employee.Management.Compensation"), s = v(), m = C("currency"), o = n.form.Fields, a = i.form.Fields;
17
+ const { t: e } = E("Employee.Management.Compensation"), s = v(), d = C("currency"), o = n.form.Fields, a = i.form.Fields;
18
18
  return /* @__PURE__ */ r(c, { flexDirection: "column", gap: 32, children: [
19
19
  /* @__PURE__ */ t(s.Heading, { as: "h2", children: g }),
20
20
  /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: [
@@ -36,13 +36,14 @@ function S({
36
36
  formHookResult: n
37
37
  }
38
38
  ),
39
- a.FlsaStatus && /* @__PURE__ */ r(E, { children: [
39
+ a.FlsaStatus && /* @__PURE__ */ r(h, { children: [
40
40
  /* @__PURE__ */ t(
41
41
  a.FlsaStatus,
42
42
  {
43
43
  label: e("employeeClassification"),
44
+ placeholder: e("flsaStatusPlaceholder"),
44
45
  description: /* @__PURE__ */ t(
45
- d,
46
+ m,
46
47
  {
47
48
  t: e,
48
49
  i18nKey: "classificationLink",
@@ -51,7 +52,7 @@ function S({
51
52
  ),
52
53
  validationMessages: {
53
54
  REQUIRED: e("validations.exemptThreshold", {
54
- limit: m(b)
55
+ limit: d(b)
55
56
  })
56
57
  },
57
58
  getOptionLabel: (l) => e(`flsaStatusLabels.${l}`),
@@ -83,7 +84,7 @@ function S({
83
84
  label: e("commissionAlerts.minimumWage.label"),
84
85
  disableScrollIntoView: !0,
85
86
  children: /* @__PURE__ */ t(
86
- d,
87
+ m,
87
88
  {
88
89
  t: e,
89
90
  i18nKey: "commissionAlerts.minimumWage.body",
@@ -119,7 +120,7 @@ function S({
119
120
  REQUIRED: e("validations.rate"),
120
121
  RATE_MINIMUM: e("validations.nonZeroRate"),
121
122
  RATE_EXEMPT_THRESHOLD: e("validations.rateExemptThreshold", {
122
- limit: m(b)
123
+ limit: d(b)
123
124
  })
124
125
  },
125
126
  formHookResult: i
@@ -129,6 +130,7 @@ function S({
129
130
  a.PaymentUnit,
130
131
  {
131
132
  label: e("wageFrequencyLabel"),
133
+ placeholder: e("paymentUnitPlaceholder"),
132
134
  description: e("paymentUnitDescription"),
133
135
  validationMessages: { REQUIRED: e("validations.paymentUnit") },
134
136
  getOptionLabel: (l) => e(`paymentUnitOptions.${l}`),
@@ -159,9 +161,10 @@ function S({
159
161
  a.MinimumWageId,
160
162
  {
161
163
  label: e("minimumWageLabel"),
164
+ placeholder: e("minimumWagePlaceholder"),
162
165
  description: e("minimumWageDescription"),
163
166
  validationMessages: { REQUIRED: e("validations.minimumWage") },
164
- getOptionLabel: (l) => `${m(Number(l.wage))} - ${l.authority}: ${l.notes ?? ""}`,
167
+ getOptionLabel: (l) => `${d(Number(l.wage))} - ${l.authority}: ${l.notes ?? ""}`,
165
168
  formHookResult: i
166
169
  }
167
170
  ),
@@ -177,7 +180,7 @@ function S({
177
180
  {
178
181
  label: e("stateWcCoveredLabel"),
179
182
  description: /* @__PURE__ */ t(
180
- d,
183
+ m,
181
184
  {
182
185
  t: e,
183
186
  i18nKey: "stateWcCoveredDescription",
@@ -1 +1 @@
1
- {"version":3,"file":"ManagementCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api-v-2025-11-15/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2025-11-15/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2025-11-15/models/components/minimumwage'\nimport type { UseJobFormReady } from '../shared/useJobForm'\nimport type { UseCompensationFormReady } from '../shared/useCompensationForm'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\n/** @internal */\nexport interface ManagementCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (schedule a future comp\n * change for a present job) and `EditPendingCompensation` (update an existing future comp).\n * Field visibility is driven entirely by hook configuration — the hooks expose `undefined`\n * for fields that should not render — so this component renders the correct subset for each\n * use case without extra conditional props.\n *\n * @internal\n */\nexport function ManagementCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n}: ManagementCompensationFormBodyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <CompFields.Title\n label={t('jobTitleLabel')}\n validationMessages={{ REQUIRED: t('validations.jobTitleSentence') }}\n formHookResult={compensationForm}\n />\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.hireDate'),\n }}\n formHookResult={jobForm}\n />\n )}\n\n {CompFields.FlsaStatus && (\n <>\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n {(compensationForm.status.showCommissionFederalMinimumPayAlert ||\n compensationForm.status.showCommissionMinimumWageAlert ||\n compensationForm.status.showOwnerSalaryAlert ||\n compensationForm.status.willDeleteSecondaryJobs) && (\n <Flex flexDirection=\"column\" gap={0}>\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('validations.classificationChangeNotification')}\n status=\"warning\"\n >\n {t('validations.classificationChangeRemovesSecondaryJobs')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionFederalMinimumPayAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.federalMinimumPay.label')}\n disableScrollIntoView\n >\n {t('commissionAlerts.federalMinimumPay.body')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionMinimumWageAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.minimumWage.label')}\n disableScrollIntoView\n >\n <Trans\n t={t}\n i18nKey=\"commissionAlerts.minimumWage.body\"\n components={{\n minimumWageLink: (\n <Components.Link\n href=\"https://support.gusto.com/article/112472520100000/manage-tip-wages-distributed-service-charges-and-tip-credits-in-gusto-for-admins\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Alert>\n )}\n {compensationForm.status.showOwnerSalaryAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.ownerSalary.label')}\n disableScrollIntoView\n />\n )}\n </Flex>\n )}\n </>\n )}\n\n {CompFields.Rate && (\n <CompFields.Rate\n label={t('wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.PaymentUnit && (\n <CompFields.PaymentUnit\n label={t('wageFrequencyLabel')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) => t(`paymentUnitOptions.${unit}` as const)}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n EFFECTIVE_DATE_BEFORE_MIN: t('validations.effectiveDateBeforeMin'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentShareholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n </Flex>\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["ManagementCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;AA8BO,SAASA,EAA+B;AAAA,EAC7C,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAAwC;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GACbC,IAASC,EAAmB,UAAU,GAEtCC,IAAYZ,EAAQ,KAAK,QACzBa,IAAaZ,EAAiB,KAAK;AAEzC,SACE,gBAAAa,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAN,GAAM;AAAA,IAEnC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACH,EAAW;AAAA,QAAX;AAAA,UACC,OAAOP,EAAE,eAAe;AAAA,UACxB,oBAAoB,EAAE,UAAUA,EAAE,8B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aACE,gBAAAU;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,GAAAZ;AAAA,cACA,SAAQ;AAAA,cACR,YAAY;AAAA,gBACV,QACE,gBAAAU;AAAA,kBAACR,EAAW;AAAA,kBAAX;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,KAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAEJ;AAAA,UAAA;AAAA,UAGJ,gBAAgB,CAACe,MACLjB,EAAViB,IAAY,8BAAiC,0BAAN;AAAA,UAEzC,gBAAgBvB;AAAA,QAAA;AAAA,MAAA;AAAA,MAInBY,EAAU,oBACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,uBAAuB;AAAA,UAChC,aAAaA,EAAE,6BAA6B;AAAA,UAC5C,aAAaA,EAAE,uBAAuB;AAAA,UACtC,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBN;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAECwB,GAAA,EACE,UAAA;AAAA,MAAAnB,KACC,gBAAAW,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAAU,YAAYD,GACnE,UAAAE,EAAE,WAAW,EAAA,CAChB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWJ,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"ManagementCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/management/ManagementCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api-v-2025-11-15/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api-v-2025-11-15/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api-v-2025-11-15/models/components/minimumwage'\nimport type { UseJobFormReady } from '../shared/useJobForm'\nimport type { UseCompensationFormReady } from '../shared/useCompensationForm'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\n/** @internal */\nexport interface ManagementCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (schedule a future comp\n * change for a present job) and `EditPendingCompensation` (update an existing future comp).\n * Field visibility is driven entirely by hook configuration — the hooks expose `undefined`\n * for fields that should not render — so this component renders the correct subset for each\n * use case without extra conditional props.\n *\n * @internal\n */\nexport function ManagementCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n}: ManagementCompensationFormBodyProps) {\n const { t } = useTranslation('Employee.Management.Compensation')\n const Components = useComponentContext()\n const format = useNumberFormatter('currency')\n\n const JobFields = jobForm.form.Fields\n const CompFields = compensationForm.form.Fields\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h2\">{title}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <CompFields.Title\n label={t('jobTitleLabel')}\n validationMessages={{ REQUIRED: t('validations.jobTitleSentence') }}\n formHookResult={compensationForm}\n />\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.hireDate'),\n }}\n formHookResult={jobForm}\n />\n )}\n\n {CompFields.FlsaStatus && (\n <>\n <CompFields.FlsaStatus\n label={t('employeeClassification')}\n placeholder={t('flsaStatusPlaceholder')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{ ClassificationLink: <Components.Link /> }}\n />\n }\n validationMessages={{\n REQUIRED: t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n getOptionLabel={(status: FlsaStatusType) => t(`flsaStatusLabels.${status}`)}\n formHookResult={compensationForm}\n />\n {(compensationForm.status.showCommissionFederalMinimumPayAlert ||\n compensationForm.status.showCommissionMinimumWageAlert ||\n compensationForm.status.showOwnerSalaryAlert ||\n compensationForm.status.willDeleteSecondaryJobs) && (\n <Flex flexDirection=\"column\" gap={0}>\n {compensationForm.status.willDeleteSecondaryJobs && (\n <Components.Alert\n label={t('validations.classificationChangeNotification')}\n status=\"warning\"\n >\n {t('validations.classificationChangeRemovesSecondaryJobs')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionFederalMinimumPayAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.federalMinimumPay.label')}\n disableScrollIntoView\n >\n {t('commissionAlerts.federalMinimumPay.body')}\n </Components.Alert>\n )}\n {compensationForm.status.showCommissionMinimumWageAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.minimumWage.label')}\n disableScrollIntoView\n >\n <Trans\n t={t}\n i18nKey=\"commissionAlerts.minimumWage.body\"\n components={{\n minimumWageLink: (\n <Components.Link\n href=\"https://support.gusto.com/article/112472520100000/manage-tip-wages-distributed-service-charges-and-tip-credits-in-gusto-for-admins\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Alert>\n )}\n {compensationForm.status.showOwnerSalaryAlert && (\n <Components.Alert\n status=\"info\"\n label={t('commissionAlerts.ownerSalary.label')}\n disableScrollIntoView\n />\n )}\n </Flex>\n )}\n </>\n )}\n\n {CompFields.Rate && (\n <CompFields.Rate\n label={t('wageLabel')}\n validationMessages={{\n REQUIRED: t('validations.rate'),\n RATE_MINIMUM: t('validations.nonZeroRate'),\n RATE_EXEMPT_THRESHOLD: t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.PaymentUnit && (\n <CompFields.PaymentUnit\n label={t('wageFrequencyLabel')}\n placeholder={t('paymentUnitPlaceholder')}\n description={t('paymentUnitDescription')}\n validationMessages={{ REQUIRED: t('validations.paymentUnit') }}\n getOptionLabel={(unit: PaymentUnit) => t(`paymentUnitOptions.${unit}` as const)}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDateLabel')}\n validationMessages={{\n REQUIRED: t('validations.effectiveDate'),\n EFFECTIVE_DATE_BEFORE_HIRE: t('validations.effectiveDateBeforeHire'),\n EFFECTIVE_DATE_BEFORE_MIN: t('validations.effectiveDateBeforeMin'),\n }}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.AdjustForMinimumWage && (\n <CompFields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n formHookResult={compensationForm}\n />\n )}\n\n {CompFields.MinimumWageId && (\n <CompFields.MinimumWageId\n label={t('minimumWageLabel')}\n placeholder={t('minimumWagePlaceholder')}\n description={t('minimumWageDescription')}\n validationMessages={{ REQUIRED: t('validations.minimumWage') }}\n getOptionLabel={(wage: MinimumWage) =>\n `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`\n }\n formHookResult={compensationForm}\n />\n )}\n\n {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentShareholderLabel')}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcCovered && (\n <JobFields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n getOptionLabel={(covered: boolean) =>\n covered ? t('stateWcCoveredOptions.yes') : t('stateWcCoveredOptions.no')\n }\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.StateWcClassCode && (\n <JobFields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n placeholder={t('stateWcClassCodeLabel')}\n validationMessages={{ REQUIRED: t('validations.stateWcClassCode') }}\n formHookResult={jobForm}\n />\n )}\n </Flex>\n\n <ActionsLayout>\n {onCancel && (\n <Components.Button variant=\"secondary\" onClick={onCancel} isDisabled={isPending}>\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["ManagementCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;AA8BO,SAASA,EAA+B;AAAA,EAC7C,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,GAAwC;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzDC,IAAaC,EAAA,GACbC,IAASC,EAAmB,UAAU,GAEtCC,IAAYZ,EAAQ,KAAK,QACzBa,IAAaZ,EAAiB,KAAK;AAEzC,SACE,gBAAAa,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAN,GAAM;AAAA,IAEnC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACH,EAAW;AAAA,QAAX;AAAA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AAE,4BAA4B;AAAA,UACrC,gBAAgBN;AAAA,QAAA;AAAA,MAAA;AAAA,MAInBY,EAAU,kBACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,qBAAqB;AAAA,UAC9B,aACE,gBAAAU;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,GAAAZ;AAAA,cACA,SAAQ;AAAA,cACR,YAAY;AAAA,gBACV,QACE,gBAAAU;AAAA,kBAACR,EAAW;AAAA,kBAAX;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,KAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAEJ;AAAA,UAAA;AAAA,UAGJ,gBAAgB,CAACe,MACLjB,EAAViB,IAAY,8BAAiC,0BAAN;AAAA,UAEzC,gBAAgBvB;AAAA,QAAA;AAAA,MAAA;AAAA,MAInBY,EAAU,oBACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,uBAAuB;AAAA,UAChC,aAAaA,EAAE,6BAA6B;AAAA,UAC5C,aAAaA,EAAE,uBAAuB;AAAA,UACtC,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBN;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAECwB,GAAA,EACE,UAAA;AAAA,MAAAnB,KACC,gBAAAW,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAAU,YAAYD,GACnE,UAAAE,EAAE,WAAW,EAAA,CAChB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWJ,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,21 +1,17 @@
1
1
  import { state as t, transition as E, reduce as n } from "robot3";
2
2
  import { CompensationEditFormContextual as N, CompensationAddJobFormContextual as O, CompensationAddAnotherJobFormContextual as d, CompensationCardContextual as r } from "./CompensationComponents.js";
3
3
  import { componentEvents as o } from "../../../../shared/constants.js";
4
- const _ = n(
5
- (A) => ({
6
- ...A,
7
- component: r,
8
- successAlert: null,
9
- currentJobId: null
10
- })
11
- ), e = (A) => n(
12
- (M) => ({
13
- ...M,
14
- component: r,
15
- successAlert: A,
16
- currentJobId: null
17
- })
18
- ), C = {
4
+ const _ = n((A) => ({
5
+ ...A,
6
+ component: r,
7
+ successAlert: null,
8
+ currentJobId: null
9
+ })), e = (A) => n((M) => ({
10
+ ...M,
11
+ component: r,
12
+ successAlert: A,
13
+ currentJobId: null
14
+ })), C = {
19
15
  card: t(
20
16
  E(
21
17
  o.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_EDIT_REQUESTED,
@@ -32,26 +28,22 @@ const _ = n(
32
28
  E(
33
29
  o.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_REQUESTED,
34
30
  "addJob",
35
- n(
36
- (A) => ({
37
- ...A,
38
- component: O,
39
- currentJobId: null,
40
- successAlert: null
41
- })
42
- )
31
+ n((A) => ({
32
+ ...A,
33
+ component: O,
34
+ currentJobId: null,
35
+ successAlert: null
36
+ }))
43
37
  ),
44
38
  E(
45
39
  o.EMPLOYEE_MANAGEMENT_COMPENSATION_CARD_ADD_ANOTHER_REQUESTED,
46
40
  "addAnotherJob",
47
- n(
48
- (A) => ({
49
- ...A,
50
- component: d,
51
- currentJobId: null,
52
- successAlert: null
53
- })
54
- )
41
+ n((A) => ({
42
+ ...A,
43
+ component: d,
44
+ currentJobId: null,
45
+ successAlert: null
46
+ }))
55
47
  ),
56
48
  E(
57
49
  o.EMPLOYEE_MANAGEMENT_COMPENSATION_ALERT_DISMISSED,