@gusto/embedded-react-sdk 0.14.0 → 0.15.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 (263) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/assets/icons/feature-icon-check.svg.js +10 -0
  3. package/dist/assets/icons/feature-icon-check.svg.js.map +1 -0
  4. package/dist/assets/icons/plus-circle.svg.js +10 -0
  5. package/dist/assets/icons/plus-circle.svg.js.map +1 -0
  6. package/dist/assets/icons/x-circle.svg.js +10 -0
  7. package/dist/assets/icons/x-circle.svg.js.map +1 -0
  8. package/dist/components/Base/Base.js +4 -4
  9. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  10. package/dist/components/Common/DataView/DataView.js +19 -18
  11. package/dist/components/Common/DataView/DataView.js.map +1 -1
  12. package/dist/components/Common/PaginationControl/PaginationControl.js +36 -36
  13. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  14. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +3 -1
  15. package/dist/components/Common/SignatureForm/SignatureForm.js +13 -10
  16. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  17. package/dist/components/Common/SignatureForm/SignatureFormActions.js +8 -6
  18. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  19. package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -11
  20. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  21. package/dist/components/Common/UI/Alert/Alert.module.scss.js +14 -14
  22. package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +1 -1
  23. package/dist/components/Common/index.d.ts +1 -0
  24. package/dist/components/Company/AssignSignatory/AssignSignatory.js +10 -7
  25. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  26. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +4 -2
  27. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -6
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +15 -13
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +13 -10
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +14 -12
  40. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  42. package/dist/components/Company/AssignSignatory/TitleSelect.js +5 -3
  43. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  46. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +6 -4
  48. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  50. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +3 -2
  51. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  52. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -6
  53. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
  55. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  56. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  57. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  58. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -8
  59. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  60. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  61. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +14 -11
  62. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  63. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  64. package/dist/components/Company/FederalTaxes/Actions.js +7 -6
  65. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  66. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -12
  67. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  68. package/dist/components/Company/FederalTaxes/Form.js +4 -4
  69. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  70. package/dist/components/Company/Industry/Actions.js +8 -7
  71. package/dist/components/Company/Industry/Actions.js.map +1 -1
  72. package/dist/components/Company/Industry/Context.js +1 -1
  73. package/dist/components/Company/Industry/Edit.js +4 -2
  74. package/dist/components/Company/Industry/Edit.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  76. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationForm/Form.js +7 -4
  78. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  79. package/dist/components/Company/Locations/LocationForm/LocationForm.js +17 -14
  80. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  82. package/dist/components/Company/Locations/LocationsList/Actions.js +3 -2
  83. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  84. package/dist/components/Company/Locations/LocationsList/List.js +22 -20
  85. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  86. package/dist/components/Company/Locations/LocationsList/LocationsList.js +12 -9
  87. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  88. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +3 -1
  89. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  90. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  91. package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
  92. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  93. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
  94. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  95. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +9 -6
  96. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  97. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  98. package/dist/components/Company/PaySchedule/PaySchedule.js +34 -32
  99. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  100. package/dist/components/Company/PaySchedule/_parts/Actions.js +3 -2
  101. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/_parts/Edit.js +3 -2
  103. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -7
  105. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  106. package/dist/components/Company/PaySchedule/_parts/List.js +6 -6
  107. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  108. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  109. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  110. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  111. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  112. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  113. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  114. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  115. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  116. package/dist/components/Contractor/Address/Address.js +6 -3
  117. package/dist/components/Contractor/Address/Address.js.map +1 -1
  118. package/dist/components/Contractor/Address/Form.js +9 -6
  119. package/dist/components/Contractor/Address/Form.js.map +1 -1
  120. package/dist/components/Contractor/Address/useAddress.js +1 -1
  121. package/dist/components/Contractor/ContractorList/index.js +57 -55
  122. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  123. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -1
  124. package/dist/components/Contractor/ContractorList/useContractorList.js +7 -6
  125. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  126. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +12 -10
  127. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  128. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +4 -2
  129. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  130. package/dist/components/Contractor/Profile/useContractorProfile.js +1 -1
  131. package/dist/components/Contractor/Submit/Submit.js +20 -19
  132. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  133. package/dist/components/Employee/Compensation/Actions.js +13 -12
  134. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  135. package/dist/components/Employee/Compensation/Compensation.js +144 -147
  136. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  137. package/dist/components/Employee/Compensation/Edit.js +27 -26
  138. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  139. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +4 -4
  140. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +6 -6
  141. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +20 -19
  142. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  143. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +3 -2
  144. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  145. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -7
  146. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  147. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  148. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  149. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  150. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +12 -9
  151. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  152. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  153. package/dist/components/Employee/EmployeeList/Actions.js +7 -6
  154. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  155. package/dist/components/Employee/EmployeeList/EmployeeList.js +15 -12
  156. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  157. package/dist/components/Employee/EmployeeList/Head.js +3 -2
  158. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  159. package/dist/components/Employee/EmployeeList/List.js +43 -41
  160. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  161. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +3 -1
  162. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  163. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  164. package/dist/components/Employee/FederalTaxes/Actions.js +6 -5
  165. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  166. package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -4
  167. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  168. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +1 -1
  169. package/dist/components/Employee/Landing/Landing.js +3 -2
  170. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  171. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  172. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  173. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -2
  174. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  175. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +4 -4
  176. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +4 -2
  177. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  178. package/dist/components/Employee/PaymentMethod/Split.js +4 -4
  179. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  180. package/dist/components/Employee/Profile/Actions.js +6 -5
  181. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  182. package/dist/components/Employee/Profile/AdminPersonalDetails.js +7 -6
  183. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  184. package/dist/components/Employee/Profile/HomeAddress.js +6 -4
  185. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  186. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +31 -28
  187. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  188. package/dist/components/Employee/Profile/useProfile.js +1 -1
  189. package/dist/components/Employee/StateTaxes/Actions.js +6 -5
  190. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  191. package/dist/components/Employee/StateTaxes/useStateTaxes.js +1 -1
  192. package/dist/components/Employee/Taxes/Actions.js +7 -6
  193. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  194. package/dist/components/Employee/Taxes/FederalForm.js +5 -4
  195. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  196. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  197. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +6 -0
  198. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +32 -0
  199. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +1 -0
  200. package/dist/components/Payroll/PayrollBlocker/{PayrollBlockerAlerts.d.ts → components/PayrollBlockerAlerts.d.ts} +1 -1
  201. package/dist/components/Payroll/PayrollBlocker/{PayrollBlockerAlerts.js → components/PayrollBlockerAlerts.js} +18 -17
  202. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -0
  203. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +41 -0
  204. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -0
  205. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.module.scss.js +8 -0
  206. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.module.scss.js.map +1 -0
  207. package/dist/components/Payroll/PayrollBlocker/index.d.ts +3 -1
  208. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +129 -67
  209. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  210. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +6 -1
  211. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +85 -71
  212. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  213. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +21 -20
  214. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  215. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +47 -46
  216. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  217. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  218. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +32 -26
  219. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  220. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +1 -0
  221. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +72 -48
  222. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  223. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +21 -20
  224. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  225. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +15 -15
  226. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  227. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +1 -1
  228. package/dist/components/Payroll/PayrollList/PayrollList.js +65 -24
  229. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  230. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +13 -1
  231. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +153 -50
  232. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  233. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +10 -0
  234. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -0
  235. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +98 -74
  236. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  237. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +73 -72
  238. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  239. package/dist/components/Payroll/helpers.d.ts +2 -0
  240. package/dist/components/Payroll/helpers.js +38 -37
  241. package/dist/components/Payroll/helpers.js.map +1 -1
  242. package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
  243. package/dist/components/Payroll/usePreparedPayrollData.js +25 -19
  244. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  245. package/dist/components/index.d.ts +1 -1
  246. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  247. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  248. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +9 -9
  249. package/dist/i18n/en/Payroll.PayrollHistory.json.js +9 -9
  250. package/dist/i18n/en/Payroll.PayrollList.json.js +24 -14
  251. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  252. package/dist/i18n/en/Payroll.PayrollOverview.json.js +16 -16
  253. package/dist/index.js +1 -1
  254. package/dist/shared/constants.d.ts +6 -0
  255. package/dist/shared/constants.js +11 -8
  256. package/dist/shared/constants.js.map +1 -1
  257. package/dist/style.css +1 -1
  258. package/dist/types/i18next.d.ts +15 -1
  259. package/package.json +14 -14
  260. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js.map +0 -1
  261. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +0 -23
  262. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +0 -6
  263. /package/dist/components/Payroll/PayrollBlocker/{PayrollBlockerList.d.ts → components/PayrollBlockerList.d.ts} +0 -0
