@gusto/embedded-react-sdk 0.44.2 → 0.46.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 (586) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
  3. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
  4. package/dist/components/Common/UI/Alert/Alert.js +24 -23
  5. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  6. package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
  7. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  8. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
  9. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  10. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  12. package/dist/components/Company/AssignSignatory/Head.js +12 -9
  13. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  16. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
  17. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  18. package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
  19. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  20. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +26 -26
  21. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  22. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  23. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
  24. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  25. package/dist/components/Company/FederalTaxes/Head.js +7 -6
  26. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  27. package/dist/components/Company/Industry/Head.js +10 -9
  28. package/dist/components/Company/Industry/Head.js.map +1 -1
  29. package/dist/components/Company/Industry/IndustrySelect.js +22 -19
  30. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  31. package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
  32. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  33. package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
  34. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  35. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
  36. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  37. package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
  38. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  39. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  40. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
  41. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  42. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
  43. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  44. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
  45. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  46. package/dist/components/Employee/Compensation/index.d.ts +1 -1
  47. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
  48. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +230 -0
  49. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
  50. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
  51. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  52. package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
  53. package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
  54. package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
  55. package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
  56. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
  57. package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
  58. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
  59. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
  60. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
  61. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
  62. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
  63. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
  64. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  65. package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
  66. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
  67. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
  68. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
  69. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
  70. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
  71. package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
  72. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
  73. package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
  74. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
  75. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
  76. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
  77. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
  78. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
  79. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  80. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  81. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
  82. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
  83. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +203 -188
  84. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  85. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  86. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
  87. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +16 -0
  88. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +21 -15
  89. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  90. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +30 -3
  91. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +138 -130
  92. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  93. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +19 -1
  94. package/dist/components/Employee/Dashboard/BasicDetailsView.js +93 -47
  95. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  96. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
  97. package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
  98. package/dist/components/Employee/Dashboard/Dashboard.js +95 -109
  99. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  100. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +19 -0
  101. package/dist/components/Employee/Dashboard/DashboardComponents.js +137 -25
  102. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  103. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
  104. package/dist/components/Employee/Dashboard/DocumentsView.js +34 -20
  105. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  106. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
  107. package/dist/components/Employee/Dashboard/JobAndPayView.js +536 -135
  108. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  109. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +8 -0
  110. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
  111. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
  112. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
  113. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
  114. package/dist/components/Employee/Dashboard/TaxesView.d.ts +19 -1
  115. package/dist/components/Employee/Dashboard/TaxesView.js +92 -56
  116. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  117. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
  118. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +238 -40
  119. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  120. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
  121. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
  122. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
  123. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
  124. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
  125. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -18
  126. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  127. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +26 -10
  128. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +61 -38
  129. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  130. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
  131. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
  132. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
  133. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
  134. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
  135. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
  136. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
  137. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
  138. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
  139. package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
  140. package/dist/components/Employee/Deductions/Deductions.js +25 -52
  141. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  142. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
  143. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
  144. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
  145. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
  146. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
  147. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  148. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
  149. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
  150. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
  151. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
  152. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
  153. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  154. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
  155. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
  156. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  157. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
  158. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  159. package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
  160. package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
  161. package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
  162. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
  163. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
  164. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
  165. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
  166. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
  167. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
  168. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
  169. package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
  170. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
  171. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
  172. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
  173. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
  174. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
  175. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
  176. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
  177. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
  178. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
  179. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
  180. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
  181. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
  182. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
  183. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
  184. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
  185. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
  186. package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
  187. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
  188. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
  189. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
  190. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
  191. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
  192. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
  193. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
  194. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
  195. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
  196. package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
  197. package/dist/components/Employee/Deductions/stateMachine.js +67 -89
  198. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  199. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
  200. package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
  201. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
  202. package/dist/components/Employee/Documents/management/index.d.ts +3 -0
  203. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
  204. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
  205. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
  206. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
  207. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  208. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
  209. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
  210. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
  211. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
  212. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.js +6 -6
  213. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  214. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
  215. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
  216. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
  217. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
  218. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
  219. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
  220. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
  221. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
  222. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
  223. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
  224. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
  225. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
  226. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +13 -13
  227. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
  228. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
  229. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
  230. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  231. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
  232. package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
  233. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
  234. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
  235. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
  236. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
  237. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
  238. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
  239. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +14 -14
  240. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
  241. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
  242. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  243. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  244. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
  245. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
  246. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  247. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
  248. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  249. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  250. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  251. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  252. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
  253. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  254. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
  255. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  256. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
  257. package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
  258. package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
  259. package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
  260. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
  261. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
  262. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
  263. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
  264. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
  265. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
  266. package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
  267. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
  268. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
  269. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
  270. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
  271. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
  272. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
  273. package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
  274. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
  275. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
  276. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
  277. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
  278. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
  279. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
  280. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
  281. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
  282. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
  283. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
  284. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
  285. package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
  286. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
  287. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
  288. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
  289. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
  290. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
  291. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
  292. package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
  293. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
  294. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
  295. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
  296. package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
  297. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
  298. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
  299. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
  300. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
  301. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
  302. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
  303. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
  304. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
  305. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
  306. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
  307. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
  308. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
  309. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
  310. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
  311. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
  312. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
  313. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
  314. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
  315. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
  316. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
  317. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
  318. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
  319. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
  320. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
  321. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
  322. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
  323. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
  324. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
  325. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
  326. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
  327. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
  328. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
  329. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
  330. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
  331. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
  332. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
  333. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  334. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  335. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  336. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  337. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
  338. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  339. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  340. package/dist/components/Employee/Taxes/FederalForm.js +27 -26
  341. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  342. package/dist/components/Employee/Taxes/FederalHead.js +13 -10
  343. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  344. package/dist/components/Employee/Taxes/StateForm.js +17 -14
  345. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  346. package/dist/components/Employee/Taxes/Taxes.js +75 -69
  347. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  348. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
  349. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  350. package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
  351. package/dist/components/Employee/exports/employeeManagement.js +22 -18
  352. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  353. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  354. package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
  355. package/dist/components/Employee/index.d.ts +4 -4
  356. package/dist/components/Employee/index.js +5 -5
  357. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
  358. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  359. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
  360. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  361. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  362. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
  363. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  364. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
  365. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
  366. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  367. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
  368. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  369. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
  370. package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
  371. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  372. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
  373. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  374. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
  375. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
  376. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  377. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  378. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +78 -55
  379. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  380. package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
  381. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
  382. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  383. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
  384. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
  385. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  386. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
  387. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  388. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
  389. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  390. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  391. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
  392. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  393. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  394. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
  395. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  396. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  397. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
  398. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  399. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
  400. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
  401. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
  402. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
  403. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  404. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
  405. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
  406. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  407. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
  408. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  409. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
  410. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  411. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
  412. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  413. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
  414. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
  415. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  416. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
  417. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  418. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
  419. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  420. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
  421. package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
  422. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  423. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
  424. package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
  425. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
  426. package/dist/helpers/formattedStrings.d.ts +12 -0
  427. package/dist/helpers/formattedStrings.js +55 -33
  428. package/dist/helpers/formattedStrings.js.map +1 -1
  429. package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
  430. package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
  431. package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
  432. package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
  433. package/dist/i18n/I18n.js +6 -5
  434. package/dist/i18n/I18n.js.map +1 -1
  435. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  436. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  437. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
  438. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  439. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
  440. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
  441. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
  442. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
  443. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  444. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
  445. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
  446. package/dist/i18n/en/Employee.Compensation.json.js +48 -44
  447. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  448. package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
  449. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  450. package/dist/i18n/en/Employee.Deductions.json.js +104 -76
  451. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  452. package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
  453. package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
  454. package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
  455. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  456. package/dist/i18n/en/common.json.d.ts +14 -0
  457. package/dist/i18n/en/common.json.js +19 -17
  458. package/dist/i18n/en/common.json.js.map +1 -1
  459. package/dist/index.d.ts +16 -6
  460. package/dist/index.js +138 -112
  461. package/dist/index.js.map +1 -1
  462. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
  463. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
  464. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  465. package/dist/shared/constants.d.ts +10 -2
  466. package/dist/shared/constants.js +30 -26
  467. package/dist/shared/constants.js.map +1 -1
  468. package/dist/style.css +1 -1
  469. package/dist/test-utils/assertions.d.ts +16 -0
  470. package/dist/types/i18next.d.ts +161 -5
  471. package/dist/types/sdkError.js +58 -47
  472. package/dist/types/sdkError.js.map +1 -1
  473. package/docs/reference/endpoint-inventory.json +980 -1170
  474. package/package.json +29 -21
  475. package/dist/components/Employee/Compensation/Compensation.js +0 -87
  476. package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
  477. package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
  478. package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
  479. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
  480. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
  481. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
  482. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
  483. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
  484. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
  485. package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
  486. package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
  487. package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
  488. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
  489. package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
  490. package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
  491. package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
  492. package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
  493. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
  494. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
  495. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
  496. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
  497. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
  498. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
  499. package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
  500. package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
  501. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
  502. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
  503. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
  504. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  505. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
  506. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
  507. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  508. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
  509. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
  510. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
  511. package/dist/components/Employee/Deductions/Head.d.ts +0 -1
  512. package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
  513. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
  514. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
  515. package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
  516. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
  517. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
  518. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
  519. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
  520. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
  521. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
  522. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
  523. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
  524. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
  525. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
  526. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
  527. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  528. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  529. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
  530. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
  531. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
  532. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
  533. package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
  534. package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
  535. package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
  536. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
  537. package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
  538. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
  539. package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
  540. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
  541. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
  542. package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
  543. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
  544. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
  545. package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
  546. package/dist/components/Employee/PaymentMethod/Head.js +0 -13
  547. package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
  548. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
  549. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
  550. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
  551. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
  552. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
  553. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
  554. package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
  555. package/dist/components/Employee/PaymentMethod/Split.js +0 -175
  556. package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
  557. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
  558. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
  559. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
  560. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
  561. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
  562. package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
  563. package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
  564. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  565. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
  566. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
  567. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  568. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
  569. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
  570. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
  571. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
  572. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
  573. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
  574. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
  575. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
  576. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
  577. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
  578. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
  579. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
  580. package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
  581. package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +1 -1
  582. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
  583. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
  584. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
  585. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
  586. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
