@gusto/embedded-react-sdk 0.44.1 → 0.45.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 (604) hide show
  1. package/CHANGELOG.md +63 -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/CreateSignatory/useCreateSignatory.js +4 -20
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/Head.js +12 -9
  15. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -20
  19. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -22
  21. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  22. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
  23. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  24. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -20
  25. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  26. package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
  27. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  28. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -20
  29. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  30. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +28 -28
  31. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  32. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
  33. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  34. package/dist/components/Company/FederalTaxes/Head.js +7 -6
  35. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  36. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -28
  37. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  38. package/dist/components/Company/Industry/Context.js +7 -23
  39. package/dist/components/Company/Industry/Context.js.map +1 -1
  40. package/dist/components/Company/Industry/Head.js +10 -9
  41. package/dist/components/Company/Industry/Head.js.map +1 -1
  42. package/dist/components/Company/Industry/IndustrySelect.js +22 -19
  43. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  44. package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
  45. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -20
  47. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  48. package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
  49. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  50. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
  51. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  52. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -20
  53. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  54. package/dist/components/Company/OnboardingOverview/context.js +4 -20
  55. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  56. package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
  57. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  58. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -20
  59. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  60. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -20
  61. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  62. package/dist/components/Contractor/Address/useAddress.js +6 -22
  63. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  64. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
  65. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  66. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
  67. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  68. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
  69. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  70. package/dist/components/Contractor/Profile/useContractorProfile.js +42 -52
  71. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  72. package/dist/components/Employee/Compensation/index.d.ts +1 -1
  73. package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
  74. package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
  75. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
  76. package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
  77. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
  78. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
  79. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
  80. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
  81. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
  82. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
  83. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  84. package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
  85. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
  86. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
  87. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
  88. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
  89. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
  90. package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
  91. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
  92. package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
  93. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
  94. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
  95. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
  96. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
  97. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
  98. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  99. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
  100. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
  101. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +193 -181
  102. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  103. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
  104. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
  105. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +14 -13
  106. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  107. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +19 -2
  108. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +133 -130
  109. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  110. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
  111. package/dist/components/Employee/Dashboard/BasicDetailsView.js +87 -65
  112. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
  114. package/dist/components/Employee/Dashboard/Dashboard.js +89 -109
  115. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +15 -0
  117. package/dist/components/Employee/Dashboard/DashboardComponents.js +120 -25
  118. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  119. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
  120. package/dist/components/Employee/Dashboard/DocumentsView.js +24 -17
  121. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  122. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
  123. package/dist/components/Employee/Dashboard/JobAndPayView.js +495 -114
  124. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  125. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
  126. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
  127. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
  128. package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
  129. package/dist/components/Employee/Dashboard/TaxesView.js +82 -60
  130. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  131. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
  132. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +227 -40
  133. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  134. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
  135. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
  136. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
  137. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
  138. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +7 -4
  139. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  140. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +14 -8
  141. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +60 -36
  142. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  143. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
  144. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
  145. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
  146. package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
  147. package/dist/components/Employee/Deductions/Deductions.js +25 -52
  148. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  149. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
  150. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
  151. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
  152. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
  153. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
  154. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  155. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
  156. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
  157. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
  158. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
  159. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
  160. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  161. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
  162. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
  163. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  164. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
  165. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  166. package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
  167. package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
  168. package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
  169. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
  170. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
  171. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
  172. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
  173. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
  174. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
  175. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
  176. package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
  177. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
  178. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
  179. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
  180. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
  181. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
  182. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
  183. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
  184. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
  185. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
  186. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
  187. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
  188. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
  189. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
  190. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
  191. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
  192. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
  193. package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
  194. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
  195. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
  196. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
  197. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
  198. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
  199. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
  200. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
  201. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
  202. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
  203. package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
  204. package/dist/components/Employee/Deductions/stateMachine.js +67 -89
  205. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  206. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
  207. package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
  208. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
  209. package/dist/components/Employee/Documents/management/index.d.ts +3 -0
  210. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
  211. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
  212. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
  213. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
  214. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  215. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
  216. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
  217. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
  218. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
  219. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +8 -0
  220. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  221. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
  222. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
  223. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
  224. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
  225. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
  226. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
  227. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
  228. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
  229. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
  230. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
  231. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
  232. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
  233. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +11 -11
  234. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
  235. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
  236. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
  237. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  238. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
  239. package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
  240. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
  241. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
  242. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
  243. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
  244. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
  245. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
  246. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +11 -11
  247. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
  248. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
  249. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  250. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  251. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
  252. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
  253. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
  254. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  255. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  256. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  257. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  258. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
  259. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  260. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
  261. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  262. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
  263. package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
  264. package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
  265. package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
  266. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
  267. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
  268. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
  269. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
  270. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
  271. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
  272. package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
  273. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
  274. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
  275. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
  276. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
  277. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
  278. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
  279. package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
  280. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
  281. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
  282. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
  283. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
  284. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
  285. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
  286. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
  287. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
  288. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
  289. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
  290. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
  291. package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
  292. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
  293. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
  294. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
  295. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
  296. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
  297. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
  298. package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
  299. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
  300. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
  301. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
  302. package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
  303. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
  304. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
  305. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
  306. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
  307. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
  308. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
  309. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
  310. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
  311. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
  312. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
  313. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
  314. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
  315. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
  316. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
  317. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
  318. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
  319. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
  320. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
  321. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
  322. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
  323. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
  324. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
  325. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
  326. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
  327. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
  328. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
  329. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
  330. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
  331. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
  332. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
  333. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
  334. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
  335. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
  336. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
  337. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
  338. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
  339. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  340. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
  341. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  342. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +19 -17
  343. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  344. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js +8 -0
  345. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js.map +1 -0
  346. package/dist/components/Employee/Taxes/FederalForm.js +27 -26
  347. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  348. package/dist/components/Employee/Taxes/FederalHead.js +13 -10
  349. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  350. package/dist/components/Employee/Taxes/StateForm.js +17 -14
  351. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  352. package/dist/components/Employee/Taxes/Taxes.js +75 -69
  353. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  354. package/dist/components/Employee/Taxes/useTaxes.js +4 -20
  355. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  356. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
  357. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  358. package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
  359. package/dist/components/Employee/exports/employeeManagement.js +22 -18
  360. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  361. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  362. package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
  363. package/dist/components/Employee/index.d.ts +4 -4
  364. package/dist/components/Employee/index.js +5 -5
  365. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +26 -34
  366. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  367. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
  368. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  369. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
  370. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +71 -54
  371. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  372. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
  373. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  374. package/dist/components/Payroll/usePreparedPayrollData.js +22 -36
  375. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  376. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
  377. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  378. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  379. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
  380. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  381. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
  382. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
  383. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  384. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
  385. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  386. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
  387. package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
  388. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  389. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
  390. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  391. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
  392. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
  393. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  394. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  395. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +59 -48
  396. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  397. package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
  398. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
  399. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  400. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
  401. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
  402. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  403. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
  404. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  405. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
  406. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  407. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  408. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
  409. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  410. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  411. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
  412. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  413. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  414. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
  415. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  416. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
  417. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
  418. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
  419. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
  420. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  421. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
  422. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
  423. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  424. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
  425. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  426. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
  427. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  428. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
  429. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  430. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
  431. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
  432. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  433. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
  434. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  435. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
  436. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  437. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
  438. package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
  439. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  440. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
  441. package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
  442. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
  443. package/dist/helpers/dateFormatting.js +52 -56
  444. package/dist/helpers/dateFormatting.js.map +1 -1
  445. package/dist/helpers/formattedStrings.d.ts +12 -0
  446. package/dist/helpers/formattedStrings.js +55 -33
  447. package/dist/helpers/formattedStrings.js.map +1 -1
  448. package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
  449. package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
  450. package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
  451. package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
  452. package/dist/i18n/I18n.js +6 -5
  453. package/dist/i18n/I18n.js.map +1 -1
  454. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  455. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  456. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
  457. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  458. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
  459. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
  460. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
  461. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
  462. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  463. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
  464. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
  465. package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
  466. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  467. package/dist/i18n/en/Employee.Deductions.json.js +104 -76
  468. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  469. package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
  470. package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
  471. package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
  472. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  473. package/dist/i18n/en/common.json.d.ts +7 -0
  474. package/dist/i18n/en/common.json.js +19 -17
  475. package/dist/i18n/en/common.json.js.map +1 -1
  476. package/dist/index.d.ts +16 -6
  477. package/dist/index.js +138 -112
  478. package/dist/index.js.map +1 -1
  479. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
  480. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
  481. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  482. package/dist/shared/constants.d.ts +8 -2
  483. package/dist/shared/constants.js +11 -8
  484. package/dist/shared/constants.js.map +1 -1
  485. package/dist/style.css +1 -1
  486. package/dist/test-utils/assertions.d.ts +20 -0
  487. package/dist/types/i18next.d.ts +140 -4
  488. package/dist/types/sdkError.js +58 -47
  489. package/dist/types/sdkError.js.map +1 -1
  490. package/docs/reference/endpoint-inventory.json +980 -1170
  491. package/package.json +33 -22
  492. package/dist/components/Employee/Compensation/Compensation.js +0 -87
  493. package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
  494. package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
  495. package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
  496. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
  497. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
  498. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
  499. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
  500. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
  501. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
  502. package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
  503. package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
  504. package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
  505. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
  506. package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
  507. package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
  508. package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
  509. package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
  510. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
  511. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
  512. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
  513. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
  514. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
  515. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
  516. package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
  517. package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
  518. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
  519. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
  520. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
  521. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  522. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
  523. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
  524. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  525. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
  526. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
  527. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
  528. package/dist/components/Employee/Deductions/Head.d.ts +0 -1
  529. package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
  530. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
  531. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
  532. package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
  533. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
  534. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +0 -24
  535. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
  536. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
  537. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
  538. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
  539. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
  540. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
  541. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
  542. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
  543. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
  544. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
  545. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  546. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  547. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
  548. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
  549. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
  550. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
  551. package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
  552. package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
  553. package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
  554. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
  555. package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
  556. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
  557. package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
  558. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
  559. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
  560. package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
  561. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
  562. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
  563. package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
  564. package/dist/components/Employee/PaymentMethod/Head.js +0 -13
  565. package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
  566. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
  567. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
  568. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
  569. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
  570. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
  571. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
  572. package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
  573. package/dist/components/Employee/PaymentMethod/Split.js +0 -175
  574. package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
  575. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
  576. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
  577. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
  578. /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
  579. /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
  580. /package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
  581. /package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
  582. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  583. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
  584. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
  585. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  586. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
  587. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
  588. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
  589. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
  590. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
  591. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
  592. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
  593. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
  594. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
  595. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
  596. /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
  597. /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
  598. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
  599. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +0 -0
  600. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
  601. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
  602. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
  603. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
  604. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
