@gusto/embedded-react-sdk 0.10.7 → 0.11.0-rc.1

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 (289) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/Base/Base.js +18 -19
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +20 -19
  5. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  6. package/dist/components/Common/ReorderableList/ReorderableItem.js +1 -1
  7. package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  9. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  11. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  13. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  14. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  15. package/dist/components/Common/UI/Button/Button.js +4 -4
  16. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  17. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +1 -1
  18. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +0 -5
  19. package/dist/components/Company/AssignSignatory/AssignSignatory.js +34 -39
  20. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  22. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.d.ts +0 -4
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +51 -54
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  29. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.d.ts +0 -4
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +40 -43
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  37. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  38. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  39. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  40. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/index.d.ts +0 -1
  42. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  43. package/dist/components/Company/BankAccount/BankAccount.d.ts +0 -5
  44. package/dist/components/Company/BankAccount/BankAccount.js +17 -23
  45. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  47. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  48. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.d.ts +0 -5
  49. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +28 -31
  50. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
  52. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  53. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  55. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.d.ts +0 -5
  57. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +25 -28
  58. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  60. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  61. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.d.ts +0 -5
  62. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +33 -36
  63. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  64. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  65. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  66. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  67. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  68. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +0 -6
  69. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +38 -44
  70. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  72. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +0 -4
  73. package/dist/components/Company/DocumentSigner/DocumentSigner.js +23 -26
  74. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -6
  76. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +41 -47
  77. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  78. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  79. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  80. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  81. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
  82. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  83. package/dist/components/Company/FederalTaxes/Form.js +2 -3
  84. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  85. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  86. package/dist/components/Company/Industry/Actions.js +5 -6
  87. package/dist/components/Company/Industry/Actions.js.map +1 -1
  88. package/dist/components/Company/Industry/Context.js +1 -1
  89. package/dist/components/Company/Industry/Edit.js +10 -11
  90. package/dist/components/Company/Industry/Edit.js.map +1 -1
  91. package/dist/components/Company/Industry/Industry.d.ts +0 -5
  92. package/dist/components/Company/Industry/Industry.js +23 -29
  93. package/dist/components/Company/Industry/Industry.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  95. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  97. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationForm/LocationForm.d.ts +0 -5
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js +43 -48
  100. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  102. package/dist/components/Company/Locations/Locations.d.ts +0 -4
  103. package/dist/components/Company/Locations/Locations.js +14 -18
  104. package/dist/components/Company/Locations/Locations.js.map +1 -1
  105. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  106. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  107. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  108. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  109. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +0 -5
  110. package/dist/components/Company/Locations/LocationsList/LocationsList.js +32 -37
  111. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  112. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  113. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  114. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  115. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
  116. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  117. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
  118. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  119. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  120. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +1 -7
  121. package/dist/components/Company/PaySchedule/PaySchedule.js +72 -78
  122. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  123. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  124. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  125. package/dist/components/Company/PaySchedule/_parts/Edit.js +25 -26
  126. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  127. package/dist/components/Company/PaySchedule/_parts/Head.js +2 -3
  128. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  129. package/dist/components/Company/PaySchedule/_parts/List.js +5 -6
  130. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  131. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  132. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +0 -4
  133. package/dist/components/Company/StateTaxes/StateTaxes.js +39 -22
  134. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  135. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +8 -6
  136. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +16 -15
  137. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  138. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  139. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.d.ts +0 -5
  141. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +44 -47
  142. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  143. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  145. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  147. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  148. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +0 -5
  149. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +26 -29
  150. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  151. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  152. package/dist/components/Company/StateTaxes/stateTaxesReducer.d.ts +20 -0
  153. package/dist/components/Company/StateTaxes/stateTaxesReducer.js +40 -0
  154. package/dist/components/Company/StateTaxes/stateTaxesReducer.js.map +1 -0
  155. package/dist/components/Contractor/Address/Address.d.ts +0 -5
  156. package/dist/components/Contractor/Address/Address.js +35 -40
  157. package/dist/components/Contractor/Address/Address.js.map +1 -1
  158. package/dist/components/Contractor/Address/Form.js +2 -3
  159. package/dist/components/Contractor/Address/Form.js.map +1 -1
  160. package/dist/components/Contractor/Address/useAddress.js +1 -1
  161. package/dist/components/Contractor/List/index.js +2 -3
  162. package/dist/components/Contractor/List/index.js.map +1 -1
  163. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  164. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  165. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  166. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  167. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  168. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  169. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  170. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  171. package/dist/components/Contractor/Profile/ContractorProfile.d.ts +11 -0
  172. package/dist/components/Contractor/Profile/ContractorProfile.js +24 -0
  173. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -0
  174. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +5 -0
  175. package/dist/components/Contractor/Profile/ContractorProfileForm.js +140 -0
  176. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -0
  177. package/dist/components/Contractor/Profile/index.d.ts +3 -0
  178. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +254 -0
  179. package/dist/components/Contractor/Profile/useContractorProfile.js +223 -0
  180. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -0
  181. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +6 -0
  182. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +27 -0
  183. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +1 -0
  184. package/dist/components/Contractor/Submit/SubmitDone.d.ts +5 -0
  185. package/dist/components/Contractor/Submit/SubmitDone.js +18 -0
  186. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -0
  187. package/dist/components/Contractor/Submit/index.d.ts +6 -0
  188. package/dist/components/Contractor/Submit/index.js +18 -0
  189. package/dist/components/Contractor/Submit/index.js.map +1 -0
  190. package/dist/components/Contractor/Submit/index.module.scss.js +8 -0
  191. package/dist/components/Contractor/Submit/index.module.scss.js.map +1 -0
  192. package/dist/components/Contractor/index.d.ts +2 -0
  193. package/dist/components/Contractor/index.js +10 -6
  194. package/dist/components/Contractor/index.js.map +1 -1
  195. package/dist/components/Employee/Compensation/Actions.js +4 -5
  196. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  197. package/dist/components/Employee/Compensation/Compensation.d.ts +0 -6
  198. package/dist/components/Employee/Compensation/Compensation.js +97 -102
  199. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  200. package/dist/components/Employee/Compensation/Edit.js +2 -3
  201. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  202. package/dist/components/Employee/Compensation/List.js +5 -6
  203. package/dist/components/Employee/Compensation/List.js.map +1 -1
  204. package/dist/components/Employee/Deductions/Actions.js +8 -9
  205. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  206. package/dist/components/Employee/Deductions/DeductionForm.js +2 -3
  207. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  208. package/dist/components/Employee/Deductions/DeductionsList.js +2 -3
  209. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  210. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +2 -3
  211. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  212. package/dist/components/Employee/Deductions/useDeductions.js +1 -1
  213. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  214. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  215. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.d.ts +0 -5
  216. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +25 -30
  217. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  218. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  219. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  220. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  221. package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +1 -7
  222. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +16 -20
  223. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  224. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -7
  225. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +40 -46
  226. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  227. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  228. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  229. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  230. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +0 -5
  231. package/dist/components/Employee/EmployeeList/EmployeeList.js +56 -61
  232. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  233. package/dist/components/Employee/EmployeeList/Head.js +2 -3
  234. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  235. package/dist/components/Employee/EmployeeList/List.js +2 -3
  236. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  237. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  238. package/dist/components/Employee/Landing/Landing.js +6 -7
  239. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  240. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  241. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  242. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
  243. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  244. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  245. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  246. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  247. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  248. package/dist/components/Employee/PaymentMethod/Split.js +2 -3
  249. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  250. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  251. package/dist/components/Employee/Profile/Actions.js +6 -7
  252. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  253. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +3 -3
  254. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  255. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  256. package/dist/components/Employee/Profile/HomeAddress.js +4 -5
  257. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  258. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  259. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  260. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  261. package/dist/components/Employee/Profile/Profile.d.ts +0 -8
  262. package/dist/components/Employee/Profile/Profile.js +131 -138
  263. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  264. package/dist/components/Employee/Profile/useProfile.js +1 -1
  265. package/dist/components/Employee/Taxes/Actions.js +7 -8
  266. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  267. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  268. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  269. package/dist/components/Employee/Taxes/Taxes.d.ts +0 -6
  270. package/dist/components/Employee/Taxes/Taxes.js +76 -81
  271. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  272. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  273. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  274. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  275. package/dist/i18n/I18n.js +1 -1
  276. package/dist/i18n/I18n.js.map +1 -1
  277. package/dist/i18n/en/Contractor.ContractorSubmit.json.js +22 -0
  278. package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +1 -0
  279. package/dist/i18n/en/Contractor.Profile.json.js +73 -0
  280. package/dist/i18n/en/Contractor.Profile.json.js.map +1 -0
  281. package/dist/shared/constants.d.ts +14 -0
  282. package/dist/shared/constants.js +33 -26
  283. package/dist/shared/constants.js.map +1 -1
  284. package/dist/style.css +1 -1
  285. package/dist/types/i18next.d.ts +77 -1
  286. package/package.json +3 -3
  287. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +0 -5
  288. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +0 -48
  289. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +0 -1
