@gusto/embedded-react-sdk 0.28.0 → 0.30.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 (250) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/Common/Fields/PercentageField/PercentageField.d.ts +8 -0
  3. package/dist/components/Common/Fields/PercentageField/PercentageField.js +58 -0
  4. package/dist/components/Common/Fields/PercentageField/PercentageField.js.map +1 -0
  5. package/dist/components/Common/Fields/PercentageField/index.d.ts +2 -0
  6. package/dist/components/Common/SignatureForm/SignatureForm.js +11 -12
  7. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  9. package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
  10. package/dist/components/Common/TaxInputs/TaxInputs.js +125 -98
  11. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  12. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  13. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  14. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  15. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +5 -5
  16. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +17 -16
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  24. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +6 -5
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  29. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  30. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -6
  31. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  32. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  33. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  34. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -6
  35. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  36. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  37. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  38. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  39. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
  40. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  41. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  42. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  43. package/dist/components/Company/FederalTaxes/Form.js +3 -4
  44. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  45. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  46. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  47. package/dist/components/Company/Industry/Context.js +6 -7
  48. package/dist/components/Company/Industry/Context.js.map +1 -1
  49. package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
  50. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  51. package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
  52. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  53. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  54. package/dist/components/Company/Locations/LocationsList/LocationsList.js +39 -56
  55. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  56. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  57. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  58. package/dist/components/Company/OnboardingOverview/Completed.js +2 -3
  59. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  60. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
  61. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  62. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
  63. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  64. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  65. package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
  66. package/dist/components/Company/PaySchedule/_parts/Edit.js +24 -23
  67. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  68. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -9
  69. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  70. package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
  71. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  72. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  73. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  74. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +60 -67
  75. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  76. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  77. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  78. package/dist/components/Company/StateTaxes/StateTaxesForm/index.d.ts +2 -0
  79. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  80. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  81. package/dist/components/Company/StateTaxes/StateTaxesList/index.d.ts +2 -0
  82. package/dist/components/Company/index.d.ts +2 -0
  83. package/dist/components/Company/index.js +21 -17
  84. package/dist/components/Company/index.js.map +1 -1
  85. package/dist/components/Contractor/Address/Address.js +2 -2
  86. package/dist/components/Contractor/Address/Form.js +8 -7
  87. package/dist/components/Contractor/Address/Form.js.map +1 -1
  88. package/dist/components/Contractor/Address/useAddress.js +5 -6
  89. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  90. package/dist/components/Contractor/ContractorList/index.js +17 -17
  91. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +8 -8
  92. package/dist/components/Contractor/ContractorList/useContractorList.js +9 -25
  93. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  94. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  95. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  96. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -3
  97. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  98. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +23 -22
  99. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  100. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -8
  101. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  102. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
  103. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +1 -0
  104. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +38 -24
  105. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  106. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  107. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +95 -60
  108. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  109. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -3
  110. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  111. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -7
  112. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  113. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -3
  114. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  115. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +67 -42
  116. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  117. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +3 -1
  118. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +40 -36
  119. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  120. package/dist/components/Contractor/Payments/types.d.ts +2 -0
  121. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  122. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  123. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  124. package/dist/components/Contractor/Submit/Submit.js +1 -1
  125. package/dist/components/Employee/Compensation/Edit.js +27 -23
  126. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  127. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -11
  128. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  129. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -12
  130. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  131. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
  132. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  133. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  134. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
  135. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  136. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
  137. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  138. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  139. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  140. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  141. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  142. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  143. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  144. package/dist/components/Employee/EmployeeList/EmployeeList.js +77 -95
  145. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  146. package/dist/components/Employee/EmployeeList/Head.js +2 -3
  147. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  148. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  149. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  150. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  151. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  152. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  153. package/dist/components/Employee/Landing/Landing.js +8 -8
  154. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  155. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  156. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  157. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  158. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  159. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  160. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  161. package/dist/components/Employee/Profile/HomeAddress.js +10 -9
  162. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  163. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +11 -10
  164. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  165. package/dist/components/Employee/Profile/useProfile.js +3 -4
  166. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  167. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  168. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  169. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  170. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  171. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  172. package/dist/components/Flow/Flow.js +2 -3
  173. package/dist/components/Flow/Flow.js.map +1 -1
  174. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -16
  175. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  176. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
  177. package/dist/components/InformationRequests/InformationRequests.js +1 -1
  178. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  179. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +1 -1
  180. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +2 -3
  181. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  182. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  183. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +4 -1
  184. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  185. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
  186. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  187. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +50 -68
  188. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  189. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +39 -38
  190. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  191. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +17 -18
  192. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  193. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +17 -0
  194. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +75 -0
  195. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -0
  196. package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +3 -0
  197. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +9 -0
  198. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +198 -0
  199. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -0
  200. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.test.d.ts +1 -0
  201. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.d.ts +1 -0
  202. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +49 -0
  203. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -0
  204. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +17 -13
  205. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  206. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  207. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  208. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +3 -6
  209. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +115 -300
  210. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  211. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.test.d.ts +1 -0
  212. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -3
  213. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  214. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +2 -3
  215. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  216. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +15 -13
  217. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  218. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
  219. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  220. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
  221. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  222. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
  223. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  224. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
  225. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
  226. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
  227. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  228. package/dist/components/Payroll/index.d.ts +1 -0
  229. package/dist/components/Payroll/index.js +14 -12
  230. package/dist/components/Payroll/index.js.map +1 -1
  231. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  232. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  233. package/dist/helpers/percentageConversion.d.ts +3 -0
  234. package/dist/helpers/percentageConversion.js +27 -0
  235. package/dist/helpers/percentageConversion.js.map +1 -0
  236. package/dist/helpers/percentageConversion.test.d.ts +1 -0
  237. package/dist/hooks/usePagination/usePagination.d.ts +15 -0
  238. package/dist/hooks/usePagination/usePagination.js +37 -0
  239. package/dist/hooks/usePagination/usePagination.js.map +1 -0
  240. package/dist/hooks/usePagination/usePagination.test.d.ts +1 -0
  241. package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
  242. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +28 -28
  243. package/dist/i18n/en/common.json.d.ts +3 -1
  244. package/dist/i18n/en/common.json.js +1 -1
  245. package/dist/shared/constants.d.ts +2 -0
  246. package/dist/shared/constants.js +11 -10
  247. package/dist/shared/constants.js.map +1 -1
  248. package/dist/style.css +1 -1
  249. package/dist/types/i18next.d.ts +7 -0
  250. package/package.json +12 -10