@@ -2,8 +2,10 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import "classnames";
4
4
  import { SIGNATORY_TITLES as s } from "../../../shared/constants.js";
5
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import "react";
5
7
  import { SelectField as a } from "../../Common/Fields/SelectField/SelectField.js";
6
- const S = () => {
8
+ const f = () => {
7
9
  const { t } = l("Company.AssignSignatory"), e = Object.entries(s).map(([i, o]) => ({
8
10
  value: i,
9
11
  label: t(`signatoryTitles.${o}`, { ns: "common" })
@@ -20,7 +22,7 @@ const S = () => {
20
22
  );
21
23
  };
22
24
  export {
23
- S as TitleSelect,
24
- S as default
25
+ f as TitleSelect,
26
+ f as default
25
27
  };
26
28
  //# sourceMappingURL=TitleSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSelect.js","sources":["../../../../src/components/Company/AssignSignatory/TitleSelect.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SelectField } from '@/components/Common'\nimport { SIGNATORY_TITLES } from '@/shared/constants'\n\nexport const TitleSelect = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n\n const titleOptions = Object.entries(SIGNATORY_TITLES).map(([key, value]) => ({\n value: key,\n label: t(`signatoryTitles.${value}`, { ns: 'common' }),\n }))\n\n return (\n <SelectField\n name=\"title\"\n label={t('signatoryDetails.titleSelect.label')}\n isRequired\n options={titleOptions}\n errorMessage={t('validations.title')}\n />\n )\n}\n\nexport default TitleSelect\n"],"names":["TitleSelect","useTranslation","titleOptions","SIGNATORY_TITLES","key","value","jsx","SelectField"],"mappings":";;;;;AAIO,MAAMA,IAAc,MAAM;AAC/B,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAEhDC,IAAe,OAAO,QAAQC,CAAgB,EAAE,IAAI,CAAC,CAACC,GAAKC,CAAK,OAAO;AAAA,IAC3E,OAAOD;AAAA,IACP,OAAO,EAAE,mBAAmBC,CAAK,IAAI,EAAE,IAAI,UAAU;AAAA,EAAA,EACrD;AAEF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO,EAAE,oCAAoC;AAAA,MAC7C,YAAU;AAAA,MACV,SAASL;AAAA,MACT,cAAc,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA;AAGzC;"}
1
+ {"version":3,"file":"TitleSelect.js","sources":["../../../../src/components/Company/AssignSignatory/TitleSelect.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SelectField } from '@/components/Common'\nimport { SIGNATORY_TITLES } from '@/shared/constants'\n\nexport const TitleSelect = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n\n const titleOptions = Object.entries(SIGNATORY_TITLES).map(([key, value]) => ({\n value: key,\n label: t(`signatoryTitles.${value}`, { ns: 'common' }),\n }))\n\n return (\n <SelectField\n name=\"title\"\n label={t('signatoryDetails.titleSelect.label')}\n isRequired\n options={titleOptions}\n errorMessage={t('validations.title')}\n />\n )\n}\n\nexport default TitleSelect\n"],"names":["TitleSelect","useTranslation","titleOptions","SIGNATORY_TITLES","key","value","jsx","SelectField"],"mappings":";;;;;;;AAIO,MAAMA,IAAc,MAAM;AAC/B,QAAM,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAEhDC,IAAe,OAAO,QAAQC,CAAgB,EAAE,IAAI,CAAC,CAACC,GAAKC,CAAK,OAAO;AAAA,IAC3E,OAAOD;AAAA,IACP,OAAO,EAAE,mBAAmBC,CAAK,IAAI,EAAE,IAAI,UAAU;AAAA,EAAA,EACrD;AAEF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO,EAAE,oCAAoC;AAAA,MAC7C,YAAU;AAAA,MACV,SAASL;AAAA,MACT,cAAc,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA;AAGzC;"}
@@ -9,9 +9,9 @@ import "@tanstack/react-query";
9
9
  import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
11
  import "classnames";
12
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import "dompurify";
13
14
  import "../../../contexts/LocaleProvider/useLocale.js";
14
- import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
15
  import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
17
17
  const x = {
@@ -1,13 +1,14 @@
1
1
  import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
- import { useTranslation as s } from "react-i18next";
3
- import { useBankAccountForm as m } from "./context.js";
2
+ import { useTranslation as m } from "react-i18next";
3
+ import { useBankAccountForm as s } from "./context.js";
4
4
  import "classnames";
5
5
  import { componentEvents as a } from "../../../../shared/constants.js";
6
- import { ActionsLayout as u } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as p } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function b() {
9
- const { t } = s("Company.BankAccount"), { isPending: i, isEditing: r, onEvent: c } = m(), n = p();
10
- return /* @__PURE__ */ e(u, { children: [
6
+ import { ActionsLayout as p } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
+ import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import "react";
9
+ function k() {
10
+ const { t } = m("Company.BankAccount"), { isPending: i, isEditing: r, onEvent: c } = s(), n = u();
11
+ return /* @__PURE__ */ e(p, { children: [
11
12
  r && /* @__PURE__ */ o(
12
13
  n.Button,
13
14
  {
@@ -23,6 +24,6 @@ function b() {
23
24
  ] });
24
25
  }
25
26
  export {
26
- b as Actions
27
+ k as Actions
27
28
  };
28
29
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, isEditing, onEvent } = useBankAccountForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {isEditing && (\n <Components.Button\n type=\"button\"\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CANCEL)\n }}\n >\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"bank-account-submit\">\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","isEditing","onEvent","useBankAccountForm","Components","useComponentContext","ActionsLayout","jsx","componentEvents"],"mappings":";;;;;;;AAMO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA,GACpCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAL,KACC,gBAAAM;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAQM,EAAgB,2BAA2B;AAAA,QACrD;AAAA,QAEC,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAGlB,gBAAAD,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWJ,GAAW,eAAY,uBAChE,UAAA,EAAE,aAAa,EAAA,CAClB;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, isEditing, onEvent } = useBankAccountForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {isEditing && (\n <Components.Button\n type=\"button\"\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CANCEL)\n }}\n >\n {t('cancelCta')}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"bank-account-submit\">\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","isEditing","onEvent","useBankAccountForm","Components","useComponentContext","ActionsLayout","jsx","componentEvents"],"mappings":";;;;;;;;AAMO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA,GACpCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAL,KACC,gBAAAM;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAQM,EAAgB,2BAA2B;AAAA,QACrD;AAAA,QAEC,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAGlB,gBAAAD,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWJ,GAAW,eAAY,uBAChE,UAAA,EAAE,aAAa,EAAA,CAClB;AAAA,EAAA,GACF;AAEJ;"}
@@ -6,11 +6,13 @@ import { Flex as a } from "../../../Common/Flex/Flex.js";
6
6
  import "classnames";
7
7
  import "../../../../shared/constants.js";
8
8
  import { TextInputField as e } from "../../../Common/Fields/TextInputField/TextInputField.js";
9
- const g = i.object({
9
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import "react";
11
+ const F = i.object({
10
12
  routingNumber: u,
11
13
  accountNumber: n
12
14
  });
13
- function x() {
15
+ function j() {
14
16
  const { t: r } = m("Company.BankAccount");
15
17
  return /* @__PURE__ */ t(a, { flexDirection: "column", gap: 20, children: [
16
18
  /* @__PURE__ */ o(
@@ -35,7 +37,7 @@ function x() {
35
37
  ] });
36
38
  }
37
39
  export {
38
- g as BankAccountFormSchema,
39
- x as Form
40
+ F as BankAccountFormSchema,
41
+ j as Form
40
42
  };
41
43
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":";;;;;;;;AAKO,MAAMA,IAAwBC,EAAE,OAAO;AAAA,EAC5C,eAAeC;AAAA,EACf,eAAeC;AACjB,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,IAE7C,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,yBAAyB;AAAA,QAClC,YAAU;AAAA,QACV,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7C,GACF;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":";;;;;;;;;;AAKO,MAAMA,IAAwBC,EAAE,OAAO;AAAA,EAC5C,eAAeC;AAAA,EACf,eAAeC;AACjB,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,IAE7C,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,yBAAyB;AAAA,QAClC,YAAU;AAAA,QACV,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7C,GACF;AAEJ;"}
@@ -9,9 +9,9 @@ import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
11
  import "classnames";
12
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
15
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
17
17
  const [s, F] = o("BankAccountContext");
@@ -5,7 +5,8 @@ import "classnames";
5
5
  import "../../../../shared/constants.js";
6
6
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
7
  import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function k() {
8
+ import "react";
9
+ function A() {
9
10
  const { handleContinue: r, handleChange: c } = a(), { t: n } = e("Company.BankAccount"), o = s();
10
11
  return /* @__PURE__ */ i(m, { children: [
11
12
  /* @__PURE__ */ t(o.Button, { variant: "secondary", onClick: c, children: n("changeBankAccountCta") }),
@@ -13,6 +14,6 @@ function k() {
13
14
  ] });
14
15
  }
15
16
  export {
16
- k as Actions
17
+ A as Actions
17
18
  };
18
19
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccount } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { handleContinue, handleChange } = useBankAccount()\n const { t } = useTranslation('Company.BankAccount')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleChange}>\n {t('changeBankAccountCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleContinue","handleChange","useBankAccount","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,gBAAAC,GAAgB,cAAAC,EAAA,IAAiBC,EAAA,GACnC,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASJ,GAC7C,UAAAE,EAAE,sBAAsB,EAAA,CAC3B;AAAA,IACA,gBAAAK,EAACH,EAAW,QAAX,EAAkB,SAASL,GAAiB,UAAAG,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccount } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { handleContinue, handleChange } = useBankAccount()\n const { t } = useTranslation('Company.BankAccount')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleChange}>\n {t('changeBankAccountCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","handleContinue","handleChange","useBankAccount","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,gBAAAC,GAAgB,cAAAC,EAAA,IAAiBC,EAAA,GACnC,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASJ,GAC7C,UAAAE,EAAE,sBAAsB,EAAA,CAC3B;AAAA,IACA,gBAAAK,EAACH,EAAW,QAAX,EAAkB,SAASL,GAAiB,UAAAG,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
@@ -1,19 +1,20 @@
1
- import { jsxs as r, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as i } from "react/jsx-runtime";
2
2
  import { useTranslation as c } from "react-i18next";
3
3
  import { useBankAccountVerify as e } from "./context.js";
4
4
  import "classnames";
5
5
  import "../../../../shared/constants.js";
6
6
  import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
7
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function k() {
9
- const { t } = c("Company.BankAccount"), { isPending: n, handleCancel: a } = e(), o = m();
10
- return /* @__PURE__ */ r(s, { children: [
8
+ import "react";
9
+ function b() {
10
+ const { t } = c("Company.BankAccount"), { isPending: n, handleCancel: r } = e(), o = m();
11
+ return /* @__PURE__ */ a(s, { children: [
11
12
  /* @__PURE__ */ i(
12
13
  o.Button,
13
14
  {
14
15
  variant: "secondary",
15
16
  isLoading: n,
16
- onClick: a,
17
+ onClick: r,
17
18
  "data-testid": "bank-account-verify-cancel",
18
19
  children: t("cancelCta")
19
20
  }
@@ -30,6 +31,6 @@ function k() {
30
31
  ] });
31
32
  }
32
33
  export {
33
- k as Actions
34
+ b as Actions
34
35
  };
35
36
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountVerify } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, handleCancel } = useBankAccountVerify()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n isLoading={isPending}\n onClick={handleCancel}\n data-testid=\"bank-account-verify-cancel\"\n >\n {t('cancelCta')}\n </Components.Button>\n <Components.Button\n type=\"submit\"\n isLoading={isPending}\n data-testid=\"bank-account-verify-submit\"\n >\n {t('verifyCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,cAAAC,EAAA,IAAiBC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,WAAWH;AAAA,QACX,SAASC;AAAA,QACT,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAEhB,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,WAAWH;AAAA,QACX,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountVerify } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, handleCancel } = useBankAccountVerify()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n isLoading={isPending}\n onClick={handleCancel}\n data-testid=\"bank-account-verify-cancel\"\n >\n {t('cancelCta')}\n </Components.Button>\n <Components.Button\n type=\"submit\"\n isLoading={isPending}\n data-testid=\"bank-account-verify-submit\"\n >\n {t('verifyCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,cAAAC,EAAA,IAAiBC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,WAAWH;AAAA,QACX,SAASC;AAAA,QACT,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,IAEhB,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,WAAWH;AAAA,QACX,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
@@ -5,11 +5,13 @@ import { Flex as s } from "../../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
6
  import "../../../../shared/constants.js";
7
7
  import { NumberInputField as i } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
8
- const f = o.object({
8
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import "react";
10
+ const x = o.object({
9
11
  deposit1: o.number().min(0),
10
12
  deposit2: o.number().min(0)
11
13
  });
12
- function b() {
14
+ function y() {
13
15
  const { t: e } = n("Company.BankAccount");
14
16
  return /* @__PURE__ */ t(s, { flexDirection: "column", gap: 20, children: [
15
17
  /* @__PURE__ */ r(
@@ -37,7 +39,7 @@ function b() {
37
39
  ] });
38
40
  }
39
41
  export {
40
- f as BankAccountVerifySchema,
41
- b as Form
42
+ x as BankAccountVerifySchema,
43
+ y as Form
42
44
  };
43
45
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Flex, NumberInputField } from '@/components/Common'\n\nexport const BankAccountVerifySchema = z.object({\n deposit1: z.number().min(0),\n deposit2: z.number().min(0),\n})\n\nexport type BankAccountVerifyInputs = z.infer<typeof BankAccountVerifySchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"deposit1\"\n format=\"currency\"\n isRequired\n label={t('deposit1Label')}\n description={t('deposit1Description')}\n errorMessage={t('validations.deposit1')}\n />\n <NumberInputField\n name=\"deposit2\"\n format=\"currency\"\n label={t('deposit2Label')}\n description={t('deposit2Description')}\n isRequired\n errorMessage={t('validations.deposit2')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountVerifySchema","z","Form","t","useTranslation","jsxs","Flex","jsx","NumberInputField"],"mappings":";;;;;;;AAIO,MAAMA,IAA0BC,EAAE,OAAO;AAAA,EAC9C,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,UAAUA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC5B,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,YAAU;AAAA,QACV,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,IAExC,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Flex, NumberInputField } from '@/components/Common'\n\nexport const BankAccountVerifySchema = z.object({\n deposit1: z.number().min(0),\n deposit2: z.number().min(0),\n})\n\nexport type BankAccountVerifyInputs = z.infer<typeof BankAccountVerifySchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"deposit1\"\n format=\"currency\"\n isRequired\n label={t('deposit1Label')}\n description={t('deposit1Description')}\n errorMessage={t('validations.deposit1')}\n />\n <NumberInputField\n name=\"deposit2\"\n format=\"currency\"\n label={t('deposit2Label')}\n description={t('deposit2Description')}\n isRequired\n errorMessage={t('validations.deposit2')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountVerifySchema","z","Form","t","useTranslation","jsxs","Flex","jsx","NumberInputField"],"mappings":";;;;;;;;;AAIO,MAAMA,IAA0BC,EAAE,OAAO;AAAA,EAC9C,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,UAAUA,EAAE,OAAA,EAAS,IAAI,CAAC;AAC5B,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,YAAU;AAAA,QACV,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,IAExC,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
@@ -5,11 +5,12 @@ import "classnames";
5
5
  import "../../../../shared/constants.js";
6
6
  import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
7
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function h({ continueCtaLabel: t }) {
8
+ import "react";
9
+ function x({ continueCtaLabel: t }) {
9
10
  const { t: n } = m("Company.DocumentList"), { handleContinue: i } = e(), r = c();
10
11
  return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(r.Button, { onClick: i, children: t || n("continueCta") }) });
11
12
  }
12
13
  export {
13
- h as Actions
14
+ x as Actions
14
15
  };
15
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AASO,SAASA,EAAQ,EAAE,kBAAAC,KAAkC;AAC1D,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,gBAAAC,EAAA,IAAmBC,EAAA,GACrBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASF,GACzB,UAAAH,KAAoBC,EAAE,aAAa,EAAA,CACtC,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AASO,SAASA,EAAQ,EAAE,kBAAAC,KAAkC;AAC1D,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,gBAAAC,EAAA,IAAmBC,EAAA,GACrBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASF,GACzB,UAAAH,KAAoBC,EAAE,aAAa,EAAA,CACtC,GACF;AAEJ;"}
@@ -11,11 +11,14 @@ import { BaseComponent as R } from "../../../Base/Base.js";
11
11
  import { useBase as A } from "../../../Base/useBase.js";
12
12
  import { Flex as E } from "../../../Common/Flex/Flex.js";
13
13
  import "classnames";
14
- import { companyEvents as e } from "../../../../shared/constants.js";
15
- function J(n) {
14
+ import { companyEvents as i } from "../../../../shared/constants.js";
15
+ import "react-i18next";
16
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
17
+ import "react";
18
+ function X(n) {
16
19
  return /* @__PURE__ */ o(R, { ...n, children: /* @__PURE__ */ o(N, { ...n, children: n.children }) });
17
20
  }
18
- function N({ companyId: n, signatoryId: i, className: s, children: m, dictionary: a }) {
21
+ function N({ companyId: n, signatoryId: e, className: s, children: m, dictionary: a }) {
19
22
  D("Company.DocumentList", a), M("Company.DocumentList");
20
23
  const { onEvent: t } = A(), {
21
24
  data: { formList: c },
@@ -26,7 +29,7 @@ function N({ companyId: n, signatoryId: i, className: s, children: m, dictionary
26
29
  data: { signatoryList: l }
27
30
  } = C({
28
31
  companyUuid: n
29
- }), r = l[0], f = !!i && r?.uuid === i;
32
+ }), r = l[0], f = !!e && r?.uuid === e;
30
33
  return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
31
34
  _,
32
35
  {
@@ -34,13 +37,13 @@ function N({ companyId: n, signatoryId: i, className: s, children: m, dictionary
34
37
  companyForms: p,
35
38
  documentListError: u,
36
39
  handleRequestFormToSign: (d) => {
37
- t(e.COMPANY_VIEW_FORM_TO_SIGN, d);
40
+ t(i.COMPANY_VIEW_FORM_TO_SIGN, d);
38
41
  },
39
42
  handleChangeSignatory: () => {
40
- t(e.COMPANY_FORM_EDIT_SIGNATORY, r);
43
+ t(i.COMPANY_FORM_EDIT_SIGNATORY, r);
41
44
  },
42
45
  handleContinue: () => {
43
- t(e.COMPANY_FORMS_DONE);
46
+ t(i.COMPANY_FORMS_DONE);
44
47
  },
45
48
  isSelfSignatory: f,
46
49
  signatory: r
@@ -55,6 +58,6 @@ function N({ companyId: n, signatoryId: i, className: s, children: m, dictionary
55
58
  ) });
56
59
  }
57
60
  export {
58
- J as DocumentList
61
+ X as DocumentList
59
62
  };
60
63
  //# sourceMappingURL=DocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGetAllSuspense } from '@gusto/embedded-api/react-query/companyFormsGetAll'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { ManageSignatories } from './ManageSignatories'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children, dictionary }: DocumentListProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","dictionary","useComponentDictionary","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":";;;;;;;;;;;;;;AAmBO,SAASA,EAAaC,GAA0B;AACrD,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,aAAAC,GAAa,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAC5F,EAAAC,EAAuB,wBAAwBD,CAAU,GACzDE,EAAQ,sBAAsB;AAC9B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,IACR,OAAOC;AAAA,EAAA,IACLC,EAA8B;AAAA,IAChC,WAAAX;AAAA,EAAA,CACD,GACKY,IAAeH,GAEf;AAAA,IACJ,MAAM,EAAE,eAAAI,EAAA;AAAA,EAAc,IACpBC,EAA2B;AAAA,IAC7B,aAAad;AAAA,EAAA,CACd,GAKKe,IAJcF,EAIU,CAAC,GACzBG,IAAkB,CAAC,CAACf,KAAec,GAAW,SAASd;AAc7D,SACE,gBAAAJ,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAAL;AAAA,QACA,mBAAAF;AAAA,QACA,yBAlBwB,CAACQ,MAAqB;AACpD,UAAAX,EAAQY,EAAc,2BAA2BD,CAAI;AAAA,QACvD;AAAA,QAiBQ,uBAfsB,MAAM;AAClC,UAAAX,EAAQY,EAAc,6BAA6BJ,CAAS;AAAA,QAC9D;AAAA,QAcQ,gBAZe,MAAM;AAC3B,UAAAR,EAAQY,EAAc,kBAAkB;AAAA,QAC1C;AAAA,QAWQ,iBAAAH;AAAA,QACA,WAAAD;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAlB,EAACuB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAjB,KAGC,gBAAAkB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAzB,EAAC0B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAkB;AAAA,0BAClBC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGetAllSuspense } from '@gusto/embedded-api/react-query/companyFormsGetAll'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { ManageSignatories } from './ManageSignatories'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children, dictionary }: DocumentListProps) {\n useComponentDictionary('Company.DocumentList', dictionary)\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","dictionary","useComponentDictionary","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,SAASA,EAAaC,GAA0B;AACrD,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,aAAAC,GAAa,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAC5F,EAAAC,EAAuB,wBAAwBD,CAAU,GACzDE,EAAQ,sBAAsB;AAC9B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,IACR,OAAOC;AAAA,EAAA,IACLC,EAA8B;AAAA,IAChC,WAAAX;AAAA,EAAA,CACD,GACKY,IAAeH,GAEf;AAAA,IACJ,MAAM,EAAE,eAAAI,EAAA;AAAA,EAAc,IACpBC,EAA2B;AAAA,IAC7B,aAAad;AAAA,EAAA,CACd,GAKKe,IAJcF,EAIU,CAAC,GACzBG,IAAkB,CAAC,CAACf,KAAec,GAAW,SAASd;AAc7D,SACE,gBAAAJ,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAAL;AAAA,QACA,mBAAAF;AAAA,QACA,yBAlBwB,CAACQ,MAAqB;AACpD,UAAAX,EAAQY,EAAc,2BAA2BD,CAAI;AAAA,QACvD;AAAA,QAiBQ,uBAfsB,MAAM;AAClC,UAAAX,EAAQY,EAAc,6BAA6BJ,CAAS;AAAA,QAC9D;AAAA,QAcQ,gBAZe,MAAM;AAC3B,UAAAR,EAAQY,EAAc,kBAAkB;AAAA,QAC1C;AAAA,QAWQ,iBAAAH;AAAA,QACA,WAAAD;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAlB,EAACuB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAjB,KAGC,gBAAAkB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAzB,EAAC0B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAkB;AAAA,0BAClBC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -9,9 +9,9 @@ import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
11
  import "classnames";
12
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
15
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
16
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
17
17
  const [f, v] = t(
@@ -14,20 +14,23 @@ import { SignatureForm as v } from "../../../Common/SignatureForm/SignatureForm.
14
14
  import { Flex as G } from "../../../Common/Flex/Flex.js";
15
15
  import "classnames";
16
16
  import { companyEvents as t } from "../../../../shared/constants.js";
17
- function W(r) {
17
+ import "react-i18next";
18
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
19
+ import "react";
20
+ function oo(r) {
18
21
  return /* @__PURE__ */ o(x, { ...r, children: /* @__PURE__ */ o(R, { ...r, children: r.children }) });
19
22
  }
20
- function R({ formId: r, children: e, dictionary: i }) {
23
+ function R({ formId: r, children: m, dictionary: i }) {
21
24
  O("Company.SignatureForm", i), b("Company.SignatureForm");
22
25
  const { onEvent: n, baseSubmitHandler: a } = A(), {
23
26
  data: { form: s }
24
27
  } = C({
25
28
  formId: r
26
- }), u = s, { isPending: c, mutateAsync: f } = h(), {
27
- data: { formPdf: p }
29
+ }), u = s, { isPending: c, mutateAsync: p } = h(), {
30
+ data: { formPdf: f }
28
31
  } = y({
29
32
  formId: r
30
- }), l = p.documentUrl;
33
+ }), l = f.documentUrl;
31
34
  return /* @__PURE__ */ o(
32
35
  M,
33
36
  {
@@ -40,19 +43,19 @@ function R({ formId: r, children: e, dictionary: i }) {
40
43
  }
41
44
  },
42
45
  children: /* @__PURE__ */ o(v, { onSubmit: async (d) => {
43
- await a(d, async (m) => {
44
- const F = await f({
46
+ await a(d, async (e) => {
47
+ const F = await p({
45
48
  request: {
46
49
  formId: r,
47
50
  requestBody: {
48
- signatureText: m.signature,
49
- agree: m.confirmSignature
51
+ signatureText: e.signature,
52
+ agree: e.confirmSignature
50
53
  }
51
54
  }
52
55
  });
53
56
  n(t.COMPANY_SIGN_FORM, F.form), n(t.COMPANY_SIGN_FORM_DONE);
54
57
  });
55
- }, children: /* @__PURE__ */ o(G, { flexDirection: "column", gap: 32, children: e || /* @__PURE__ */ S(g, { children: [
58
+ }, children: /* @__PURE__ */ o(G, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ S(g, { children: [
56
59
  /* @__PURE__ */ o(N, {}),
57
60
  /* @__PURE__ */ o(P, {}),
58
61
  /* @__PURE__ */ o(_, {}),
@@ -63,6 +66,6 @@ function R({ formId: r, children: e, dictionary: i }) {
63
66
  }
64
67
  export {
65
68
  R as Root,
66
- W as SignatureForm
69
+ oo as SignatureForm
67
70
  };
68
71
  //# sourceMappingURL=SignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useCompanyFormsGetSuspense } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport { useCompanyFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { Head } from './Head'\nimport { Preview } from './Preview'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport {\n SignatureForm as SharedSignatureForm,\n type SignatureFormInputs,\n} from '@/components/Common/SignatureForm'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface SignatureFormProps extends BaseComponentInterface<'Company.SignatureForm'> {\n formId: string\n companyId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport function Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { form: formNullable },\n } = useCompanyFormsGetSuspense({\n formId,\n })\n const form = formNullable!\n\n const { isPending, mutateAsync: signForm } = useCompanyFormsSignMutation()\n\n const {\n data: { formPdf },\n } = useCompanyFormsGetPdfSuspense({\n formId,\n })\n const pdfUrl = formPdf!.documentUrl!\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const signFormResponse = await signForm({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n\n onEvent(companyEvents.COMPANY_SIGN_FORM, signFormResponse.form)\n\n onEvent(companyEvents.COMPANY_SIGN_FORM_DONE)\n })\n }\n\n const handleBack = () => {\n onEvent(companyEvents.COMPANY_SIGN_FORM_BACK)\n }\n\n return (\n <SignatureFormProvider\n value={{\n form,\n pdfUrl,\n isPending,\n onBack: handleBack,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","formNullable","useCompanyFormsGetSuspense","form","isPending","signForm","useCompanyFormsSignMutation","formPdf","useCompanyFormsGetPdfSuspense","pdfUrl","SignatureFormProvider","companyEvents","SharedSignatureForm","data","payload","signFormResponse","Flex","jsxs","Fragment","Head","Preview","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;AAwBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,SAASG,EAAK,EAAE,QAAAC,GAAQ,UAAAC,GAAU,YAAAC,KAAkC;AACzE,EAAAC,EAAuB,yBAAyBD,CAAU,GAC1DE,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC;AAAA,IACJ,MAAM,EAAE,MAAMC,EAAA;AAAA,EAAa,IACzBC,EAA2B;AAAA,IAC7B,QAAAT;AAAA,EAAA,CACD,GACKU,IAAOF,GAEP,EAAE,WAAAG,GAAW,aAAaC,EAAA,IAAaC,EAAA,GAEvC;AAAA,IACJ,MAAM,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACdC,EAA8B;AAAA,IAChC,QAAAf;AAAA,EAAA,CACD,GACKgB,IAASF,EAAS;AAwBxB,SACE,gBAAAjB;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,MAAAP;AAAA,QACA,QAAAM;AAAA,QACA,WAAAL;AAAA,QACA,QAVa,MAAM;AACvB,UAAAN,EAAQa,EAAc,sBAAsB;AAAA,QAC9C;AAAA,MAQc;AAAA,MAGV,UAAA,gBAAArB,EAACsB,GAAA,EAAoB,UA/BJ,OAAOC,MAA8B;AACxD,cAAMd,EAAkBc,GAAM,OAAMC,MAAW;AAC7C,gBAAMC,IAAmB,MAAMV,EAAS;AAAA,YACtC,SAAS;AAAA,cACP,QAAAZ;AAAA,cACA,aAAa;AAAA,gBACX,eAAeqB,EAAQ;AAAA,gBACvB,OAAOA,EAAQ;AAAA,cAAA;AAAA,YACjB;AAAA,UACF,CACD;AAED,UAAAhB,EAAQa,EAAc,mBAAmBI,EAAiB,IAAI,GAE9DjB,EAAQa,EAAc,sBAAsB;AAAA,QAC9C,CAAC;AAAA,MACH,GAgBM,UAAA,gBAAArB,EAAC0B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAtB,KAGC,gBAAAuB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA5B,EAAC6B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Company/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useCompanyFormsGetSuspense } from '@gusto/embedded-api/react-query/companyFormsGet'\nimport { useCompanyFormsSignMutation } from '@gusto/embedded-api/react-query/companyFormsSign'\nimport { useCompanyFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/companyFormsGetPdf'\nimport { Head } from './Head'\nimport { Preview } from './Preview'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport {\n SignatureForm as SharedSignatureForm,\n type SignatureFormInputs,\n} from '@/components/Common/SignatureForm'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface SignatureFormProps extends BaseComponentInterface<'Company.SignatureForm'> {\n formId: string\n companyId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nexport function Root({ formId, children, dictionary }: SignatureFormProps) {\n useComponentDictionary('Company.SignatureForm', dictionary)\n useI18n('Company.SignatureForm')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const {\n data: { form: formNullable },\n } = useCompanyFormsGetSuspense({\n formId,\n })\n const form = formNullable!\n\n const { isPending, mutateAsync: signForm } = useCompanyFormsSignMutation()\n\n const {\n data: { formPdf },\n } = useCompanyFormsGetPdfSuspense({\n formId,\n })\n const pdfUrl = formPdf!.documentUrl!\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const signFormResponse = await signForm({\n request: {\n formId,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n\n onEvent(companyEvents.COMPANY_SIGN_FORM, signFormResponse.form)\n\n onEvent(companyEvents.COMPANY_SIGN_FORM_DONE)\n })\n }\n\n const handleBack = () => {\n onEvent(companyEvents.COMPANY_SIGN_FORM_BACK)\n }\n\n return (\n <SignatureFormProvider\n value={{\n form,\n pdfUrl,\n isPending,\n onBack: handleBack,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","formId","children","dictionary","useComponentDictionary","useI18n","onEvent","baseSubmitHandler","useBase","formNullable","useCompanyFormsGetSuspense","form","isPending","signForm","useCompanyFormsSignMutation","formPdf","useCompanyFormsGetPdfSuspense","pdfUrl","SignatureFormProvider","companyEvents","SharedSignatureForm","data","payload","signFormResponse","Flex","jsxs","Fragment","Head","Preview","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBO,SAASA,GAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEO,SAASG,EAAK,EAAE,QAAAC,GAAQ,UAAAC,GAAU,YAAAC,KAAkC;AACzE,EAAAC,EAAuB,yBAAyBD,CAAU,GAC1DE,EAAQ,uBAAuB;AAC/B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC;AAAA,IACJ,MAAM,EAAE,MAAMC,EAAA;AAAA,EAAa,IACzBC,EAA2B;AAAA,IAC7B,QAAAT;AAAA,EAAA,CACD,GACKU,IAAOF,GAEP,EAAE,WAAAG,GAAW,aAAaC,EAAA,IAAaC,EAAA,GAEvC;AAAA,IACJ,MAAM,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACdC,EAA8B;AAAA,IAChC,QAAAf;AAAA,EAAA,CACD,GACKgB,IAASF,EAAS;AAwBxB,SACE,gBAAAjB;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,MAAAP;AAAA,QACA,QAAAM;AAAA,QACA,WAAAL;AAAA,QACA,QAVa,MAAM;AACvB,UAAAN,EAAQa,EAAc,sBAAsB;AAAA,QAC9C;AAAA,MAQc;AAAA,MAGV,UAAA,gBAAArB,EAACsB,GAAA,EAAoB,UA/BJ,OAAOC,MAA8B;AACxD,cAAMd,EAAkBc,GAAM,OAAMC,MAAW;AAC7C,gBAAMC,IAAmB,MAAMV,EAAS;AAAA,YACtC,SAAS;AAAA,cACP,QAAAZ;AAAA,cACA,aAAa;AAAA,gBACX,eAAeqB,EAAQ;AAAA,gBACvB,OAAOA,EAAQ;AAAA,cAAA;AAAA,YACjB;AAAA,UACF,CACD;AAED,UAAAhB,EAAQa,EAAc,mBAAmBI,EAAiB,IAAI,GAE9DjB,EAAQa,EAAc,sBAAsB;AAAA,QAC9C,CAAC;AAAA,MACH,GAgBM,UAAA,gBAAArB,EAAC0B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAtB,KAGC,gBAAAuB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA5B,EAAC6B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -9,9 +9,9 @@ import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
11
  import "classnames";
12
+ import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
- import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
15
  import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
17
17
  const [s, f] = o(
@@ -3,13 +3,14 @@ import { useTranslation as e } from "react-i18next";
3
3
  import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
4
  import "classnames";
5
5
  import "../../../shared/constants.js";
6
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
7
- import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const x = () => {
9
- const { t } = e("Company.FederalTaxes"), { isPending: n } = i(), r = m();
10
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(r.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
6
+ import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
7
+ import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import "react";
9
+ const C = () => {
10
+ const { t } = e("Company.FederalTaxes"), { isPending: n } = i(), r = s();
11
+ return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(r.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
11
12
  };
12
13
  export {
13
- x as Actions
14
+ C as Actions
14
15
  };
15
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
@@ -14,12 +14,15 @@ import { useBase as O } from "../../Base/useBase.js";
14
14
  import { Flex as j } from "../../Common/Flex/Flex.js";
15
15
  import "classnames";
16
16
  import { companyEvents as l } from "../../../shared/constants.js";
17
- function V(a) {
18
- return /* @__PURE__ */ e(B, { ...a, children: /* @__PURE__ */ e(q, { ...a, children: a.children }) });
17
+ import "react-i18next";
18
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
19
+ import "react";
20
+ function oe(o) {
21
+ return /* @__PURE__ */ e(B, { ...o, children: /* @__PURE__ */ e(q, { ...o, children: o.children }) });
19
22
  }
20
- function q({ companyId: a, children: t, className: s, defaultValues: i, dictionary: d }) {
23
+ function q({ companyId: o, children: t, className: s, defaultValues: i, dictionary: d }) {
21
24
  R("Company.FederalTaxes"), M("Company.FederalTaxes", d);
22
- const { onEvent: m, baseSubmitHandler: f } = O(), { data: c } = h({ companyId: a }), r = c.federalTaxDetails, { mutateAsync: p, isPending: F } = D(), n = E({
25
+ const { onEvent: m, baseSubmitHandler: f } = O(), { data: p } = h({ companyId: o }), r = p.federalTaxDetails, { mutateAsync: c, isPending: F } = D(), n = E({
23
26
  resolver: v(A),
24
27
  defaultValues: {
25
28
  federalEin: r.hasEin ? void 0 : "",
@@ -28,15 +31,15 @@ function q({ companyId: a, children: t, className: s, defaultValues: i, dictiona
28
31
  legalName: r.legalName ?? i?.legalName
29
32
  }
30
33
  }), x = async (u) => {
31
- await f(u, async (o) => {
32
- const T = await p({
34
+ await f(u, async (a) => {
35
+ const T = await c({
33
36
  request: {
34
- companyId: a,
37
+ companyId: o,
35
38
  requestBody: {
36
- ein: o.federalEin,
37
- taxPayerType: o.taxPayerType,
38
- filingForm: o.filingForm,
39
- legalName: o.legalName,
39
+ ein: a.federalEin,
40
+ taxPayerType: a.taxPayerType,
41
+ filingForm: a.filingForm,
42
+ legalName: a.legalName,
40
43
  version: r.version
41
44
  }
42
45
  }
@@ -63,6 +66,6 @@ function q({ companyId: a, children: t, className: s, defaultValues: i, dictiona
63
66
  ) });
64
67
  }
65
68
  export {
66
- V as FederalTaxes
69
+ oe as FederalTaxes
67
70
  };
68
71
  //# sourceMappingURL=FederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { useFederalTaxDetailsUpdateMutation } from '@gusto/embedded-api/react-query/federalTaxDetailsUpdate'\nimport { useFederalTaxDetailsGetSuspense } from '@gusto/embedded-api/react-query/federalTaxDetailsGet'\nimport type {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n FederalTaxesProvider,\n type FederalTaxFormInputs,\n FederalTaxFormSchema,\n type FederalTaxesDefaultValues,\n} from './useFederalTaxes'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Form } from '@/components/Company/FederalTaxes/Form'\nimport { Actions } from '@/components/Company/FederalTaxes/Actions'\nimport { Head } from '@/components/Company/FederalTaxes/Head'\nimport { useI18n } from '@/i18n'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Company.FederalTaxes'> {\n companyId: string\n defaultValues?: FederalTaxesDefaultValues\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, children, className, defaultValues, dictionary }: FederalTaxesProps) {\n useI18n('Company.FederalTaxes')\n useComponentDictionary('Company.FederalTaxes', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useFederalTaxDetailsGetSuspense({ companyId })\n const federalTaxDetails = data.federalTaxDetails!\n\n const { mutateAsync: updateFederalTaxDetails, isPending } = useFederalTaxDetailsUpdateMutation()\n\n const formMethods = useForm<FederalTaxFormInputs>({\n resolver: zodResolver(FederalTaxFormSchema),\n defaultValues: {\n federalEin: federalTaxDetails.hasEin ? undefined : '',\n taxPayerType: federalTaxDetails.taxPayerType\n ? (federalTaxDetails.taxPayerType as TaxPayerType)\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? (federalTaxDetails.filingForm as FilingForm)\n : defaultValues?.filingForm,\n legalName: federalTaxDetails.legalName ?? defaultValues?.legalName,\n },\n })\n\n const handleSubmit = async (data: FederalTaxFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const updateFederalTaxDetailsResponse = await updateFederalTaxDetails({\n request: {\n companyId: companyId,\n requestBody: {\n ein: payload.federalEin,\n taxPayerType: payload.taxPayerType as TaxPayerType | undefined,\n filingForm: payload.filingForm as FilingForm | undefined,\n legalName: payload.legalName,\n version: federalTaxDetails.version as string,\n },\n },\n })\n\n onEvent(\n companyEvents.COMPANY_FEDERAL_TAXES_UPDATED,\n updateFederalTaxDetailsResponse.federalTaxDetails,\n )\n onEvent(companyEvents.COMPANY_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n federalTaxDetails,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","companyId","children","className","defaultValues","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useFederalTaxDetailsGetSuspense","federalTaxDetails","updateFederalTaxDetails","isPending","useFederalTaxDetailsUpdateMutation","formMethods","useForm","zodResolver","FederalTaxFormSchema","handleSubmit","payload","updateFederalTaxDetailsResponse","companyEvents","FederalTaxesProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;AA+BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,YAAAC,KAAiC;AAC9F,EAAAC,EAAQ,sBAAsB,GAC9BC,EAAuB,wBAAwBF,CAAU;AACzD,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAA,GAEtDC,IAAcC,EAA8B;AAAA,IAChD,UAAUC,EAAYC,CAAoB;AAAA,IAC1C,eAAe;AAAA,MACb,YAAYP,EAAkB,SAAS,SAAY;AAAA,MACnD,cAAcA,EAAkB,eAC3BA,EAAkB,eACnBT,GAAe;AAAA,MACnB,YAAYS,EAAkB,aACzBA,EAAkB,aACnBT,GAAe;AAAA,MACnB,WAAWS,EAAkB,aAAaT,GAAe;AAAA,IAAA;AAAA,EAC3D,CACD,GAEKiB,IAAe,OAAOV,MAA+B;AACzD,UAAMF,EAAkBE,GAAM,OAAMW,MAAW;AAC7C,YAAMC,IAAkC,MAAMT,EAAwB;AAAA,QACpE,SAAS;AAAA,UACP,WAAAb;AAAA,UACA,aAAa;AAAA,YACX,KAAKqB,EAAQ;AAAA,YACb,cAAcA,EAAQ;AAAA,YACtB,YAAYA,EAAQ;AAAA,YACpB,WAAWA,EAAQ;AAAA,YACnB,SAAST,EAAkB;AAAA,UAAA;AAAA,QAC7B;AAAA,MACF,CACD;AAED,MAAAL;AAAA,QACEgB,EAAc;AAAA,QACdD,EAAgC;AAAA,MAAA,GAElCf,EAAQgB,EAAc,0BAA0B;AAAA,IAClD,CAAC;AAAA,EACH;AAEA,SACE,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MAAA;AAAA,MAGF,4BAACa,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAnB,EAAC6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAGC,gBAAA2B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { useFederalTaxDetailsUpdateMutation } from '@gusto/embedded-api/react-query/federalTaxDetailsUpdate'\nimport { useFederalTaxDetailsGetSuspense } from '@gusto/embedded-api/react-query/federalTaxDetailsGet'\nimport type {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n FederalTaxesProvider,\n type FederalTaxFormInputs,\n FederalTaxFormSchema,\n type FederalTaxesDefaultValues,\n} from './useFederalTaxes'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Form } from '@/components/Company/FederalTaxes/Form'\nimport { Actions } from '@/components/Company/FederalTaxes/Actions'\nimport { Head } from '@/components/Company/FederalTaxes/Head'\nimport { useI18n } from '@/i18n'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Company.FederalTaxes'> {\n companyId: string\n defaultValues?: FederalTaxesDefaultValues\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, children, className, defaultValues, dictionary }: FederalTaxesProps) {\n useI18n('Company.FederalTaxes')\n useComponentDictionary('Company.FederalTaxes', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useFederalTaxDetailsGetSuspense({ companyId })\n const federalTaxDetails = data.federalTaxDetails!\n\n const { mutateAsync: updateFederalTaxDetails, isPending } = useFederalTaxDetailsUpdateMutation()\n\n const formMethods = useForm<FederalTaxFormInputs>({\n resolver: zodResolver(FederalTaxFormSchema),\n defaultValues: {\n federalEin: federalTaxDetails.hasEin ? undefined : '',\n taxPayerType: federalTaxDetails.taxPayerType\n ? (federalTaxDetails.taxPayerType as TaxPayerType)\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? (federalTaxDetails.filingForm as FilingForm)\n : defaultValues?.filingForm,\n legalName: federalTaxDetails.legalName ?? defaultValues?.legalName,\n },\n })\n\n const handleSubmit = async (data: FederalTaxFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const updateFederalTaxDetailsResponse = await updateFederalTaxDetails({\n request: {\n companyId: companyId,\n requestBody: {\n ein: payload.federalEin,\n taxPayerType: payload.taxPayerType as TaxPayerType | undefined,\n filingForm: payload.filingForm as FilingForm | undefined,\n legalName: payload.legalName,\n version: federalTaxDetails.version as string,\n },\n },\n })\n\n onEvent(\n companyEvents.COMPANY_FEDERAL_TAXES_UPDATED,\n updateFederalTaxDetailsResponse.federalTaxDetails,\n )\n onEvent(companyEvents.COMPANY_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n federalTaxDetails,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","companyId","children","className","defaultValues","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useFederalTaxDetailsGetSuspense","federalTaxDetails","updateFederalTaxDetails","isPending","useFederalTaxDetailsUpdateMutation","formMethods","useForm","zodResolver","FederalTaxFormSchema","handleSubmit","payload","updateFederalTaxDetailsResponse","companyEvents","FederalTaxesProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;AA+BO,SAASA,GAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,YAAAC,KAAiC;AAC9F,EAAAC,EAAQ,sBAAsB,GAC9BC,EAAuB,wBAAwBF,CAAU;AACzD,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAA,GAEtDC,IAAcC,EAA8B;AAAA,IAChD,UAAUC,EAAYC,CAAoB;AAAA,IAC1C,eAAe;AAAA,MACb,YAAYP,EAAkB,SAAS,SAAY;AAAA,MACnD,cAAcA,EAAkB,eAC3BA,EAAkB,eACnBT,GAAe;AAAA,MACnB,YAAYS,EAAkB,aACzBA,EAAkB,aACnBT,GAAe;AAAA,MACnB,WAAWS,EAAkB,aAAaT,GAAe;AAAA,IAAA;AAAA,EAC3D,CACD,GAEKiB,IAAe,OAAOV,MAA+B;AACzD,UAAMF,EAAkBE,GAAM,OAAMW,MAAW;AAC7C,YAAMC,IAAkC,MAAMT,EAAwB;AAAA,QACpE,SAAS;AAAA,UACP,WAAAb;AAAA,UACA,aAAa;AAAA,YACX,KAAKqB,EAAQ;AAAA,YACb,cAAcA,EAAQ;AAAA,YACtB,YAAYA,EAAQ;AAAA,YACpB,WAAWA,EAAQ;AAAA,YACnB,SAAST,EAAkB;AAAA,UAAA;AAAA,QAC7B;AAAA,MACF,CACD;AAED,MAAAL;AAAA,QACEgB,EAAc;AAAA,QACdD,EAAgC;AAAA,MAAA,GAElCf,EAAQgB,EAAc,0BAA0B;AAAA,IAClD,CAAC;AAAA,EACH;AAEA,SACE,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MAAA;AAAA,MAGF,4BAACa,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAnB,EAAC6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAGC,gBAAA2B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}