@@ -1,73 +1,67 @@
1
- import { jsx as o, jsxs as P, Fragment as N } from "react/jsx-runtime";
2
- import { useCompanyFormsGetSuspense as _ } from "@gusto/embedded-api/react-query/companyFormsGet";
3
- import { useCompanyFormsSignMutation as A } from "@gusto/embedded-api/react-query/companyFormsSign";
4
- import { useCompanyFormsGetPdfSuspense as B } from "@gusto/embedded-api/react-query/companyFormsGetPdf";
5
- import { Head as a } from "./Head.js";
6
- import { Preview as s } from "./Preview.js";
7
- import { Form as u } from "./Form.js";
8
- import { Actions as c } from "./Actions.js";
1
+ import { jsx as o, jsxs as S, Fragment as g } from "react/jsx-runtime";
2
+ import { useCompanyFormsGetSuspense as C } from "@gusto/embedded-api/react-query/companyFormsGet";
3
+ import { useCompanyFormsSignMutation as h } from "@gusto/embedded-api/react-query/companyFormsSign";
4
+ import { useCompanyFormsGetPdfSuspense as y } from "@gusto/embedded-api/react-query/companyFormsGetPdf";
5
+ import { Head as N } from "./Head.js";
6
+ import { Preview as P } from "./Preview.js";
7
+ import { Form as _ } from "./Form.js";
8
+ import { Actions as B } from "./Actions.js";
9
9
  import { SignatureFormProvider as M } from "./useSignatureForm.js";
10
10
  import { useComponentDictionary as O, useI18n as b } from "../../../../i18n/I18n.js";