@@ -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","PencilSvg","TrashCanSvg","Flex","jsxs","Fragment","DataView","ActionsLayout","PlusCircleIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BO,SAASA,GAAeC,GAAqD;AAClF,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,UAAAC,GAAU,YAAAC,GAAY,YAAAC,KAAmC;AAClF,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS;AAElD,EAAAE,EAAuB,uBAAuBV,CAAU,GACxDW,EAAQ,qBAAqB;AAE7B,QAAM,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAd,GAAY,GACrDe,IAAaF,EAAK,cAClBG,IAAmBD,EAAW,OAAO,CAAAE,MAAaA,EAAU,MAAM,GAElE,EAAE,aAAaC,GAAiB,WAAWC,EAAA,IAC/CC,EAAA,GAEIC,IAAe,OAAOJ,MAA2B;AACrD,UAAMd,EAAkBc,GAAW,OAAMK,MAAW;AAClD,YAAM,EAAE,aAAAC,MAAgB,MAAML,EAAgB;AAAA,QAC5C,SAAS;AAAA,UACP,eAAeI,EAAQ;AAAA,UACvB,0BAA0B;AAAA,YACxB,GAAGA;AAAA,YACH,aAAaA,EAAQ,eAAe;AAAA,YACpC,QAAQ;AAAA,YACR,SAASA,EAAQ;AAAA,UAAA;AAAA,QACnB;AAAA,MACF,CACD,GAIKE,IAA4BT,EAAW,OAAO,CAAAU,MAAKA,EAAE,MAAM;AAEjE,MACED,EAA0B,WAAW,KACrCA,EAA0B,CAAC,GAAG,SAASD,GAAa,OAEpDrB,EAAQwB,EAAgB,gCAAgC,IAExDxB,EAAQwB,EAAgB,4BAA4BH,CAAW;AAAA,IAEnE,CAAC;AAAA,EACH,GAEMI,IAAa,CAACV,MAA2B;AAC7C,IAAAf,EAAQwB,EAAgB,yBAAyBT,CAAS;AAAA,EAC5D,GAEMW,IAAY,MAAM;AACtB,IAAA1B,EAAQwB,EAAgB,sBAAsB;AAAA,EAChD,GAEMG,IAAiB,MAAM;AAC3B,IAAA3B,EAAQwB,EAAgB,uBAAuB;AAAA,EACjD,GAEM,EAAE,GAAGI,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMf;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,YAAY;AAAA,MAAA;AAAA,MAEvB;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,iBAAiB;AAAA,QAC1B,QAAQ,CAAAC,MACCA,EAAU,YAAY,EAAE,eAAe,IAAI,EAAE,kBAAkB;AAAA,MACxE;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAAA,MAAa;AACnB,gBAAMe,IAAkBf,EAAU,qBAC9BP,EAAc,OAAOO,EAAU,MAAM,CAAC,IACtCT,EAAe,OAAOS,EAAU,MAAM,CAAC;AAC3C,iBAAOA,EAAU,YACb,EAAE,mBAAmB,EAAE,OAAOe,EAAA,CAAiB,IAC/CA;AAAA,QACN;AAAA,MAAA;AAAA,IACF;AAAA,IAEF,UAAU,CAAAf,MAEN,gBAAAtB;AAAA,MAACsC;AAAA,MAAA;AAAA,QACC,WAAWd;AAAA,QACX,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAQ,EAAWV,CAAS;AAAA,YACtB;AAAA,YACA,MAAM,gBAAAtB,EAACuC,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,UAE/B;AAAA,YACE,OAAO,EAAE,WAAW;AAAA,YACpB,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,QAC1B,QAAQ,CAAAW,MACCA,EAAU,YAAYX,EAAE,eAAe,IAAIA,EAAE,kBAAkB;AAAA,MACxE;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAAW,MACNC,EAAsBD,GAAW;AAAA,UAC/B,gBAAAP;AAAA,UACA,eAAAE;AAAA,UACA,mBAAmB,CAACO,MAAkBb,EAAE,mBAAmB,EAAE,OAAAa,GAAO;AAAA,QAAA,CACrE;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,UAAU,CAAAF,MAEN,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAWP;AAAA,QACX,OAAO;AAAA,UACL;AAAA,YACE,OAAOR,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAJ,EAAOe,CAAS;AAAA,YAClB;AAAA,YACA,MAAM,gBAAAG,EAACE,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,UAE/B;AAAA,YACE,OAAOhB,EAAE,WAAW;AAAA,YACpB,SAAS,MAAM;AACb,cAAAH,EAASc,CAAS;AAAA,YACpB;AAAA,YACA,MAAM,gBAAAG,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QACjC;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SACE,gBAAAH,EAAC,aAAQ,WAAArB,GACP,UAAA,gBAAAyB,EAACC,KAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAL,EAACZ,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,WAAW,GAAE;AAAA,MAC5C,gBAAAc,EAACZ,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAAF,EAAE,gCAAgC,EAAA,CACrC;AAAA,IAAA,GACF;AAAA,sBAECoB,GAAA,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,EAAC,WAAA,EAAQ,WAAWC,EAAWC,EAAO,WAAWV,CAAS,GACxD,UAAA,gBAAAW,EAACC,GAAA,EAAK,qBAAoB,OACxB,UAAA;AAAA,IAAA,gBAAAD,EAACE,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAL,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,WAAW,GAAE;AAAA,MAC5C,gBAAAI,EAACF,EAAW,MAAX,EAAgB,SAAQ,cACtB,UAAAF,EAAE,gCAAgC,EAAA,CACrC;AAAA,IAAA,GACF;AAAA,IAEA,gBAAAI,EAAC,WAAA,EAAQ,WAAWE,EAAO,qBACzB,UAAA,gBAAAC,EAACE,GAAA,EAAK,eAAc,UAAS,KAAK,IAAI,gBAAe,UAAS,YAAW,UACvE,UAAA;AAAA,MAAA,gBAAAL,EAAC,OAAA,EAAI,WAAWE,EAAO,wBACrB,UAAA,gBAAAF,EAACM,KAAe,OAAO,IAAI,QAAQ,GAAA,CAAI,EAAA,CACzC;AAAA,MACA,gBAAAN,EAACF,EAAW,MAAX,EAAgB,QAAO,QAAQ,UAAAF,EAAE,6BAA6B,GAAE;AAAA,MACjE,gBAAAO;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,MAAK;AAAA,UACL,SAAQ;AAAA,UACR,SAASL;AAAA,UACT,WAAWS,EAAO;AAAA,UAElB,UAAA;AAAA,YAAA,gBAAAF,EAACO,GAAA,EAAe;AAAA,YACfX,EAAE,uBAAuB;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC5B,EAAA,CACF,EAAA,CACF;AAAA,IACA,gBAAAI,EAACQ,GAAA,EACC,UAAA,gBAAAR,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,SAASJ,GACvC,UAAAE,EAAE,aAAa,GAClB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -1,10 +1,12 @@
1
- const n = "_emptyStateContainer_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;
@@ -0,0 +1,74 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { IncludeDeductions as C } from "./IncludeDeductions/IncludeDeductions.js";
3
+ import { DeductionsList as L } from "./DeductionsList/DeductionsList.js";
4
+ import { DeductionsForm as O } from "./DeductionsForm/DeductionsForm.js";
5
+ import { useDeductionsList as m } from "./shared/useDeductionsList.js";
6
+ import { BaseLayout as s } from "../../Base/Base.js";
7
+ import { useFlow as l } from "../../Flow/useFlow.js";
8
+ import { componentEvents as n } from "../../../shared/constants.js";
9
+ import { ensureRequired as a } from "../../../helpers/ensureRequired.js";
10
+ function g() {
11
+ const { onEvent: t } = l();
12
+ return /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(C, { onAdd: () => {
13
+ t(n.EMPLOYEE_DEDUCTION_INCLUDE_YES);
14
+ }, onContinue: () => {
15
+ t(n.EMPLOYEE_DEDUCTION_INCLUDE_NO), t(n.EMPLOYEE_DEDUCTION_DONE);
16
+ } }) });
17
+ }
18
+ function A() {
19
+ const { employeeId: t, onEvent: o } = l(), e = m({ employeeId: a(t) });
20
+ if (e.isLoading)
21
+ return /* @__PURE__ */ r(s, { isLoading: !0, error: e.errorHandling.errors });
22
+ const E = () => {
23
+ o(n.EMPLOYEE_DEDUCTION_ADD);
24
+ }, D = (i) => {
25
+ o(n.EMPLOYEE_DEDUCTION_EDIT, i);
26
+ }, c = () => {
27
+ o(n.EMPLOYEE_DEDUCTION_DONE);
28
+ }, u = async (i) => {
29
+ const d = await e.actions.onDelete(i);
30
+ d && (d.data.remainingActiveCount === 0 ? o(n.EMPLOYEE_DEDUCTION_DELETED_EMPTY) : o(n.EMPLOYEE_DEDUCTION_DELETED, d.data.garnishment));
31
+ };
32
+ return /* @__PURE__ */ r(s, { error: e.errorHandling.errors, children: /* @__PURE__ */ r(
33
+ L,
34
+ {
35
+ deductionsList: e,
36
+ onAdd: E,
37
+ onEdit: D,
38
+ onDelete: (i) => {
39
+ u(i);
40
+ },
41
+ onContinue: c
42
+ }
43
+ ) });
44
+ }
45
+ function v() {
46
+ const { employeeId: t, editingDeductionId: o, onEvent: e } = l(), E = m({ employeeId: a(t) });
47
+ if (E.isLoading)
48
+ return /* @__PURE__ */ r(s, { isLoading: !0, error: E.errorHandling.errors });
49
+ const D = o ? E.data.deductions.find((d) => d.uuid === o) ?? null : null, c = E.data.deductions.length > 0, u = (d, _) => {
50
+ e(
51
+ _ === "create" ? n.EMPLOYEE_DEDUCTION_CREATED : n.EMPLOYEE_DEDUCTION_UPDATED,
52
+ d
53
+ );
54
+ }, i = () => {
55
+ e(
56
+ c ? n.EMPLOYEE_DEDUCTION_CANCEL : n.EMPLOYEE_DEDUCTION_CANCEL_EMPTY
57
+ );
58
+ };
59
+ return /* @__PURE__ */ r(s, { error: E.errorHandling.errors, children: /* @__PURE__ */ r(
60
+ O,
61
+ {
62
+ employeeId: a(t),
63
+ deduction: D,
64
+ onSaved: u,
65
+ onCancel: i
66
+ }
67
+ ) });
68
+ }
69
+ export {
70
+ v as DeductionsFormContextual,
71
+ A as DeductionsListContextual,
72
+ g as IncludeDeductionsContextual
73
+ };
74
+ //# sourceMappingURL=deductionsContextualComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deductionsContextualComponents.js","sources":["../../../../src/components/Employee/Deductions/deductionsContextualComponents.tsx"],"sourcesContent":["import { type Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { IncludeDeductions } from './IncludeDeductions/IncludeDeductions'\nimport { DeductionsList } from './DeductionsList/DeductionsList'\nimport { DeductionsForm } from './DeductionsForm/DeductionsForm'\nimport { useDeductionsList } from './shared/useDeductionsList'\nimport { BaseLayout } from '@/components/Base/Base'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_ADD]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_EDIT]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_CANCEL]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_CREATED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_UPDATED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_DELETED]: Garnishment\n [componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY]: undefined\n [componentEvents.EMPLOYEE_DEDUCTION_DONE]: undefined\n}\n\nexport interface DeductionsContextInterface extends FlowContextInterface {\n employeeId: string\n /** Set by the EDIT transition; consumed by the form-mode contextual. */\n editingDeductionId?: string\n}\n\nexport function IncludeDeductionsContextual() {\n const { onEvent } = useFlow<DeductionsContextInterface>()\n\n const onAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES)\n }\n const onContinue = () => {\n // The outer onboarding flow advances on DONE; partners also receive\n // INCLUDE_NO so analytics can distinguish the empty-state confirmation.\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO)\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n\n // BaseLayout's inner FadeIn (width: 100%) is the canonical \"page\" container\n // for content rendered inside <Flow>. Without it the outer row-direction\n // Flex in Flow collapses to the intrinsic content width of its single\n // child, producing the \"squashed\" layout for narrow content.\n return (\n <BaseLayout>\n <IncludeDeductions onAdd={onAdd} onContinue={onContinue} />\n </BaseLayout>\n )\n}\n\nexport function DeductionsListContextual() {\n const { employeeId, onEvent } = useFlow<DeductionsContextInterface>()\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const onAdd = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_ADD)\n }\n const onEdit = (deduction: Garnishment) => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_EDIT, deduction)\n }\n const onContinue = () => {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n }\n const onDelete = async (deduction: Garnishment) => {\n const result = await list.actions.onDelete(deduction)\n if (!result) return\n if (result.data.remainingActiveCount === 0) {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED_EMPTY)\n } else {\n onEvent(componentEvents.EMPLOYEE_DEDUCTION_DELETED, result.data.garnishment)\n }\n }\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsList\n deductionsList={list}\n onAdd={onAdd}\n onEdit={onEdit}\n onDelete={(d: Garnishment) => {\n void onDelete(d)\n }}\n onContinue={onContinue}\n />\n </BaseLayout>\n )\n}\n\nexport function DeductionsFormContextual() {\n const { employeeId, editingDeductionId, onEvent } = useFlow<DeductionsContextInterface>()\n // The same list query the form hooks use internally — React Query dedupes\n // so this is the only outstanding request.\n const list = useDeductionsList({ employeeId: ensureRequired(employeeId) })\n\n if (list.isLoading) {\n return <BaseLayout isLoading error={list.errorHandling.errors} />\n }\n\n const deduction = editingDeductionId\n ? (list.data.deductions.find(d => d.uuid === editingDeductionId) ?? null)\n : null\n const hasActiveDeductions = list.data.deductions.length > 0\n\n const onSaved = (saved: Garnishment, mode: 'create' | 'update') => {\n onEvent(\n mode === 'create'\n ? componentEvents.EMPLOYEE_DEDUCTION_CREATED\n : componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n saved,\n )\n }\n const onCancel = () => {\n onEvent(\n hasActiveDeductions\n ? componentEvents.EMPLOYEE_DEDUCTION_CANCEL\n : componentEvents.EMPLOYEE_DEDUCTION_CANCEL_EMPTY,\n )\n }\n\n return (\n <BaseLayout error={list.errorHandling.errors}>\n <DeductionsForm\n employeeId={ensureRequired(employeeId)}\n deduction={deduction}\n onSaved={onSaved}\n onCancel={onCancel}\n />\n </BaseLayout>\n )\n}\n"],"names":["IncludeDeductionsContextual","onEvent","useFlow","BaseLayout","jsx","IncludeDeductions","componentEvents","DeductionsListContextual","employeeId","list","useDeductionsList","ensureRequired","onAdd","onEdit","deduction","onContinue","onDelete","result","DeductionsList","d","DeductionsFormContextual","editingDeductionId","hasActiveDeductions","onSaved","saved","mode","onCancel","DeductionsForm"],"mappings":";;;;;;;;;AA8BO,SAASA,IAA8B;AAC5C,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAgBpB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAAkB,OAhBT,MAAM;AAClB,IAAAJ,EAAQK,EAAgB,8BAA8B;AAAA,EACxD,GAcqC,YAblB,MAAM;AAGvB,IAAAL,EAAQK,EAAgB,6BAA6B,GACrDL,EAAQK,EAAgB,uBAAuB;AAAA,EACjD,GAQ6D,GAC3D;AAEJ;AAEO,SAASC,IAA2B;AACzC,QAAM,EAAE,YAAAC,GAAY,SAAAP,EAAA,IAAYC,EAAA,GAC1BO,IAAOC,EAAkB,EAAE,YAAYC,EAAeH,CAAU,GAAG;AAEzE,MAAIC,EAAK;AACP,6BAAQN,GAAA,EAAW,WAAS,IAAC,OAAOM,EAAK,cAAc,QAAQ;AAGjE,QAAMG,IAAQ,MAAM;AAClB,IAAAX,EAAQK,EAAgB,sBAAsB;AAAA,EAChD,GACMO,IAAS,CAACC,MAA2B;AACzC,IAAAb,EAAQK,EAAgB,yBAAyBQ,CAAS;AAAA,EAC5D,GACMC,IAAa,MAAM;AACvB,IAAAd,EAAQK,EAAgB,uBAAuB;AAAA,EACjD,GACMU,IAAW,OAAOF,MAA2B;AACjD,UAAMG,IAAS,MAAMR,EAAK,QAAQ,SAASK,CAAS;AACpD,IAAKG,MACDA,EAAO,KAAK,yBAAyB,IACvChB,EAAQK,EAAgB,gCAAgC,IAExDL,EAAQK,EAAgB,4BAA4BW,EAAO,KAAK,WAAW;AAAA,EAE/E;AAEA,SACE,gBAAAb,EAACD,GAAA,EAAW,OAAOM,EAAK,cAAc,QACpC,UAAA,gBAAAL;AAAA,IAACc;AAAA,IAAA;AAAA,MACC,gBAAgBT;AAAA,MAChB,OAAAG;AAAA,MACA,QAAAC;AAAA,MACA,UAAU,CAACM,MAAmB;AAC5B,QAAKH,EAASG,CAAC;AAAA,MACjB;AAAA,MACA,YAAAJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEO,SAASK,IAA2B;AACzC,QAAM,EAAE,YAAAZ,GAAY,oBAAAa,GAAoB,SAAApB,EAAA,IAAYC,EAAA,GAG9CO,IAAOC,EAAkB,EAAE,YAAYC,EAAeH,CAAU,GAAG;AAEzE,MAAIC,EAAK;AACP,6BAAQN,GAAA,EAAW,WAAS,IAAC,OAAOM,EAAK,cAAc,QAAQ;AAGjE,QAAMK,IAAYO,IACbZ,EAAK,KAAK,WAAW,KAAK,CAAA,MAAK,EAAE,SAASY,CAAkB,KAAK,OAClE,MACEC,IAAsBb,EAAK,KAAK,WAAW,SAAS,GAEpDc,IAAU,CAACC,GAAoBC,MAA8B;AACjE,IAAAxB;AAAA,MACEwB,MAAS,WACLnB,EAAgB,6BAChBA,EAAgB;AAAA,MACpBkB;AAAA,IAAA;AAAA,EAEJ,GACME,IAAW,MAAM;AACrB,IAAAzB;AAAA,MACEqB,IACIhB,EAAgB,4BAChBA,EAAgB;AAAA,IAAA;AAAA,EAExB;AAEA,SACE,gBAAAF,EAACD,GAAA,EAAW,OAAOM,EAAK,cAAc,QACpC,UAAA,gBAAAL;AAAA,IAACuB;AAAA,IAAA;AAAA,MACC,YAAYhB,EAAeH,CAAU;AAAA,MACrC,WAAAM;AAAA,MACA,SAAAS;AAAA,MACA,UAAAG;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -0,0 +1,7 @@
1
+ import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
2
+ export declare function DeleteDeductionDialog({ pendingDeleteDeduction, isPrimaryActionLoading, onClose, onConfirm, }: {
3
+ pendingDeleteDeduction: Garnishment | null;
4
+ isPrimaryActionLoading: boolean;
5
+ onClose: () => void;
6
+ onConfirm: () => void;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useTranslation as r } from "react-i18next";
3
+ import { useComponentContext as a } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
4
+ function d({
5
+ pendingDeleteDeduction: t,
6
+ isPrimaryActionLoading: e,
7
+ onClose: i,
8
+ onConfirm: n
9
+ }) {
10
+ const { t: o } = r("Employee.Deductions"), l = a();
11
+ return /* @__PURE__ */ c(
12
+ l.Dialog,
13
+ {
14
+ isOpen: t !== null,
15
+ onClose: i,
16
+ onPrimaryActionClick: n,
17
+ isPrimaryActionLoading: e,
18
+ isDestructive: !0,
19
+ title: o("deleteDeductionDialog.title"),
20
+ primaryActionLabel: o("deleteDeductionDialog.confirmCta"),
21
+ closeActionLabel: o("deleteDeductionDialog.cancelCta"),
22
+ children: t && o("deleteDeductionDialog.description", {
23
+ deduction: t.description ?? ""
24
+ })
25
+ }
26
+ );
27
+ }
28
+ export {
29
+ d as DeleteDeductionDialog
30
+ };
31
+ //# sourceMappingURL=DeleteDeductionDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteDeductionDialog.js","sources":["../../../../../src/components/Employee/Deductions/shared/DeleteDeductionDialog.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function DeleteDeductionDialog({\n pendingDeleteDeduction,\n isPrimaryActionLoading,\n onClose,\n onConfirm,\n}: {\n pendingDeleteDeduction: Garnishment | null\n isPrimaryActionLoading: boolean\n onClose: () => void\n onConfirm: () => void\n}) {\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n return (\n <Components.Dialog\n isOpen={pendingDeleteDeduction !== null}\n onClose={onClose}\n onPrimaryActionClick={onConfirm}\n isPrimaryActionLoading={isPrimaryActionLoading}\n isDestructive\n title={t('deleteDeductionDialog.title')}\n primaryActionLabel={t('deleteDeductionDialog.confirmCta')}\n closeActionLabel={t('deleteDeductionDialog.cancelCta')}\n >\n {pendingDeleteDeduction &&\n t('deleteDeductionDialog.description', {\n deduction: pendingDeleteDeduction.description ?? '',\n })}\n </Components.Dialog>\n )\n}\n"],"names":["DeleteDeductionDialog","pendingDeleteDeduction","isPrimaryActionLoading","onClose","onConfirm","t","useTranslation","Components","useComponentContext","jsx"],"mappings":";;;AAIO,SAASA,EAAsB;AAAA,EACpC,wBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,GAKG;AACD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AACnB,SACE,gBAAAC;AAAA,IAACF,EAAW;AAAA,IAAX;AAAA,MACC,QAAQN,MAA2B;AAAA,MACnC,SAAAE;AAAA,MACA,sBAAsBC;AAAA,MACtB,wBAAAF;AAAA,MACA,eAAa;AAAA,MACb,OAAOG,EAAE,6BAA6B;AAAA,MACtC,oBAAoBA,EAAE,kCAAkC;AAAA,MACxD,kBAAkBA,EAAE,iCAAiC;AAAA,MAEpD,UAAAJ,KACCI,EAAE,qCAAqC;AAAA,QACrC,WAAWJ,EAAuB,eAAe;AAAA,MAAA,CAClD;AAAA,IAAA;AAAA,EAAA;AAGT;"}
@@ -0,0 +1,7 @@
1
+ import { Garnishment } from '@gusto/embedded-api/models/components/garnishment';
2
+ export interface DeductionAmountFormatters {
3
+ formatCurrency: (value: number) => string;
4
+ formatPercent: (value: number) => string;
5
+ formatPerPaycheck: (value: string) => string;
6
+ }
7
+ export declare function formatDeductionAmount(deduction: Pick<Garnishment, 'amount' | 'deductAsPercentage' | 'recurring'>, { formatCurrency, formatPercent, formatPerPaycheck }: DeductionAmountFormatters): string;
@@ -0,0 +1,10 @@
1
+ function o(r, { formatCurrency: n, formatPercent: u, formatPerPaycheck: m }) {
2
+ const t = Number(r.amount);
3
+ if (Number.isNaN(t)) return "-";
4
+ const e = r.deductAsPercentage ? u(t) : n(t);
5
+ return r.recurring ? m(e) : e;
6
+ }
7
+ export {
8
+ o as formatDeductionAmount
9
+ };
10
+ //# sourceMappingURL=formatDeductionAmount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatDeductionAmount.js","sources":["../../../../../src/components/Employee/Deductions/shared/formatDeductionAmount.ts"],"sourcesContent":["import type { Garnishment } from '@gusto/embedded-api/models/components/garnishment'\n\nexport interface DeductionAmountFormatters {\n formatCurrency: (value: number) => string\n formatPercent: (value: number) => string\n formatPerPaycheck: (value: string) => string\n}\n\nexport function formatDeductionAmount(\n deduction: Pick<Garnishment, 'amount' | 'deductAsPercentage' | 'recurring'>,\n { formatCurrency, formatPercent, formatPerPaycheck }: DeductionAmountFormatters,\n): string {\n const numericAmount = Number(deduction.amount)\n if (Number.isNaN(numericAmount)) return '-'\n const formatted = deduction.deductAsPercentage\n ? formatPercent(numericAmount)\n : formatCurrency(numericAmount)\n return deduction.recurring ? formatPerPaycheck(formatted) : formatted\n}\n"],"names":["formatDeductionAmount","deduction","formatCurrency","formatPercent","formatPerPaycheck","numericAmount","formatted"],"mappings":"AAQO,SAASA,EACdC,GACA,EAAE,gBAAAC,GAAgB,eAAAC,GAAe,mBAAAC,KACzB;AACR,QAAMC,IAAgB,OAAOJ,EAAU,MAAM;AAC7C,MAAI,OAAO,MAAMI,CAAa,EAAG,QAAO;AACxC,QAAMC,IAAYL,EAAU,qBACxBE,EAAcE,CAAa,IAC3BH,EAAeG,CAAa;AAChC,SAAOJ,EAAU,YAAYG,EAAkBE,CAAS,IAAIA;AAC9D;"}
@@ -0,0 +1,7 @@
1
+ import "./types/i18next.d.ts"
2
+ export { useDeductionsList, type UseDeductionsListProps, type UseDeductionsListResult, type UseDeductionsListReady, type DeductionsListDeleteResult, } from './useDeductionsList';
3
+ export { useDeleteDeduction } from './useDeleteDeduction';
4
+ export { DeleteDeductionDialog } from './DeleteDeductionDialog';
5
+ export { formatDeductionAmount, type DeductionAmountFormatters } from './formatDeductionAmount';
6
+ export * from './useDeductionForm';
7
+ export * from './useChildSupportGarnishmentForm';