@gusto/embedded-react-sdk 0.52.2 → 0.53.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 (459) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +1 -2
  3. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +42 -43
  4. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  5. package/dist/components/Common/Fields/PercentageField/PercentageField.js +44 -42
  6. package/dist/components/Common/Fields/PercentageField/PercentageField.js.map +1 -1
  7. package/dist/components/Common/UI/Box/Box.js +6 -6
  8. package/dist/components/Common/UI/Box/Box.js.map +1 -1
  9. package/dist/components/Common/UI/Box/Box.module.scss.js +8 -8
  10. package/dist/components/Common/UI/Box/BoxTypes.d.ts +1 -1
  11. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  12. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js +16 -14
  13. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js.map +1 -1
  14. package/dist/components/Common/UI/Dialog/Dialog.js +29 -28
  15. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
  16. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  17. package/dist/components/Common/UI/FormBox/FormBox.d.ts +1 -1
  18. package/dist/components/Common/UI/FormBox/FormBox.js +9 -8
  19. package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -1
  20. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +8 -6
  21. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -1
  22. package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +5 -1
  23. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  24. package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -10
  25. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  27. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +18 -21
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -12
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  35. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/Head.js +8 -9
  37. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  42. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +20 -21
  43. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  46. package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -12
  47. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  48. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  49. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  51. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  53. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +2 -3
  55. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  57. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  59. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  60. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  61. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  63. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  64. package/dist/components/Company/BankAccount/stateMachine.d.ts +0 -1
  65. package/dist/components/Company/BankAccount/stateMachine.js +33 -35
  66. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  67. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  68. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -14
  70. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  72. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  73. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  74. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  76. package/dist/components/Company/DocumentSigner/stateMachine.d.ts +0 -1
  77. package/dist/components/Company/DocumentSigner/stateMachine.js +27 -29
  78. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  79. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  80. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  81. package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -10
  82. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  83. package/dist/components/Company/FederalTaxes/Form.js +4 -4
  84. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  85. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  86. package/dist/components/Company/Industry/Actions.js +5 -6
  87. package/dist/components/Company/Industry/Actions.js.map +1 -1
  88. package/dist/components/Company/Industry/Context.js +8 -7
  89. package/dist/components/Company/Industry/Context.js.map +1 -1
  90. package/dist/components/Company/Industry/Edit.js +10 -12
  91. package/dist/components/Company/Industry/Edit.js.map +1 -1
  92. package/dist/components/Company/Industry/IndustrySelect.js +6 -8
  93. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  95. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationForm/Form.js +4 -6
  97. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationForm/LocationForm.js +11 -14
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  100. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -12
  105. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  107. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  108. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  109. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  110. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -10
  111. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  112. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -5
  113. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  115. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  116. package/dist/components/Company/PaySchedule/PayScheduleForm.js +47 -51
  117. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +0 -1
  119. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +26 -28
  120. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -1
  121. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  122. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +2 -1
  123. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
  125. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +29 -16
  126. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  128. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +1 -1
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +21 -32
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -75
  133. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  134. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  135. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  136. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  137. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  138. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +62 -47
  139. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +1 -0
  141. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +26 -23
  142. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  143. package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +1 -0
  144. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  145. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.d.ts +12 -0
  147. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.js +36 -0
  148. package/dist/components/Company/StateTaxes/TaxRateManagement/AddRateAction.js.map +1 -0
  149. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.d.ts +10 -0
  150. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +110 -0
  151. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -0
  152. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.d.ts +18 -0
  153. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +55 -0
  154. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -0
  155. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.d.ts +47 -0
  156. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.js +108 -0
  157. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateManagement.js.map +1 -0
  158. package/dist/components/Company/StateTaxes/TaxRateManagement/context.d.ts +25 -0
  159. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +22 -0
  160. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -0
  161. package/dist/components/Company/StateTaxes/TaxRateManagement/index.d.ts +1 -0
  162. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.d.ts +29 -0
  163. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +34 -0
  164. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -0
  165. package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +17 -0
  166. package/dist/components/Company/StateTaxes/shared/RequirementFields.js +24 -0
  167. package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -0
  168. package/dist/components/Company/StateTaxes/{StateTaxesForm → shared}/applicableIf.d.ts +1 -1
  169. package/dist/components/Company/StateTaxes/shared/applicableIf.js.map +1 -0
  170. package/dist/components/Company/StateTaxes/shared/applicableIf.test.d.ts +1 -0
  171. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.d.ts +19 -0
  172. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.js +38 -0
  173. package/dist/components/Company/StateTaxes/shared/buildRequirementSchema.js.map +1 -0
  174. package/dist/components/Company/StateTaxes/shared/requirementValue.d.ts +2 -0
  175. package/dist/components/Company/StateTaxes/shared/requirementValue.js +7 -0
  176. package/dist/components/Company/StateTaxes/shared/requirementValue.js.map +1 -0
  177. package/dist/components/Company/StateTaxes/shared/rhfKey.d.ts +23 -0
  178. package/dist/components/Company/StateTaxes/shared/rhfKey.js +13 -0
  179. package/dist/components/Company/StateTaxes/shared/rhfKey.js.map +1 -0
  180. package/dist/components/Company/StateTaxes/shared/rhfKey.test.d.ts +1 -0
  181. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +1 -0
  182. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +33 -11
  183. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  184. package/dist/components/Company/exports/companyOnboarding.d.ts +1 -0
  185. package/dist/components/Company/exports/companyOnboarding.js +12 -10
  186. package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
  187. package/dist/components/Contractor/Address/Address.js +11 -12
  188. package/dist/components/Contractor/Address/Address.js.map +1 -1
  189. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.d.ts +39 -0
  190. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +90 -0
  191. package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -0
  192. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +22 -0
  193. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +247 -0
  194. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -0
  195. package/dist/components/Contractor/ContractorList/{index.d.ts → onboarding/ContractorList.d.ts} +3 -3
  196. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js +51 -0
  197. package/dist/components/Contractor/ContractorList/onboarding/ContractorList.js.map +1 -0
  198. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.d.ts +16 -0
  199. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js +113 -0
  200. package/dist/components/Contractor/ContractorList/onboarding/ContractorListView.js.map +1 -0
  201. package/dist/components/Contractor/ContractorList/shared/index.d.ts +1 -0
  202. package/dist/components/Contractor/ContractorList/shared/useContractorList.d.ts +87 -0
  203. package/dist/components/Contractor/ContractorList/shared/useContractorList.js +110 -0
  204. package/dist/components/Contractor/ContractorList/shared/useContractorList.js.map +1 -0
  205. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.d.ts +0 -1
  206. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js +18 -20
  207. package/dist/components/Contractor/Documents/DocumentSigner/stateMachine.js.map +1 -1
  208. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js +2 -3
  209. package/dist/components/Contractor/Documents/DocumentsList/DocumentsList.js.map +1 -1
  210. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +1 -1
  211. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/fields.js +8 -8
  212. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  213. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  214. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +9 -10
  215. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
  216. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  217. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  218. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
  219. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +162 -251
  220. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  221. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +2 -1
  222. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js +2 -2
  223. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.js.map +1 -1
  224. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +45 -44
  225. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  226. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +2 -3
  227. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  228. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -3
  229. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  230. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.d.ts +32 -0
  231. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js +107 -0
  232. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.js.map +1 -0
  233. package/dist/components/Contractor/Payments/shared/usePaymentAmountsEditor.test.d.ts +1 -0
  234. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js +6 -7
  235. package/dist/components/Contractor/Profile/BusinessSelfOnboardingProfile.js.map +1 -1
  236. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js +18 -19
  237. package/dist/components/Contractor/Profile/IndividualSelfOnboardingProfile.js.map +1 -1
  238. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
  239. package/dist/components/Contractor/Submit/Submit.js +2 -3
  240. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  241. package/dist/components/Contractor/exports/contractorManagement.d.ts +1 -0
  242. package/dist/components/Contractor/exports/contractorManagement.js +12 -10
  243. package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
  244. package/dist/components/Contractor/exports/contractorOnboarding.d.ts +1 -1
  245. package/dist/components/Contractor/exports/contractorOnboarding.js +1 -1
  246. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +32 -33
  247. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  248. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +2 -3
  249. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -1
  250. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  251. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  252. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js +6 -7
  253. package/dist/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.js.map +1 -1
  254. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js +14 -15
  255. package/dist/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.js.map +1 -1
  256. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  257. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  258. package/dist/components/Employee/Documents/management/DocumentManager.js +6 -7
  259. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  260. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +6 -7
  261. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
  262. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +4 -5
  263. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
  264. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +10 -13
  265. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  266. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +5 -6
  267. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
  268. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.module.scss.js +8 -0
  269. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.module.scss.js.map +1 -0
  270. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  271. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  272. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -21
  273. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
  274. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +6 -6
  275. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +5 -4
  276. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
  277. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js +3 -4
  278. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  279. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -7
  280. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  281. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js +11 -12
  282. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -1
  283. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  284. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js +15 -16
  285. package/dist/components/Employee/FederalTaxes/management/FederalTaxesCard/FederalTaxesCard.js.map +1 -1
  286. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +6 -7
  287. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
  288. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +11 -12
  289. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
  290. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  291. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  292. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js +7 -8
  293. package/dist/components/Employee/HomeAddress/management/HomeAddressCard/HomeAddressCard.js.map +1 -1
  294. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +4 -4
  295. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +29 -23
  296. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js.map +1 -1
  297. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +26 -20
  298. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  299. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +133 -99
  300. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -1
  301. package/dist/components/Employee/PaymentMethod/onboarding/ListView.module.scss.js +8 -0
  302. package/dist/components/Employee/PaymentMethod/onboarding/ListView.module.scss.js.map +1 -0
  303. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.d.ts +1 -1
  304. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +19 -20
  305. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
  306. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js +92 -86
  307. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js.map +1 -1
  308. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  309. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  310. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +65 -64
  311. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
  312. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +7 -8
  313. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
  314. package/dist/components/Employee/Profile/management/ProfileEditForm.js +7 -7
  315. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +6 -6
  316. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +6 -6
  317. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  318. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  319. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  320. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js +11 -12
  321. package/dist/components/Employee/StateTaxes/management/StateTaxesCard/StateTaxesCard.js.map +1 -1
  322. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +9 -10
  323. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
  324. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +6 -7
  325. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
  326. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  327. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +44 -45
  328. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -1
  329. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +23 -22
  330. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
  331. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +27 -27
  332. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  333. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -10
  334. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  335. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -3
  336. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  337. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js +16 -17
  338. package/dist/components/Employee/WorkAddress/management/WorkAddressCard/WorkAddressCard.js.map +1 -1
  339. package/dist/components/Flow/Flow.js +1 -1
  340. package/dist/components/Flow/FlowHeader.js +3 -4
  341. package/dist/components/Flow/FlowHeader.js.map +1 -1
  342. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +8 -9
  343. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  344. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +7 -8
  345. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  346. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +37 -37
  347. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  348. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -9
  349. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  350. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +7 -8
  351. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  352. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -12
  353. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  354. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
  355. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  356. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -8
  357. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  358. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +3 -3
  359. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +54 -50
  360. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  361. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +80 -69
  362. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  363. package/dist/components/Payroll/PayrollList/PayrollList.js +20 -18
  364. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  365. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +138 -136
  366. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  367. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +10 -12
  368. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  369. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +4 -4
  370. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
  371. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  372. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
  373. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  374. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -2
  375. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  376. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
  377. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  378. package/dist/components/Payroll/usePreparedPayrollData.js +4 -3
  379. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  380. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -3
  381. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  382. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +4 -4
  383. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +4 -4
  384. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +34 -36
  385. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  386. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +4 -4
  387. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +24 -25
  388. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  389. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -0
  390. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +29 -28
  391. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  392. package/dist/contexts/LocaleProvider/useLocale.d.ts +1 -9
  393. package/dist/contexts/LocaleProvider/useLocale.js +5 -15
  394. package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
  395. package/dist/contexts/NonceProvider/index.d.ts +1 -0
  396. package/dist/contexts/NonceProvider/useNonce.d.ts +37 -0
  397. package/dist/contexts/NonceProvider/useNonce.js +7 -0
  398. package/dist/contexts/NonceProvider/useNonce.js.map +1 -0
  399. package/dist/contexts/ThemeProvider/ThemeProvider.js +25 -24
  400. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  401. package/dist/contexts/index.d.ts +1 -0
  402. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +12 -7
  403. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +25 -21
  404. package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -1
  405. package/dist/i18n/I18n.js +1 -0
  406. package/dist/i18n/I18n.js.map +1 -1
  407. package/dist/i18n/en/Company.StateTaxes.json.js +6 -4
  408. package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
  409. package/dist/i18n/en/Contractor.ContractorList.json.js +14 -12
  410. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  411. package/dist/i18n/en/Contractor.ManagementContractorList.json.js +60 -0
  412. package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -0
  413. package/dist/i18n/en/Employee.Management.PaymentMethodBankForm.json.js +18 -16
  414. package/dist/i18n/en/Employee.Management.PaymentMethodBankForm.json.js.map +1 -1
  415. package/dist/i18n/en/Employee.Management.PaymentMethodSplitForm.json.js +2 -2
  416. package/dist/i18n/en/Employee.PaymentMethod.json.js +74 -72
  417. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  418. package/dist/i18n/en/Employee.SplitPaymentsFormBody.json.js +2 -2
  419. package/dist/i18n/en/Payroll.PayrollHistory.json.js +8 -8
  420. package/dist/i18n/en/Payroll.PayrollList.json.js +23 -23
  421. package/dist/i18n/types.d.ts +193 -11
  422. package/dist/index.js +15 -13
  423. package/dist/index.js.map +1 -1
  424. package/dist/models/external.d.ts +4 -0
  425. package/dist/partner-hook-utils/form/SDKFormProvider.js +39 -24
  426. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  427. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +12 -15
  428. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  429. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +16 -19
  430. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  431. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +13 -16
  432. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  433. package/dist/partner-hook-utils/form/fields/SelectHookField.js +12 -15
  434. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  435. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +18 -21
  436. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  437. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +9 -12
  438. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  439. package/dist/partner-hook-utils/form/preprocessors.d.ts +2 -2
  440. package/dist/partner-hook-utils/form/preprocessors.js +8 -7
  441. package/dist/partner-hook-utils/form/preprocessors.js.map +1 -1
  442. package/dist/partner-hook-utils/form/preprocessors.test.d.ts +1 -0
  443. package/dist/shared/constants.d.ts +12 -0
  444. package/dist/shared/constants.js +23 -17
  445. package/dist/shared/constants.js.map +1 -1
  446. package/dist/style.css +1 -1
  447. package/docs/guides/endpoint-inventory.json +61 -0
  448. package/package.json +16 -14
  449. package/dist/components/Company/StateTaxes/StateTaxesForm/applicableIf.js.map +0 -1
  450. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +0 -4
  451. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +0 -5
  452. package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +0 -1
  453. package/dist/components/Contractor/ContractorList/index.js +0 -141
  454. package/dist/components/Contractor/ContractorList/index.js.map +0 -1
  455. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +0 -18
  456. package/dist/components/Contractor/ContractorList/useContractorList.js +0 -15
  457. package/dist/components/Contractor/ContractorList/useContractorList.js.map +0 -1
  458. /package/dist/components/Company/StateTaxes/{StateTaxesForm/applicableIf.test.d.ts → TaxRateManagement/toHistoryRows.test.d.ts} +0 -0
  459. /package/dist/components/Company/StateTaxes/{StateTaxesForm → shared}/applicableIf.js +0 -0