@@ -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 { RadioGroupField as q } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
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";
11
14
  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: $ } = I();
25
+ ), { currency: $ } = w();
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 = w();
36
+ const f = q();
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
- W,
53
+ I,
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
- q,
109
+ W,
110
110
  {
111
111
  name: "splitBy",
112
112
  label: u("splitByLabel"),
@@ -11,11 +11,10 @@ import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
12
  import "classnames";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
14
  import "dompurify";
16
15
  import "../../../contexts/LocaleProvider/useLocale.js";
17
16
  import { createCompoundContext as a } from "../../Base/createCompoundContext.js";
18
- const S = t.union([
17
+ const x = t.union([
19
18
  l.extend({
20
19
  type: t.literal("Direct Deposit"),
21
20
  isSplit: t.literal(!1)
@@ -55,10 +54,10 @@ const S = t.union([
55
54
  remainder: t.string()
56
55
  })
57
56
  ])
58
- ]), [k, C] = a("PaymentMethodContext");
57
+ ]), [S, k] = a("PaymentMethodContext");
59
58
  export {
60
- S as CombinedSchema,
61
- C as PaymentMethodProvider,
62
- k as usePaymentMethod
59
+ x as CombinedSchema,
60
+ k as PaymentMethodProvider,
61
+ S as usePaymentMethod
63
62
  };
64
63
  //# 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,M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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;"}
@@ -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 { SwitchField as w } from "../../Common/Fields/SwitchField/SwitchField.js";
12
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import { SwitchField as w } from "../../Common/Fields/SwitchField/SwitchField.js";
13
13
  const d = y.merge(
14
14
  x
15
15
  ).extend({
@@ -5,9 +5,10 @@ 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 { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
8
+ import "classnames";
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";
11
12
  import { SelectField as T } from "../../Common/Fields/SelectField/SelectField.js";
12
13
  import { CheckboxField as A } from "../../Common/Fields/CheckboxField/CheckboxField.js";
13
14
  const s = t.object({
@@ -17,7 +18,7 @@ const s = t.object({
17
18
  state: t.string().min(1),
18
19
  zip: t.string().refine((e) => /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(e)),
19
20
  courtesyWithholding: t.boolean()
20
- }), L = t.union([
21
+ }), k = t.union([
21
22
  // Case 1: selfOnboarding is false or undefined
22
23
  s.extend({
23
24
  selfOnboarding: t.union([t.literal(!1), t.undefined()])
@@ -26,7 +27,7 @@ const s = t.object({
26
27
  t.object({
27
28
  selfOnboarding: t.literal(!0)
28
29
  })
29
- ]), k = t.union([
30
+ ]), $ = t.union([
30
31
  // Case 1: selfOnboarding is false or undefined
31
32
  s.extend({
32
33
  selfOnboarding: t.union([t.literal(!1), t.undefined()])
@@ -35,8 +36,8 @@ const s = t.object({
35
36
  s.extend({
36
37
  selfOnboarding: t.literal(!0)
37
38
  })
38
- ]), $ = () => {
39
- const { t: e } = f("Employee.HomeAddress"), r = C(), { isSelfOnboardingIntended: m, isAdmin: c, hasCompletedSelfOnboarding: h } = b(), { watch: u } = g(), p = u("courtesyWithholding");
39
+ ]), B = () => {
40
+ const { t: e } = f("Employee.HomeAddress"), r = C(), { isSelfOnboardingIntended: m, isAdmin: c, hasCompletedSelfOnboarding: h } = b(), { watch: p } = g(), u = p("courtesyWithholding");
40
41
  return c && m && !h ? null : /* @__PURE__ */ n(a, { children: [
41
42
  /* @__PURE__ */ n("div", { children: [
42
43
  /* @__PURE__ */ i(r.Heading, { as: "h2", children: e("formTitle") }),
@@ -116,12 +117,12 @@ const s = t.object({
116
117
  ] })
117
118
  }
118
119
  ),
119
- p && /* @__PURE__ */ i(r.Alert, { label: e("withholdingTitle"), status: "warning", children: /* @__PURE__ */ i(d, { t: e, i18nKey: "withholdingNote" }) })
120
+ u && /* @__PURE__ */ i(r.Alert, { label: e("withholdingTitle"), status: "warning", children: /* @__PURE__ */ i(d, { t: e, i18nKey: "withholdingNote" }) })
120
121
  ] });
121
122
  };
122
123
  export {
123
- $ as HomeAddress,
124
- L as HomeAddressSchema,
125
- k as HomeAddressSchemaWithCompletedOnboarding
124
+ B as HomeAddress,
125
+ k as HomeAddressSchema,
126
+ $ as HomeAddressSchemaWithCompletedOnboarding
126
127
  };
127
128
  //# 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,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,CAAC,GAIYI,IAAc,MAAM;AAC/B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7CC,IAAaC,EAAA,GACb,EAAE,0BAAAC,GAA0B,SAAAC,GAAS,4BAAAC,EAAA,IAA+BC,EAAA,GAEpE,EAAE,OAAAC,EAAA,IAAU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AAA;AAAA,UAEZ,gBAAAa;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOf,EAAE,KAAK;AAAA,cACd,cAAcA,EAAE,iBAAiB;AAAA,YAAA;AAAA,UAAA;AAAA,QACnC;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAa;AAAA,MAACM;AAAA,MAAA;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,EAA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AA,EAAA,GAEJ;AAEJ;"}
@@ -4,20 +4,21 @@ import { useFormContext as c } from "react-hook-form";
4
4
  import { useTranslation as s } from "react-i18next";
5
5
  import "../../../shared/constants.js";
6
6
  import { Grid as b } from "../../Common/Grid/Grid.js";
7
- import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
8
- import { DatePickerField as p } from "../../Common/Fields/DatePickerField/DatePickerField.js";
7
+ import "classnames";
9
8
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
10
9
  import "react";
11
10
  import { removeNonDigits as S, addressInline as g } from "../../../helpers/formattedStrings.js";
12
11
  import { usePlaceholderSSN as h, normalizeSSN as N } from "../../../helpers/ssn.js";
13
12
  import { SSN_REGEX as D, nameValidation as m } from "../../../helpers/validations.js";
13
+ import { TextInputField as o } from "../../Common/Fields/TextInputField/TextInputField.js";
14
14
  import { SelectField as I } from "../../Common/Fields/SelectField/SelectField.js";
15
+ import { DatePickerField as p } from "../../Common/Fields/DatePickerField/DatePickerField.js";
15
16
  const v = t.object({
16
17
  firstName: m,
17
18
  middleInitial: t.string().optional(),
18
19
  lastName: m
19
20
  });
20
- function z() {
21
+ function G() {
21
22
  const { t: e } = s("Employee.Profile");
22
23
  return /* @__PURE__ */ l(d, { children: [
23
24
  /* @__PURE__ */ l(b, { gap: { base: 20, small: 8 }, gridTemplateColumns: { base: "1fr", small: ["1fr", 200] }, children: [
@@ -48,7 +49,7 @@ const O = t.object({
48
49
  startDate: t.date().transform((e) => e.toISOString().split("T")[0]),
49
50
  email: t.string().email()
50
51
  });
51
- function G({ companyLocations: e }) {
52
+ function V({ companyLocations: e }) {
52
53
  const { t: r } = s("Employee.Profile"), {
53
54
  formState: { errors: n }
54
55
  } = c();
@@ -95,7 +96,7 @@ const R = t.object({
95
96
  ssn: t.string().transform((e) => S(e)).refine((e) => D.test(e)),
96
97
  enableSsn: t.boolean()
97
98
  });
98
- function V({ employee: e, onChange: r }) {
99
+ function X({ employee: e, onChange: r }) {
99
100
  const { setValue: n } = c(), { t: i } = s("Employee.Profile"), u = h(e?.hasSsn);
100
101
  return /* @__PURE__ */ a(
101
102
  o,
@@ -115,7 +116,7 @@ function V({ employee: e, onChange: r }) {
115
116
  const y = t.object({
116
117
  dateOfBirth: t.date().transform((e) => e.toISOString().split("T")[0])
117
118
  });
118
- function X() {
119
+ function _() {
119
120
  const { t: e } = s("Employee.Profile");
120
121
  return /* @__PURE__ */ a(
121
122
  p,
@@ -132,13 +133,13 @@ v.merge(O).merge(R).merge(y).extend({
132
133
  enableSsn: t.boolean()
133
134
  });
134
135
  export {
135
- G as AdminInputs,
136
+ V as AdminInputs,
136
137
  O as AdminInputsSchema,
137
- X as DateOfBirthInput,
138
+ _ as DateOfBirthInput,
138
139
  y as DateOfBirthSchema,
139
- z as NameInputs,
140
+ G as NameInputs,
140
141
  v as NameInputsSchema,
141
- V as SocialSecurityNumberInput,
142
+ X as SocialSecurityNumberInput,
142
143
  R as SocialSecurityNumberSchema
143
144
  };
144
145
  //# sourceMappingURL=PersonalDetailsInputs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersonalDetailsInputs.js","sources":["../../../../src/components/Employee/Profile/PersonalDetailsInputs.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type Employee } from '@gusto/embedded-api/models/components/employee'\nimport { SelectField, TextInputField, Grid, DatePickerField } from '@/components/Common'\nimport { addressInline, removeNonDigits } from '@/helpers/formattedStrings'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { nameValidation, SSN_REGEX } from '@/helpers/validations'\n\nexport const NameInputsSchema = z.object({\n firstName: nameValidation,\n middleInitial: z.string().optional(),\n lastName: nameValidation,\n})\n\nexport function NameInputs() {\n const { t } = useTranslation('Employee.Profile')\n\n return (\n <>\n <Grid gap={{ base: 20, small: 8 }} gridTemplateColumns={{ base: '1fr', small: ['1fr', 200] }}>\n <TextInputField\n name=\"firstName\"\n isRequired\n label={t('firstName')}\n errorMessage={t('validations.firstName')}\n />\n <TextInputField name=\"middleInitial\" label={t('middleInitial')} />\n </Grid>\n <TextInputField\n name=\"lastName\"\n isRequired\n label={t('lastName')}\n errorMessage={t('validations.lastName')}\n />\n </>\n )\n}\n\nexport const AdminInputsSchema = z.object({\n workAddress: z.string().min(1),\n startDate: z.date().transform(date => date.toISOString().split('T')[0]),\n email: z.string().email(),\n})\n\ntype AdminInputsSchemaType = z.infer<typeof AdminInputsSchema>\n\ninterface AdminInputsProps {\n companyLocations: Location[]\n}\n\nexport function AdminInputs({ companyLocations }: AdminInputsProps) {\n const { t } = useTranslation('Employee.Profile')\n const {\n formState: { errors },\n } = useFormContext<AdminInputsSchemaType>()\n\n return (\n <>\n <SelectField\n name=\"workAddress\"\n options={companyLocations.map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))}\n label={t('workAddress')}\n description={t('workAddressDescription')}\n placeholder={t('workAddressPlaceholder')}\n errorMessage={t('validations.location', { ns: 'common' })}\n isRequired\n />\n <DatePickerField\n name=\"startDate\"\n label={t('startDateLabel')}\n description={t('startDateDescription')}\n isRequired\n errorMessage={\n errors.startDate?.type === 'custom'\n ? t('validations.startDateOutOfRange')\n : t('validations.startDate')\n }\n />\n <TextInputField\n name=\"email\"\n label={t('email')}\n description={t('emailDescription')}\n errorMessage={t('validations.email')}\n isRequired\n type=\"email\"\n />\n </>\n )\n}\n\nexport const SocialSecurityNumberSchema = z.object({\n ssn: z\n .string()\n .transform(input => removeNonDigits(input))\n .refine(input => SSN_REGEX.test(input)),\n enableSsn: z.boolean(),\n})\n\ntype SocialSecurityNumberSchemaType = z.infer<typeof SocialSecurityNumberSchema>\n\ninterface SocialSecurityNumberInputProps {\n employee?: Employee\n onChange?: (updatedValue: string) => void\n}\n\nexport function SocialSecurityNumberInput({ employee, onChange }: SocialSecurityNumberInputProps) {\n const { setValue } = useFormContext<SocialSecurityNumberSchemaType>()\n const { t } = useTranslation('Employee.Profile')\n const placeholderSSN = usePlaceholderSSN(employee?.hasSsn)\n return (\n <TextInputField\n isRequired\n name=\"ssn\"\n label={t('ssnLabel')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n placeholder={placeholderSSN}\n transform={normalizeSSN}\n onChange={updatedValue => {\n setValue('enableSsn', true)\n onChange?.(updatedValue)\n }}\n />\n )\n}\n\nexport const DateOfBirthSchema = z.object({\n dateOfBirth: z.date().transform(date => date.toISOString().split('T')[0]),\n})\n\nexport function DateOfBirthInput() {\n const { t } = useTranslation('Employee.Profile')\n return (\n <DatePickerField\n name=\"dateOfBirth\"\n label={t('dobLabel')}\n isRequired\n errorMessage={t('validations.dob', { ns: 'common' })}\n />\n )\n}\n\n// All possible inputs for PersonalDetails forms\nconst PersonalDetailsTotalSchema = NameInputsSchema.merge(AdminInputsSchema)\n .merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n selfOnboarding: z.boolean(),\n enableSsn: z.boolean(),\n })\n\ntype NullableDatesMapper<Source> = {\n [Property in keyof Source]: Source[Property] extends Date\n ? Source[Property] | null\n : Source[Property]\n}\n\nexport type PersonalDetailsPayload = z.infer<typeof PersonalDetailsTotalSchema>\n\n//Typescript magic to mark date fields as nullable for correct defaultvalues\nexport type PersonalDetailsInputs = NullableDatesMapper<z.input<typeof PersonalDetailsTotalSchema>>\n"],"names":["NameInputsSchema","z","nameValidation","NameInputs","t","useTranslation","jsxs","Fragment","Grid","jsx","TextInputField","AdminInputsSchema","date","AdminInputs","companyLocations","errors","useFormContext","SelectField","location","addressInline","DatePickerField","SocialSecurityNumberSchema","input","removeNonDigits","SSN_REGEX","SocialSecurityNumberInput","employee","onChange","setValue","placeholderSSN","usePlaceholderSSN","normalizeSSN","updatedValue","DateOfBirthSchema","DateOfBirthInput"],"mappings":";;;;;;;;;;;;;;AAUO,MAAMA,IAAmBC,EAAE,OAAO;AAAA,EACvC,WAAWC;AAAA,EACX,eAAeD,E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B;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,MAAK;AAAA,MACL,OAAON,EAAE,UAAU;AAAA,MACnB,cAAcA,EAAE,mBAAmB,EAAE,IAAI,UAAU;AAAA,MACnD,aAAayB;AAAA,MACb,WAAWE;AAAA,MACX,UAAU,CAAAC,MAAgB;AACxB,QAAAJ,EAAS,aAAa,EAAI,GAC1BD,IAAWK,CAAY;AAAA,MACzB;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,MAAMC,IAAoBhC,EAAE,OAAO;AAAA,EACxC,aAAaA,EAAE,KAAA,EAAO,UAAU,CAAAW,MAAQA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,CAAC;AAC1E,CAAC;AAEM,SAASsB,IAAmB;AACjC,QAAM,EAAE,GAAA9B,EAAA,IAAMC,EAAe,kBAAkB;AAC/C,SACE,gBAAAI;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAOhB,EAAE,UAAU;AAAA,MACnB,YAAU;AAAA,MACV,cAAcA,EAAE,mBAAmB,EAAE,IAAI,UAAU;AAAA,IAAA;AAAA,EAAA;AAGzD;AAGmCJ,EAAiB,MAAMW,CAAiB,EACxE,MAAMU,CAA0B,EAChC,MAAMY,CAAiB,EACvB,OAAO;AAAA,EACN,gBAAgBhC,EAAE,QAAA;AAAA,EAClB,WAAWA,EAAE,QAAA;AACf,CAAC;"}
1
+ {"version":3,"file":"PersonalDetailsInputs.js","sources":["../../../../src/components/Employee/Profile/PersonalDetailsInputs.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type Employee } from '@gusto/embedded-api/models/components/employee'\nimport { SelectField, TextInputField, Grid, DatePickerField } from '@/components/Common'\nimport { addressInline, removeNonDigits } from '@/helpers/formattedStrings'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { nameValidation, SSN_REGEX } from '@/helpers/validations'\n\nexport const NameInputsSchema = z.object({\n firstName: nameValidation,\n middleInitial: z.string().optional(),\n lastName: nameValidation,\n})\n\nexport function NameInputs() {\n const { t } = useTranslation('Employee.Profile')\n\n return (\n <>\n <Grid gap={{ base: 20, small: 8 }} gridTemplateColumns={{ base: '1fr', small: ['1fr', 200] }}>\n <TextInputField\n name=\"firstName\"\n isRequired\n label={t('firstName')}\n errorMessage={t('validations.firstName')}\n />\n <TextInputField name=\"middleInitial\" label={t('middleInitial')} />\n </Grid>\n <TextInputField\n name=\"lastName\"\n isRequired\n label={t('lastName')}\n errorMessage={t('validations.lastName')}\n />\n </>\n )\n}\n\nexport const AdminInputsSchema = z.object({\n workAddress: z.string().min(1),\n startDate: z.date().transform(date => date.toISOString().split('T')[0]),\n email: z.string().email(),\n})\n\ntype AdminInputsSchemaType = z.infer<typeof AdminInputsSchema>\n\ninterface AdminInputsProps {\n companyLocations: Location[]\n}\n\nexport function AdminInputs({ companyLocations }: AdminInputsProps) {\n const { t } = useTranslation('Employee.Profile')\n const {\n formState: { errors },\n } = useFormContext<AdminInputsSchemaType>()\n\n return (\n <>\n <SelectField\n name=\"workAddress\"\n options={companyLocations.map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))}\n label={t('workAddress')}\n description={t('workAddressDescription')}\n placeholder={t('workAddressPlaceholder')}\n errorMessage={t('validations.location', { ns: 'common' })}\n isRequired\n />\n <DatePickerField\n name=\"startDate\"\n label={t('startDateLabel')}\n description={t('startDateDescription')}\n isRequired\n errorMessage={\n errors.startDate?.type === 'custom'\n ? t('validations.startDateOutOfRange')\n : t('validations.startDate')\n }\n />\n <TextInputField\n name=\"email\"\n label={t('email')}\n description={t('emailDescription')}\n errorMessage={t('validations.email')}\n isRequired\n type=\"email\"\n />\n </>\n )\n}\n\nexport const SocialSecurityNumberSchema = z.object({\n ssn: z\n .string()\n .transform(input => removeNonDigits(input))\n .refine(input => SSN_REGEX.test(input)),\n enableSsn: z.boolean(),\n})\n\ntype SocialSecurityNumberSchemaType = z.infer<typeof SocialSecurityNumberSchema>\n\ninterface SocialSecurityNumberInputProps {\n employee?: Employee\n onChange?: (updatedValue: string) => void\n}\n\nexport function SocialSecurityNumberInput({ employee, onChange }: SocialSecurityNumberInputProps) {\n const { setValue } = useFormContext<SocialSecurityNumberSchemaType>()\n const { t } = useTranslation('Employee.Profile')\n const placeholderSSN = usePlaceholderSSN(employee?.hasSsn)\n return (\n <TextInputField\n isRequired\n name=\"ssn\"\n label={t('ssnLabel')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n placeholder={placeholderSSN}\n transform={normalizeSSN}\n onChange={updatedValue => {\n setValue('enableSsn', true)\n onChange?.(updatedValue)\n }}\n />\n )\n}\n\nexport const DateOfBirthSchema = z.object({\n dateOfBirth: z.date().transform(date => date.toISOString().split('T')[0]),\n})\n\nexport function DateOfBirthInput() {\n const { t } = useTranslation('Employee.Profile')\n return (\n <DatePickerField\n name=\"dateOfBirth\"\n label={t('dobLabel')}\n isRequired\n errorMessage={t('validations.dob', { ns: 'common' })}\n />\n )\n}\n\n// All possible inputs for PersonalDetails forms\nconst PersonalDetailsTotalSchema = NameInputsSchema.merge(AdminInputsSchema)\n .merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n selfOnboarding: z.boolean(),\n enableSsn: z.boolean(),\n })\n\ntype NullableDatesMapper<Source> = {\n [Property in keyof Source]: Source[Property] extends Date\n ? Source[Property] | null\n : Source[Property]\n}\n\nexport type PersonalDetailsPayload = z.infer<typeof PersonalDetailsTotalSchema>\n\n//Typescript magic to mark date fields as nullable for correct defaultvalues\nexport type PersonalDetailsInputs = NullableDatesMapper<z.input<typeof PersonalDetailsTotalSchema>>\n"],"names":["NameInputsSchema","z","nameValidation","NameInputs","t","useTranslation","jsxs","Fragment","Grid","jsx","TextInputField","AdminInputsSchema","date","AdminInputs","companyLocations","errors","useFormContext","SelectField","location","addressInline","DatePickerField","SocialSecurityNumberSchema","input","removeNonDigits","SSN_REGEX","SocialSecurityNumberInput","employee","onChange","setValue","placeholderSSN","usePlaceholderSSN","normalizeSSN","updatedValue","DateOfBirthSchema","DateOfBirthInput"],"mappings":";;;;;;;;;;;;;;;AAUO,MAAMA,IAAmBC,EAAE,OAAO;AAAA,EACvC,WAAWC;AAAA,EACX,eAAeD,EAAE,OAAA,EAAS,SAAA;AAAA,EAC1B,UAAUC;AACZ,CAAC;AAEM,SAASC,IAAa;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB;AAE/C,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAD,EAACE,KAAK,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA,GAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,GAAG,KACvF,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAON,EAAE,WAAW;AAAA,UACpB,cAAcA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAExCM,GAAA,EAAe,MAAK,iBAAgB,OAAON,EAAE,eAAe,EAAA,CAAG;AAAA,IAAA,GAClE;AAAA,IACA,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON,EAAE,UAAU;AAAA,QACnB,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;AAEO,MAAMO,IAAoBV,EAAE,OAAO;AAAA,EACxC,aAAaA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC7B,WAAWA,EAAE,OAAO,UAAU,CAAAW,MAAQA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,CAAC;AAAA,EACtE,OAAOX,EAAE,OAAA,EAAS,MAAA;AACpB,CAAC;AAQM,SAASY,EAAY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AWrB,EAAE,QAAA;AACf,CAAC;AASM,SAASwB,EAA0B,EAAE,UAAAC,GAAU,UAAAC,KAA4C;AAChG,QAAM,EAAE,UAAAC,EAAA,IAAaZ,EAAA,GACf,EAAE,GAAAZ,EAAA,IAAMC,EAAe,kBAAkB,GACzCwB,IAAiBC,EAAkBJ,GAAU,MAAM;AACzD,SACE,gBAAAjB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,MAAK;AAAA,MACL,OAAON,EAAE,UAAU;AAAA,MACnB,cAAcA,EAAE,mBAAmB,EAAE,IAAI,UAAU;AAAA,MACnD,aAAayB;AAAA,MACb,WAAWE;AAAA,MACX,UAAU,CAAAC,MAAgB;AACxB,QAAAJ,EAAS,aAAa,EAAI,GAC1BD,IAAWK,CAAY;AAAA,MACzB;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,MAAMC,IAAoBhC,EAAE,OAAO;AAAA,EACxC,aAAaA,EAAE,KAAA,EAAO,UAAU,CAAAW,MAAQA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,CAAC;AAC1E,CAAC;AAEM,SAASsB,IAAmB;AACjC,QAAM,EAAE,GAAA9B,EAAA,IAAMC,EAAe,kBAAkB;AAC/C,SACE,gBAAAI;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAOhB,EAAE,UAAU;AAAA,MACnB,YAAU;AAAA,MACV,cAAcA,EAAE,mBAAmB,EAAE,IAAI,UAAU;AAAA,IAAA;AAAA,EAAA;AAGzD;AAGmCJ,EAAiB,MAAMW,CAAiB,EACxE,MAAMU,CAA0B,EAChC,MAAMY,CAAiB,EACvB,OAAO;AAAA,EACN,gBAAgBhC,EAAE,QAAA;AAAA,EAClB,WAAWA,EAAE,QAAA;AACf,CAAC;"}
@@ -9,13 +9,12 @@ import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
12
  import "dompurify";
14
13
  import "../../../contexts/LocaleProvider/useLocale.js";
15
14
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [u, a] = o("ProfileContext");
15
+ const [s, u] = o("ProfileContext");
17
16
  export {
18
- a as ProfileProvider,
19
- u as useProfile
17
+ u as ProfileProvider,
18
+ s as useProfile
20
19
  };
21
20
  //# sourceMappingURL=useProfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n hasCompletedSelfOnboarding: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
1
+ {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n hasCompletedSelfOnboarding: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
@@ -9,13 +9,12 @@ import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
12
  import "dompurify";
14
13
  import "../../../contexts/LocaleProvider/useLocale.js";
15
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [u, f] = t("StateTaxesContext");
15
+ const [d, u] = t("StateTaxesContext");
17
16
  export {
18
- f as StateTaxesProvider,
19
- u as useStateTaxes
17
+ u as StateTaxesProvider,
18
+ d as useStateTaxes
20
19
  };
21
20
  //# sourceMappingURL=useStateTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStateTaxes.js","sources":["../../../../src/components/Employee/StateTaxes/useStateTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useStateTaxes, StateTaxesProvider] =\n createCompoundContext<StateTaxesContextType>('StateTaxesContext')\nexport { useStateTaxes, StateTaxesProvider }\n"],"names":["useStateTaxes","StateTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
1
+ {"version":3,"file":"useStateTaxes.js","sources":["../../../../src/components/Employee/StateTaxes/useStateTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useStateTaxes, StateTaxesProvider] =\n createCompoundContext<StateTaxesContextType>('StateTaxesContext')\nexport { useStateTaxes, StateTaxesProvider }\n"],"names":["useStateTaxes","StateTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAeC,CAAkB,IACtCC,EAA6C,mBAAmB;"}
@@ -4,12 +4,12 @@ import { useFormContext as m } from "react-hook-form";
4
4
  import { z as t } from "zod";
5
5
  import "../../../shared/constants.js";
6
6
  import "classnames";
7
- import { RadioGroupField as f } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
- import { TextInputField as g } from "../../Common/Fields/TextInputField/TextInputField.js";
9
- import { NumberInputField as l } from "../../Common/Fields/NumberInputField/NumberInputField.js";
10
- import { useComponentContext as c } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import { useComponentContext as f } from "../../../contexts/ComponentAdapter/useComponentContext.js";
11
8
  import "react";
12
9
  import { SelectField as s } from "../../Common/Fields/SelectField/SelectField.js";
10
+ import { RadioGroupField as g } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
11
+ import { NumberInputField as l } from "../../Common/Fields/NumberInputField/NumberInputField.js";
12
+ import { TextInputField as c } from "../../Common/Fields/TextInputField/TextInputField.js";
13
13
  const p = t.object({
14
14
  w4DataType: t.literal("rev_2020_w4"),
15
15
  filingStatus: t.string().min(1),
@@ -29,7 +29,7 @@ function A() {
29
29
  return e("w4DataType") === "rev_2020_w4" ? /* @__PURE__ */ i(b, {}) : /* @__PURE__ */ i(S, {});
30
30
  }
31
31
  function b() {
32
- const { t: e } = o("Employee.Taxes"), r = c(), d = [
32
+ const { t: e } = o("Employee.Taxes"), r = f(), d = [
33
33
  { value: "Single", label: e("filingStatusSingle") },
34
34
  { value: "Married", label: e("filingStatusMarried") },
35
35
  { value: "Head of Household", label: e("filingStatusHeadOfHousehold") },
@@ -48,7 +48,7 @@ function b() {
48
48
  }
49
49
  ),
50
50
  /* @__PURE__ */ i(
51
- f,
51
+ g,
52
52
  {
53
53
  name: "twoJobs",
54
54
  isRequired: !0,
@@ -149,7 +149,7 @@ function S() {
149
149
  }
150
150
  ),
151
151
  /* @__PURE__ */ i(
152
- g,
152
+ c,
153
153
  {
154
154
  name: "additionalWithholding",
155
155
  label: e("additionalWithholding"),
@@ -9,13 +9,12 @@ import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
12
  import "dompurify";
14
13
  import "../../../contexts/LocaleProvider/useLocale.js";
15
14
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
- const [f, v] = o("TaxesContext");
15
+ const [u, f] = o("TaxesContext");
17
16
  export {
18
- v as TaxesProvider,
19
- f as useTaxes
17
+ f as TaxesProvider,
18
+ u as useTaxes
20
19
  };
21
20
  //# sourceMappingURL=useTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
1
+ {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
@@ -4,11 +4,10 @@ import { useTranslation as w } from "react-i18next";
4
4
  import { FlowBreadcrumbs as F } from "../Common/FlowBreadcrumbs/FlowBreadcrumbs.js";
5
5
  import { Flex as s, FlexItem as d } from "../Common/Flex/Flex.js";
6
6
  import "classnames";
7
- import "../../shared/constants.js";
8
7
  import { useComponentContext as j } from "../../contexts/ComponentAdapter/useComponentContext.js";
9
8
  import "react";
10
9
  import { FlowContext as E } from "./useFlow.js";
11
- const q = ({
10
+ const k = ({
12
11
  onEvent: x,
13
12
  machine: f
14
13
  }) => {
@@ -60,6 +59,6 @@ const q = ({
60
59
  ) });
61
60
  };
62
61
  export {
63
- q as Flow
62
+ k as Flow
64
63
  };
65
64
  //# sourceMappingURL=Flow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":";;;;;;;;;;AAiBO,MAAMA,IAAO,CAAkD;AAAA,EACpE,SAAAC;AAAA,EACA,SAAAC;AACF,MAAoB;AAClB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,CACjB,GAEK;AAAA,IACJ,iBAAAC,IAAkB;AAAA,IAClB,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,qBAAAC;AAAA,IACA,aAAAC,IAAc,CAAA;AAAA,EAAC,IACbT,EAAQ;AAEZ,WAASI,EAAYM,GAAiBC,GAAqB;AACzD,UAAMC,IAAQ,EAAE,MAAAF,GAAM,SAASC,EAAA,GACzBE,IAASZ;AAEf,IAAIC,EAAQ,QACRA,EAAQ,MAAM,KAA8BU,CAAK,IAEnDC,EAAOD,CAAK,GAGdlB,EAAQgB,GAAMC,CAAI;AAAA,EACpB;AAEA,2BACGG,GAAA,EACC,UAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,GAAGhB,EAAQ;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAiB,EAACH,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAA;AAAA,QAAAT,MAAoB,cAAcE,KAAeD,KAChD,gBAAAS;AAAA,UAACnB,EAAW;AAAA,UAAX;AAAA,YACC,YAAAU;AAAA,YACA,aAAAC;AAAA,YACA,OAAOT,EAAE,oBAAoB,EAAE,YAAAQ,GAAY,aAAAC,GAAa;AAAA,YACxD,KAAKP,EAAQ,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGxBK,MAAoB,iBACnB,gBAAAY,EAACH,GAAA,EAAK,eAAc,OAAM,gBAAe,iBAAgB,YAAW,UAClE,UAAA;AAAA,UAAA,gBAAAC,EAACG,GAAA,EAAS,UAAU,GAClB,UAAA,gBAAAH;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,aAAaX,IAAuBC,EAAYD,CAAmB,KAAK,CAAA,IAAM,CAAA;AAAA,cAC9E,qBAAAA;AAAA,cACA,SAASJ;AAAA,YAAA;AAAA,UAAA,GAEb;AAAA,UACA,gBAAAW,EAACG,GAAA,EACE,UAAAlB,EAAQ,QAAQ,oCAAmBA,EAAQ,QAAQ,gBAAhB,CAAA,CAA+B,EAAA,CACrE;AAAA,QAAA,GACF;AAAA,QAEDA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Flow.js","sources":["../../../src/components/Flow/Flow.tsx"],"sourcesContent":["import { useMachine } from 'react-robot'\nimport { type Machine, type SendFunction } from 'robot3'\nimport { useTranslation } from 'react-i18next'\nimport type { OnEventType } from '../Base/useBase'\nimport { FlowBreadcrumbs } from '../Common/FlowBreadcrumbs/FlowBreadcrumbs'\nimport { Flex } from '../Common/Flex'\nimport { FlexItem } from '../Common'\nimport type { FlowContextInterface } from './useFlow'\nimport { FlowContext } from './useFlow'\nimport { type EventType } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype FlowProps<M extends Machine> = {\n machine: M\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const Flow = <M extends Machine<object, FlowContextInterface>>({\n onEvent,\n machine,\n}: FlowProps<M>) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n const [current, send, service] = useMachine(machine, {\n onEvent: handleEvent,\n component: null,\n progressBarCta: null,\n })\n\n const {\n progressBarType = null,\n totalSteps = null,\n currentStep = null,\n currentBreadcrumbId,\n breadcrumbs = {},\n } = current.context\n\n function handleEvent(type: EventType, data: unknown): void {\n const event = { type, payload: data }\n const sendFn = send as SendFunction<string>\n //When dealing with nested state machine, correct machine needs to recieve an event\n if (service.child) {\n ;(service.child.send as SendFunction<string>)(event)\n } else {\n sendFn(event)\n }\n // Pass event upstream - onEvent can be optional on Flow component\n onEvent(type, data)\n }\n\n return (\n <Flex>\n <FlowContext.Provider\n value={{\n ...current.context,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {progressBarType === 'progress' && currentStep && totalSteps && (\n <Components.ProgressBar\n totalSteps={totalSteps}\n currentStep={currentStep}\n label={t('progressBarLabel', { totalSteps, currentStep })}\n cta={current.context.progressBarCta}\n />\n )}\n {progressBarType === 'breadcrumbs' && (\n <Flex flexDirection=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n <FlexItem flexGrow={1}>\n <FlowBreadcrumbs\n breadcrumbs={currentBreadcrumbId ? (breadcrumbs[currentBreadcrumbId] ?? []) : []}\n currentBreadcrumbId={currentBreadcrumbId}\n onEvent={handleEvent}\n />\n </FlexItem>\n <FlexItem>\n {current.context.progressBarCta && <current.context.progressBarCta />}\n </FlexItem>\n </Flex>\n )}\n {current.context.component && <current.context.component />}\n </Flex>\n </FlowContext.Provider>\n </Flex>\n )\n}\n"],"names":["Flow","onEvent","machine","Components","useComponentContext","t","useTranslation","current","send","service","useMachine","handleEvent","progressBarType","totalSteps","currentStep","currentBreadcrumbId","breadcrumbs","type","data","event","sendFn","Flex","jsx","FlowContext","jsxs","FlexItem","FlowBreadcrumbs"],"mappings":";;;;;;;;;AAiBO,MAAMA,IAAO,CAAkD;AAAA,EACpE,SAAAC;AAAA,EACA,SAAAC;AACF,MAAoB;AAClB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,CAACC,GAASC,GAAMC,CAAO,IAAIC,EAAWR,GAAS;AAAA,IACnD,SAASS;AAAA,IACT,WAAW;AAAA,IACX,gBAAgB;AAAA,EAAA,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,gBAAhB,CAAA,CAA+B,EAAA,CACrE;AAAA,QAAA,GACF;AAAA,QAEDA,EAAQ,QAAQ,+BAAcA,EAAQ,QAAQ,WAAhB,CAAA,CAA0B;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -13,14 +13,14 @@ import { BaseComponent as G } from "../../Base/Base.js";
13
13
  import { useBase as $ } from "../../Base/useBase.js";
14
14
  import { Flex as y } from "../../Common/Flex/Flex.js";
15
15
  import "classnames";
16
- import { informationRequestEvents as C } from "../../../shared/constants.js";
17
- import { TextInputField as J } from "../../Common/Fields/TextInputField/TextInputField.js";
18
- import { useComponentContext as w } from "../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
19
17
  import "react";
20
- import { FileInputField as X } from "../../Common/Fields/FileInputField/FileInputField.js";
21
- import { Form as Z } from "../../Common/Form/Form.js";
22
- import { useComponentDictionary as ee, useI18n as M } from "../../../i18n/I18n.js";
23
- import { useFlow as ne } from "../../Flow/useFlow.js";
18
+ import { FileInputField as J } from "../../Common/Fields/FileInputField/FileInputField.js";
19
+ import { Form as X } from "../../Common/Form/Form.js";
20
+ import { useComponentDictionary as Z, useI18n as w } from "../../../i18n/I18n.js";
21
+ import { informationRequestEvents as M } from "../../../shared/constants.js";
22
+ import { useFlow as ee } from "../../Flow/useFlow.js";
23
+ import { TextInputField as ne } from "../../Common/Fields/TextInputField/TextInputField.js";
24
24
  const _ = "gusto-sdk-information-request-form", te = ["image/jpeg", "image/png", "application/pdf"], oe = f.record(
25
25
  f.string(),
26
26
  f.union([f.string().min(1), f.instanceof(File)])
@@ -43,8 +43,8 @@ function ae(o) {
43
43
  return o.some((s) => s.responseType === u.Persona);
44
44
  }
45
45
  function ue({ companyId: o, requestId: s, dictionary: i }) {
46
- ee("InformationRequests.InformationRequestForm", i), M("InformationRequests.InformationRequestForm");
47
- const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: q, Heading: T, Text: c } = w(), { onEvent: I, baseSubmitHandler: g } = $(), { data: N } = P({
46
+ Z("InformationRequests.InformationRequestForm", i), w("InformationRequests.InformationRequestForm");
47
+ const { t: n } = D("InformationRequests.InformationRequestForm"), { Alert: q, Heading: T, Text: c } = C(), { onEvent: I, baseSubmitHandler: g } = $(), { data: N } = P({
48
48
  companyUuid: o
49
49
  }), l = N.informationRequestList?.find((t) => t.uuid === s), a = l?.requiredQuestions ?? [], F = l?.blockingPayroll ?? !1, O = A(a), b = ae(a), { mutateAsync: Q } = W(), v = {}, U = [];
50
50
  a.forEach((t) => {
@@ -83,7 +83,7 @@ function ue({ companyId: o, requestId: s, dictionary: i }) {
83
83
  }
84
84
  }
85
85
  });
86
- I(C.INFORMATION_REQUEST_FORM_DONE, x.informationRequest);
86
+ I(M.INFORMATION_REQUEST_FORM_DONE, x.informationRequest);
87
87
  });
88
88
  }, L = (t) => {
89
89
  if (!t.questionUuid || !t.responseType) return null;
@@ -95,7 +95,7 @@ function ue({ companyId: o, requestId: s, dictionary: i }) {
95
95
  ] }),
96
96
  /* @__PURE__ */ e("hr", { className: r.divider }),
97
97
  x && /* @__PURE__ */ e("div", { className: r.textInputWrapper, children: /* @__PURE__ */ e(
98
- J,
98
+ ne,
99
99
  {
100
100
  name: R,
101
101
  label: n("fields.textAnswer.label"),
@@ -105,7 +105,7 @@ function ue({ companyId: o, requestId: s, dictionary: i }) {
105
105
  }
106
106
  ) }),
107
107
  h && /* @__PURE__ */ e("div", { className: r.fileInputWrapper, children: /* @__PURE__ */ e(
108
- X,
108
+ J,
109
109
  {
110
110
  name: R,
111
111
  label: n("fields.fileUpload.label"),
@@ -128,19 +128,19 @@ function ue({ companyId: o, requestId: s, dictionary: i }) {
128
128
  return /* @__PURE__ */ e("div", { className: r.root, children: /* @__PURE__ */ m(y, { flexDirection: "column", gap: 16, children: [
129
129
  /* @__PURE__ */ e(T, { as: "h2", children: n("title") }),
130
130
  F && /* @__PURE__ */ e(q, { status: "error", label: n("blockingAlert.title"), disableScrollIntoView: !0, children: n("blockingAlert.description") }),
131
- O ? j : /* @__PURE__ */ e(H, { ...E, children: /* @__PURE__ */ e(Z, { id: _, onSubmit: E.handleSubmit(k), children: /* @__PURE__ */ e(y, { flexDirection: "column", gap: 16, children: a.map(L) }) }) })
131
+ O ? j : /* @__PURE__ */ e(H, { ...E, children: /* @__PURE__ */ e(X, { id: _, onSubmit: E.handleSubmit(k), children: /* @__PURE__ */ e(y, { flexDirection: "column", gap: 16, children: a.map(L) }) }) })
132
132
  ] }) });
133
133
  }
134
134
  const ce = ({ onEvent: o }) => {
135
- M("InformationRequests.InformationRequestForm");
136
- const { t: s } = D("InformationRequests.InformationRequestForm"), { Button: i } = w(), { companyId: n, selectedRequestId: q } = ne(), { data: T } = P({
135
+ w("InformationRequests.InformationRequestForm");
136
+ const { t: s } = D("InformationRequests.InformationRequestForm"), { Button: i } = C(), { companyId: n, selectedRequestId: q } = ee(), { data: T } = P({
137
137
  companyUuid: n
138
138
  }), I = T.informationRequestList?.find(
139
139
  (F) => F.uuid === q
140
140
  )?.requiredQuestions ?? [], g = A(I), l = V({
141
141
  mutationKey: Y()
142
142
  }) > 0, a = () => {
143
- o(C.INFORMATION_REQUEST_FORM_CANCEL);
143
+ o(M.INFORMATION_REQUEST_FORM_CANCEL);
144
144
  };
145
145
  return g ? /* @__PURE__ */ e(y, { justifyContent: "flex-end", gap: 12, children: /* @__PURE__ */ e(i, { variant: "secondary", onClick: a, children: s("cta.close") }) }) : /* @__PURE__ */ m(y, { justifyContent: "flex-end", gap: 12, children: [
146
146
  /* @__PURE__ */ e(i, { variant: "secondary", onClick: a, isDisabled: l, children: s("cta.cancel") }),