@gusto/embedded-react-sdk 0.25.0 → 0.27.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 (370) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/dist/assets/icons/icon-file-jpg.svg.js +10 -0
  3. package/dist/assets/icons/icon-file-jpg.svg.js.map +1 -0
  4. package/dist/assets/icons/icon-file-pdf.svg.js +10 -0
  5. package/dist/assets/icons/icon-file-pdf.svg.js.map +1 -0
  6. package/dist/assets/icons/icon-file-png.svg.js +10 -0
  7. package/dist/assets/icons/icon-file-png.svg.js.map +1 -0
  8. package/dist/assets/icons/icon-trashcan.svg.js +10 -0
  9. package/dist/assets/icons/icon-trashcan.svg.js.map +1 -0
  10. package/dist/assets/icons/plus-circle.svg.js +5 -5
  11. package/dist/assets/icons/plus-circle.svg.js.map +1 -1
  12. package/dist/components/Common/DocumentList/DocumentList.js +23 -23
  13. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  14. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +6 -10
  15. package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
  16. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +12 -12
  17. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +1 -1
  18. package/dist/components/Common/InternalError/InternalError.module.scss.js +4 -4
  19. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +8 -8
  20. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  22. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  23. package/dist/components/Common/UI/Alert/Alert.js +10 -10
  24. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  25. package/dist/components/Common/UI/Alert/Alert.module.scss.js +10 -10
  26. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  27. package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
  28. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  29. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +4 -4
  30. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  31. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +1 -1
  32. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
  33. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +4 -4
  34. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
  35. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +2 -2
  36. package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
  37. package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
  38. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +27 -25
  39. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
  40. package/dist/components/Common/UI/Input/Input.module.scss.js +8 -8
  41. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  42. package/dist/components/Common/UI/Modal/Modal.js +41 -40
  43. package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
  44. package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
  45. package/dist/components/Common/UI/Radio/Radio.module.scss.js +6 -6
  46. package/dist/components/Common/UI/Select/Select.module.scss.js +5 -5
  47. package/dist/components/Common/UI/Table/Table.js +1 -1
  48. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  49. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  50. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +1 -1
  51. package/dist/components/Common/UI/Text/Text.module.scss.js +17 -15
  52. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  53. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +1 -1
  54. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -17
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  58. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -6
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  64. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  65. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +1 -1
  66. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  67. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  70. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  72. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  73. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  74. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  75. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  76. package/dist/components/Company/Industry/Context.js +7 -6
  77. package/dist/components/Company/Industry/Context.js.map +1 -1
  78. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  79. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  80. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  81. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  82. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  83. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  84. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  85. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  86. package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
  87. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  88. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  89. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  90. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  91. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  92. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  93. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  94. package/dist/components/Contractor/Address/Form.js +7 -8
  95. package/dist/components/Contractor/Address/Form.js.map +1 -1
  96. package/dist/components/Contractor/Address/useAddress.js +6 -5
  97. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  98. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  99. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  100. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
  101. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  102. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +22 -23
  103. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  104. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +8 -0
  105. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +60 -0
  106. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
  107. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
  108. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
  109. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
  110. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  111. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -55
  112. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  113. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  114. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
  115. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  116. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  117. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
  118. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  119. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +14 -14
  120. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
  121. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
  122. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
  123. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
  124. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +127 -0
  125. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
  126. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
  127. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
  128. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  129. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
  130. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -47
  131. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  132. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  133. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +1 -1
  134. package/dist/components/Employee/Compensation/Edit.js +14 -14
  135. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +3 -1
  136. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +145 -137
  137. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  138. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -1
  139. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +106 -101
  140. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  141. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -87
  142. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  143. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +2 -1
  144. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +110 -104
  145. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  146. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +50 -45
  147. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  148. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +30 -30
  149. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  150. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +4 -8
  151. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  152. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  153. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  154. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  155. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  156. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  157. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  158. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
  159. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
  160. package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
  161. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  162. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  163. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  164. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  165. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  166. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  167. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  168. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  169. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  170. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +1 -1
  171. package/dist/components/Employee/Profile/HomeAddress.js +9 -10
  172. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  173. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -11
  174. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  175. package/dist/components/Employee/Profile/useProfile.js +4 -3
  176. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  177. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  178. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  179. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  180. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  181. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  182. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
  183. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +163 -0
  184. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
  185. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
  186. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
  187. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
  188. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +98 -0
  189. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
  190. package/dist/components/InformationRequests/InformationRequests.d.ts +12 -0
  191. package/dist/components/InformationRequests/InformationRequests.js +101 -0
  192. package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
  193. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
  194. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
  195. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
  196. package/dist/components/InformationRequests/index.d.ts +4 -0
  197. package/dist/components/InformationRequests/index.js +9 -0
  198. package/dist/components/InformationRequests/index.js.map +1 -0
  199. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
  200. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
  201. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
  202. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
  203. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  204. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  205. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
  206. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  207. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +10 -10
  208. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +2 -0
  209. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +33 -0
  210. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -0
  211. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +7 -0
  212. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +39 -0
  213. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -0
  214. package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +5 -0
  215. package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +15 -0
  216. package/dist/components/Payroll/OffCycleReasonSelection/types.js +14 -0
  217. package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -0
  218. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +2 -0
  219. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +35 -0
  220. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +1 -0
  221. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +2 -0
  222. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +65 -0
  223. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +1 -0
  224. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +18 -0
  225. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +1 -0
  226. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormTypes.d.ts +53 -0
  227. package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +3 -0
  228. package/dist/components/Payroll/PayPeriodDateForm/usePayPeriodDateValidation.d.ts +5 -0
  229. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -22
  230. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  231. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
  232. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +103 -28
  233. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  234. package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
  235. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
  236. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  237. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
  238. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
  239. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  240. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
  241. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  242. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +38 -39
  243. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  244. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +5 -5
  245. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +6 -6
  246. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  247. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
  248. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  249. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
  250. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  251. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +29 -29
  252. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  253. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
  254. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
  255. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  256. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
  257. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
  258. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  259. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
  260. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  261. package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
  262. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  263. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
  264. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +93 -98
  265. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  266. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  267. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
  268. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
  269. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  270. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
  271. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  272. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
  273. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  274. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +18 -18
  275. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
  276. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
  277. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +4 -1
  278. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +34 -28
  279. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  280. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +82 -51
  281. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  282. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
  283. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
  284. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -35
  285. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  286. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
  287. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +67 -0
  288. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
  289. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
  290. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
  291. package/dist/components/Payroll/helpers.js.map +1 -1
  292. package/dist/components/Payroll/index.d.ts +5 -2
  293. package/dist/components/Payroll/index.js +16 -14
  294. package/dist/components/Payroll/index.js.map +1 -1
  295. package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
  296. package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
  297. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  298. package/dist/components/index.d.ts +1 -0
  299. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  300. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  301. package/dist/contexts/ThemeProvider/theme.d.ts +8 -3
  302. package/dist/contexts/ThemeProvider/theme.js +27 -22
  303. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  304. package/dist/helpers/dateFormatting.d.ts +3 -0
  305. package/dist/helpers/dateFormatting.js.map +1 -1
  306. package/dist/helpers/formattedStrings.js +12 -11
  307. package/dist/helpers/formattedStrings.js.map +1 -1
  308. package/dist/i18n/I18n.js +8 -8
  309. package/dist/i18n/I18n.js.map +1 -1
  310. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
  311. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  312. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
  313. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
  314. package/dist/i18n/en/Employee.Deductions.json.js +157 -161
  315. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  316. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
  317. package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
  318. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
  319. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
  320. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +20 -0
  321. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
  322. package/dist/i18n/en/InformationRequests.json.js +8 -0
  323. package/dist/i18n/en/InformationRequests.json.js.map +1 -0
  324. package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
  325. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js +12 -0
  326. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js.map +1 -0
  327. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +32 -0
  328. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +1 -0
  329. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
  330. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  331. package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
  332. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
  333. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
  334. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
  335. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
  336. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
  337. package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
  338. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  339. package/dist/index.js +10 -8
  340. package/dist/index.js.map +1 -1
  341. package/dist/shared/constants.d.ts +10 -0
  342. package/dist/shared/constants.js +22 -17
  343. package/dist/shared/constants.js.map +1 -1
  344. package/dist/style.css +1 -1
  345. package/dist/types/i18next.d.ts +290 -40
  346. package/package.json +17 -17
  347. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
  348. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
  349. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
  350. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
  351. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
  352. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
  353. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
  354. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
  355. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
  356. package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
  357. package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
  358. package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
  359. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
  360. package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
  361. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
  362. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
  363. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
  364. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
  365. package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
  366. package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
  367. package/dist/i18n/en/Payroll.InformationRequestList.json.js +0 -18
  368. package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
  369. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
  370. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