@@ -0,0 +1,137 @@
1
+ import { jsx as n, jsxs as a } from "react/jsx-runtime";
2
+ import { useTranslation as f } from "react-i18next";
3
+ import { useWatch as A } from "react-hook-form";
4
+ import { useDeductionForm as b } from "../shared/useDeductionForm/useDeductionForm.js";
5
+ import { Form as D } from "../../../Common/Form/Form.js";
6
+ import { Flex as u } from "../../../Common/Flex/Flex.js";
7
+ import "classnames";
8
+ import "../../../../shared/constants.js";
9
+ import { ActionsLayout as y } from "../../../Common/ActionsLayout/ActionsLayout.js";
10
+ import { BaseLayout as p } from "../../../Base/Base.js";
11
+ import { SDKFormProvider as h } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
12
+ import { useComponentContext as R } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ function S({
14
+ employeeId: r,
15
+ deduction: i,
16
+ courtOrdered: t,
17
+ garnishmentType: e,
18
+ title: m,
19
+ onSaved: d,
20
+ onCancel: l
21
+ }) {
22
+ const { t: c } = f("Employee.Deductions"), s = R(), o = b({
23
+ employeeId: r,
24
+ garnishmentId: i?.uuid,
25
+ courtOrdered: t,
26
+ defaultValues: t && e ? { garnishmentType: e } : void 0
27
+ });
28
+ if (o.isLoading)
29
+ return /* @__PURE__ */ n(p, { isLoading: !0, error: o.errorHandling.errors });
30
+ const { Fields: g } = o.form;
31
+ return /* @__PURE__ */ n(
32
+ x,
33
+ {
34
+ form: o,
35
+ Fields: g,
36
+ Components: s,
37
+ t: c,
38
+ title: m,
39
+ onSaved: d,
40
+ onCancel: l
41
+ }
42
+ );
43
+ }
44
+ function x({
45
+ form: r,
46
+ Fields: i,
47
+ Components: t,
48
+ t: e,
49
+ title: m,
50
+ onSaved: d,
51
+ onCancel: l
52
+ }) {
53
+ const c = A({
54
+ control: r.form.hookFormInternals.formMethods.control,
55
+ name: "deductAsPercentage"
56
+ }), s = async () => {
57
+ const o = await r.actions.onSubmit();
58
+ o && d(o.data, o.mode);
59
+ };
60
+ return /* @__PURE__ */ n(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ n(h, { formHookResult: r, children: /* @__PURE__ */ n(D, { onSubmit: s, children: /* @__PURE__ */ a(u, { flexDirection: "column", gap: 32, children: [
61
+ /* @__PURE__ */ n(t.Heading, { as: "h3", children: m }),
62
+ /* @__PURE__ */ a(u, { flexDirection: "column", gap: 20, children: [
63
+ /* @__PURE__ */ a(u, { flexDirection: "column", gap: 20, children: [
64
+ /* @__PURE__ */ n(
65
+ i.Description,
66
+ {
67
+ label: e("descriptionLabelV2"),
68
+ validationMessages: { REQUIRED: e("descriptionRequired") }
69
+ }
70
+ ),
71
+ /* @__PURE__ */ n(
72
+ i.Recurring,
73
+ {
74
+ label: e("frequencyLabel"),
75
+ getOptionLabel: (o) => e(o ? "frequencyRecurringOptionV2" : "frequencyOneTimeOptionV2"),
76
+ validationMessages: { REQUIRED: e("frequencyRequired") }
77
+ }
78
+ ),
79
+ /* @__PURE__ */ n(
80
+ i.DeductAsPercentage,
81
+ {
82
+ label: e("deductionTypeLabelV2"),
83
+ getOptionLabel: (o) => e(o ? "deductionTypePercentageOptionV2" : "deductionTypeFixedAmountOption"),
84
+ validationMessages: { REQUIRED: e("deductionTypeRequired") }
85
+ }
86
+ ),
87
+ /* @__PURE__ */ n(
88
+ i.Amount,
89
+ {
90
+ label: e("deductionAmountLabel"),
91
+ format: c ? "percent" : "currency",
92
+ description: e(c ? "deductionAmountDescriptionPercentage" : "deductionAmountDescriptionFixed"),
93
+ min: 0,
94
+ validationMessages: {
95
+ REQUIRED: e("amountRequired"),
96
+ NEGATIVE_AMOUNT: e("amountNonNegative")
97
+ }
98
+ }
99
+ )
100
+ ] }),
101
+ i.TotalAmount && i.AnnualMaximum && /* @__PURE__ */ a(u, { flexDirection: "column", gap: 20, children: [
102
+ /* @__PURE__ */ n(
103
+ i.TotalAmount,
104
+ {
105
+ label: e("totalAmountLabel"),
106
+ description: e("totalAmountDescription"),
107
+ format: "currency",
108
+ min: 0,
109
+ validationMessages: {
110
+ NEGATIVE_AMOUNT: e("amountNonNegative")
111
+ }
112
+ }
113
+ ),
114
+ /* @__PURE__ */ n(
115
+ i.AnnualMaximum,
116
+ {
117
+ label: e("annualMaxLabel"),
118
+ description: e("annualMaxDescription"),
119
+ format: "currency",
120
+ min: 0,
121
+ validationMessages: {
122
+ NEGATIVE_AMOUNT: e("amountNonNegative")
123
+ }
124
+ }
125
+ )
126
+ ] })
127
+ ] }),
128
+ /* @__PURE__ */ a(y, { children: [
129
+ /* @__PURE__ */ n(t.Button, { variant: "secondary", type: "button", onClick: l, children: e("cancelCta") }),
130
+ /* @__PURE__ */ n(t.Button, { type: "submit", isLoading: r.status.isPending, children: e("saveCta") })
131
+ ] })
132
+ ] }) }) }) });
133
+ }
134
+ export {
135
+ S as StandardDeductionForm
136
+ };
137
+ //# sourceMappingURL=StandardDeductionForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StandardDeductionForm.js","sources":["../../../../../src/components/Employee/Deductions/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 '../shared/useDeductionForm'\nimport type { DeductionFormData } from '../shared/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\nexport function StandardDeductionForm({\n employeeId,\n deduction,\n courtOrdered,\n garnishmentType,\n title,\n onSaved,\n onCancel,\n}: StandardDeductionFormProps) {\n const { t } = useTranslation('Employee.Deductions')\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.Deductions'>>['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 const watchedDeductAsPercentage = useWatch({\n control: form.form.hookFormInternals.formMethods.control as Control<DeductionFormData>,\n name: 'deductAsPercentage',\n })\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('descriptionLabelV2')}\n validationMessages={{ REQUIRED: t('descriptionRequired') }}\n />\n <Fields.Recurring\n label={t('frequencyLabel')}\n getOptionLabel={(value: boolean) =>\n value ? t('frequencyRecurringOptionV2') : t('frequencyOneTimeOptionV2')\n }\n validationMessages={{ REQUIRED: t('frequencyRequired') }}\n />\n <Fields.DeductAsPercentage\n label={t('deductionTypeLabelV2')}\n getOptionLabel={(value: boolean) =>\n value\n ? t('deductionTypePercentageOptionV2')\n : t('deductionTypeFixedAmountOption')\n }\n validationMessages={{ REQUIRED: t('deductionTypeRequired') }}\n />\n <Fields.Amount\n label={t('deductionAmountLabel')}\n format={watchedDeductAsPercentage ? 'percent' : 'currency'}\n description={\n watchedDeductAsPercentage\n ? t('deductionAmountDescriptionPercentage')\n : t('deductionAmountDescriptionFixed')\n }\n min={0}\n validationMessages={{\n REQUIRED: t('amountRequired'),\n NEGATIVE_AMOUNT: t('amountNonNegative'),\n }}\n />\n </Flex>\n {Fields.TotalAmount && Fields.AnnualMaximum && (\n <Flex flexDirection=\"column\" gap={20}>\n <Fields.TotalAmount\n label={t('totalAmountLabel')}\n description={t('totalAmountDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n NEGATIVE_AMOUNT: t('amountNonNegative'),\n }}\n />\n <Fields.AnnualMaximum\n label={t('annualMaxLabel')}\n description={t('annualMaxDescription')}\n format=\"currency\"\n min={0}\n validationMessages={{\n NEGATIVE_AMOUNT: t('amountNonNegative'),\n }}\n />\n </Flex>\n )}\n </Flex>\n <ActionsLayout>\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={form.status.isPending}>\n {t('saveCta')}\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","watchedDeductAsPercentage","useWatch","handleSubmit","result","SDKFormProvider","Form","jsxs","Flex","value","ActionsLayout"],"mappings":";;;;;;;;;;;;AAgCO,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,qBAAqB,GAC5CC,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,MAAIQ,EAAK;AACP,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAK,cAAc,QAAQ;AAGjE,QAAM,EAAE,QAAAG,MAAWH,EAAK;AACxB,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAL;AAAA,MACA,QAAAG;AA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J;AAAA,sBACCmB,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAX,EAACN,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASH,GAC3D,UAAAC,EAAE,WAAW,EAAA,CAChB;AAAA,MACA,gBAAAQ,EAACN,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWE,EAAK,OAAO,WACrD,UAAAJ,EAAE,SAAS,EAAA,CACd;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
@@ -1,6 +1,11 @@
1
- import { BaseComponentInterface, CommonComponentInterface } from '../../../Base';
2
- interface DeductionsListProps extends CommonComponentInterface<'Employee.Deductions'> {
3
- employeeId: string;
1
+ import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
2
+ import { UseDeductionsListReady } from '../shared/useDeductionsList';
3
+ export interface DeductionsListProps {
4
+ className?: string;
5
+ deductionsList: UseDeductionsListReady;
6
+ onAdd: () => void;
7
+ onEdit: (deduction: Garnishment) => void;
8
+ onDelete: (deduction: Garnishment) => void;
9
+ onContinue: () => void;
4
10
  }
5
- export declare function DeductionsList(props: DeductionsListProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
6
- export {};
11
+ export declare function DeductionsList({ className, deductionsList, onAdd, onEdit, onDelete, onContinue, }: DeductionsListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,109 +1,89 @@
1
- import { jsx as n, jsxs as s, Fragment as M } from "react/jsx-runtime";
2
- import { useTranslation as N } from "react-i18next";
3
- import { useGarnishmentsListSuspense as I } from "@gusto/embedded-api/react-query/garnishmentsList";
4
- import { useGarnishmentsUpdateMutation as k } from "@gusto/embedded-api/react-query/garnishmentsUpdate";
5
- import { BaseComponent as w } from "../../../Base/Base.js";
6
- import { useBase as U } from "../../../Base/useBase.js";
7
- import { Flex as p } from "../../../Common/Flex/Flex.js";
1
+ import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
+ import { useTranslation as D } from "react-i18next";
3
+ import { formatDeductionAmount as x } from "../shared/formatDeductionAmount.js";
4
+ import { Flex as c } from "../../../Common/Flex/Flex.js";
8
5
  import "classnames";
9
- import { componentEvents as a } from "../../../../shared/constants.js";
10
- import { ActionsLayout as Y } from "../../../Common/ActionsLayout/ActionsLayout.js";
11
- import E from "../../../../hooks/useNumberFormatter.js";
12
- import S from "../../../../assets/icons/pencil.svg.js";
13
- import B from "../../../../assets/icons/trashcan.svg.js";
14
- import { useComponentDictionary as V, useI18n as q } from "../../../../i18n/I18n.js";
15
- import { useComponentContext as F } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import G from "../../../../assets/icons/plus-circle.svg.js";
17
- import { HamburgerMenu as H } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
18
- import { useDataView as R } from "../../../Common/DataView/useDataView.js";
19
- import { DataView as j } from "../../../Common/DataView/DataView.js";
20
- function de(i) {
21
- return /* @__PURE__ */ n(w, { ...i, children: /* @__PURE__ */ n(z, { ...i, children: i.children }) });
22
- }
23
- function z({ className: i, children: m, employeeId: D, dictionary: f }) {
24
- const { onEvent: o, baseSubmitHandler: h } = U(), { t } = N("Employee.Deductions"), c = F(), g = E("currency"), C = E("percent");
25
- V("Employee.Deductions", f), q("Employee.Deductions");
26
- const { data: v } = I({ employeeId: D }), u = v.garnishments, T = u.filter((e) => e.active), { mutateAsync: y, isPending: P } = k(), L = async (e) => {
27
- await h(e, async (r) => {
28
- const { garnishment: l } = await y({
29
- request: {
30
- garnishmentId: r.uuid,
31
- updateGarnishmentRequest: {
32
- ...r,
33
- totalAmount: r.totalAmount ?? void 0,
34
- active: !1,
35
- version: r.version
36
- }
37
- }
38
- }), d = u.filter((A) => A.active);
39
- d.length === 1 && d[0]?.uuid === l?.uuid ? o(a.EMPLOYEE_DEDUCTION_DELETED_EMPTY) : o(a.EMPLOYEE_DEDUCTION_DELETED, l);
40
- });
41
- }, b = (e) => {
42
- o(a.EMPLOYEE_DEDUCTION_EDIT, e);
43
- }, O = () => {
44
- o(a.EMPLOYEE_DEDUCTION_ADD);
45
- }, _ = () => {
46
- o(a.EMPLOYEE_DEDUCTION_DONE);
47
- }, { ...x } = R({
48
- data: T,
6
+ import "../../../../shared/constants.js";
7
+ import { ActionsLayout as k } from "../../../Common/ActionsLayout/ActionsLayout.js";
8
+ import m from "../../../../hooks/useNumberFormatter.js";
9
+ import P from "../../../../assets/icons/pencil.svg.js";
10
+ import b from "../../../../assets/icons/trashcan.svg.js";
11
+ import { useComponentContext as T } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import { useI18n as v } from "../../../../i18n/I18n.js";
13
+ import w from "../../../../assets/icons/plus-circle.svg.js";
14
+ import { HamburgerMenu as A } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
15
+ import { useDataView as V } from "../../../Common/DataView/useDataView.js";
16
+ import { DataView as L } from "../../../Common/DataView/DataView.js";
17
+ function Q({
18
+ className: a,
19
+ deductionsList: i,
20
+ onAdd: u,
21
+ onEdit: l,
22
+ onDelete: s,
23
+ onContinue: d
24
+ }) {
25
+ v("Employee.Deductions");
26
+ const { t: e } = D("Employee.Deductions"), n = T(), p = m("currency"), f = m("percent"), { deductions: g } = i.data, C = i.status.isPending, { ...h } = V({
27
+ data: g,
49
28
  columns: [
50
29
  {
51
30
  key: "description",
52
- title: t("nameColumn")
31
+ title: e("nameColumn")
53
32
  },
54
33
  {
55
34
  key: "recurring",
56
- title: t("frequencyColumn"),
57
- render: (e) => e.recurring ? t("recurringText") : t("nonRecurringText")
35
+ title: e("frequencyColumn"),
36
+ render: (t) => t.recurring ? e("recurringText") : e("nonRecurringText")
58
37
  },
59
38
  {
60
39
  key: "amount",
61
- title: t("withheldColumn"),
62
- render: (e) => {
63
- const r = e.deductAsPercentage ? C(Number(e.amount)) : g(Number(e.amount));
64
- return e.recurring ? t("recurringAmount", { value: r }) : r;
65
- }
40
+ title: e("withheldColumn"),
41
+ render: (t) => x(t, {
42
+ formatCurrency: p,
43
+ formatPercent: f,
44
+ formatPerPaycheck: (y) => e("recurringAmount", { value: y })
45
+ })
66
46
  }
67
47
  ],
68
- itemMenu: (e) => /* @__PURE__ */ n(
69
- H,
48
+ itemMenu: (t) => /* @__PURE__ */ r(
49
+ A,
70
50
  {
71
- isLoading: P,
51
+ isLoading: C,
72
52
  items: [
73
53
  {
74
- label: t("editCta"),
54
+ label: e("editCta"),
75
55
  onClick: () => {
76
- b(e);
56
+ l(t);
77
57
  },
78
- icon: /* @__PURE__ */ n(S, { "aria-hidden": !0 })
58
+ icon: /* @__PURE__ */ r(P, { "aria-hidden": !0 })
79
59
  },
80
60
  {
81
- label: t("deleteCta"),
82
- onClick: async () => {
83
- await L(e);
61
+ label: e("deleteCta"),
62
+ onClick: () => {
63
+ s(t);
84
64
  },
85
- icon: /* @__PURE__ */ n(B, { "aria-hidden": !0 })
65
+ icon: /* @__PURE__ */ r(b, { "aria-hidden": !0 })
86
66
  }
87
67
  ]
88
68
  }
89
69
  )
90
70
  });
91
- return /* @__PURE__ */ n("section", { className: i, children: /* @__PURE__ */ n(p, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ s(M, { children: [
92
- /* @__PURE__ */ s(p, { flexDirection: "column", gap: 2, children: [
93
- /* @__PURE__ */ n(c.Heading, { as: "h2", children: t("pageTitle") }),
94
- /* @__PURE__ */ n(c.Text, { variant: "supporting", children: t("includeDeductionsDescriptionV2") })
71
+ return /* @__PURE__ */ r("section", { className: a, children: /* @__PURE__ */ o(c, { flexDirection: "column", gap: 32, children: [
72
+ /* @__PURE__ */ o(c, { flexDirection: "column", gap: 2, children: [
73
+ /* @__PURE__ */ r(n.Heading, { as: "h2", children: e("pageTitle") }),
74
+ /* @__PURE__ */ r(n.Text, { variant: "supporting", children: e("includeDeductionsDescriptionV2") })
95
75
  ] }),
96
- /* @__PURE__ */ n(j, { label: t("deductionsTableLabel"), ...x }),
97
- /* @__PURE__ */ s(Y, { children: [
98
- /* @__PURE__ */ s(c.Button, { variant: "secondary", onClick: O, children: [
99
- /* @__PURE__ */ n(G, {}),
100
- t("addDeductionCta")
76
+ /* @__PURE__ */ r(L, { label: e("deductionsTableLabel"), ...h }),
77
+ /* @__PURE__ */ o(k, { children: [
78
+ /* @__PURE__ */ o(n.Button, { variant: "secondary", onClick: u, children: [
79
+ /* @__PURE__ */ r(w, {}),
80
+ e("addDeductionCta")
101
81
  ] }),
102
- /* @__PURE__ */ n(c.Button, { onClick: _, children: t("continueCta") })
82
+ /* @__PURE__ */ r(n.Button, { onClick: d, children: e("continueCta") })
103
83
  ] })
104
- ] }) }) });
84
+ ] }) });
105
85
  }
106
86
  export {
107
- de as DeductionsList
87
+ Q as DeductionsList
108
88
  };
109
89
  //# sourceMappingURL=DeductionsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionsList.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsList/DeductionsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useGarnishmentsListSuspense } from '@gusto/embedded-api/react-query/garnishmentsList'\nimport { useGarnishmentsUpdateMutation } from '@gusto/embedded-api/react-query/garnishmentsUpdate'\nimport { type Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { useDataView, DataView } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\ninterface DeductionsListProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n}\n\nexport function DeductionsList(props: DeductionsListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, children, employeeId, dictionary }: DeductionsListProps) {\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const { data } = useGarnishmentsListSuspense({ employeeId })\n const deductions = data.garnishments!\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { mutateAsync: updateDeduction, isPending: isPendingUpdate } =\n useGarnishmentsUpdateMutation()\n\n const handleDelete = async (deduction: Garnishment) => {\n await baseSubmitHandler(deduction, async payload => {\n const { garnishment } = await updateDeduction({\n request: {\n garnishmentId: payload.uuid,\n updateGarnishmentRequest: {\n ...payload,\n totalAmount: payload.totalAmount ?? undefined,\n active: false,\n version: payload.version as string,\n },\n },\n })\n\n // if soft deleted deduction was the last active, then return to empty view\n // else if any other active deductions return to list view\n const remainingActiveDeductions = deductions.filter(d => d.active)\n\n if (\n remainingActiveDeductions.length === 1 &&\n remainingActiveDeductions[0]?.uuid === garnishment?.uuid\n ) {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY)\n } else {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED, garnishment)\n }\n })\n }\n\n const handleEdit = (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n }\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD)\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n {\n key: 'description',\n title: t('nameColumn'),\n },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPendingUpdate}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: async () => {\n await handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n </Flex>\n\n <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n <PlusCircleIcon />\n {t('addDeductionCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </>\n )}\n </Flex>\n </section>\n )\n}\n"],"names":["DeductionsList","props","jsx","BaseComponent","Root","className","children","employeeId","dictionary","onEvent","baseSubmitHandler","useBase","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","useComponentDictionary","useI18n","data","useGarnishmentsListSuspense","deductions","activeDeductions","deduction","updateDeduction","isPendingUpdate","useGarnishmentsUpdateMutation","handleDelete","payload","garnishment","remainingActiveDeductions","d","componentEvents","handleEdit","handleAdd","handleContinue","dataViewProps","useDataView","formattedAmount","HamburgerMenu","Penc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B,SAAS,YAAY;AACnB,oBAAMb,EAAaJ,CAAS;AAAA,YAC9B;AAAA,YACA,MAAM,gBAAAtB,EAACwC,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SACE,gBAAAxC,EAAC,WAAA,EAAQ,WAAAG,GACP,UAAA,gBAAAH,EAACyC,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAArC,KAGC,gBAAAsC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAACD,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAzC,EAACW,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAA,EAAE,WAAW,GAAE;AAAA,MAC5C,gBAAAX,EAACW,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAA,EAAE,gCAAgC,EAAA,CACrC;AAAA,IAAA,GACF;AAAA,sBAECiC,GAAA,EAAS,OAAO,EAAE,sBAAsB,GAAI,GAAGT,GAAe;AAAA,sBAC9DU,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAH,EAAC/B,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASsB,GAC9C,UAAA;AAAA,QAAA,gBAAAjC,EAAC8C,GAAA,EAAe;AAAA,QACf,EAAE,iBAAiB;AAAA,MAAA,GACtB;AAAA,MACA,gBAAA9C,EAACW,EAAW,QAAX,EAAkB,SAASuB,GAAiB,UAAA,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,EAAA,CAChE;AAAA,EAAA,EAAA,CACF,GAEJ,GACF;AAEJ;"}
1
+ {"version":3,"file":"DeductionsList.js","sources":["../../../../../src/components/Employee/Deductions/DeductionsList/DeductionsList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport type { UseDeductionsListReady } from '../shared/useDeductionsList'\nimport { formatDeductionAmount } from '../shared/formatDeductionAmount'\nimport { useDataView, DataView } from '@/components/Common'\nimport { ActionsLayout } from '@/components/Common'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nexport interface DeductionsListProps {\n className?: string\n deductionsList: UseDeductionsListReady\n onAdd: () => void\n onEdit: (deduction: Garnishment) => void\n onDelete: (deduction: Garnishment) => void\n onContinue: () => void\n}\n\nexport function DeductionsList({\n className,\n deductionsList,\n onAdd,\n onEdit,\n onDelete,\n onContinue,\n}: DeductionsListProps) {\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const { deductions } = deductionsList.data\n const isPendingAny = deductionsList.status.isPending\n\n const { ...dataViewProps } = useDataView({\n data: deductions,\n columns: [\n {\n key: 'description',\n title: t('nameColumn'),\n },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction =>\n formatDeductionAmount(deduction, {\n formatCurrency,\n formatPercent,\n formatPerPaycheck: (value: string) => t('recurringAmount', { value }),\n }),\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPendingAny}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n onEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n onDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n return (\n <section className={className}>\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n </Flex>\n\n <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={onAdd}>\n <PlusCircleIcon />\n {t('addDeductionCta')}\n </Components.Button>\n <Components.Button onClick={onContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n </Flex>\n </section>\n )\n}\n"],"names":["DeductionsList","className","deductionsList","onAdd","onEdit","onDelete","onContinue","useI18n","t","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","formatPercent","deductions","isPendingAny","dataViewProps","useDataView","deduction","formatDeductionAmount","value","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","jsxs","Flex","DataView","ActionsLayout","PlusCircleIcon"],"mappings":";;;;;;;;;;;;;;;;AAwBO,SAASA,EAAe;AAAA,EAC7B,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAwB;AACtB,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5C,EAAE,YAAAE,MAAeb,EAAe,MAChCc,IAAed,EAAe,OAAO,WAErC,EAAE,GAAGe,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMH;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOP,EAAE,YAAY;AAAA,MAAA;AAAA,MAEvB;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,iBAAiB;AAAA,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A,EAAS,OAAOpB,EAAE,sBAAsB,GAAI,GAAGS,GAAe;AAAA,sBAC9DY,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAH,EAAChB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASP,GAC9C,UAAA;AAAA,QAAA,gBAAAmB,EAACQ,GAAA,EAAe;AAAA,QACftB,EAAE,iBAAiB;AAAA,MAAA,GACtB;AAAA,MACA,gBAAAc,EAACZ,EAAW,QAAX,EAAkB,SAASJ,GAAa,UAAAE,EAAE,aAAa,EAAA,CAAE;AAAA,IAAA,EAAA,CAC5D;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -1,6 +1,6 @@
1
- import { BaseComponentInterface, CommonComponentInterface } from '../../../Base';
2
- interface IncludeDeductionsProps extends CommonComponentInterface<'Employee.Deductions'> {
3
- employeeId: string;
1
+ export interface IncludeDeductionsProps {
2
+ className?: string;
3
+ onAdd: () => void;
4
+ onContinue: () => void;
4
5
  }
5
- export declare function IncludeDeductions(props: IncludeDeductionsProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
6
- export {};
6
+ export declare function IncludeDeductions({ className, onAdd, onContinue }: IncludeDeductionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,53 +1,43 @@
1
- import { jsx as n, jsxs as i } from "react/jsx-runtime";
2
- import { useTranslation as u } from "react-i18next";
3
- import r from "./IncludeDeductions.module.scss.js";
4
- import { BaseComponent as p } from "../../../Base/Base.js";
5
- import { useBase as h } from "../../../Base/useBase.js";
6
- import { Grid as C } from "../../../Common/Grid/Grid.js";
7
- import { Flex as m } from "../../../Common/Flex/Flex.js";
8
- import { ActionsLayout as f } from "../../../Common/ActionsLayout/ActionsLayout.js";
9
- import { useComponentDictionary as D, useI18n as E } from "../../../../i18n/I18n.js";
10
- import { componentEvents as s } from "../../../../shared/constants.js";
11
- import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import g from "../../../../assets/icons/coins-hand.svg.js";
13
- import x from "../../../../assets/icons/plus-circle.svg.js";
14
- function Y(t) {
15
- return /* @__PURE__ */ n(p, { ...t, children: /* @__PURE__ */ n(I, { ...t, children: t.children }) });
16
- }
17
- function I({ className: t, dictionary: d }) {
18
- const { onEvent: c } = h(), { t: e } = u("Employee.Deductions"), o = y();
19
- D("Employee.Deductions", d), E("Employee.Deductions");
20
- const l = () => {
21
- c(s.EMPLOYEE_DEDUCTION_INCLUDE_YES);
22
- }, a = () => {
23
- c(s.EMPLOYEE_DEDUCTION_INCLUDE_NO);
24
- };
25
- return /* @__PURE__ */ n("section", { className: t, children: /* @__PURE__ */ i(C, { gridTemplateColumns: "1fr", children: [
26
- /* @__PURE__ */ i(m, { flexDirection: "column", gap: 2, children: [
27
- /* @__PURE__ */ n(o.Heading, { as: "h2", children: e("pageTitle") }),
28
- /* @__PURE__ */ n(o.Text, { variant: "supporting", children: e("includeDeductionsDescriptionV2") })
1
+ import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
+ import m from "classnames";
3
+ import { useTranslation as a } from "react-i18next";
4
+ import i from "./IncludeDeductions.module.scss.js";
5
+ import { Grid as d } from "../../../Common/Grid/Grid.js";
6
+ import { Flex as r } from "../../../Common/Flex/Flex.js";
7
+ import { ActionsLayout as u } from "../../../Common/ActionsLayout/ActionsLayout.js";
8
+ import { useComponentContext as p } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { useI18n as h } from "../../../../i18n/I18n.js";
10
+ import f from "../../../../assets/icons/coins-hand.svg.js";
11
+ import C from "../../../../assets/icons/plus-circle.svg.js";
12
+ function j({ className: c, onAdd: s, onContinue: l }) {
13
+ h("Employee.Deductions");
14
+ const { t: n } = a("Employee.Deductions"), e = p();
15
+ return /* @__PURE__ */ t("section", { className: m(i.container, c), children: /* @__PURE__ */ o(d, { gridTemplateColumns: "1fr", children: [
16
+ /* @__PURE__ */ o(r, { flexDirection: "column", gap: 2, children: [
17
+ /* @__PURE__ */ t(e.Heading, { as: "h2", children: n("pageTitle") }),
18
+ /* @__PURE__ */ t(e.Text, { variant: "supporting", children: n("includeDeductionsDescriptionV2") })
29
19
  ] }),
30
- /* @__PURE__ */ n("section", { className: r.emptyStateContainer, children: /* @__PURE__ */ i(m, { flexDirection: "column", gap: 16, justifyContent: "center", alignItems: "center", children: [
31
- /* @__PURE__ */ n("section", { className: r.coinHandsIconContainer, children: /* @__PURE__ */ n(g, { width: 24, height: 24 }) }),
32
- /* @__PURE__ */ n(o.Text, { weight: "bold", children: e("includeDeductionsEmptyState") }),
33
- /* @__PURE__ */ i(
34
- o.Button,
20
+ /* @__PURE__ */ t("section", { className: i.emptyStateContainer, children: /* @__PURE__ */ o(r, { flexDirection: "column", gap: 16, justifyContent: "center", alignItems: "center", children: [
21
+ /* @__PURE__ */ t("div", { className: i.coinHandsIconContainer, children: /* @__PURE__ */ t(f, { width: 24, height: 24 }) }),
22
+ /* @__PURE__ */ t(e.Text, { weight: "bold", children: n("includeDeductionsEmptyState") }),
23
+ /* @__PURE__ */ o(
24
+ e.Button,
35
25
  {
36
26
  type: "button",
37
27
  variant: "secondary",
38
- onClick: l,
39
- className: r.addDeductionButton,
28
+ onClick: s,
29
+ className: i.addDeductionButton,
40
30
  children: [
41
- /* @__PURE__ */ n(x, {}),
42
- e("addDeductionButtonCta")
31
+ /* @__PURE__ */ t(C, {}),
32
+ n("addDeductionButtonCta")
43
33
  ]
44
34
  }
45
35
  )
46
36
  ] }) }),
47
- /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(o.Button, { type: "button", onClick: a, children: e("continueCta") }) })
37
+ /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(e.Button, { type: "button", onClick: l, children: n("continueCta") }) })
48
38
  ] }) });
49
39
  }
50
40
  export {
51
- Y as IncludeDeductions
41
+ j as IncludeDeductions
52
42
  };
53
43
  //# sourceMappingURL=IncludeDeductions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IncludeDeductions.js","sources":["../../../../../src/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './IncludeDeductions.module.scss'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n useBase,\n} from '@/components/Base'\nimport { Grid } from '@/components/Common/Grid/Grid'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport CoinsHandsIcon from '@/assets/icons/coins-hand.svg?react'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\ninterface IncludeDeductionsProps extends CommonComponentInterface<'Employee.Deductions'> {\n employeeId: string\n}\n\nexport function IncludeDeductions(props: IncludeDeductionsProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ className, dictionary }: IncludeDeductionsProps) {\n const { onEvent } = useBase()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n useComponentDictionary('Employee.Deductions', dictionary)\n useI18n('Employee.Deductions')\n\n const handleAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES)\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO)\n }\n\n return (\n <section className={className}>\n <Grid gridTemplateColumns=\"1fr\">\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n </Flex>\n\n {/* TODO: Replace with proper empty state component for DataViews */}\n <section className={styles.emptyStateContainer}>\n <Flex flexDirection=\"column\" gap={16} justifyContent=\"center\" alignItems=\"center\">\n <section className={styles.coinHandsIconContainer}>\n <CoinsHandsIcon width={24} height={24} />\n </section>\n <Components.Text weight=\"bold\">{t('includeDeductionsEmptyState')}</Components.Text>\n <Components.Button\n type=\"button\"\n variant=\"secondary\"\n onClick={handleAdd}\n className={styles.addDeductionButton}\n >\n <PlusCircleIcon />\n {t('addDeductionButtonCta')}\n </Components.Button>\n </Flex>\n </section>\n <ActionsLayout>\n <Components.Button type=\"button\" onClick={handleContinue}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Grid>\n </section>\n )\n}\n"],"names":["IncludeDeductions","props","jsx","BaseComponent","Root","className","dictionary","onEvent","useBase","t","useTranslation","Components","useComponentContext","useComponentDictionary","useI18n","handleAdd","componentEvents","handleContinue","jsxs","Grid","Flex","styles","CoinsHandsIcon","PlusCircleIcon","ActionsLayout"],"mappings":";;;;;;;;;;;;;AAqBO,SAASA,EAAkBC,GAAwD;AACxF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,YAAAC,KAAsC;AAC/D,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AAEnB,EAAAC,EAAuB,uBAAuBP,CAAU,GACxDQ,EAAQ,qBAAqB;AAE7B,QAAMC,IAAY,MAAM;AACtB,IAAAR,EAAQS,EAAgB,8BAA8B;AAAA,EACxD,GAEMC,IAAiB,MAAM;AAC3B,IAAAV,EAAQS,EAAgB,6BAA6B;AAAA,EACvD;AAEA,2BACG,WAAA,EAAQ,WAAAX,GACP,UAAA,gBAAAa,EAACC,GAAA,EAAK,qBAAoB,OACxB,UAAA;AAAA,IAAA,gBAAAD,EAACE,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAlB,EAACS,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,WAAW,GAAE;AAAA,MAC5C,gBAAAP,EAACS,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAAF,EAAE,gCAAgC,EAAA,CACrC;AAAA,IAAA,GACF;AAAA,IAGA,gBAAAP,EAAC,WAAA,EAAQ,WAAWmB,EAAO,qBACzB,UAAA,gBAAAH,EAACE,GAAA,EAAK,eAAc,UAAS,KAAK,IAAI,gBAAe,UAAS,YAAW,UACvE,UAAA;AAAA,MAAA,gBAAAlB,EAAC,WAAA,EAAQ,WAAWmB,EAAO,wBACzB,UAAA,gBAAAnB,EAACoB,KAAe,OAAO,IAAI,QAAQ,GAAA,CAAI,EAAA,CACzC;AAAA,MACA,gBAAApB,EAACS,EAAW,MAAX,EAAgB,QAAO,QAAQ,UAAAF,EAAE,6BAA6B,GAAE;AAAA,MACjE,gBAAAS;AAAA,QAACP,EAAW;AAAA,QAAX;AAAA,UACC,MAAK;AAAA,UACL,SAAQ;AAAA,UACR,SAASI;AAAA,UACT,WAAWM,EAAO;AAAA,UAElB,UAAA;AAAA,YAAA,gBAAAnB,EAACqB,GAAA,EAAe;AAAA,YACfd,EAAE,uBAAuB;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC5B,EAAA,CACF,EAAA,CACF;AAAA,IACA,gBAAAP,EAACsB,GAAA,EACC,UAAA,gBAAAtB,EAACS,EAAW,QAAX,EAAkB,MAAK,UAAS,SAASM,GACvC,UAAAR,EAAE,aAAa,GAClB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"IncludeDeductions.js","sources":["../../../../../src/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport styles from './IncludeDeductions.module.scss'\nimport { Grid } from '@/components/Common/Grid/Grid'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport CoinsHandsIcon from '@/assets/icons/coins-hand.svg?react'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nexport interface IncludeDeductionsProps {\n className?: string\n onAdd: () => void\n onContinue: () => void\n}\n\nexport function IncludeDeductions({ className, onAdd, onContinue }: IncludeDeductionsProps) {\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n return (\n <section className={classNames(styles.container, className)}>\n <Grid gridTemplateColumns=\"1fr\">\n <Flex flexDirection=\"column\" gap={2}>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n </Flex>\n\n <section className={styles.emptyStateContainer}>\n <Flex flexDirection=\"column\" gap={16} justifyContent=\"center\" alignItems=\"center\">\n <div className={styles.coinHandsIconContainer}>\n <CoinsHandsIcon width={24} height={24} />\n </div>\n <Components.Text weight=\"bold\">{t('includeDeductionsEmptyState')}</Components.Text>\n <Components.Button\n type=\"button\"\n variant=\"secondary\"\n onClick={onAdd}\n className={styles.addDeductionButton}\n >\n <PlusCircleIcon />\n {t('addDeductionButtonCta')}\n </Components.Button>\n </Flex>\n </section>\n <ActionsLayout>\n <Components.Button type=\"button\" onClick={onContinue}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n </Grid>\n </section>\n )\n}\n"],"names":["IncludeDeductions","className","onAdd","onContinue","useI18n","t","useTranslation","Components","useComponentContext","jsx","classNames","styles","jsxs","Grid","Flex","CoinsHandsIcon","PlusCircleIcon","ActionsLayout"],"mappings":";;;;;;;;;;;AAgBO,SAASA,EAAkB,EAAE,WAAAC,GAAW,OAAAC,GAAO,YAAAC,KAAsC;AAC1F,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,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StateContainer_1iaf0_1", t = "_coinHandsIconContainer_1iaf0_11", a = {
2
- emptyStateContainer: n,
3
- coinHandsIconContainer: t
1
+ const n = "_container_14qw1_1", t = "_emptyStateContainer_14qw1_5", o = "_coinHandsIconContainer_14qw1_15", e = {
2
+ container: n,
3
+ emptyStateContainer: t,
4
+ coinHandsIconContainer: o
4
5
  };
5
6
  export {
6
- t as coinHandsIconContainer,
7
- a as default,
8
- n as emptyStateContainer
7
+ o as coinHandsIconContainer,
8
+ n as container,
9
+ e as default,
10
+ t as emptyStateContainer
9
11
  };
10
12
  //# sourceMappingURL=IncludeDeductions.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IncludeDeductions.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"IncludeDeductions.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -5,21 +5,20 @@ export type EventPayloads = {
5
5
  [componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES]: undefined;
6
6
  [componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO]: undefined;
7
7
  [componentEvents.EMPLOYEE_DEDUCTION_ADD]: undefined;
8
+ [componentEvents.EMPLOYEE_DEDUCTION_EDIT]: Garnishment;
9
+ [componentEvents.EMPLOYEE_DEDUCTION_CANCEL]: undefined;
10
+ [componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY]: undefined;
8
11
  [componentEvents.EMPLOYEE_DEDUCTION_CREATED]: Garnishment;
9
12
  [componentEvents.EMPLOYEE_DEDUCTION_UPDATED]: Garnishment;
10
13
  [componentEvents.EMPLOYEE_DEDUCTION_DELETED]: Garnishment;
11
14
  [componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY]: undefined;
12
- [componentEvents.EMPLOYEE_DEDUCTION_EDIT]: Garnishment;
13
- [componentEvents.EMPLOYEE_DEDUCTION_CANCEL]: undefined;
14
- [componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY]: undefined;
15
15
  [componentEvents.EMPLOYEE_DEDUCTION_DONE]: undefined;
16
- [componentEvents.CANCEL]: undefined;
17
16
  };
18
17
  export interface DeductionsContextInterface extends FlowContextInterface {
19
18
  employeeId: string;
20
- currentDeductionId?: string | null;
21
- hasExistingDeductions?: boolean;
19
+ /** Set by the EDIT transition; consumed by the form-mode contextual. */
20
+ editingDeductionId?: string;
22
21
  }
23
- export declare function IncludeDeductionsFormContextual(): import("react/jsx-runtime").JSX.Element;
22
+ export declare function IncludeDeductionsContextual(): import("react/jsx-runtime").JSX.Element;
24
23
  export declare function DeductionsListContextual(): import("react/jsx-runtime").JSX.Element;
25
- export declare function DeductionFormContextual(): import("react/jsx-runtime").JSX.Element;
24
+ export declare function DeductionsFormContextual(): import("react/jsx-runtime").JSX.Element;