@@ -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/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/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,UACC,OAAOP,EAAE,eAAe;AAAA,UACxB,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBL;AAAA,QAAA;AAAA,MAAA;AAAA,MAGjBW,EAAU,YACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,eAAe;AAAA,UACxB,oBAAoB;AAAA,YAClB,UAAUA,EAAE,sBAAsB;AAAA,UAAA;AAAA,UAEpC,gBAAgBN;AAAA,QAAA;AAAA,MAA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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/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/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,UACC,OAAOP,EAAE,eAAe;AAAA,UACxB,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBL;AAAA,QAAA;AAAA,MAAA;AAAA,MAGjBW,EAAU,YACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA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AAA,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;"}
@@ -3,11 +3,10 @@ import { useTranslation as R, Trans as d } from "react-i18next";
3
3
  import { Flex as c } from "../../../Common/Flex/Flex.js";
4
4
  import { ActionsLayout as v } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
5
  import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
- import "react";
7
6
  import { FLSA_OVERTIME_SALARY_LIMIT as p } from "../../../../shared/constants.js";
8
7
  import y from "../../../../hooks/useNumberFormatter.js";
9
8
  import { useI18n as D, useComponentDictionary as M } from "../../../../i18n/I18n.js";
10
- function U({
9
+ function H({
11
10
  jobForm: n,
12
11
  compensationForm: i,
13
12
  title: g,
@@ -219,6 +218,6 @@ function U({
219
218
  ] });
220
219
  }
221
220
  export {
222
- U as AddCompensationFormBody
221
+ H as AddCompensationFormBody
223
222
  };
224
223
  //# sourceMappingURL=AddCompensationFormBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/shared/AddCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { UseJobFormReady } from './useJobForm'\nimport type { UseCompensationFormReady } from './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'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\n\n/**\n * Translation overrides for the shared add-compensation form body. The body\n * reads its copy from the onboarding `Employee.Compensation` namespace by\n * default; management surfaces resolve this dictionary from\n * `Employee.Management.Compensation` and pass it in so management copy renders\n * while the two surfaces stay isolated.\n *\n * @internal\n */\nexport type AddCompensationFormDictionary = ResourceDictionary<'Employee.Compensation'>\n\n/** @internal */\nexport interface AddCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n /** Per-surface translation overrides resolved against the consumer's namespace. */\n dictionary?: AddCompensationFormDictionary\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (onboarding) and\n * `CompensationAddAnotherJobForm` (management). Field visibility is driven entirely by the hook\n * configuration — `JobFields.HireDate` is only defined when `withHireDateField: true`,\n * and `CompFields.EffectiveDate` is only defined when `withEffectiveDateField: true` —\n * so this component renders the correct subset for each use case with no extra props.\n *\n * Copy resolves from the onboarding `Employee.Compensation` namespace by default; management\n * consumers inject a `dictionary` mapped from `Employee.Management.Compensation` to keep\n * onboarding and management strings independently overridable.\n *\n * @internal\n */\nexport function AddCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n dictionary,\n}: AddCompensationFormBodyProps) {\n useI18n('Employee.Compensation')\n useComponentDictionary('Employee.Compensation', dictionary)\n const { t } = useTranslation('Employee.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 {JobFields.Title && (\n <JobFields.Title\n label={t('jobTitle')}\n validationMessages={{ REQUIRED: t('validations.title') }}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDate')}\n validationMessages={{ REQUIRED: t('validations.hireDate') }}\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}`)}\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 {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDate')}\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 {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentStakeholderLabel')}\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('cancelNewJobCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["AddCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","dictionary","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;;AAiDO,SAASA,EAAwB;AAAA,EACtC,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAiC;AAC/B,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAC1D,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA,GACbC,IAASC,EAAmB,UAAU,GAEtCC,IAAYf,EAAQ,KAAK,QACzBgB,IAAaf,EAAiB,KAAK;AAEzC,SACE,gBAAAgB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAT,GAAM;AAAA,IAEnC,gBAAAe,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,MAAAH,EAAU,SACT,gBAAAI;AAAA,QAACJ,EAAU;AAAA,QAAV;AAAA,UACC,OAAON,EAAE,UAAU;AAAA,UACnB,oBAAoB,EAAE,UAAUA,EAAE,mBAAmB,EAAA;AAAA,UACrD,gBAAgBT;AAAA,QAAA;AA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AA,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,gBAAgB1B;AAAA,QAAA;AAAA,MAAA;AAAA,MAInBe,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,gBAAgBT;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAEC2B,GAAA,EACE,UAAA;AAAA,MAAAtB,KACC,gBAAAc,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAAU,YAAYD,GACnE,UAAAK,EAAE,iBAAiB,EAAA,CACtB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"AddCompensationFormBody.js","sources":["../../../../../src/components/Employee/Compensation/shared/AddCompensationFormBody.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { UseJobFormReady } from './useJobForm'\nimport type { UseCompensationFormReady } from './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'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport type { ResourceDictionary } from '@/types/Helpers'\n\n/**\n * Translation overrides for the shared add-compensation form body. The body\n * reads its copy from the onboarding `Employee.Compensation` namespace by\n * default; management surfaces resolve this dictionary from\n * `Employee.Management.Compensation` and pass it in so management copy renders\n * while the two surfaces stay isolated.\n *\n * @internal\n */\nexport type AddCompensationFormDictionary = ResourceDictionary<'Employee.Compensation'>\n\n/** @internal */\nexport interface AddCompensationFormBodyProps {\n jobForm: UseJobFormReady\n compensationForm: UseCompensationFormReady\n title: string\n submitCtaLabel: string\n isPending: boolean\n onCancel?: () => void\n /** Per-surface translation overrides resolved against the consumer's namespace. */\n dictionary?: AddCompensationFormDictionary\n}\n\n/**\n * Renders the shared field layout used by both `EditCompensation` (onboarding) and\n * `CompensationAddAnotherJobForm` (management). Field visibility is driven entirely by the hook\n * configuration — `JobFields.HireDate` is only defined when `withHireDateField: true`,\n * and `CompFields.EffectiveDate` is only defined when `withEffectiveDateField: true` —\n * so this component renders the correct subset for each use case with no extra props.\n *\n * Copy resolves from the onboarding `Employee.Compensation` namespace by default; management\n * consumers inject a `dictionary` mapped from `Employee.Management.Compensation` to keep\n * onboarding and management strings independently overridable.\n *\n * @internal\n */\nexport function AddCompensationFormBody({\n jobForm,\n compensationForm,\n title,\n submitCtaLabel,\n isPending,\n onCancel,\n dictionary,\n}: AddCompensationFormBodyProps) {\n useI18n('Employee.Compensation')\n useComponentDictionary('Employee.Compensation', dictionary)\n const { t } = useTranslation('Employee.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 {JobFields.Title && (\n <JobFields.Title\n label={t('jobTitle')}\n validationMessages={{ REQUIRED: t('validations.title') }}\n formHookResult={jobForm}\n />\n )}\n\n {JobFields.HireDate && (\n <JobFields.HireDate\n label={t('hireDate')}\n validationMessages={{ REQUIRED: t('validations.hireDate') }}\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}`)}\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 {CompFields.EffectiveDate && (\n <CompFields.EffectiveDate\n label={t('effectiveDate')}\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 {JobFields.TwoPercentShareholder && (\n <JobFields.TwoPercentShareholder\n label={t('twoPercentStakeholderLabel')}\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('cancelNewJobCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending}>\n {submitCtaLabel}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["AddCompensationFormBody","jobForm","compensationForm","title","submitCtaLabel","isPending","onCancel","dictionary","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","format","useNumberFormatter","JobFields","CompFields","jsxs","Flex","jsx","Fragment","Trans","FLSA_OVERTIME_SALARY_LIMIT","status","unit","wage","covered","ActionsLayout"],"mappings":";;;;;;;;AAiDO,SAASA,EAAwB;AAAA,EACtC,SAA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UACC,OAAON,EAAE,uBAAuB;AAAA,UAChC,aAAaA,EAAE,6BAA6B;AAAA,UAC5C,aAAaA,EAAE,uBAAuB;AAAA,UACtC,oBAAoB,EAAE,UAAUA,EAAE,8BAA8B,EAAA;AAAA,UAChE,gBAAgBT;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GAEJ;AAAA,sBAEC2B,GAAA,EACE,UAAA;AAAA,MAAAtB,KACC,gBAAAc,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAAU,YAAYD,GACnE,UAAAK,EAAE,iBAAiB,EAAA,CACtB;AAAA,MAEF,gBAAAU,EAACR,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWP,GACzC,UAAAD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { TextInputHookField as n } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
2
+ import { DatePickerHookField as n } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
3
3
  import { SelectHookField as i } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
4
4
  import { CheckboxHookField as r } from "../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
5
5
  import { NumberInputHookField as o } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
6
- import { DatePickerHookField as m } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
6
+ import { TextInputHookField as m } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
7
7
  function c(e) {
8
- return /* @__PURE__ */ t(n, { ...e, name: "title" });
8
+ return /* @__PURE__ */ t(m, { ...e, name: "title" });
9
9
  }
10
10
  function p(e) {
11
11
  return /* @__PURE__ */ t(i, { ...e, name: "flsaStatus" });
@@ -23,7 +23,7 @@ function g(e) {
23
23
  return /* @__PURE__ */ t(i, { ...e, name: "minimumWageId" });
24
24
  }
25
25
  function x(e) {
26
- return /* @__PURE__ */ t(m, { ...e, name: "effectiveDate" });
26
+ return /* @__PURE__ */ t(n, { ...e, name: "effectiveDate" });
27
27
  }
28
28
  export {
29
29
  H as AdjustForMinimumWageField,
@@ -1,11 +1,11 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { TextInputHookField as t } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
3
- import { SelectHookField as r } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
2
+ import { SelectHookField as t } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
3
+ import { RadioGroupHookField as r } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
4
4
  import { CheckboxHookField as i } from "../../../../../partner-hook-utils/form/fields/CheckboxHookField.js";
5
5
  import { DatePickerHookField as n } from "../../../../../partner-hook-utils/form/fields/DatePickerHookField.js";
6
- import { RadioGroupHookField as a } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
6
+ import { TextInputHookField as a } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
7
7
  function F(e) {
8
- return /* @__PURE__ */ o(t, { ...e, name: "title" });
8
+ return /* @__PURE__ */ o(a, { ...e, name: "title" });
9
9
  }
10
10
  function p(e) {
11
11
  return /* @__PURE__ */ o(n, { ...e, name: "hireDate" });
@@ -14,10 +14,10 @@ function k(e) {
14
14
  return /* @__PURE__ */ o(i, { ...e, name: "twoPercentShareholder" });
15
15
  }
16
16
  function s(e) {
17
- return /* @__PURE__ */ o(a, { ...e, name: "stateWcCovered" });
17
+ return /* @__PURE__ */ o(r, { ...e, name: "stateWcCovered" });
18
18
  }
19
19
  function C(e) {
20
- return /* @__PURE__ */ o(r, { ...e, name: "stateWcClassCode" });
20
+ return /* @__PURE__ */ o(t, { ...e, name: "stateWcClassCode" });
21
21
  }
22
22
  export {
23
23
  p as HireDateField,
@@ -4,17 +4,16 @@ import { useChildSupportGarnishmentForm as b } from "../useChildSupportGarnishme
4
4
  import { Form as g } from "../../../../Common/Form/Form.js";
5
5
  import { Flex as d } from "../../../../Common/Flex/Flex.js";
6
6
  import { ActionsLayout as R } from "../../../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as P } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
7
  import { BaseLayout as h } from "../../../../Base/Base.js";
10
- import { SDKFormProvider as f } from "../../../../../partner-hook-utils/form/SDKFormProvider.js";
11
- function F({
8
+ import { SDKFormProvider as P } from "../../../../../partner-hook-utils/form/SDKFormProvider.js";
9
+ import { useComponentContext as f } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ function O({
12
11
  employeeId: n,
13
12
  deduction: a,
14
13
  onSaved: s,
15
14
  onCancel: p
16
15
  }) {
17
- const { t: e } = S("Employee.DeductionsForm"), c = P(), t = b({
16
+ const { t: e } = S("Employee.DeductionsForm"), c = f(), t = b({
18
17
  employeeId: n,
19
18
  garnishmentId: a?.uuid
20
19
  });
@@ -24,7 +23,7 @@ function F({
24
23
  const o = await t.actions.onSubmit();
25
24
  o && s(o.data, o.mode);
26
25
  };
27
- return /* @__PURE__ */ r(h, { error: t.errorHandling.errors, children: /* @__PURE__ */ r(f, { formHookResult: t, children: /* @__PURE__ */ r(g, { onSubmit: y, children: /* @__PURE__ */ l(d, { flexDirection: "column", gap: 32, children: [
26
+ return /* @__PURE__ */ r(h, { error: t.errorHandling.errors, children: /* @__PURE__ */ r(P, { formHookResult: t, children: /* @__PURE__ */ r(g, { onSubmit: y, children: /* @__PURE__ */ l(d, { flexDirection: "column", gap: 32, children: [
28
27
  /* @__PURE__ */ r(c.Heading, { as: "h3", children: e("types.childSupport") }),
29
28
  /* @__PURE__ */ l(d, { flexDirection: "column", gap: 20, children: [
30
29
  /* @__PURE__ */ r(
@@ -142,6 +141,6 @@ function E(n, a) {
142
141
  }
143
142
  }
144
143
  export {
145
- F as ChildSupportFormView
144
+ O as ChildSupportFormView
146
145
  };
147
146
  //# sourceMappingURL=ChildSupportFormView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChildSupportFormView.js","sources":["../../../../../../src/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport type { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport'\nimport { useChildSupportGarnishmentForm } from '../useChildSupportGarnishmentForm'\nimport type { StateFieldEntry, CountyEntry } from '../useChildSupportGarnishmentForm'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ChildSupportFormViewProps {\n employeeId: string\n deduction: Garnishment | null\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}\n\n/** @internal */\nexport function ChildSupportFormView({\n employeeId,\n deduction,\n onSaved,\n onCancel,\n}: ChildSupportFormViewProps) {\n const { t } = useTranslation('Employee.DeductionsForm')\n const Components = useComponentContext()\n\n const form = useChildSupportGarnishmentForm({\n employeeId,\n garnishmentId: deduction?.uuid,\n })\n\n if (form.isLoading) {\n return <BaseLayout isLoading error={form.errorHandling.errors} />\n }\n\n const { Fields } = form.form\n const hasSelection = form.status.selectedAgency !== null\n\n const handleSubmit = async () => {\n const result = await form.actions.onSubmit()\n if (result) onSaved(result.data, result.mode)\n }\n\n return (\n <BaseLayout error={form.errorHandling.errors}>\n <SDKFormProvider formHookResult={form}>\n <Form onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{t('types.childSupport')}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.State\n label={t('childSupport.agencyLabel')}\n placeholder={t('childSupport.agencyPlaceholder')}\n description={t('childSupport.agencyDescription')}\n getOptionLabel={(entry: StateFieldEntry) => entry.name}\n validationMessages={{ REQUIRED: t('childSupport.agencyRequired') }}\n />\n\n {form.status.isManualPaymentRequired && (\n <Components.Alert\n status=\"warning\"\n label={t('childSupport.manualPaymentRequired')}\n />\n )}\n\n {hasSelection && (\n <Flex flexDirection=\"column\" gap={20}>\n {Fields.FipsCode && (\n <Fields.FipsCode\n label={t('childSupport.countyLabel')}\n placeholder={t('childSupport.countyPlaceholder')}\n description={t('childSupport.countyDescription')}\n getOptionLabel={(entry: CountyEntry) =>\n entry.county ?? t('childSupport.allCounties')\n }\n validationMessages={{ REQUIRED: t('childSupport.countyRequired') }}\n />\n )}\n {Fields.CaseNumber && (\n <Fields.CaseNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'case_number')}\n description={t('childSupport.caseNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.caseNumberRequired') }}\n />\n )}\n {Fields.OrderNumber && (\n <Fields.OrderNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'order_number')}\n description={t('childSupport.orderNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.orderNumberRequired') }}\n />\n )}\n {Fields.RemittanceNumber && (\n <Fields.RemittanceNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'remittance_number')}\n description={t('childSupport.remittanceNumberDescription')}\n validationMessages={{\n REQUIRED: t('childSupport.remittanceNumberRequired'),\n }}\n />\n )}\n <Fields.PayPeriodMaximum\n label={t('childSupport.totalAmountWithheld')}\n description={t('childSupport.totalAmountWithheldDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n REQUIRED: t('childSupport.payPeriodMaximumRequired'),\n NEGATIVE_AMOUNT: t('childSupport.amountNonNegative'),\n }}\n />\n <Fields.Amount\n label={t('childSupport.maxPaycheckPercentage')}\n description={t('childSupport.maxPaycheckPercentageDescription')}\n format=\"percent\"\n min={0}\n max={100}\n validationMessages={{\n REQUIRED: t('childSupport.amountRequired'),\n PERCENT_OUT_OF_RANGE: t('childSupport.percentOutOfRange'),\n }}\n />\n <Fields.PaymentPeriod\n label={t('childSupport.paymentPeriodLabel')}\n placeholder={t('childSupport.paymentPeriodPlaceholder')}\n description={t('childSupport.paymentPeriodDescription')}\n getOptionLabel={(value: PaymentPeriod) => paymentPeriodLabel(t, value)}\n validationMessages={{ REQUIRED: t('childSupport.paymentPeriodRequired') }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('actions.cancel')}\n </Components.Button>\n {hasSelection && (\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n )}\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\nfunction requiredAttrLabel(\n selectedAgency: { requiredAttributes?: Array<{ key?: string; label?: string }> } | null,\n key: 'case_number' | 'order_number' | 'remittance_number',\n): string {\n const match = selectedAgency?.requiredAttributes?.find(a => a.key === key)\n return match?.label ?? key\n}\n\nfunction paymentPeriodLabel(\n t: ReturnType<typeof useTranslation<'Employee.DeductionsForm'>>['t'],\n value: PaymentPeriod,\n): string {\n switch (value) {\n case 'Every week':\n return t('childSupport.paymentPeriod.everyWeek')\n case 'Every other week':\n return t('childSupport.paymentPeriod.everyOtherWeek')\n case 'Twice per month':\n return t('childSupport.paymentPeriod.twicePerMonth')\n case 'Monthly':\n return t('childSupport.paymentPeriod.monthly')\n }\n}\n"],"names":["ChildSupportFormView","employeeId","deduction","onSaved","onCancel","t","useTranslation","Components","useComponentContext","form","useChildSupportGarnishmentForm","BaseLayout","Fields","hasSelection","handleSubmit","result","SDKFormProvider","jsx","Form","jsxs","Flex","entry","requiredAttrLabel","value","paymentPeriodLabel","ActionsLayout","selectedAgency","key","a"],"mappings":";;;;;;;;;;AAoBO,SAASA,EAAqB;AAAA,EACnC,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAC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ASH,EACPnB,GACAkB,GACQ;AACR,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAOlB,EAAE,sCAAsC;AAAA,IACjD,KAAK;AACH,aAAOA,EAAE,2CAA2C;AAAA,IACtD,KAAK;AACH,aAAOA,EAAE,0CAA0C;AAAA,IACrD,KAAK;AACH,aAAOA,EAAE,oCAAoC;AAAA,EAAA;AAEnD;"}
1
+ {"version":3,"file":"ChildSupportFormView.js","sources":["../../../../../../src/components/Employee/Deductions/shared/DeductionsForm/ChildSupportFormView.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport type { PaymentPeriod } from '@gusto/embedded-api/models/components/garnishmentchildsupport'\nimport { useChildSupportGarnishmentForm } from '../useChildSupportGarnishmentForm'\nimport type { StateFieldEntry, CountyEntry } from '../useChildSupportGarnishmentForm'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ChildSupportFormViewProps {\n employeeId: string\n deduction: Garnishment | null\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}\n\n/** @internal */\nexport function ChildSupportFormView({\n employeeId,\n deduction,\n onSaved,\n onCancel,\n}: ChildSupportFormViewProps) {\n const { t } = useTranslation('Employee.DeductionsForm')\n const Components = useComponentContext()\n\n const form = useChildSupportGarnishmentForm({\n employeeId,\n garnishmentId: deduction?.uuid,\n })\n\n if (form.isLoading) {\n return <BaseLayout isLoading error={form.errorHandling.errors} />\n }\n\n const { Fields } = form.form\n const hasSelection = form.status.selectedAgency !== null\n\n const handleSubmit = async () => {\n const result = await form.actions.onSubmit()\n if (result) onSaved(result.data, result.mode)\n }\n\n return (\n <BaseLayout error={form.errorHandling.errors}>\n <SDKFormProvider formHookResult={form}>\n <Form onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{t('types.childSupport')}</Components.Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.State\n label={t('childSupport.agencyLabel')}\n placeholder={t('childSupport.agencyPlaceholder')}\n description={t('childSupport.agencyDescription')}\n getOptionLabel={(entry: StateFieldEntry) => entry.name}\n validationMessages={{ REQUIRED: t('childSupport.agencyRequired') }}\n />\n\n {form.status.isManualPaymentRequired && (\n <Components.Alert\n status=\"warning\"\n label={t('childSupport.manualPaymentRequired')}\n />\n )}\n\n {hasSelection && (\n <Flex flexDirection=\"column\" gap={20}>\n {Fields.FipsCode && (\n <Fields.FipsCode\n label={t('childSupport.countyLabel')}\n placeholder={t('childSupport.countyPlaceholder')}\n description={t('childSupport.countyDescription')}\n getOptionLabel={(entry: CountyEntry) =>\n entry.county ?? t('childSupport.allCounties')\n }\n validationMessages={{ REQUIRED: t('childSupport.countyRequired') }}\n />\n )}\n {Fields.CaseNumber && (\n <Fields.CaseNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'case_number')}\n description={t('childSupport.caseNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.caseNumberRequired') }}\n />\n )}\n {Fields.OrderNumber && (\n <Fields.OrderNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'order_number')}\n description={t('childSupport.orderNumberDescription')}\n validationMessages={{ REQUIRED: t('childSupport.orderNumberRequired') }}\n />\n )}\n {Fields.RemittanceNumber && (\n <Fields.RemittanceNumber\n label={requiredAttrLabel(form.status.selectedAgency, 'remittance_number')}\n description={t('childSupport.remittanceNumberDescription')}\n validationMessages={{\n REQUIRED: t('childSupport.remittanceNumberRequired'),\n }}\n />\n )}\n <Fields.PayPeriodMaximum\n label={t('childSupport.totalAmountWithheld')}\n description={t('childSupport.totalAmountWithheldDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n REQUIRED: t('childSupport.payPeriodMaximumRequired'),\n NEGATIVE_AMOUNT: t('childSupport.amountNonNegative'),\n }}\n />\n <Fields.Amount\n label={t('childSupport.maxPaycheckPercentage')}\n description={t('childSupport.maxPaycheckPercentageDescription')}\n format=\"percent\"\n min={0}\n max={100}\n validationMessages={{\n REQUIRED: t('childSupport.amountRequired'),\n PERCENT_OUT_OF_RANGE: t('childSupport.percentOutOfRange'),\n }}\n />\n <Fields.PaymentPeriod\n label={t('childSupport.paymentPeriodLabel')}\n placeholder={t('childSupport.paymentPeriodPlaceholder')}\n description={t('childSupport.paymentPeriodDescription')}\n getOptionLabel={(value: PaymentPeriod) => paymentPeriodLabel(t, value)}\n validationMessages={{ REQUIRED: t('childSupport.paymentPeriodRequired') }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('actions.cancel')}\n </Components.Button>\n {hasSelection && (\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n )}\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\nfunction requiredAttrLabel(\n selectedAgency: { requiredAttributes?: Array<{ key?: string; label?: string }> } | null,\n key: 'case_number' | 'order_number' | 'remittance_number',\n): string {\n const match = selectedAgency?.requiredAttributes?.find(a => a.key === key)\n return match?.label ?? key\n}\n\nfunction paymentPeriodLabel(\n t: ReturnType<typeof useTranslation<'Employee.DeductionsForm'>>['t'],\n value: PaymentPeriod,\n): string {\n switch (value) {\n case 'Every week':\n return t('childSupport.paymentPeriod.everyWeek')\n case 'Every other week':\n return t('childSupport.paymentPeriod.everyOtherWeek')\n case 'Twice per month':\n return t('childSupport.paymentPeriod.twicePerMonth')\n case 'Monthly':\n return t('childSupport.paymentPeriod.monthly')\n }\n}\n"],"names":["ChildSupportFormView","employeeId","deduction","onSaved","onCancel","t","useTranslation","Components","useComponentContext","form","useChildSupportGarnishmentForm","BaseLayout","Fields","hasSelection","handleSubmit","result","SDKFormProvider","jsx","Form","jsxs","Flex","entry","requiredAttrLabel","value","paymentPeriodLabel","ActionsLayout","selectedAgency","key","a"],"mappings":";;;;;;;;;AAoBO,SAASA,EAAqB;AAAA,EACnC,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AACF,GAA8B;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,EAAA,GAEbC,IAAOC,EAA+B;AAAA,IAC1C,YAAAT;AAAA,IACA,eAAeC,GAAW;AAAA,EAAA,CAC3B;AAED,MAAIO,EAAK;AACP,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAK,cAAc,QAAQ;AAGjE,QAAM,EAAE,QAAAG,MAAWH,EAAK,MAClBI,IAAeJ,EAAK,OAAO,mBAAmB,MAE9CK,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMN,EAAK,QAAQ,SAAA;AAClC,IAAIM,KAAQZ,EAAQY,EAAO,MAAMA,EAAO,IAAI;AAAA,EAC9C;AAEA,2BACGJ,GAAA,EAAW,OAAOF,EAAK,cAAc,QACpC,4BAACO,GAAA,EAAgB,gBAAgBP,GAC/B,UAAA,gBAAAQ,EAACC,GAAA,EAAK,UAAUJ,GACd,UAAA,gBAAAK,EAACC,KAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAH,EAACV,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,oBAAoB,GAAE;AAAA,IAErD,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACL,EAAO;AAAA,QAAP;AAAA,UACC,OAAOP,EAAE,0BAA0B;AAAA,UACnC,aAAaA,EAAE,gCAAgC;AAAA,UAC/C,aAAaA,EAAE,gCAAgC;AAAA,UAC/C,gBAAgB,CAACgB,MAA2BA,EAA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rD,UAAAJ,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;AAEA,SAASiB,EACPI,GACAC,GACQ;AAER,SADcD,GAAgB,oBAAoB,KAAK,CAAAE,MAAKA,EAAE,QAAQD,CAAG,GAC3D,SAASA;AACzB;AAEA,SAASH,EACPnB,GACAkB,GACQ;AACR,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAOlB,EAAE,sCAAsC;AAAA,IACjD,KAAK;AACH,aAAOA,EAAE,2CAA2C;AAAA,IACtD,KAAK;AACH,aAAOA,EAAE,0CAA0C;AAAA,IACrD,KAAK;AACH,aAAOA,EAAE,oCAAoC;AAAA,EAAA;AAEnD;"}
@@ -5,20 +5,19 @@ import { useDeductionForm as b } from "../useDeductionForm/useDeductionForm.js";
5
5
  import { Form as h } from "../../../../Common/Form/Form.js";
6
6
  import { Flex as u } from "../../../../Common/Flex/Flex.js";
7
7
  import { ActionsLayout as y } from "../../../../Common/ActionsLayout/ActionsLayout.js";
8
- import { useComponentContext as A } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import "react";
10
8
  import { BaseLayout as g } from "../../../../Base/Base.js";
11
- import { SDKFormProvider as R } from "../../../../../partner-hook-utils/form/SDKFormProvider.js";
12
- function S({
9
+ import { SDKFormProvider as A } from "../../../../../partner-hook-utils/form/SDKFormProvider.js";
10
+ import { useComponentContext as R } from "../../../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ function O({
13
12
  employeeId: t,
14
13
  deduction: a,
15
14
  courtOrdered: o,
16
15
  garnishmentType: n,
17
- title: m,
18
- onSaved: l,
16
+ title: l,
17
+ onSaved: m,
19
18
  onCancel: p
20
19
  }) {
21
- const { t: s } = f("Employee.DeductionsForm"), c = A(), i = b({
20
+ const { t: s } = f("Employee.DeductionsForm"), c = R(), i = b({
22
21
  employeeId: t,
23
22
  garnishmentId: a?.uuid,
24
23
  courtOrdered: o,
@@ -34,8 +33,8 @@ function S({
34
33
  Fields: r,
35
34
  Components: c,
36
35
  t: s,
37
- title: m,
38
- onSaved: l,
36
+ title: l,
37
+ onSaved: m,
39
38
  onCancel: p
40
39
  }
41
40
  );
@@ -45,8 +44,8 @@ function x({
45
44
  Fields: a,
46
45
  Components: o,
47
46
  t: n,
48
- title: m,
49
- onSaved: l,
47
+ title: l,
48
+ onSaved: m,
50
49
  onCancel: p
51
50
  }) {
52
51
  const s = D({
@@ -54,10 +53,10 @@ function x({
54
53
  name: "deductAsPercentage"
55
54
  }), c = s === !0 || s === "true", i = async () => {
56
55
  const r = await t.actions.onSubmit();
57
- r && l(r.data, r.mode);
56
+ r && m(r.data, r.mode);
58
57
  };
59
- return /* @__PURE__ */ e(g, { error: t.errorHandling.errors, children: /* @__PURE__ */ e(R, { formHookResult: t, children: /* @__PURE__ */ e(h, { onSubmit: i, children: /* @__PURE__ */ d(u, { flexDirection: "column", gap: 32, children: [
60
- /* @__PURE__ */ e(o.Heading, { as: "h3", children: m }),
58
+ return /* @__PURE__ */ e(g, { error: t.errorHandling.errors, children: /* @__PURE__ */ e(A, { formHookResult: t, children: /* @__PURE__ */ e(h, { onSubmit: i, children: /* @__PURE__ */ d(u, { flexDirection: "column", gap: 32, children: [
59
+ /* @__PURE__ */ e(o.Heading, { as: "h3", children: l }),
61
60
  /* @__PURE__ */ d(u, { flexDirection: "column", gap: 20, children: [
62
61
  /* @__PURE__ */ d(u, { flexDirection: "column", gap: 20, children: [
63
62
  /* @__PURE__ */ e(
@@ -131,6 +130,6 @@ function x({
131
130
  ] }) }) }) });
132
131
  }
133
132
  export {
134
- S as StandardDeductionForm
133
+ O as StandardDeductionForm
135
134
  };
136
135
  //# sourceMappingURL=StandardDeductionForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StandardDeductionForm.js","sources":["../../../../../../src/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWatch } from 'react-hook-form'\nimport type {\n Garnishment,\n GarnishmentType,\n} from '@gusto/embedded-api/models/components/garnishment'\nimport type { Control } from 'react-hook-form'\nimport { useDeductionForm } from '../useDeductionForm'\nimport type { DeductionFormData } from '../useDeductionForm'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface StandardDeductionFormProps {\n employeeId: string\n deduction: Garnishment | null\n /** Court-ordered garnishments require `garnishmentType`. Custom deductions don't. */\n courtOrdered: boolean\n /** Only meaningful when `courtOrdered: true`. Selects the garnishment type\n * on create. Ignored in edit mode (the existing type is preserved). */\n garnishmentType?: GarnishmentType\n /** Section heading shown above the form. The parent picker is responsible\n * for translating the garnishment-type label so this component doesn't\n * need to repeat the labels mapping. */\n title: string\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}\n\n/** @internal */\nexport function StandardDeductionForm({\n employeeId,\n deduction,\n courtOrdered,\n garnishmentType,\n title,\n onSaved,\n onCancel,\n}: StandardDeductionFormProps) {\n const { t } = useTranslation('Employee.DeductionsForm')\n const Components = useComponentContext()\n\n const form = useDeductionForm({\n employeeId,\n garnishmentId: deduction?.uuid,\n courtOrdered,\n defaultValues: courtOrdered && garnishmentType ? { garnishmentType } : undefined,\n })\n\n if (form.isLoading) {\n return <BaseLayout isLoading error={form.errorHandling.errors} />\n }\n\n const { Fields } = form.form\n return (\n <ReadyForm\n form={form}\n Fields={Fields}\n Components={Components}\n t={t}\n title={title}\n onSaved={onSaved}\n onCancel={onCancel}\n />\n )\n}\n\n// Split into a child component so we can call `useWatch` on the form's control\n// only once the hook is in its ready state (the control reference exists then).\nfunction ReadyForm({\n form,\n Fields,\n Components,\n t,\n title,\n onSaved,\n onCancel,\n}: {\n form: Extract<ReturnType<typeof useDeductionForm>, { isLoading: false }>\n Fields: Extract<ReturnType<typeof useDeductionForm>, { isLoading: false }>['form']['Fields']\n Components: ReturnType<typeof useComponentContext>\n t: ReturnType<typeof useTranslation<'Employee.DeductionsForm'>>['t']\n title: string\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}) {\n // useWatch subscribes to changes; getValues only reads once. We need the\n // subscription because `Fields.Amount`'s `format` and `description` props\n // need to re-render when the user toggles Percentage / Fixed amount.\n // The RadioGroup's options carry string values (`'true'`/`'false'`), which\n // round-trip into form state as strings — only `coerceStringBoolean` in the\n // zod preprocessor turns them into actual booleans at validation time. So\n // here we explicitly compare against both shapes; `Boolean('false')` would\n // be truthy and surface the wrong copy under the Amount field.\n const watchedDeductAsPercentageRaw = useWatch({\n control: form.form.hookFormInternals.formMethods.control as Control<DeductionFormData>,\n name: 'deductAsPercentage',\n }) as boolean | 'true' | 'false' | undefined\n const watchedDeductAsPercentage =\n watchedDeductAsPercentageRaw === true || watchedDeductAsPercentageRaw === 'true'\n\n const handleSubmit = async () => {\n const result = await form.actions.onSubmit()\n if (result) onSaved(result.data, result.mode)\n }\n\n return (\n <BaseLayout error={form.errorHandling.errors}>\n <SDKFormProvider formHookResult={form}>\n <Form onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{title}</Components.Heading>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.Description\n label={t('standard.descriptionLabel')}\n validationMessages={{ REQUIRED: t('standard.descriptionRequired') }}\n />\n <Fields.Recurring\n label={t('standard.frequencyLabel')}\n getOptionLabel={(value: boolean) =>\n value ? t('standard.frequencyRecurring') : t('standard.frequencyOneTime')\n }\n validationMessages={{ REQUIRED: t('standard.frequencyRequired') }}\n />\n <Fields.DeductAsPercentage\n label={t('standard.typeLabel')}\n getOptionLabel={(value: boolean) =>\n value ? t('standard.typePercentage') : t('standard.typeFixed')\n }\n validationMessages={{ REQUIRED: t('standard.typeRequired') }}\n />\n <Fields.Amount\n label={t('standard.amountLabel')}\n format={watchedDeductAsPercentage ? 'percent' : 'currency'}\n description={\n watchedDeductAsPercentage\n ? t('standard.amountPercentDescription')\n : t('standard.amountFixedDescription')\n }\n min={0}\n validationMessages={{\n REQUIRED: t('standard.amountRequired'),\n NEGATIVE_AMOUNT: t('standard.amountNonNegative'),\n }}\n />\n </Flex>\n {Fields.TotalAmount && Fields.AnnualMaximum && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.TotalAmount\n label={t('standard.totalAmountLabel')}\n description={t('standard.totalAmountDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n NEGATIVE_AMOUNT: t('standard.amountNonNegative'),\n }}\n />\n <Fields.AnnualMaximum\n label={t('standard.annualMaxLabel')}\n description={t('standard.annualMaxDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n NEGATIVE_AMOUNT: t('standard.amountNonNegative'),\n }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["StandardDeductionForm","employeeId","deduction","courtOrdered","garnishmentType","title","onSaved","onCancel","t","useTranslation","Components","useComponentContext","form","useDeductionForm","BaseLayout","Fields","jsx","ReadyForm","watchedDeductAsPercentageRaw","useWatch","watchedDeductAsPercentage","handleSubmit","result","SDKFormProvider","Form","jsxs","Flex","value","ActionsLayout"],"mappings":";;;;;;;;;;;AAiCO,SAASA,EAAsB;AAAA,EACpC,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,U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UAACD,EAAO;AAAA,UAAP;AAAA,YACC,OAAOP,EAAE,2BAA2B;AAAA,YACpC,aAAaA,EAAE,iCAAiC;AAAA,YAChD,QAAO;AAAA,YACP,KAAK;AAAA,YACL,oBAAoB;AAAA,cAClB,iBAAiBA,EAAE,4BAA4B;AAAA,YAAA;AAAA,UACjD;AAAA,QAAA;AAAA,QAEF,gBAAAQ;AAAA,UAACD,EAAO;AAAA,UAAP;AAAA,YACC,OAAOP,EAAE,yBAAyB;AAAA,YAClC,aAAaA,EAAE,+BAA+B;AAAA,YAC9C,QAAO;AAAA,YACP,KAAK;AAAA,YACL,oBAAoB;AAAA,cAClB,iBAAiBA,EAAE,4BAA4B;AAAA,YAAA;AAAA,UACjD;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,sBACCoB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAZ,EAACN,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASH,GAC3D,UAAAC,EAAE,gBAAgB,EAAA,CACrB;AAAA,MACA,gBAAAQ,EAACN,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWE,EAAK,OAAO,WACrD,UAAAJ,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"StandardDeductionForm.js","sources":["../../../../../../src/components/Employee/Deductions/shared/DeductionsForm/StandardDeductionForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWatch } from 'react-hook-form'\nimport type {\n Garnishment,\n GarnishmentType,\n} from '@gusto/embedded-api/models/components/garnishment'\nimport type { Control } from 'react-hook-form'\nimport { useDeductionForm } from '../useDeductionForm'\nimport type { DeductionFormData } from '../useDeductionForm'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface StandardDeductionFormProps {\n employeeId: string\n deduction: Garnishment | null\n /** Court-ordered garnishments require `garnishmentType`. Custom deductions don't. */\n courtOrdered: boolean\n /** Only meaningful when `courtOrdered: true`. Selects the garnishment type\n * on create. Ignored in edit mode (the existing type is preserved). */\n garnishmentType?: GarnishmentType\n /** Section heading shown above the form. The parent picker is responsible\n * for translating the garnishment-type label so this component doesn't\n * need to repeat the labels mapping. */\n title: string\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}\n\n/** @internal */\nexport function StandardDeductionForm({\n employeeId,\n deduction,\n courtOrdered,\n garnishmentType,\n title,\n onSaved,\n onCancel,\n}: StandardDeductionFormProps) {\n const { t } = useTranslation('Employee.DeductionsForm')\n const Components = useComponentContext()\n\n const form = useDeductionForm({\n employeeId,\n garnishmentId: deduction?.uuid,\n courtOrdered,\n defaultValues: courtOrdered && garnishmentType ? { garnishmentType } : undefined,\n })\n\n if (form.isLoading) {\n return <BaseLayout isLoading error={form.errorHandling.errors} />\n }\n\n const { Fields } = form.form\n return (\n <ReadyForm\n form={form}\n Fields={Fields}\n Components={Components}\n t={t}\n title={title}\n onSaved={onSaved}\n onCancel={onCancel}\n />\n )\n}\n\n// Split into a child component so we can call `useWatch` on the form's control\n// only once the hook is in its ready state (the control reference exists then).\nfunction ReadyForm({\n form,\n Fields,\n Components,\n t,\n title,\n onSaved,\n onCancel,\n}: {\n form: Extract<ReturnType<typeof useDeductionForm>, { isLoading: false }>\n Fields: Extract<ReturnType<typeof useDeductionForm>, { isLoading: false }>['form']['Fields']\n Components: ReturnType<typeof useComponentContext>\n t: ReturnType<typeof useTranslation<'Employee.DeductionsForm'>>['t']\n title: string\n onSaved: (deduction: Garnishment, mode: 'create' | 'update') => void\n onCancel: () => void\n}) {\n // useWatch subscribes to changes; getValues only reads once. We need the\n // subscription because `Fields.Amount`'s `format` and `description` props\n // need to re-render when the user toggles Percentage / Fixed amount.\n // The RadioGroup's options carry string values (`'true'`/`'false'`), which\n // round-trip into form state as strings — only `coerceStringBoolean` in the\n // zod preprocessor turns them into actual booleans at validation time. So\n // here we explicitly compare against both shapes; `Boolean('false')` would\n // be truthy and surface the wrong copy under the Amount field.\n const watchedDeductAsPercentageRaw = useWatch({\n control: form.form.hookFormInternals.formMethods.control as Control<DeductionFormData>,\n name: 'deductAsPercentage',\n }) as boolean | 'true' | 'false' | undefined\n const watchedDeductAsPercentage =\n watchedDeductAsPercentageRaw === true || watchedDeductAsPercentageRaw === 'true'\n\n const handleSubmit = async () => {\n const result = await form.actions.onSubmit()\n if (result) onSaved(result.data, result.mode)\n }\n\n return (\n <BaseLayout error={form.errorHandling.errors}>\n <SDKFormProvider formHookResult={form}>\n <Form onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n <Components.Heading as=\"h3\">{title}</Components.Heading>\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.Description\n label={t('standard.descriptionLabel')}\n validationMessages={{ REQUIRED: t('standard.descriptionRequired') }}\n />\n <Fields.Recurring\n label={t('standard.frequencyLabel')}\n getOptionLabel={(value: boolean) =>\n value ? t('standard.frequencyRecurring') : t('standard.frequencyOneTime')\n }\n validationMessages={{ REQUIRED: t('standard.frequencyRequired') }}\n />\n <Fields.DeductAsPercentage\n label={t('standard.typeLabel')}\n getOptionLabel={(value: boolean) =>\n value ? t('standard.typePercentage') : t('standard.typeFixed')\n }\n validationMessages={{ REQUIRED: t('standard.typeRequired') }}\n />\n <Fields.Amount\n label={t('standard.amountLabel')}\n format={watchedDeductAsPercentage ? 'percent' : 'currency'}\n description={\n watchedDeductAsPercentage\n ? t('standard.amountPercentDescription')\n : t('standard.amountFixedDescription')\n }\n min={0}\n validationMessages={{\n REQUIRED: t('standard.amountRequired'),\n NEGATIVE_AMOUNT: t('standard.amountNonNegative'),\n }}\n />\n </Flex>\n {Fields.TotalAmount && Fields.AnnualMaximum && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.TotalAmount\n label={t('standard.totalAmountLabel')}\n description={t('standard.totalAmountDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n NEGATIVE_AMOUNT: t('standard.amountNonNegative'),\n }}\n />\n <Fields.AnnualMaximum\n label={t('standard.annualMaxLabel')}\n description={t('standard.annualMaxDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n NEGATIVE_AMOUNT: t('standard.amountNonNegative'),\n }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["StandardDeductionForm","employeeId","deduction","courtOrdered","garnishmentType","title","onSaved","onCancel","t","useTranslation","Components","useComponentContext","form","useDeductionForm","BaseLayout","Fields","jsx","ReadyForm","watchedDeductAsPercentageRaw","useWatch","watchedDeductAsPercentage","handleSubmit","result","SDKFormProvider","Form","jsxs","Flex","value","ActionsLayout"],"mappings":";;;;;;;;;;AAiCO,SAASA,EAAsB;AAAA,EACpC,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AACF,GAA+B;AAC7B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,EAAA,GAEbC,IAAOC,EAAiB;AAAA,IAC5B,YAAAZ;AAAA,IACA,eAAeC,GAAW;AAAA,IAC1B,cAAAC;AAAA,IACA,eAAeA,KAAgBC,IAAkB,EAAE,iBAAAA,MAAoB;AAAA,EAAA,CACxE;AAED,MAA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UAAP;AAAA,YACC,OAAOP,EAAE,yBAAyB;AAAA,YAClC,aAAaA,EAAE,+BAA+B;AAAA,YAC9C,QAAO;AAAA,YACP,KAAK;AAAA,YACL,oBAAoB;AAAA,cAClB,iBAAiBA,EAAE,4BAA4B;AAAA,YAAA;AAAA,UACjD;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,sBACCoB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAZ,EAACN,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASH,GAC3D,UAAAC,EAAE,gBAAgB,EAAA,CACrB;AAAA,MACA,gBAAAQ,EAACN,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWE,EAAK,OAAO,WACrD,UAAAJ,EAAE,cAAc,EAAA,CACnB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -1,21 +1,21 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { TextInputHookField as n } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
3
- import { SelectHookField as t } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
2
+ import { SelectHookField as n } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
4
3
  import { NumberInputHookField as i } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
4
+ import { TextInputHookField as t } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
5
5
  function d(e) {
6
- return /* @__PURE__ */ r(t, { ...e, name: "state" });
6
+ return /* @__PURE__ */ r(n, { ...e, name: "state" });
7
7
  }
8
8
  function f(e) {
9
- return /* @__PURE__ */ r(t, { ...e, name: "fipsCode" });
9
+ return /* @__PURE__ */ r(n, { ...e, name: "fipsCode" });
10
10
  }
11
11
  function c(e) {
12
- return /* @__PURE__ */ r(n, { ...e, name: "caseNumber" });
12
+ return /* @__PURE__ */ r(t, { ...e, name: "caseNumber" });
13
13
  }
14
14
  function l(e) {
15
- return /* @__PURE__ */ r(n, { ...e, name: "orderNumber" });
15
+ return /* @__PURE__ */ r(t, { ...e, name: "orderNumber" });
16
16
  }
17
17
  function F(e) {
18
- return /* @__PURE__ */ r(n, { ...e, name: "remittanceNumber" });
18
+ return /* @__PURE__ */ r(t, { ...e, name: "remittanceNumber" });
19
19
  }
20
20
  function p(e) {
21
21
  return /* @__PURE__ */ r(i, { ...e, name: "payPeriodMaximum" });
@@ -24,7 +24,7 @@ function b(e) {
24
24
  return /* @__PURE__ */ r(i, { ...e, name: "amount" });
25
25
  }
26
26
  function N(e) {
27
- return /* @__PURE__ */ r(t, { ...e, name: "paymentPeriod" });
27
+ return /* @__PURE__ */ r(n, { ...e, name: "paymentPeriod" });
28
28
  }
29
29
  export {
30
30
  b as AmountField,
@@ -1,10 +1,10 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { TextInputHookField as o } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
3
- import { SelectHookField as i } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
2
+ import { SelectHookField as o } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
4
3
  import { NumberInputHookField as t } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
5
4
  import { RadioGroupHookField as r } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
5
+ import { TextInputHookField as i } from "../../../../../partner-hook-utils/form/fields/TextInputHookField.js";
6
6
  function l(n) {
7
- return /* @__PURE__ */ e(o, { ...n, name: "description" });
7
+ return /* @__PURE__ */ e(i, { ...n, name: "description" });
8
8
  }
9
9
  function p(n) {
10
10
  return /* @__PURE__ */ e(r, { ...n, name: "recurring" });
@@ -22,7 +22,7 @@ function A(n) {
22
22
  return /* @__PURE__ */ e(t, { ...n, name: "annualMaximum" });
23
23
  }
24
24
  function g(n) {
25
- return /* @__PURE__ */ e(i, { ...n, name: "garnishmentType" });
25
+ return /* @__PURE__ */ e(o, { ...n, name: "garnishmentType" });
26
26
  }
27
27
  export {
28
28
  F as AmountField,
@@ -1,17 +1,16 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { useTranslation as s, Trans as p } from "react-i18next";
3
- import { useEmployeeFormsGetSuspense as u } from "@gusto/embedded-api/react-query/employeeFormsGet";
2
+ import { useTranslation as s, Trans as u } from "react-i18next";
3
+ import { useEmployeeFormsGetSuspense as p } from "@gusto/embedded-api/react-query/employeeFormsGet";
4
4
  import { useEmployeeFormsGetPdfSuspense as f } from "@gusto/embedded-api/react-query/employeeFormsGetPdf";
5
5
  import { BaseComponent as d } from "../../../Base/Base.js";
6
6
  import { useBase as C } from "../../../Base/useBase.js";
7
7
  import { Flex as D } from "../../../Common/Flex/Flex.js";
8
8
  import { ActionsLayout as y } from "../../../Common/ActionsLayout/ActionsLayout.js";
9
9
  import { useComponentContext as g } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import "react";
11
10
  import { useI18n as h } from "../../../../i18n/I18n.js";
12
11
  import { componentEvents as E } from "../../../../shared/constants.js";
13
12
  import { DocumentViewer as x } from "../../../Common/DocumentViewer/DocumentViewer.js";
14
- function P(o) {
13
+ function N(o) {
15
14
  return h("Employee.DocumentManager"), /* @__PURE__ */ e(d, { ...o, componentName: "Employee.DocumentManager", children: /* @__PURE__ */ e(w, { employeeId: o.employeeId, formId: o.formId }) });
16
15
  }
17
16
  function w({
@@ -20,13 +19,13 @@ function w({
20
19
  }) {
21
20
  const { t: r } = s("Employee.DocumentManager"), t = g(), { onEvent: a } = C(), {
22
21
  data: { form: n }
23
- } = u({ employeeId: o, formId: i }), {
22
+ } = p({ employeeId: o, formId: i }), {
24
23
  data: { formPdf: c }
25
24
  } = f({ employeeId: o, formId: i }), m = c?.documentUrl;
26
25
  return n ? /* @__PURE__ */ l(D, { flexDirection: "column", gap: 16, children: [
27
26
  n.title && /* @__PURE__ */ e(t.Heading, { as: "h2", children: n.title }),
28
27
  m && /* @__PURE__ */ e(t.Text, { children: /* @__PURE__ */ e(
29
- p,
28
+ u,
30
29
  {
31
30
  t: r,
32
31
  i18nKey: "downloadDocumentCta",
@@ -57,6 +56,6 @@ function w({
57
56
  ] }) : null;
58
57
  }
59
58
  export {
60
- P as DocumentManager
59
+ N as DocumentManager
61
60
  };
62
61
  //# sourceMappingURL=DocumentManager.js.map