@@ -1,51 +1,51 @@
1
- import { jsx as t, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as i } from "react/jsx-runtime";
2
2
  import { useTranslation as u } from "react-i18next";
3
- import i from "./IncludeDeductions.module.scss.js";
4
- import { BaseComponent as a } from "../../../Base/Base.js";
5
- import { useBase as p } from "../../../Base/useBase.js";
6
- import { Grid as h } from "../../../Common/Grid/Grid.js";
7
- import { Flex as C } from "../../../Common/Flex/Flex.js";
8
- import "classnames";
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";
9
8
  import { ActionsLayout as f } from "../../../Common/ActionsLayout/ActionsLayout.js";
10
9
  import { useComponentContext as D } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
10
  import "react";
12
- import { useComponentDictionary as E, useI18n as g } from "../../../../i18n/I18n.js";
11
+ import { useComponentDictionary as E, useI18n as y } from "../../../../i18n/I18n.js";
13
12
  import { componentEvents as s } from "../../../../shared/constants.js";
14
- import y from "../../../../assets/icons/coins-hand.svg.js";
13
+ import g from "../../../../assets/icons/coins-hand.svg.js";
15
14
  import x from "../../../../assets/icons/plus-circle.svg.js";
16
- function k(o) {
17
- return /* @__PURE__ */ t(a, { ...o, children: /* @__PURE__ */ t(I, { ...o, children: o.children }) });
15
+ function k(t) {
16
+ return /* @__PURE__ */ n(p, { ...t, children: /* @__PURE__ */ n(I, { ...t, children: t.children }) });
18
17
  }
19
- function I({ className: o, dictionary: l }) {
20
- const { onEvent: c } = p(), { t: n } = u("Employee.Deductions"), e = D();
21
- E("Employee.Deductions", l), g("Employee.Deductions");
22
- const d = () => {
18
+ function I({ className: t, dictionary: d }) {
19
+ const { onEvent: c } = h(), { t: e } = u("Employee.Deductions"), o = D();
20
+ E("Employee.Deductions", d), y("Employee.Deductions");
21
+ const l = () => {
23
22
  c(s.EMPLOYEE_DEDUCTION_INCLUDE_YES);
24
- }, m = () => {
23
+ }, a = () => {
25
24
  c(s.EMPLOYEE_DEDUCTION_INCLUDE_NO);
26
25
  };
27
- return /* @__PURE__ */ t("section", { className: o, children: /* @__PURE__ */ r(h, { gridTemplateColumns: "1fr", children: [
28
- /* @__PURE__ */ t(e.Heading, { as: "h2", children: n("pageTitle") }),
29
- /* @__PURE__ */ t(e.Text, { variant: "supporting", children: n("includeDeductionsDescriptionV2") }),
30
- /* @__PURE__ */ t(e.Text, { weight: "bold", size: "lg", children: n("includeDeductionsSubtitle") }),
31
- /* @__PURE__ */ t("section", { className: i.emptyStateContainer, children: /* @__PURE__ */ r(C, { flexDirection: "column", gap: 16, justifyContent: "center", alignItems: "center", children: [
32
- /* @__PURE__ */ t("section", { className: i.coinHandsIconContainer, children: /* @__PURE__ */ t(y, { width: 36, height: 36 }) }),
33
- /* @__PURE__ */ t(e.Text, { weight: "bold", children: n("includeDeductionsEmptyState") }),
34
- /* @__PURE__ */ r(
35
- e.Button,
26
+ return /* @__PURE__ */ n("section", { className: t, children: /* @__PURE__ */ i(C, { gridTemplateColumns: "1fr", children: [
27
+ /* @__PURE__ */ i(m, { flexDirection: "column", gap: 2, children: [
28
+ /* @__PURE__ */ n(o.Heading, { as: "h2", children: e("pageTitle") }),
29
+ /* @__PURE__ */ n(o.Text, { variant: "supporting", children: e("includeDeductionsDescriptionV2") })
30
+ ] }),
31
+ /* @__PURE__ */ n("section", { className: r.emptyStateContainer, children: /* @__PURE__ */ i(m, { flexDirection: "column", gap: 16, justifyContent: "center", alignItems: "center", children: [
32
+ /* @__PURE__ */ n("section", { className: r.coinHandsIconContainer, children: /* @__PURE__ */ n(g, { width: 24, height: 24 }) }),
33
+ /* @__PURE__ */ n(o.Text, { weight: "bold", children: e("includeDeductionsEmptyState") }),
34
+ /* @__PURE__ */ i(
35
+ o.Button,
36
36
  {
37
37
  type: "button",
38
38
  variant: "secondary",
39
- onClick: d,
40
- className: i.addDeductionButton,
39
+ onClick: l,
40
+ className: r.addDeductionButton,
41
41
  children: [
42
- /* @__PURE__ */ t(x, { width: 24, height: 24, className: i.plusCircleIcon }),
43
- n("addDeductionButtonCta")
42
+ /* @__PURE__ */ n(x, {}),
43
+ e("addDeductionButtonCta")
44
44
  ]
45
45
  }
46
46
  )
47
47
  ] }) }),
48
- /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(e.Button, { type: "button", onClick: m, children: n("continueCta") }) })
48
+ /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(o.Button, { type: "button", onClick: a, children: e("continueCta") }) })
49
49
  ] }) });
50
50
  }
51
51
  export {
@@ -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 <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text variant=\"supporting\">\n {t('includeDeductionsDescriptionV2')}\n </Components.Text>\n <Components.Text weight=\"bold\" size=\"lg\">\n {t('includeDeductionsSubtitle')}\n </Components.Text>\n <section className={styles.emptyStateContainer}>\n <Flex flexDirection=\"column\" gap={16} justifyContent=\"center\" alignItems=\"center\">\n <section className={styles.coinHandsIconContainer}>\n <CoinsHandsIcon width={36} height={36} />\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 width={24} height={24} className={styles.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","styles","Flex","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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+ {"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,14 +1,10 @@
1
- const n = "_emptyStateContainer_1iboq_1", t = "_coinHandsIconContainer_1iboq_11", o = "_plusCircleIcon_1iboq_17", e = "_addDeductionButton_1iboq_21", c = {
1
+ const n = "_emptyStateContainer_1iaf0_1", t = "_coinHandsIconContainer_1iaf0_11", a = {
2
2
  emptyStateContainer: n,
3
- coinHandsIconContainer: t,
4
- plusCircleIcon: o,
5
- addDeductionButton: e
3
+ coinHandsIconContainer: t
6
4
  };
7
5
  export {
8
- e as addDeductionButton,
9
6
  t as coinHandsIconContainer,
10
- c as default,
11
- n as emptyStateContainer,
12
- o as plusCircleIcon
7
+ a as default,
8
+ n as emptyStateContainer
13
9
  };
14
10
  //# 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":";;;;"}
@@ -11,10 +11,11 @@ import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
13
  import "dompurify";
14
+ import "../../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [d, a] = t("DocumentListContext");
16
+ const [a, f] = t("DocumentListContext");
16
17
  export {
17
- a as DocumentListProvider,
18
- d as useDocumentList
18
+ f as DocumentListProvider,
19
+ a as useDocumentList
19
20
  };
20
21
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -11,10 +11,11 @@ import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
13
  import "dompurify";
14
+ import "../../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = o("SignatureFormContext");
16
+ const [d, s] = o("SignatureFormContext");
16
17
  export {
17
- d as SignatureFormProvider,
18
- c as useSignatureForm
18
+ s as SignatureFormProvider,
19
+ d as useSignatureForm
19
20
  };
20
21
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -11,10 +11,11 @@ import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
13
  import "dompurify";
14
+ import "../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [c, d] = o("EmployeeListContext");
16
+ const [d, u] = o("EmployeeListContext");
16
17
  export {
17
- d as EmployeeListProvider,
18
- c as useEmployeeList
18
+ u as EmployeeListProvider,
19
+ d as useEmployeeList
19
20
  };
20
21
  //# sourceMappingURL=useEmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n totalCount: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: PaginationItemsPerPage) => void\n currentPage: number\n totalPages: number\n totalCount: number\n employees: Employee[]\n itemsPerPage: PaginationItemsPerPage\n isFetching: boolean\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA0BA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -0,0 +1,3 @@
1
+ import { BaseComponentInterface } from '../../Base/Base';
2
+ export type EmploymentEligibilityProps = BaseComponentInterface<'Employee.EmploymentEligibility'>;
3
+ export declare function EmploymentEligibility(props: EmploymentEligibilityProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ declare const EligibilityStatusValues: readonly ["citizen", "lawfulPermanentResident", "noncitizen", "noncitizen_authorized"];
3
+ declare const AuthorizationDocumentValues: readonly ["uscis", "i94", "foreignPassport"];
4
+ export declare const EmploymentEligibilitySchema: z.ZodObject<{
5
+ eligibilityStatus: z.ZodOptional<z.ZodEnum<["citizen", "lawfulPermanentResident", "noncitizen", "noncitizen_authorized"]>>;
6
+ authorizedToWorkUntil: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodDate>>, Date | null | undefined, Date | null | undefined>;
7
+ authorizationDocumentType: z.ZodOptional<z.ZodEnum<["uscis", "i94", "foreignPassport"]>>;
8
+ uscisNumber: z.ZodOptional<z.ZodString>;
9
+ i94AdmissionNumber: z.ZodOptional<z.ZodString>;
10
+ foreignPassportNumber: z.ZodOptional<z.ZodString>;
11
+ countryOfIssuance: z.ZodOptional<z.ZodString>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ authorizedToWorkUntil?: Date | null | undefined;
14
+ uscisNumber?: string | undefined;
15
+ i94AdmissionNumber?: string | undefined;
16
+ countryOfIssuance?: string | undefined;
17
+ eligibilityStatus?: "citizen" | "lawfulPermanentResident" | "noncitizen" | "noncitizen_authorized" | undefined;
18
+ authorizationDocumentType?: "foreignPassport" | "uscis" | "i94" | undefined;
19
+ foreignPassportNumber?: string | undefined;
20
+ }, {
21
+ authorizedToWorkUntil?: Date | null | undefined;
22
+ uscisNumber?: string | undefined;
23
+ i94AdmissionNumber?: string | undefined;
24
+ countryOfIssuance?: string | undefined;
25
+ eligibilityStatus?: "citizen" | "lawfulPermanentResident" | "noncitizen" | "noncitizen_authorized" | undefined;
26
+ authorizationDocumentType?: "foreignPassport" | "uscis" | "i94" | undefined;
27
+ foreignPassportNumber?: string | undefined;
28
+ }>;
29
+ export type EmploymentEligibilityInputs = z.infer<typeof EmploymentEligibilitySchema>;
30
+ export type EligibilityStatus = (typeof EligibilityStatusValues)[number];
31
+ export type AuthorizationDocumentType = (typeof AuthorizationDocumentValues)[number];
32
+ interface EmploymentEligibilityPresentationProps {
33
+ onSubmit: (data: EmploymentEligibilityInputs) => void;
34
+ defaultValues?: Partial<EmploymentEligibilityInputs>;
35
+ }
36
+ export declare const EmploymentEligibilityPresentation: ({ onSubmit, defaultValues, }: EmploymentEligibilityPresentationProps) => import("react/jsx-runtime").JSX.Element;
37
+ export {};
@@ -0,0 +1,4 @@
1
+ import "./types/i18next.d.ts"
2
+ export { EmploymentEligibility } from './EmploymentEligibility';
3
+ export type { EmploymentEligibilityProps } from './EmploymentEligibility';
4
+ export type { EligibilityStatus } from './EmploymentEligibilityPresentation';
@@ -4,12 +4,12 @@ import { useFormContext as m } from "react-hook-form";
4
4
  import { z as i } from "zod";
5
5
  import "../../../shared/constants.js";
6
6
  import "classnames";
7
- import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import { RadioGroupField as g } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
+ import { TextInputField as f } from "../../Common/Fields/TextInputField/TextInputField.js";
9
+ import { NumberInputField as r } from "../../Common/Fields/NumberInputField/NumberInputField.js";
10
+ import { useComponentContext as c } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
11
  import "react";
9
12
  import { SelectField as s } from "../../Common/Fields/SelectField/SelectField.js";
10
- import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
11
- import { NumberInputField as r } from "../../Common/Fields/NumberInputField/NumberInputField.js";
12
- import { TextInputField as c } from "../../Common/Fields/TextInputField/TextInputField.js";
13
13
  const p = i.object({
14
14
  w4DataType: i.literal("rev_2020_w4"),
15
15
  filingStatus: i.string().min(1),
@@ -29,7 +29,7 @@ function A() {
29
29
  return e("w4DataType") === "rev_2020_w4" ? /* @__PURE__ */ t(b, {}) : /* @__PURE__ */ t(S, {});
30
30
  }
31
31
  function b() {
32
- const { t: e } = o("Employee.FederalTaxes"), l = g(), d = [
32
+ const { t: e } = o("Employee.FederalTaxes"), l = c(), d = [
33
33
  { value: "Single", label: e("filingStatusSingle") },
34
34
  { value: "Married", label: e("filingStatusMarried") },
35
35
  { value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
@@ -49,7 +49,7 @@ function b() {
49
49
  }
50
50
  ),
51
51
  /* @__PURE__ */ t(
52
- f,
52
+ g,
53
53
  {
54
54
  name: "twoJobs",
55
55
  isRequired: !0,
@@ -150,7 +150,7 @@ function S() {
150
150
  }
151
151
  ),
152
152
  /* @__PURE__ */ t(
153
- c,
153
+ f,
154
154
  {
155
155
  name: "additionalWithholding",
156
156
  label: e("additionalWithholding"),
@@ -11,10 +11,11 @@ import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
13
  import "dompurify";
14
+ import "../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [T, c] = o("FederalTaxesContext");
16
+ const [c, u] = o("FederalTaxesContext");
16
17
  export {
17
- c as FederalTaxesProvider,
18
- T as useFederalTaxes
18
+ u as FederalTaxesProvider,
19
+ c as useFederalTaxes
19
20
  };
20
21
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Employee/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype FederalTaxesContextType = {\n isPending: boolean\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] =\n createCompoundContext<FederalTaxesContextType>('FederalTaxesContext')\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAMA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -4,10 +4,10 @@ import { useTranslation as s } from "react-i18next";
4
4
  import { usePaymentMethod as c } from "./usePaymentMethod.js";
5
5
  import { PAYMENT_METHODS as l } from "../../../shared/constants.js";
6
6
  import "classnames";
7
+ import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
+ import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
7
9
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
8
10
  import "react";
9
- import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
10
- import { RadioGroupField as p } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
11
11
  const k = () => {
12
12
  const { mode: t, watchedType: a } = c(), { t: e } = s("Employee.PaymentMethod"), { setValue: n } = m();
13
13
  if (!(t !== "ADD" && t !== "INITIAL" || a === l.check))
@@ -4,9 +4,9 @@ import { z as o } from "zod";
4
4
  import { usePaymentMethod as c } from "./usePaymentMethod.js";
5
5
  import { PAYMENT_METHODS as r } from "../../../shared/constants.js";
6
6
  import "classnames";
7
+ import { RadioGroupField as n } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
7
8
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
8
9
  import "react";
9
- import { RadioGroupField as n } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
10
  o.object({
11
11
  type: o.enum(["Check", "Direct Deposit"])
12
12
  });
@@ -7,11 +7,11 @@ import { useMemo as j, useEffect as D } from "react";
7
7
  import { usePaymentMethod as N } from "./usePaymentMethod.js";
8
8
  import { SPLIT_BY as h } from "../../../shared/constants.js";
9
9
  import "classnames";
10
- import { useComponentContext as q } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
- import { useLocale as w } from "../../../contexts/LocaleProvider/useLocale.js";
12
- import { ReorderableList as I } from "../../Common/ReorderableList/ReorderableList.js";
13
- import { RadioGroupField as W } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
+ import { RadioGroupField as q } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
14
11
  import { NumberInputField as F } from "../../Common/Fields/NumberInputField/NumberInputField.js";
12
+ import { useComponentContext as w } from "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import { useLocale as I } from "../../../contexts/LocaleProvider/useLocale.js";
14
+ import { ReorderableList as W } from "../../Common/ReorderableList/ReorderableList.js";
15
15
  function ie() {
16
16
  const { paymentMethod: r, bankAccounts: m, mode: c } = N(), {
17
17
  control: s,
@@ -22,7 +22,7 @@ function ie() {
22
22
  } = B(), { t: u } = g("Employee.PaymentMethod"), d = A("splitBy"), L = A("priority"), a = j(() => r.splits ?? [], [r.splits]), l = Object.entries(L).reduce(
23
23
  (e, [t, i]) => !e || (L[e] ?? 0) < i ? t : e,
24
24
  ""
25
- ), { currency: $ } = w();
25
+ ), { currency: $ } = I();
26
26
  D(() => {
27
27
  if (a.length)
28
28
  if (d === h.amount) {
@@ -33,7 +33,7 @@ function ie() {
33
33
  o("splitAmount", e);
34
34
  }
35
35
  }, [d, a, l, o]);
36
- const f = q();
36
+ const f = w();
37
37
  if (c !== "SPLIT" || m.length < 2 || r.splits === null) return null;
38
38
  o("isSplit", !0);
39
39
  const b = (e, t) => {
@@ -50,7 +50,7 @@ function ie() {
50
50
  const p = a[i];
51
51
  p && (o("priority", t), l && l !== p.uuid && (S(`splitAmount.${l}`), b(l, 0)), b(p.uuid, null));
52
52
  }, R = () => d === h.amount ? /* @__PURE__ */ n(
53
- I,
53
+ W,
54
54
  {
55
55
  label: u("draggableListLabel"),
56
56
  items: a.map((e) => ({
@@ -106,7 +106,7 @@ function ie() {
106
106
  /* @__PURE__ */ n(f.Heading, { as: "h2", children: u("title") }),
107
107
  /* @__PURE__ */ n(V, { t: u, i18nKey: "splitDescription", components: { p: /* @__PURE__ */ n(f.Text, {}) } }),
108
108
  /* @__PURE__ */ n(
109
- W,
109
+ q,
110
110
  {
111
111
  name: "splitBy",
112
112
  label: u("splitByLabel"),
@@ -13,8 +13,9 @@ import "classnames";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
14
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
15
  import "dompurify";
16
+ import "../../../contexts/LocaleProvider/useLocale.js";
16
17
  import { createCompoundContext as a } from "../../Base/createCompoundContext.js";
17
- const x = t.union([
18
+ const S = t.union([
18
19
  l.extend({
19
20
  type: t.literal("Direct Deposit"),
20
21
  isSplit: t.literal(!1)
@@ -54,10 +55,10 @@ const x = t.union([
54
55
  remainder: t.string()
55
56
  })
56
57
  ])
57
- ]), [S, k] = a("PaymentMethodContext");
58
+ ]), [k, C] = a("PaymentMethodContext");
58
59
  export {
59
- x as CombinedSchema,
60
- k as PaymentMethodProvider,
61
- S as usePaymentMethod
60
+ S as CombinedSchema,
61
+ C as PaymentMethodProvider,
62
+ k as usePaymentMethod
62
63
  };
63
64
  //# sourceMappingURL=usePaymentMethod.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaymentMethod.js","sources":["../../../../src/components/Employee/PaymentMethod/usePaymentMethod.ts"],"sourcesContent":["import type { EmployeeBankAccount } from '@gusto/embedded-api/models/components/employeebankaccount'\nimport type { EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { z } from 'zod'\nimport { BankAccountSchema } from './BankAccount'\nimport { createCompoundContext } from '@/components/Base'\n\nexport const CombinedSchema = z.union([\n BankAccountSchema.extend({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n hasBankPayload: z.literal(false),\n }),\n z.object({\n type: z.literal('Check'),\n }),\n z.discriminatedUnion('splitBy', [\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Percentage'),\n splitAmount: z.record(z.string(), z.number().max(100).min(0)).refine(\n input => Object.values(input).reduce((acc, curr) => acc + curr, 0) === 100,\n input => {\n const total = Object.values(input).reduce((acc, curr) => acc + curr, 0)\n return {\n message: `percentage_split_total_error:${total}`,\n }\n },\n ),\n priority: z.record(z.string(), z.number()),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Amount'),\n priority: z.record(z.string(), z.number()).refine(input => {\n const arr = Object.values(input)\n return arr.filter((item, index) => arr.indexOf(item) !== index).length === 0\n }),\n splitAmount: z.record(z.string(), z.number().min(0).nullable()),\n remainder: z.string(),\n }),\n ]),\n])\n\nexport type CombinedSchemaInputs = z.input<typeof CombinedSchema>\nexport type CombinedSchemaOutputs = z.output<typeof CombinedSchema>\n\ntype PaymentMethodContextType = {\n bankAccounts: EmployeeBankAccount[]\n isPending: boolean\n watchedType?: string\n mode: MODE\n paymentMethod: EmployeePaymentMethod\n handleAdd: () => void\n handleSplit: () => void\n handleCancel: () => void\n handleDelete: (uuid: string) => void\n isAdmin: boolean\n}\n\nexport type MODE = 'ADD' | 'LIST' | 'SPLIT' | 'INITIAL'\n\nconst [usePaymentMethod, PaymentMethodProvider] =\n createCompoundContext<PaymentMethodContextType>('PaymentMethodContext')\nexport { usePaymentMethod, PaymentMethodProvider }\n"],"names":["CombinedSchema","z","BankAccountSchema","input","acc","curr","arr","item","index","usePaymentMethod","PaymentMethodProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAMO,MAAMA,IAAiBC,EAAE,MAAM;AAAA,EACpCC,EAAkB,OAAO;AAAA,IACvB,MAAMD,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,EAAA,CACzB;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,IACxB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,EAAA,CAChC;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,OAAO;AAAA,EAAA,CACxB;AAAA,EACDA,EAAE,mBAAmB,WAAW;AAAA,IAC9BA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,YAAY;AAAA,MAC/B,aAAaA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE;AAAA,QAC5D,CAAAE,MAAS,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,MAAM;AAAA,QACvE,CAAAF,OAES;AAAA,UACL,SAAS,gCAFG,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,CAEtB;AAAA,QAAA;AAAA,MAElD;AAAA,MAEF,UAAUJ,EAAE,OAAOA,EAAE,UAAUA,EAAE,QAAQ;AAAA,IAAA,CAC1C;AAAA,IACDA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,QAAQ;AAAA,MAC3B,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,CAAQ,EAAE,OAAO,CAAAE,MAAS;AACzD,cAAMG,IAAM,OAAO,OAAOH,CAAK;AAC/B,eAAOG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAC7E,CAAC;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAA;AAAA,IAAO,CACrB;AAAA,EAAA,CACF;AACH,CAAC,GAoBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"usePaymentMethod.js","sources":["../../../../src/components/Employee/PaymentMethod/usePaymentMethod.ts"],"sourcesContent":["import type { EmployeeBankAccount } from '@gusto/embedded-api/models/components/employeebankaccount'\nimport type { EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { z } from 'zod'\nimport { BankAccountSchema } from './BankAccount'\nimport { createCompoundContext } from '@/components/Base'\n\nexport const CombinedSchema = z.union([\n BankAccountSchema.extend({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n hasBankPayload: z.literal(false),\n }),\n z.object({\n type: z.literal('Check'),\n }),\n z.discriminatedUnion('splitBy', [\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Percentage'),\n splitAmount: z.record(z.string(), z.number().max(100).min(0)).refine(\n input => Object.values(input).reduce((acc, curr) => acc + curr, 0) === 100,\n input => {\n const total = Object.values(input).reduce((acc, curr) => acc + curr, 0)\n return {\n message: `percentage_split_total_error:${total}`,\n }\n },\n ),\n priority: z.record(z.string(), z.number()),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Amount'),\n priority: z.record(z.string(), z.number()).refine(input => {\n const arr = Object.values(input)\n return arr.filter((item, index) => arr.indexOf(item) !== index).length === 0\n }),\n splitAmount: z.record(z.string(), z.number().min(0).nullable()),\n remainder: z.string(),\n }),\n ]),\n])\n\nexport type CombinedSchemaInputs = z.input<typeof CombinedSchema>\nexport type CombinedSchemaOutputs = z.output<typeof CombinedSchema>\n\ntype PaymentMethodContextType = {\n bankAccounts: EmployeeBankAccount[]\n isPending: boolean\n watchedType?: string\n mode: MODE\n paymentMethod: EmployeePaymentMethod\n handleAdd: () => void\n handleSplit: () => void\n handleCancel: () => void\n handleDelete: (uuid: string) => void\n isAdmin: boolean\n}\n\nexport type MODE = 'ADD' | 'LIST' | 'SPLIT' | 'INITIAL'\n\nconst [usePaymentMethod, PaymentMethodProvider] =\n createCompoundContext<PaymentMethodContextType>('PaymentMethodContext')\nexport { usePaymentMethod, PaymentMethodProvider }\n"],"names":["CombinedSchema","z","BankAccountSchema","input","acc","curr","arr","item","index","usePaymentMethod","PaymentMethodProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAMO,MAAMA,IAAiBC,EAAE,MAAM;AAAA,EACpCC,EAAkB,OAAO;AAAA,IACvB,MAAMD,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,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O,OAAOH,CAAK;AAC/B,eAAOG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAC7E,CAAC;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAA;AAAA,IAAO,CACrB;AAAA,EAAA,CACF;AACH,CAAC,GAoBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -8,8 +8,8 @@ import P from "./AdminPersonalDetails.module.scss.js";
8
8
  import { useProfile as C } from "./useProfile.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "classnames";
11
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
11
  import { SwitchField as w } from "../../Common/Fields/SwitchField/SwitchField.js";
12
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
13
  const d = y.merge(
14
14
  x
15
15
  ).extend({
@@ -1,4 +1,4 @@
1
- const t = "_switchFieldContainer_1uwsc_1", e = {
1
+ const t = "_switchFieldContainer_1a2b0_1", e = {
2
2
  switchFieldContainer: t
3
3
  };
4
4
  export {
@@ -5,10 +5,9 @@ import { z as t } from "zod";
5
5
  import { useProfile as b } from "./useProfile.js";
6
6
  import { STATES_ABBR as y } from "../../../shared/constants.js";
7
7
  import { Grid as x } from "../../Common/Grid/Grid.js";
8
- import "classnames";
8
+ import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
9
9
  import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
10
  import "react";
11
- import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
12
11
  import { SelectField as T } from "../../Common/Fields/SelectField/SelectField.js";
13
12
  import { CheckboxField as A } from "../../Common/Fields/CheckboxField/CheckboxField.js";
14
13
  const s = t.object({
@@ -18,7 +17,7 @@ const s = t.object({
18
17
  state: t.string().min(1),
19
18
  zip: t.string().refine((e) => /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(e)),
20
19
  courtesyWithholding: t.boolean()
21
- }), k = t.union([
20
+ }), L = t.union([
22
21
  // Case 1: selfOnboarding is false or undefined
23
22
  s.extend({
24
23
  selfOnboarding: t.union([t.literal(!1), t.undefined()])
@@ -27,7 +26,7 @@ const s = t.object({
27
26
  t.object({
28
27
  selfOnboarding: t.literal(!0)
29
28
  })
30
- ]), $ = t.union([
29
+ ]), k = t.union([
31
30
  // Case 1: selfOnboarding is false or undefined
32
31
  s.extend({
33
32
  selfOnboarding: t.union([t.literal(!1), t.undefined()])
@@ -36,8 +35,8 @@ const s = t.object({
36
35
  s.extend({
37
36
  selfOnboarding: t.literal(!0)
38
37
  })
39
- ]), B = () => {
40
- const { t: e } = f("Employee.HomeAddress"), r = C(), { isSelfOnboardingIntended: m, isAdmin: c, hasCompletedSelfOnboarding: h } = b(), { watch: p } = g(), u = p("courtesyWithholding");
38
+ ]), $ = () => {
39
+ const { t: e } = f("Employee.HomeAddress"), r = C(), { isSelfOnboardingIntended: m, isAdmin: c, hasCompletedSelfOnboarding: h } = b(), { watch: u } = g(), p = u("courtesyWithholding");
41
40
  return c && m && !h ? null : /* @__PURE__ */ n(a, { children: [
42
41
  /* @__PURE__ */ n("div", { children: [
43
42
  /* @__PURE__ */ i(r.Heading, { as: "h2", children: e("formTitle") }),
@@ -117,12 +116,12 @@ const s = t.object({
117
116
  ] })
118
117
  }
119
118
  ),
120
- u && /* @__PURE__ */ i(r.Alert, { label: e("withholdingTitle"), status: "warning", children: /* @__PURE__ */ i(d, { t: e, i18nKey: "withholdingNote" }) })
119
+ p && /* @__PURE__ */ i(r.Alert, { label: e("withholdingTitle"), status: "warning", children: /* @__PURE__ */ i(d, { t: e, i18nKey: "withholdingNote" }) })
121
120
  ] });
122
121
  };
123
122
  export {
124
- B as HomeAddress,
125
- k as HomeAddressSchema,
126
- $ as HomeAddressSchemaWithCompletedOnboarding
123
+ $ as HomeAddress,
124
+ L as HomeAddressSchema,
125
+ k as HomeAddressSchemaWithCompletedOnboarding
127
126
  };
128
127
  //# sourceMappingURL=HomeAddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HomeAddress.js","sources":["../../../../src/components/Employee/Profile/HomeAddress.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { useProfile } from './useProfile'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { CheckboxField, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst HomeAddressFieldsSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().refine(zip => /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(zip)),\n courtesyWithholding: z.boolean(),\n})\n\nexport const HomeAddressSchema = z.union([\n // Case 1: selfOnboarding is false or undefined\n HomeAddressFieldsSchema.extend({\n selfOnboarding: z.union([z.literal(false), z.undefined()]),\n }),\n // Case 2: selfOnboarding is true\n z.object({\n selfOnboarding: z.literal(true),\n }),\n])\n\nexport const HomeAddressSchemaWithCompletedOnboarding = z.union([\n // Case 1: selfOnboarding is false or undefined\n HomeAddressFieldsSchema.extend({\n selfOnboarding: z.union([z.literal(false), z.undefined()]),\n }),\n // Case 2: selfOnboarding is true but admin can update completed onboarding\n HomeAddressFieldsSchema.extend({\n selfOnboarding: z.literal(true),\n }),\n])\n\nexport type HomeAddressInputs = z.infer<typeof HomeAddressSchema>\n\nexport const HomeAddress = () => {\n const { t } = useTranslation('Employee.HomeAddress')\n const Components = useComponentContext()\n const { isSelfOnboardingIntended, isAdmin, hasCompletedSelfOnboarding } = useProfile()\n\n const { watch } = useFormContext<HomeAddressInputs>()\n const watchedCourtesyWithholding = watch('courtesyWithholding')\n\n if (isAdmin && isSelfOnboardingIntended && !hasCompletedSelfOnboarding) {\n return null\n }\n\n return (\n <>\n <div>\n <Components.Heading as=\"h2\">{t('formTitle')}</Components.Heading>\n <Components.Text>{t('desc')}</Components.Text>\n </div>\n <Grid\n gridTemplateColumns={{\n base: '1fr',\n small: ['1fr', '1fr'],\n }}\n gap={20}\n >\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n isRequired\n label={t('city')}\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zip')}\n errorMessage={t('validations.zip')}\n />\n </Grid>\n <CheckboxField\n name=\"courtesyWithholding\"\n label={t('courtesyWithholdingLabel')}\n description={\n <>\n {t('courtesyWithholdingDescription')}\n <Trans\n t={t}\n i18nKey=\"learnMoreCta\"\n components={{\n LearnMoreLink: <Components.Link />,\n }}\n />\n </>\n }\n />\n {watchedCourtesyWithholding && (\n <Components.Alert label={t('withholdingTitle')} status=\"warning\">\n <Trans t={t} i18nKey=\"withholdingNote\" />\n </Components.Alert>\n )}\n </>\n )\n}\n"],"names":["HomeAddressFieldsSchema","z","zip","HomeAddressSchema","HomeAddressSchemaWithCompletedOnboarding","HomeAddress","t","useTranslation","Components","useComponentContext","isSelfOnboardingIntended","isAdmin","hasCompletedSelfOnboarding","useProfile","watch","useFormContext","watchedCourtesyWithholding","jsxs","Fragment","jsx","Grid","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxField","Trans"],"mappings":";;;;;;;;;;;;;AAQA,MAAMA,IAA0BC,EAAE,OAAO;AAAA,EACvC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,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AAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOnB,EAAE,0BAA0B;AAAA,QACnC,aACE,gBAAAW,EAAAC,GAAA,EACG,UAAA;AAAA,UAAAZ,EAAE,gCAAgC;AAAA,UACnC,gBAAAa;AAAA,YAACO;AAAA,YAAA;AAAA,cACC,GAAApB;AAAA,cACA,SAAQ;AAAA,cACR,YAAY;AAAA,gBACV,eAAe,gBAAAa,EAACX,EAAW,MAAX,CAAA,CAAgB;AAAA,cAAA;AAAA,YAClC;AAAA,UAAA;AAAA,QACF,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAGHQ,KACC,gBAAAG,EAACX,EAAW,OAAX,EAAiB,OAAOF,EAAE,kBAAkB,GAAG,QAAO,WACrD,UAAA,gBAAAa,EAACO,GAAA,EAAM,GAAApB,GAAM,SAAQ,mBAAkB,EAAA,CACzC;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"HomeAddress.js","sources":["../../../../src/components/Employee/Profile/HomeAddress.tsx"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { z } from 'zod'\nimport { useProfile } from './useProfile'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { CheckboxField, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst HomeAddressFieldsSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().refine(zip => /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(zip)),\n courtesyWithholding: z.boolean(),\n})\n\nexport const HomeAddressSchema = z.union([\n // Case 1: selfOnboarding is false or undefined\n HomeAddressFieldsSchema.extend({\n selfOnboarding: z.union([z.literal(false), z.undefined()]),\n }),\n // Case 2: selfOnboarding is true\n z.object({\n selfOnboarding: z.literal(true),\n }),\n])\n\nexport const HomeAddressSchemaWithCompletedOnboarding = z.union([\n // Case 1: selfOnboarding is false or undefined\n HomeAddressFieldsSchema.extend({\n selfOnboarding: z.union([z.literal(false), z.undefined()]),\n }),\n // Case 2: selfOnboarding is true but admin can update completed onboarding\n HomeAddressFieldsSchema.extend({\n selfOnboarding: z.literal(true),\n }),\n])\n\nexport type HomeAddressInputs = z.infer<typeof HomeAddressSchema>\n\nexport const HomeAddress = () => {\n const { t } = useTranslation('Employee.HomeAddress')\n const Components = useComponentContext()\n const { isSelfOnboardingIntended, isAdmin, hasCompletedSelfOnboarding } = useProfile()\n\n const { watch } = useFormContext<HomeAddressInputs>()\n const watchedCourtesyWithholding = watch('courtesyWithholding')\n\n if (isAdmin && isSelfOnboardingIntended && !hasCompletedSelfOnboarding) {\n return null\n }\n\n return (\n <>\n <div>\n <Components.Heading as=\"h2\">{t('formTitle')}</Components.Heading>\n <Components.Text>{t('desc')}</Components.Text>\n </div>\n <Grid\n gridTemplateColumns={{\n base: '1fr',\n small: ['1fr', '1fr'],\n }}\n gap={20}\n >\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n isRequired\n label={t('city')}\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zip')}\n errorMessage={t('validations.zip')}\n />\n </Grid>\n <CheckboxField\n name=\"courtesyWithholding\"\n label={t('courtesyWithholdingLabel')}\n description={\n <>\n {t('courtesyWithholdingDescription')}\n <Trans\n t={t}\n i18nKey=\"learnMoreCta\"\n components={{\n LearnMoreLink: <Components.Link />,\n }}\n />\n </>\n }\n />\n {watchedCourtesyWithholding && (\n <Components.Alert label={t('withholdingTitle')} status=\"warning\">\n <Trans t={t} i18nKey=\"withholdingNote\" />\n </Components.Alert>\n )}\n </>\n )\n}\n"],"names":["HomeAddressFieldsSchema","z","zip","HomeAddressSchema","HomeAddressSchemaWithCompletedOnboarding","HomeAddress","t","useTranslation","Components","useComponentContext","isSelfOnboardingIntended","isAdmin","hasCompletedSelfOnboarding","useProfile","watch","useFormContext","watchedCourtesyWithholding","jsxs","Fragment","jsx","Grid","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxField","Trans"],"mappings":";;;;;;;;;;;;AAQA,MAAMA,IAA0BC,EAAE,OAAO;AAAA,EACvC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,OAAO,CAAAC,MAAO,4BAA4B,KAAKA,CAAG,CAAC;AAAA,EACnE,qBAAqBD,EAAE,QAAA;AACzB,CAAC,GAEYE,IAAoBF,EAAE,MAAM;AAAA;AAAA,EAEvCD,EAAwB,OAAO;AAAA,IAC7B,gBAAgBC,EAAE,MAAM,CAACA,EAAE,QAAQ,EAAK,GAAGA,EAAE,WAAW,CAAC;AAAA,EAAA,CAC1D;AAAA;AAAA,EAEDA,EAAE,OAAO;AAAA,IACP,gBAAgBA,EAAE,QAAQ,EAAI;AAAA,EAAA,CAC/B;AACH,CAAC,GAEYG,IAA2CH,EAAE,MAAM;AAAA;AAAA,EAE9DD,EAAwB,OAAO;AAAA,IAC7B,gBAAgBC,EAAE,MAAM,CAACA,EAAE,QAAQ,EAAK,GAAGA,EAAE,WAAW,CAAC;AAAA,EAAA,CAC1D;AAAA;AAAA,EAEDD,EAAwB,OAAO;AAAA,IAC7B,gBAAgBC,EAAE,QAAQ,EAAI;AAAA,EAAA,CAC/B;AACH,CA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