11
- import { BaseComponent as v } from "../../../Base/Base.js";
12
- import { useBase as x } from "../../../Base/useBase.js";
13
- import { SignatureForm as G } from "../../../Common/SignatureForm/SignatureForm.js";
14
- import { Flex as R } from "../../../Common/Flex/Flex.js";
15
- import "react-i18next";
16
- import "classnames";
17
- import { companyEvents as e } from "../../../../shared/constants.js";
18
- function n(r) {
19
- return /* @__PURE__ */ o(v, { ...r, children: /* @__PURE__ */ o(w, { ...r, children: r.children }) });
11
+ import { BaseComponent as x } from "../../../Base/Base.js";
12
+ import { useBase as A } from "../../../Base/useBase.js";
13
+ import { SignatureForm as v } from "../../../Common/SignatureForm/SignatureForm.js";
14
+ import { Flex as G } from "../../../Common/Flex/Flex.js";
15
+ import { companyEvents as t } from "../../../../shared/constants.js";
16
+ function V(r) {
17
+ return /* @__PURE__ */ o(x, { ...r, children: /* @__PURE__ */ o(R, { ...r, children: r.children }) });
20
18
  }
21
- function w({ formId: r, children: m, dictionary: p }) {
22
- O("Company.SignatureForm", p), b("Company.SignatureForm");
23
- const { onEvent: t, baseSubmitHandler: f } = x(), {
24
- data: { form: d }
25
- } = _({
19
+ function R({ formId: r, children: e, dictionary: i }) {
20
+ O("Company.SignatureForm", i), b("Company.SignatureForm");
21
+ const { onEvent: n, baseSubmitHandler: a } = A(), {
22
+ data: { form: s }
23
+ } = C({
26
24
  formId: r
27
- }), l = d, { isPending: F, mutateAsync: S } = A(), {
28
- data: { formPdf: g }
29
- } = B({
25
+ }), u = s, { isPending: c, mutateAsync: f } = h(), {
26
+ data: { formPdf: p }
27
+ } = y({
30
28
  formId: r
31
- }), C = g.documentUrl;
29
+ }), l = p.documentUrl;
32
30
  return /* @__PURE__ */ o(
33
31
  M,
34
32
  {
35
33
  value: {
36
- form: l,
37
- pdfUrl: C,
38
- isPending: F,
34
+ form: u,
35
+ pdfUrl: l,
36
+ isPending: c,
39
37
  onBack: () => {
40
- t(e.COMPANY_SIGN_FORM_BACK);
38
+ n(t.COMPANY_SIGN_FORM_BACK);
41
39
  }
42
40
  },
43
- children: /* @__PURE__ */ o(G, { onSubmit: async (h) => {
44
- await f(h, async (i) => {
45
- const y = await S({
41
+ children: /* @__PURE__ */ o(v, { onSubmit: async (d) => {
42
+ await a(d, async (m) => {
43
+ const F = await f({
46
44
  request: {
47
45
  formId: r,
48
46
  requestBody: {
49
- signatureText: i.signature,
50
- agree: i.confirmSignature
47
+ signatureText: m.signature,
48
+ agree: m.confirmSignature
51
49
  }
52
50
  }
53
51
  });
54
- t(e.COMPANY_SIGN_FORM, y.form), t(e.COMPANY_SIGN_FORM_DONE);
52
+ n(t.COMPANY_SIGN_FORM, F.form), n(t.COMPANY_SIGN_FORM_DONE);
55
53
  });
56
- }, children: /* @__PURE__ */ o(R, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ P(N, { children: [
57
- /* @__PURE__ */ o(a, {}),
58
- /* @__PURE__ */ o(s, {}),
59
- /* @__PURE__ */ o(u, {}),
60
- /* @__PURE__ */ o(c, {})
54
+ }, children: /* @__PURE__ */ o(G, { flexDirection: "column", gap: 32, children: e || /* @__PURE__ */ S(g, { children: [
55
+ /* @__PURE__ */ o(N, {}),
56
+ /* @__PURE__ */ o(P, {}),
57
+ /* @__PURE__ */ o(_, {}),
58
+ /* @__PURE__ */ o(B, {})
61
59
  ] }) }) })
62
60
  }
63
61
  );
64
62
  }
65
- n.Head = a;
66
- n.Preview = s;
67
- n.Form = u;
68
- n.Actions = c;
69
63
  export {
70
- w as Root,
71
- n as SignatureForm
64
+ R as Root,
65
+ V as SignatureForm
72
66
  };
73
67
  //# 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\nSignatureForm.Head = Head\nSignatureForm.Preview = Preview\nSignatureForm.Form = Form\nSignatureForm.Actions = Actions\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;AAErD,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;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,EAAkB,IAAIC,EAAQ,GAEzC;AAAA,IACJ,MAAM,EAAE,MAAMC,EAAa;AAAA,MACzBC,EAA2B;AAAA,IAC7B,QAAAT;AAAA,EAAA,CACD,GACKU,IAAOF,GAEP,EAAE,WAAAG,GAAW,aAAaC,EAAA,IAAaC,EAA4B,GAEnE;AAAA,IACJ,MAAM,EAAE,SAAAC,EAAQ;AAAA,MACdC,EAA8B;AAAA,IAChC,QAAAf;AAAA,EAAA,CACD,GACKgB,IAASF,EAAS;AAyBtB,SAAA,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,MASI;AAAA,MAEA,UAAC,gBAAArB,EAAAsB,GAAA,EAAoB,UA/BJ,OAAOC,MAA8B;AAClD,cAAAd,EAAkBc,GAAM,OAAMC,MAAW;AACvC,gBAAAC,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;AAEO,UAAAhB,EAAAa,EAAc,mBAAmBI,EAAiB,IAAI,GAE9DjB,EAAQa,EAAc,sBAAsB;AAAA,QAAA,CAC7C;AAAA,MACH,GAgBM,UAAC,gBAAArB,EAAA0B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UACCtB,KAGE,gBAAAuB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA5B,EAAC6B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;AAEAlC,EAAc,OAAO+B;AACrB/B,EAAc,UAAUgC;AACxBhC,EAAc,OAAOiC;AACrBjC,EAAc,UAAUkC;"}
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;AAErD,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;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,EAAkB,IAAIC,EAAQ,GAEzC;AAAA,IACJ,MAAM,EAAE,MAAMC,EAAa;AAAA,MACzBC,EAA2B;AAAA,IAC7B,QAAAT;AAAA,EAAA,CACD,GACKU,IAAOF,GAEP,EAAE,WAAAG,GAAW,aAAaC,EAAA,IAAaC,EAA4B,GAEnE;AAAA,IACJ,MAAM,EAAE,SAAAC,EAAQ;AAAA,MACdC,EAA8B;AAAA,IAChC,QAAAf;AAAA,EAAA,CACD,GACKgB,IAASF,EAAS;AAyBtB,SAAA,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,MASI;AAAA,MAEA,UAAC,gBAAArB,EAAAsB,GAAA,EAAoB,UA/BJ,OAAOC,MAA8B;AAClD,cAAAd,EAAkBc,GAAM,OAAMC,MAAW;AACvC,gBAAAC,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;AAEO,UAAAhB,EAAAa,EAAc,mBAAmBI,EAAiB,IAAI,GAE9DjB,EAAQa,EAAc,sBAAsB;AAAA,QAAA,CAC7C;AAAA,MACH,GAgBM,UAAC,gBAAArB,EAAA0B,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UACCtB,KAGE,gBAAAuB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA5B,EAAC6B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
15
  const [c, d] = o(
16
16
  "CompanySignatureFormContext"
@@ -1,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
- import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
- import "classnames";
5
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
3
+ import { useFederalTaxes as s } from "./useFederalTaxes.js";
4
+ import { ActionsLayout as i } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const l = () => {
8
- const { t } = r("Company.FederalTaxes"), { isPending: n } = i(), e = m();
9
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
6
+ const f = () => {
7
+ const { t } = r("Company.FederalTaxes"), { isPending: n } = s(), e = m();
8
+ return /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
10
9
  };
11
10
  export {
12
- l as Actions
11
+ f as Actions
13
12
  };
14
13
  //# 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,EAAU,IAAIC,EAAgB,GAChCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAE,EAAA,aAAa,EAClB,CAAA,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,EAAU,IAAIC,EAAgB,GAChCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -12,15 +12,13 @@ import { useI18n as R, useComponentDictionary as M } from "../../../i18n/I18n.js
12
12
  import { BaseComponent as B } from "../../Base/Base.js";
13
13
  import { useBase as O } from "../../Base/useBase.js";
14
14
  import { Flex as j } from "../../Common/Flex/Flex.js";
15
- import "react-i18next";
16
- import "classnames";
17
15
  import { companyEvents as l } from "../../../shared/constants.js";
18
- function ee(o) {
19
- return /* @__PURE__ */ e(B, { ...o, children: /* @__PURE__ */ e(q, { ...o, children: o.children }) });
16
+ function Z(a) {
17
+ return /* @__PURE__ */ e(B, { ...a, children: /* @__PURE__ */ e(q, { ...a, children: a.children }) });
20
18
  }
21
- function q({ companyId: o, children: t, className: s, defaultValues: i, dictionary: d }) {
19
+ function q({ companyId: a, children: t, className: s, defaultValues: i, dictionary: d }) {
22
20
  R("Company.FederalTaxes"), M("Company.FederalTaxes", d);
23
- const { onEvent: m, baseSubmitHandler: f } = O(), { data: p } = h({ companyId: o }), r = p.federalTaxDetails, { mutateAsync: c, isPending: F } = D(), n = E({
21
+ const { onEvent: n, baseSubmitHandler: f } = O(), { data: c } = h({ companyId: a }), r = c.federalTaxDetails, { mutateAsync: p, isPending: F } = D(), m = E({
24
22
  resolver: v(A),
25
23
  defaultValues: {
26
24
  federalEin: r.hasEin ? void 0 : "",
@@ -29,23 +27,23 @@ function q({ companyId: o, children: t, className: s, defaultValues: i, dictiona
29
27
  legalName: r.legalName ?? i?.legalName
30
28
  }
31
29
  }), x = async (u) => {
32
- await f(u, async (a) => {
33
- const T = await c({
30
+ await f(u, async (o) => {
31
+ const T = await p({
34
32
  request: {
35
- companyId: o,
33
+ companyId: a,
36
34
  requestBody: {
37
- ein: a.federalEin,
38
- taxPayerType: a.taxPayerType,
39
- filingForm: a.filingForm,
40
- legalName: a.legalName,
35
+ ein: o.federalEin,
36
+ taxPayerType: o.taxPayerType,
37
+ filingForm: o.filingForm,
38
+ legalName: o.legalName,
41
39
  version: r.version
42
40
  }
43
41
  }
44
42
  });
45
- m(
43
+ n(
46
44
  l.COMPANY_FEDERAL_TAXES_UPDATED,
47
45
  T.federalTaxDetails
48
- ), m(l.COMPANY_FEDERAL_TAXES_DONE);
46
+ ), n(l.COMPANY_FEDERAL_TAXES_DONE);
49
47
  });
50
48
  };
51
49
  return /* @__PURE__ */ e("section", { className: s, children: /* @__PURE__ */ e(
@@ -55,7 +53,7 @@ function q({ companyId: o, children: t, className: s, defaultValues: i, dictiona
55
53
  isPending: F,
56
54
  federalTaxDetails: r
57
55
  },
58
- children: /* @__PURE__ */ e(P, { ...n, children: /* @__PURE__ */ e(S, { onSubmit: n.handleSubmit(x), children: /* @__PURE__ */ e(j, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ y(g, { children: [
56
+ children: /* @__PURE__ */ e(P, { ...m, children: /* @__PURE__ */ e(S, { onSubmit: m.handleSubmit(x), children: /* @__PURE__ */ e(j, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ y(g, { children: [
59
57
  /* @__PURE__ */ e(b, {}),
60
58
  /* @__PURE__ */ e(C, {}),
61
59
  /* @__PURE__ */ e(_, {})
@@ -64,6 +62,6 @@ function q({ companyId: o, children: t, className: s, defaultValues: i, dictiona
64
62
  ) });
65
63
  }
66
64
  export {
67
- ee as FederalTaxes
65
+ Z as FederalTaxes
68
66
  };
69
67
  //# 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,GAAaC,GAAmD;AAE5E,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;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,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAmC,GAEzFC,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;AACnD,UAAAF,EAAkBE,GAAM,OAAMW,MAAW;AACvC,YAAAC,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,MAClC,GACAf,EAAQgB,EAAc,0BAA0B;AAAA,IAAA,CACjD;AAAA,EACH;AAGE,SAAA,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MACF;AAAA,MAEA,4BAACa,GAAc,EAAA,GAAGT,GAChB,UAAC,gBAAAnB,EAAA6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAIG,gBAAA2B,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EACF,CAAA;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,EAAaC,GAAmD;AAE5E,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;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,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAmC,GAEzFC,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;AACnD,UAAAF,EAAkBE,GAAM,OAAMW,MAAW;AACvC,YAAAC,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,MAClC,GACAf,EAAQgB,EAAc,0BAA0B;AAAA,IAAA,CACjD;AAAA,EACH;AAGE,SAAA,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MACF;AAAA,MAEA,4BAACa,GAAc,EAAA,GAAGT,GAChB,UAAC,gBAAAnB,EAAA6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAIG,gBAAA2B,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -4,12 +4,11 @@ import { useTranslation as c, Trans as t } from "react-i18next";
4
4
  import { TaxPayerType as _, FilingForm as y } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
5
5
  import { useFederalTaxes as u } from "./useFederalTaxes.js";
6
6
  import { Flex as b } from "../../Common/Flex/Flex.js";
7
- import "classnames";
8
7
  import { usePlaceholderEin as g, normalizeEin as x } from "../../../helpers/federalEin.js";
9
8
  import { useComponentContext as F } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
9
  import { TextInputField as l } from "../../Common/Fields/TextInputField/TextInputField.js";
11
10
  import { SelectField as a } from "../../Common/Fields/SelectField/SelectField.js";
12
- function R() {
11
+ function O() {
13
12
  const { t: e } = c("Company.FederalTaxes"), { federalTaxDetails: s } = u(), i = F(), m = g(s?.hasEin), p = n(
14
13
  () => Object.values(_).map((o) => ({
15
14
  value: o,
@@ -100,6 +99,6 @@ function R() {
100
99
  ] });
101
100
  }
102
101
  export {
103
- R as Form
102
+ O as Form
104
103
  };
105
104
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federal_ein_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_ein_description\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayer_type_label')}\n description={t('taxpayer_type_description')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federal_filing_form_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_filing_form_description\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legal_entity_name_label')}\n description={t('legal_entity_name_description')}\n isRequired\n errorMessage={t('legal_entity_name_error')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":";;;;;;;;;;;AAWO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAkB,IAAIC,EAAgB,GACxCC,IAAaC,EAAoB,GAEjCC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAUC,OAAA;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EACJ,GAEMY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAUF,OAAA;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EACJ;AAEA,SACG,gBAAAc,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,mBAAmB;AAAA,QAC5B,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,WACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QACF;AAAA,QAEF,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IACf;AAAA,IACA,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,qBAAqB;AAAA,QAC9B,aAAaA,EAAE,2BAA2B;AAAA,QAC1C,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,2BAA2B;AAAA,QACpC,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,SACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QACF;AAAA,QAEF,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,YAAU;AAAA,QACV,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC3C,GACF;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federal_ein_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_ein_description\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayer_type_label')}\n description={t('taxpayer_type_description')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federal_filing_form_label')}\n description={\n <Trans\n t={t}\n i18nKey=\"federal_filing_form_description\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legal_entity_name_label')}\n description={t('legal_entity_name_description')}\n isRequired\n errorMessage={t('legal_entity_name_error')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":";;;;;;;;;;AAWO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAkB,IAAIC,EAAgB,GACxCC,IAAaC,EAAoB,GAEjCC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAUC,OAAA;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EACJ,GAEMY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAUF,OAAA;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EACJ;AAEA,SACG,gBAAAc,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,mBAAmB;AAAA,QAC5B,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,WACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QACF;AAAA,QAEF,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IACf;AAAA,IACA,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,qBAAqB;AAAA,QAC9B,aAAaA,EAAE,2BAA2B;AAAA,QAC1C,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,2BAA2B;AAAA,QACpC,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,SACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QACF;AAAA,QAEF,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,YAAU;AAAA,QACV,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC3C,GACF;AAEJ;"}
@@ -10,9 +10,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
10
10
  import "@tanstack/react-query";
11
11
  import "../../Base/useBase.js";
12
12
  import "../../../shared/constants.js";
13
- import "classnames";
14
13
  import "dompurify";
15
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
17
17
  const C = o.object({
18
18
  federalEin: o.string().optional(),
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { useIndustryApiState as s } from "./Context.js";
4
- import "classnames";
2
+ import { useTranslation as s } from "react-i18next";
3
+ import { useIndustryApiState as i } from "./Context.js";
5
4
  import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const y = () => {
8
- const { t: o } = i("Company.Industry"), { isPending: n } = s(), r = e();
6
+ const f = () => {
7
+ const { t: o } = s("Company.Industry"), { isPending: n } = i(), r = e();
9
8
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
10
9
  };
11
10
  export {
12
- y as Actions
11
+ f as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAU,IAAIC,EAAoB,GACpCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAEF,EAAA,WAAW,EAChB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAU,IAAIC,EAAoB,GACpCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAEF,EAAA,WAAW,EAChB,CAAA,GACF;AAEJ;"}
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
15
15
  const [A, P] = t("IndustryItems", {
16
16
  items: []
@@ -1,15 +1,14 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as e } from "react-i18next";
3
- import { useIndustryItems as m } from "./Context.js";
4
- import "classnames";
5
- import { ComboBoxField as s } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
6
- const d = () => {
7
- const { t: o } = e("Company.Industry"), { items: r } = m();
8
- return /* @__PURE__ */ t(
9
- s,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as t } from "react-i18next";
3
+ import { useIndustryItems as s } from "./Context.js";
4
+ import { ComboBoxField as m } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
5
+ const p = () => {
6
+ const { t: o } = t("Company.Industry"), { items: e } = s();
7
+ return /* @__PURE__ */ r(
8
+ m,
10
9
  {
11
10
  isRequired: !0,
12
- options: r,
11
+ options: e,
13
12
  label: o("label"),
14
13
  name: "naics_code",
15
14
  placeholder: o("placeholder")
@@ -17,6 +16,6 @@ const d = () => {
17
16
  );
18
17
  };
19
18
  export {
20
- d as Edit
19
+ p as Edit
21
20
  };
22
21
  //# sourceMappingURL=Edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAM,IAAIC,EAAiB;AAGjC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAM,IAAIC,EAAiB;AAGjC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
@@ -4,8 +4,3 @@ export type IndustryProps<T> = Pick<BaseComponentInterface<'Company.Industry'>,
4
4
  companyId: string;
5
5
  };
6
6
  export declare function Industry<T>(props: IndustryProps<T>): import("react/jsx-runtime").JSX.Element;
7
- export declare namespace Industry {
8
- var Actions: () => import("react/jsx-runtime").JSX.Element;
9
- var Edit: () => import("react/jsx-runtime").JSX.Element;
10
- var Head: () => import("react/jsx-runtime").JSX.Element;
11
- }
@@ -1,40 +1,34 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useCallback as l } from "react";
3
- import { useIndustrySelectionGetSuspense as C } from "@gusto/embedded-api/react-query/industrySelectionGet";
4
- import { useIndustrySelectionUpdateMutation as I } from "@gusto/embedded-api/react-query/industrySelectionUpdate";
5
- import { Actions as S } from "./Actions.js";
6
- import { Head as E } from "./Head.js";
7
- import { Edit as A } from "./Edit.js";
8
- import { IndustryApiStateProvider as v } from "./Context.js";
9
- import { IndustrySelect as b } from "./IndustrySelect.js";
10
- import { componentEvents as h } from "../../../shared/constants.js";
11
- import { BaseComponent as B } from "../../Base/Base.js";
12
- import { useBase as D } from "../../Base/useBase.js";
13
- import { useI18n as H, useComponentDictionary as P } from "../../../i18n/I18n.js";
14
- function _({ children: o, className: m, companyId: n, dictionary: u }) {
15
- P("Company.Industry", u);
16
- const { baseSubmitHandler: e, onEvent: i } = D(), {
17
- data: { industry: a }
18
- } = C({ companyId: n }), { isPending: d, mutateAsync: s } = I(), c = l(
19
- async (p) => {
20
- await e(p, async ({ naics_code: f }) => {
2
+ import { useCallback as f } from "react";
3
+ import { useIndustrySelectionGetSuspense as l } from "@gusto/embedded-api/react-query/industrySelectionGet";
4
+ import { useIndustrySelectionUpdateMutation as C } from "@gusto/embedded-api/react-query/industrySelectionUpdate";
5
+ import { IndustryApiStateProvider as I } from "./Context.js";
6
+ import { IndustrySelect as S } from "./IndustrySelect.js";
7
+ import { componentEvents as E } from "../../../shared/constants.js";
8
+ import { BaseComponent as v } from "../../Base/Base.js";
9
+ import { useBase as b } from "../../Base/useBase.js";
10
+ import { useI18n as h, useComponentDictionary as A } from "../../../i18n/I18n.js";
11
+ function B({ children: n, className: i, companyId: o, dictionary: u }) {
12
+ A("Company.Industry", u);
13
+ const { baseSubmitHandler: e, onEvent: r } = b(), {
14
+ data: { industry: m }
15
+ } = l({ companyId: o }), { isPending: a, mutateAsync: s } = C(), c = f(
16
+ async (d) => {
17
+ await e(d, async ({ naics_code: p }) => {
21
18
  const y = await s({
22
- request: { companyId: n, requestBody: { naicsCode: f } }
19
+ request: { companyId: o, requestBody: { naicsCode: p } }
23
20
  });
24
- i(h.COMPANY_INDUSTRY_SELECTED, y.industry);
21
+ r(E.COMPANY_INDUSTRY_SELECTED, y.industry);
25
22
  });
26
23
  },
27
- [e, n, s, i]
24
+ [e, o, s, r]
28
25
  );
29
- return /* @__PURE__ */ t("section", { className: m, children: /* @__PURE__ */ t(v, { value: { isPending: d }, children: /* @__PURE__ */ t(b, { naics_code: a?.naicsCode, onValid: c, children: o }) }) });
26
+ return /* @__PURE__ */ t("section", { className: i, children: /* @__PURE__ */ t(I, { value: { isPending: a }, children: /* @__PURE__ */ t(S, { naics_code: m?.naicsCode, onValid: c, children: n }) }) });
30
27
  }
31
- function r(o) {
32
- return H("Company.Industry"), /* @__PURE__ */ t(B, { ...o, children: /* @__PURE__ */ t(_, { ...o }) });
28
+ function U(n) {
29
+ return h("Company.Industry"), /* @__PURE__ */ t(v, { ...n, children: /* @__PURE__ */ t(B, { ...n }) });
33
30
  }
34
- r.Actions = S;
35
- r.Edit = A;
36
- r.Head = E;
37
31
  export {
38
- r as Industry
32
+ U as Industry
39
33
  };
40
34
  //# sourceMappingURL=Industry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Industry.js","sources":["../../../../src/components/Company/Industry/Industry.tsx"],"sourcesContent":["import { useCallback, type HTMLAttributes } from 'react'\nimport { useIndustrySelectionGetSuspense } from '@gusto/embedded-api/react-query/industrySelectionGet'\nimport { useIndustrySelectionUpdateMutation } from '@gusto/embedded-api/react-query/industrySelectionUpdate'\nimport { Actions } from './Actions'\nimport { Head } from './Head'\nimport type { IndustryFormFields } from './Edit'\nimport { Edit } from './Edit'\nimport { IndustryApiStateProvider } from './Context'\nimport { IndustrySelect } from './IndustrySelect'\nimport { componentEvents } from '@/shared/constants'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\n\nexport type IndustryProps<T> = Pick<\n BaseComponentInterface<'Company.Industry'>,\n 'onEvent' | 'dictionary'\n> &\n Partial<Pick<HTMLAttributes<T>, 'children' | 'className'>> & {\n companyId: string\n }\n\nfunction Root<T>({ children, className, companyId, dictionary }: IndustryProps<T>) {\n useComponentDictionary('Company.Industry', dictionary)\n const { baseSubmitHandler, onEvent } = useBase()\n\n const {\n data: { industry },\n } = useIndustrySelectionGetSuspense({ companyId })\n\n const { isPending, mutateAsync: mutateIndustry } = useIndustrySelectionUpdateMutation()\n\n const onValid = useCallback(\n async (data: IndustryFormFields) => {\n await baseSubmitHandler(data, async ({ naics_code }) => {\n const response = await mutateIndustry({\n request: { companyId, requestBody: { naicsCode: naics_code } },\n })\n onEvent(componentEvents.COMPANY_INDUSTRY_SELECTED, response.industry)\n })\n },\n [baseSubmitHandler, companyId, mutateIndustry, onEvent],\n )\n\n return (\n <section className={className}>\n <IndustryApiStateProvider value={{ isPending }}>\n <IndustrySelect naics_code={industry?.naicsCode} onValid={onValid}>\n {children}\n </IndustrySelect>\n </IndustryApiStateProvider>\n </section>\n )\n}\n\nexport function Industry<T>(props: IndustryProps<T>) {\n useI18n('Company.Industry')\n\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nIndustry.Actions = Actions\nIndustry.Edit = Edit\nIndustry.Head = Head\n"],"names":["Root","children","className","companyId","dictionary","useComponentDictionary","baseSubmitHandler","onEvent","useBase","industry","useIndustrySelectionGetSuspense","isPending","mutateIndustry","useIndustrySelectionUpdateMutation","onValid","useCallback","data","naics_code","response","componentEvents","jsx","IndustryApiStateProvider","IndustrySelect","Industry","props","useI18n","BaseComponent","Actions","Edit","Head"],"mappings":";;;;;;;;;;;;;AAqBA,SAASA,EAAQ,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,YAAAC,KAAgC;AACjF,EAAAC,EAAuB,oBAAoBD,CAAU;AACrD,QAAM,EAAE,mBAAAE,GAAmB,SAAAC,EAAQ,IAAIC,EAAQ,GAEzC;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,EAAA,IACfC,EAAgC,EAAE,WAAAP,GAAW,GAE3C,EAAE,WAAAQ,GAAW,aAAaC,EAAA,IAAmBC,EAAmC,GAEhFC,IAAUC;AAAA,IACd,OAAOC,MAA6B;AAClC,YAAMV,EAAkBU,GAAM,OAAO,EAAE,YAAAC,QAAiB;AAChD,cAAAC,IAAW,MAAMN,EAAe;AAAA,UACpC,SAAS,EAAE,WAAAT,GAAW,aAAa,EAAE,WAAWc,EAAa,EAAA;AAAA,QAAA,CAC9D;AACO,QAAAV,EAAAY,EAAgB,2BAA2BD,EAAS,QAAQ;AAAA,MAAA,CACrE;AAAA,IACH;AAAA,IACA,CAACZ,GAAmBH,GAAWS,GAAgBL,CAAO;AAAA,EACxD;AAEA,2BACG,WAAQ,EAAA,WAAAL,GACP,UAAC,gBAAAkB,EAAAC,GAAA,EAAyB,OAAO,EAAE,WAAAV,EACjC,GAAA,UAAA,gBAAAS,EAACE,KAAe,YAAYb,GAAU,WAAW,SAAAK,GAC9C,UAAAb,EAAA,CACH,EACF,CAAA,GACF;AAEJ;AAEO,SAASsB,EAAYC,GAAyB;AACnD,SAAAC,EAAQ,kBAAkB,GAGxB,gBAAAL,EAACM,KAAe,GAAGF,GACjB,4BAACxB,GAAM,EAAA,GAAGwB,GAAO,EACnB,CAAA;AAEJ;AAEAD,EAAS,UAAUI;AACnBJ,EAAS,OAAOK;AAChBL,EAAS,OAAOM;"}
1
+ {"version":3,"file":"Industry.js","sources":["../../../../src/components/Company/Industry/Industry.tsx"],"sourcesContent":["import { useCallback, type HTMLAttributes } from 'react'\nimport { useIndustrySelectionGetSuspense } from '@gusto/embedded-api/react-query/industrySelectionGet'\nimport { useIndustrySelectionUpdateMutation } from '@gusto/embedded-api/react-query/industrySelectionUpdate'\nimport type { IndustryFormFields } from './Edit'\nimport { IndustryApiStateProvider } from './Context'\nimport { IndustrySelect } from './IndustrySelect'\nimport { componentEvents } from '@/shared/constants'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\n\nexport type IndustryProps<T> = Pick<\n BaseComponentInterface<'Company.Industry'>,\n 'onEvent' | 'dictionary'\n> &\n Partial<Pick<HTMLAttributes<T>, 'children' | 'className'>> & {\n companyId: string\n }\n\nfunction Root<T>({ children, className, companyId, dictionary }: IndustryProps<T>) {\n useComponentDictionary('Company.Industry', dictionary)\n const { baseSubmitHandler, onEvent } = useBase()\n\n const {\n data: { industry },\n } = useIndustrySelectionGetSuspense({ companyId })\n\n const { isPending, mutateAsync: mutateIndustry } = useIndustrySelectionUpdateMutation()\n\n const onValid = useCallback(\n async (data: IndustryFormFields) => {\n await baseSubmitHandler(data, async ({ naics_code }) => {\n const response = await mutateIndustry({\n request: { companyId, requestBody: { naicsCode: naics_code } },\n })\n onEvent(componentEvents.COMPANY_INDUSTRY_SELECTED, response.industry)\n })\n },\n [baseSubmitHandler, companyId, mutateIndustry, onEvent],\n )\n\n return (\n <section className={className}>\n <IndustryApiStateProvider value={{ isPending }}>\n <IndustrySelect naics_code={industry?.naicsCode} onValid={onValid}>\n {children}\n </IndustrySelect>\n </IndustryApiStateProvider>\n </section>\n )\n}\n\nexport function Industry<T>(props: IndustryProps<T>) {\n useI18n('Company.Industry')\n\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n"],"names":["Root","children","className","companyId","dictionary","useComponentDictionary","baseSubmitHandler","onEvent","useBase","industry","useIndustrySelectionGetSuspense","isPending","mutateIndustry","useIndustrySelectionUpdateMutation","onValid","useCallback","data","naics_code","response","componentEvents","jsx","IndustryApiStateProvider","IndustrySelect","Industry","props","useI18n","BaseComponent"],"mappings":";;;;;;;;;;AAkBA,SAASA,EAAQ,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,YAAAC,KAAgC;AACjF,EAAAC,EAAuB,oBAAoBD,CAAU;AACrD,QAAM,EAAE,mBAAAE,GAAmB,SAAAC,EAAQ,IAAIC,EAAQ,GAEzC;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,EAAA,IACfC,EAAgC,EAAE,WAAAP,GAAW,GAE3C,EAAE,WAAAQ,GAAW,aAAaC,EAAA,IAAmBC,EAAmC,GAEhFC,IAAUC;AAAA,IACd,OAAOC,MAA6B;AAClC,YAAMV,EAAkBU,GAAM,OAAO,EAAE,YAAAC,QAAiB;AAChD,cAAAC,IAAW,MAAMN,EAAe;AAAA,UACpC,SAAS,EAAE,WAAAT,GAAW,aAAa,EAAE,WAAWc,EAAa,EAAA;AAAA,QAAA,CAC9D;AACO,QAAAV,EAAAY,EAAgB,2BAA2BD,EAAS,QAAQ;AAAA,MAAA,CACrE;AAAA,IACH;AAAA,IACA,CAACZ,GAAmBH,GAAWS,GAAgBL,CAAO;AAAA,EACxD;AAEA,2BACG,WAAQ,EAAA,WAAAL,GACP,UAAC,gBAAAkB,EAAAC,GAAA,EAAyB,OAAO,EAAE,WAAAV,EACjC,GAAA,UAAA,gBAAAS,EAACE,KAAe,YAAYb,GAAU,WAAW,SAAAK,GAC9C,UAAAb,EAAA,CACH,EACF,CAAA,GACF;AAEJ;AAEO,SAASsB,EAAYC,GAAyB;AACnD,SAAAC,EAAQ,kBAAkB,GAGxB,gBAAAL,EAACM,KAAe,GAAGF,GACjB,4BAACxB,GAAM,EAAA,GAAGwB,GAAO,EACnB,CAAA;AAEJ;"}
@@ -1,10 +1,9 @@
1
1
  import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useLocationsForm as e } from "./useLocationForm.js";
4
- import "classnames";
5
4
  import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const h = () => {
6
+ const f = () => {
8
7
  const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
9
8
  return /* @__PURE__ */ r(c, { children: [
10
9
  /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
@@ -12,6 +11,6 @@ const h = () => {
12
11
  ] });
13
12
  };
14
13
  export {
15
- h as Actions
14
+ f as Actions
16
15
  };
17
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAiB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAQ,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAEH,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAiB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAQ,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAEH,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}