@gusto/embedded-react-sdk 0.13.3 → 0.14.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 (360) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/assets/icons/hamburger.svg.js +5 -5
  3. package/dist/assets/icons/hamburger.svg.js.map +1 -1
  4. package/dist/assets/icons/receipt-check.svg.js +10 -0
  5. package/dist/assets/icons/receipt-check.svg.js.map +1 -0
  6. package/dist/assets/icons/spinner_large.svg.js +10 -0
  7. package/dist/assets/icons/spinner_large.svg.js.map +1 -0
  8. package/dist/components/Common/DataView/DataTable/DataTable.js +29 -28
  9. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
  11. package/dist/components/Common/DocumentViewer/DocumentViewer.js +9 -9
  12. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  13. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
  14. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  15. package/dist/components/Common/Flex/Flex.js +16 -12
  16. package/dist/components/Common/Flex/Flex.js.map +1 -1
  17. package/dist/components/Common/Loading/Loading.d.ts +5 -1
  18. package/dist/components/Common/Loading/Loading.js +9 -9
  19. package/dist/components/Common/Loading/Loading.js.map +1 -1
  20. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
  22. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  23. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  24. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.d.ts +3 -0
  25. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.js +25 -0
  26. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.js.map +1 -0
  27. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.module.scss.js +10 -0
  28. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinner.module.scss.js.map +1 -0
  29. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.d.ts +18 -0
  30. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js +8 -0
  31. package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -0
  32. package/dist/components/Common/UI/LoadingSpinner/index.d.ts +4 -0
  33. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +33 -31
  34. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  35. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +4 -0
  36. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
  37. package/dist/components/Common/UI/Table/Table.js +22 -13
  38. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  39. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  40. package/dist/components/Common/UI/Table/TableTypes.d.ts +5 -0
  41. package/dist/components/Common/UI/Table/TableTypes.js +2 -1
  42. package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
  43. package/dist/components/Common/UI/Text/Text.module.scss.js +15 -14
  44. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  45. package/dist/components/Common/UI/Text/TextTypes.d.ts +2 -2
  46. package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
  48. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
  50. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  52. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
  54. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  58. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
  64. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  68. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  69. package/dist/components/Company/BankAccount/BankAccount.js +25 -21
  70. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  71. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  72. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
  73. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  75. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
  77. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  78. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
  79. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  80. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  81. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  82. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  83. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  84. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +34 -35
  85. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  86. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  87. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  88. package/dist/components/Company/DocumentSigner/DocumentSigner.js +0 -1
  89. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  90. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -7
  91. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  92. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  93. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  94. package/dist/components/Company/FederalTaxes/Actions.js +6 -5
  95. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  96. package/dist/components/Company/FederalTaxes/FederalTaxes.js +12 -13
  97. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  98. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  99. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  100. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
  101. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  102. package/dist/components/Company/Industry/Actions.js +3 -2
  103. package/dist/components/Company/Industry/Actions.js.map +1 -1
  104. package/dist/components/Company/Industry/Context.js +7 -6
  105. package/dist/components/Company/Industry/Context.js.map +1 -1
  106. package/dist/components/Company/Industry/Edit.js +5 -4
  107. package/dist/components/Company/Industry/Edit.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  109. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  110. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  111. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  112. package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -11
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  114. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  115. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  116. package/dist/components/Company/Locations/Locations.js +21 -17
  117. package/dist/components/Company/Locations/Locations.js.map +1 -1
  118. package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
  119. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  120. package/dist/components/Company/Locations/LocationsList/List.js +16 -16
  121. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  122. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
  123. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  124. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  125. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  126. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -17
  127. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  128. package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
  129. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  130. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
  131. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  132. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  133. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  134. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  135. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  136. package/dist/components/Company/PaySchedule/PaySchedule.js +33 -34
  137. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  138. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
  139. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  140. package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
  141. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  142. package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
  143. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  144. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  145. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  146. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  147. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  148. package/dist/components/Company/StateTaxes/StateTaxes.js +20 -16
  149. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  150. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  151. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  152. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  153. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  154. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  155. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  156. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  157. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  158. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  159. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  160. package/dist/components/Contractor/Address/Address.js +4 -5
  161. package/dist/components/Contractor/Address/Address.js.map +1 -1
  162. package/dist/components/Contractor/Address/Form.js +3 -4
  163. package/dist/components/Contractor/Address/Form.js.map +1 -1
  164. package/dist/components/Contractor/Address/useAddress.js +6 -5
  165. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  166. package/dist/components/Contractor/ContractorList/index.js +17 -17
  167. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -21
  168. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  169. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
  170. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  171. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  172. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  173. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  174. package/dist/components/Contractor/Submit/Submit.js +1 -1
  175. package/dist/components/Employee/Compensation/Actions.js +1 -1
  176. package/dist/components/Employee/Compensation/Edit.js +12 -12
  177. package/dist/components/Employee/Compensation/List.js +23 -22
  178. package/dist/components/Employee/Compensation/List.js.map +1 -1
  179. package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
  180. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  181. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +55 -0
  182. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
  183. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  184. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  185. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  186. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +42 -0
  187. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +133 -0
  188. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  189. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  190. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  191. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  192. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +7 -0
  193. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +98 -0
  194. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +1 -0
  195. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  196. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
  197. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
  198. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  199. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
  200. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  201. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  202. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  204. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  205. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +19 -15
  206. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  207. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
  208. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  209. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  210. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  211. package/dist/components/Employee/EmployeeList/Actions.js +3 -2
  212. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  213. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  214. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  215. package/dist/components/Employee/EmployeeList/Head.js +6 -5
  216. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  217. package/dist/components/Employee/EmployeeList/List.js +12 -12
  218. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  219. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  220. package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
  221. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  222. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  223. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  224. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  225. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  226. package/dist/components/Employee/Landing/Landing.js +8 -8
  227. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +24 -20
  228. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  229. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  230. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  231. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  232. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  233. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
  234. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  235. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  236. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  237. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  238. package/dist/components/Employee/Profile/Actions.js +7 -6
  239. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  240. package/dist/components/Employee/Profile/HomeAddress.js +5 -6
  241. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  242. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
  243. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  244. package/dist/components/Employee/Profile/Profile.d.ts +1 -0
  245. package/dist/components/Employee/Profile/Profile.js +22 -22
  246. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  247. package/dist/components/Employee/Profile/useProfile.js +4 -3
  248. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  249. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +17 -13
  250. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  251. package/dist/components/Employee/StateTaxes/Actions.js +8 -7
  252. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  253. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  254. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  255. package/dist/components/Employee/Taxes/Actions.js +9 -8
  256. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  257. package/dist/components/Employee/Taxes/FederalForm.js +13 -12
  258. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  259. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  260. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  261. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.d.ts +14 -0
  262. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js +54 -0
  263. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.js.map +1 -0
  264. package/dist/components/Payroll/PayrollBlocker/PayrollBlockerList.d.ts +19 -0
  265. package/dist/components/Payroll/PayrollBlocker/index.d.ts +3 -0
  266. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +27 -0
  267. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +39 -0
  268. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -0
  269. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +78 -60
  270. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  271. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +4 -2
  272. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +157 -123
  273. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  274. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +8 -0
  275. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -0
  276. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +39 -36
  277. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  278. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +65 -66
  279. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  280. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  281. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  282. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -0
  283. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +26 -0
  284. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -0
  285. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +25 -0
  286. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +59 -0
  287. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -0
  288. package/dist/components/Payroll/PayrollFlow/index.d.ts +3 -0
  289. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -0
  290. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +116 -0
  291. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -0
  292. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  293. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  294. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
  295. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +28 -36
  296. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  297. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +15 -0
  298. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +62 -0
  299. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -0
  300. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +5 -0
  301. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +93 -0
  302. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -0
  303. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +7 -6
  304. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  305. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +4 -1
  306. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -58
  307. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  308. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -1
  309. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +315 -268
  310. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  311. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +8 -0
  312. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +35 -0
  313. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -0
  314. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
  315. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +224 -0
  316. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -0
  317. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +28 -0
  318. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -0
  319. package/dist/components/Payroll/index.d.ts +3 -1
  320. package/dist/components/Payroll/index.js +8 -6
  321. package/dist/components/Payroll/index.js.map +1 -1
  322. package/dist/components/Payroll/usePreparedPayrollData.js +40 -24
  323. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  324. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +28 -26
  325. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  326. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  327. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -23
  328. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  329. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  330. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  331. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  332. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  333. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +3 -1
  334. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
  335. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
  336. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  337. package/dist/contexts/ThemeProvider/theme.js +2 -1
  338. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  339. package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
  340. package/dist/i18n/I18n.js +1 -1
  341. package/dist/i18n/I18n.js.map +1 -1
  342. package/dist/i18n/en/Employee.Deductions.json.js +126 -66
  343. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  344. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +11 -11
  345. package/dist/i18n/en/Payroll.PayrollOverview.json.js +48 -42
  346. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  347. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +14 -12
  348. package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
  349. package/dist/i18n/en/PayrollBlocker.json.js +24 -0
  350. package/dist/i18n/en/PayrollBlocker.json.js.map +1 -0
  351. package/dist/shared/constants.d.ts +13 -5
  352. package/dist/shared/constants.js +37 -33
  353. package/dist/shared/constants.js.map +1 -1
  354. package/dist/style.css +1 -1
  355. package/dist/types/i18next.d.ts +185 -5
  356. package/package.json +21 -21
  357. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +0 -117
  358. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +0 -1
  359. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +0 -22
  360. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -2,13 +2,14 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
3
  import { useIndustryApiState as s } from "./Context.js";
4
4
  import "classnames";
5
+ import "../../../shared/constants.js";
5
6
  import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const y = () => {
8
+ const C = () => {
8
9
  const { t: o } = i("Company.Industry"), { isPending: n } = s(), r = e();
9
10
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
10
11
  };
11
12
  export {
12
- y as Actions
13
+ C as Actions
13
14
  };
14
15
  //# 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,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,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,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
@@ -12,16 +12,17 @@ import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../contexts/LocaleProvider/useLocale.js";
14
14
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [P, f] = t("IndustryItems", {
17
+ const [f, v] = t("IndustryItems", {
17
18
  items: []
18
- }), [v, x] = t("IndustryApi", {
19
+ }), [x, C] = t("IndustryApi", {
19
20
  isPending: !1
20
21
  });
21
22
  export {
22
- x as IndustryApiStateProvider,
23
- f as IndustryItemsProvider,
24
- v as useIndustryApiState,
25
- P as useIndustryItems
23
+ C as IndustryApiStateProvider,
24
+ v as IndustryItemsProvider,
25
+ x as useIndustryApiState,
26
+ f as useIndustryItems
26
27
  };
27
28
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -2,11 +2,12 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as e } from "react-i18next";
3
3
  import { useIndustryItems as m } from "./Context.js";
4
4
  import "classnames";
5
- import { ComboBoxField as s } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
6
- const d = () => {
5
+ import "../../../shared/constants.js";
6
+ import { ComboBoxField as i } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
7
+ const c = () => {
7
8
  const { t: o } = e("Company.Industry"), { items: r } = m();
8
9
  return /* @__PURE__ */ t(
9
- s,
10
+ i,
10
11
  {
11
12
  isRequired: !0,
12
13
  options: r,
@@ -17,6 +18,6 @@ const d = () => {
17
18
  );
18
19
  };
19
20
  export {
20
- d as Edit
21
+ c as Edit
21
22
  };
22
23
  //# 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,EAAA,IAAUC,EAAA;AAElB,SACE,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,EAAA;AAGlC;"}
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,EAAA,IAAUC,EAAA;AAElB,SACE,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,EAAA;AAGlC;"}
@@ -2,16 +2,17 @@ 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
4
  import "classnames";
5
- import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const h = () => {
8
- const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
9
- return /* @__PURE__ */ r(c, { children: [
5
+ import "../../../../shared/constants.js";
6
+ import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
+ import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ const x = () => {
9
+ const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = c();
10
+ return /* @__PURE__ */ r(m, { children: [
10
11
  /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
11
12
  /* @__PURE__ */ n(t.Button, { type: "submit", isLoading: s, "data-testid": "location-submit", children: o("saveCta") })
12
13
  ] });
13
14
  };
14
15
  export {
15
- h as Actions
16
+ x as Actions
16
17
  };
17
18
  //# 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,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAAH,EAAE,SAAS,EAAA,CACd;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,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAAH,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
@@ -4,13 +4,12 @@ import { useTranslation as l } from "react-i18next";
4
4
  import { zipValidation as n, phoneValidation as m } from "../../../../helpers/validations.js";
5
5
  import { Flex as d } from "../../../Common/Flex/Flex.js";
6
6
  import { Grid as p } from "../../../Common/Grid/Grid.js";
7
- import "classnames";
7
+ import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
8
8
  import { STATES_ABBR as c } from "../../../../shared/constants.js";
9
9
  import { useMaskedTransform as u, commonMasks as b } from "../../../../helpers/mask.js";
10
- import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
11
10
  import { SelectField as f } from "../../../Common/Fields/SelectField/SelectField.js";
12
11
  import { CheckboxGroupField as g } from "../../../Common/Fields/CheckboxGroupField/CheckboxGroupField.js";
13
- const k = i.object({
12
+ const q = i.object({
14
13
  phoneNumber: m,
15
14
  street1: i.string().min(1),
16
15
  street2: i.string().optional(),
@@ -19,7 +18,7 @@ const k = i.object({
19
18
  zip: n,
20
19
  addressType: i.array(i.enum(["mailingAddress", "filingAddress"])).optional()
21
20
  });
22
- function S() {
21
+ function k() {
23
22
  const { t: e } = l("Company.Locations"), o = u(b.phoneMask);
24
23
  return /* @__PURE__ */ t(d, { flexDirection: "column", gap: 20, children: [
25
24
  /* @__PURE__ */ t(
@@ -105,7 +104,7 @@ function S() {
105
104
  ] });
106
105
  }
107
106
  export {
108
- S as Form,
109
- k as LocationFormSchema
107
+ k as Form,
108
+ q as LocationFormSchema
110
109
  };
111
110
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { phoneValidation, zipValidation } from '@/helpers/validations'\nimport { CheckboxGroupField, Flex, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\n\nexport const LocationFormSchema = z.object({\n phoneNumber: phoneValidation,\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: zipValidation,\n addressType: z.array(z.enum(['mailingAddress', 'filingAddress'])).optional(),\n})\n\nexport type LocationFormInputs = z.infer<typeof LocationFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.Locations')\n const transform = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Grid\n gap={{ base: 20, small: 8 }}\n gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }}\n >\n <TextInputField\n name=\"street1\"\n isRequired\n label={t('street1Label')}\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2Label')} />\n <TextInputField\n name=\"city\"\n label={t('cityLabel')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('stateLabel')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zipLabel')}\n errorMessage={t('validations.zip')}\n />\n <TextInputField\n name=\"phoneNumber\"\n isRequired\n label={t('phoneNumberLabel')}\n errorMessage={t('validations.phone')}\n transform={transform}\n />\n </Grid>\n <CheckboxGroupField\n name=\"addressType\"\n label={t('addressTypeLabel')}\n options={[\n {\n value: 'mailingAddress',\n label: t('mailingAddressLabel'),\n description: t('mailingAddressDescription'),\n },\n {\n value: 'filingAddress',\n label: t('filingAddressLabel'),\n description: t('filingAddressDescription'),\n },\n ]}\n />\n </Flex>\n )\n}\n"],"names":["LocationFormSchema","z","phoneValidation","zipValidation","Form","t","useTranslation","transform","useMaskedTransform","commonMasks","jsxs","Flex","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxGroupField"],"mappings":";;;;;;;;;;;;AAOO,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EACzC,aAAaC;AAAA,EACb,SAASD,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKE;AAAA,EACL,aAAaF,EAAE,MAAMA,EAAE,KAAK,CAAC,kBAAkB,eAAe,CAAC,CAAC,EAAE,SAAA;AACpE,CAAC;AAIM,SAASG,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1CC,IAAYC,EAAmBC,EAAY,SAAS;AAE1D,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA;AAAA,QACxB,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA;AAAA,QAExD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,cAAc;AAAA,cACvB,cAAcA,EAAE,qBAAqB;AAAA,YAAA;AAAA,UAAA;AAAA,4BAEtCS,GAAA,EAAe,MAAK,WAAU,OAAOT,EAAE,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0BAA0B;AAAA,UAAA;AAAA,QAC3C;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { phoneValidation, zipValidation } from '@/helpers/validations'\nimport { CheckboxGroupField, Flex, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\n\nexport const LocationFormSchema = z.object({\n phoneNumber: phoneValidation,\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: zipValidation,\n addressType: z.array(z.enum(['mailingAddress', 'filingAddress'])).optional(),\n})\n\nexport type LocationFormInputs = z.infer<typeof LocationFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.Locations')\n const transform = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Grid\n gap={{ base: 20, small: 8 }}\n gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }}\n >\n <TextInputField\n name=\"street1\"\n isRequired\n label={t('street1Label')}\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2Label')} />\n <TextInputField\n name=\"city\"\n label={t('cityLabel')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('stateLabel')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zipLabel')}\n errorMessage={t('validations.zip')}\n />\n <TextInputField\n name=\"phoneNumber\"\n isRequired\n label={t('phoneNumberLabel')}\n errorMessage={t('validations.phone')}\n transform={transform}\n />\n </Grid>\n <CheckboxGroupField\n name=\"addressType\"\n label={t('addressTypeLabel')}\n options={[\n {\n value: 'mailingAddress',\n label: t('mailingAddressLabel'),\n description: t('mailingAddressDescription'),\n },\n {\n value: 'filingAddress',\n label: t('filingAddressLabel'),\n description: t('filingAddressDescription'),\n },\n ]}\n />\n </Flex>\n )\n}\n"],"names":["LocationFormSchema","z","phoneValidation","zipValidation","Form","t","useTranslation","transform","useMaskedTransform","commonMasks","jsxs","Flex","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxGroupField"],"mappings":";;;;;;;;;;;AAOO,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EACzC,aAAaC;AAAA,EACb,SAASD,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKE;AAAA,EACL,aAAaF,EAAE,MAAMA,EAAE,KAAK,CAAC,kBAAkB,eAAe,CAAC,CAAC,EAAE,SAAA;AACpE,CAAC;AAIM,SAASG,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1CC,IAAYC,EAAmBC,EAAY,SAAS;AAE1D,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA;AAAA,QACxB,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA;AAAA,QAExD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,cAAc;AAAA,cACvB,cAAcA,EAAE,qBAAqB;AAAA,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,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,0BAA0B;AAAA,UAAA;AAAA,QAC3C;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -10,12 +10,11 @@ import { Actions as I } from "./Actions.js";
10
10
  import { LocationsFormProvider as M } from "./useLocationForm.js";
11
11
  import { Form as _ } from "../../../Common/Form/Form.js";
12
12
  import { Flex as w } from "../../../Common/Flex/Flex.js";
13
- import "react-i18next";
14
13
  import "classnames";
14
+ import { componentEvents as a } from "../../../../shared/constants.js";
15
15
  import { BaseComponent as z } from "../../../Base/Base.js";
16
16
  import { useBase as U } from "../../../Base/useBase.js";
17
17
  import { useI18n as j } from "../../../../i18n/I18n.js";
18
- import { componentEvents as a } from "../../../../shared/constants.js";
19
18
  function H(t) {
20
19
  const {
21
20
  data: { location: e }
@@ -25,7 +24,7 @@ function H(t) {
25
24
  function p({
26
25
  companyId: t,
27
26
  location: e,
28
- className: i,
27
+ className: n,
29
28
  children: r
30
29
  }) {
31
30
  j("Company.Locations");
@@ -38,12 +37,12 @@ function p({
38
37
  street2: e?.street2 ?? "",
39
38
  state: e?.state ?? "",
40
39
  zip: e?.zip ?? "",
41
- addressType: L.filter((n) => e?.[n] ?? !1)
40
+ addressType: L.filter((i) => e?.[i] ?? !1)
42
41
  }
43
42
  }), v = () => {
44
43
  s(a.CANCEL);
45
- }, C = async (n) => {
46
- await f(n, async (F) => {
44
+ }, C = async (i) => {
45
+ await f(i, async (F) => {
47
46
  const { addressType: c, ...P } = F, u = {
48
47
  ...P,
49
48
  mailingAddress: c?.includes("mailingAddress"),
@@ -68,7 +67,7 @@ function p({
68
67
  }
69
68
  });
70
69
  };
71
- return /* @__PURE__ */ o("section", { className: i, children: /* @__PURE__ */ o(E, { ...d, control: h, children: /* @__PURE__ */ o(_, { onSubmit: d.handleSubmit(C), children: /* @__PURE__ */ o(
70
+ return /* @__PURE__ */ o("section", { className: n, children: /* @__PURE__ */ o(E, { ...d, control: h, children: /* @__PURE__ */ o(_, { onSubmit: d.handleSubmit(C), children: /* @__PURE__ */ o(
72
71
  M,
73
72
  {
74
73
  value: { handleCancel: v, isPending: A || y },
@@ -80,16 +79,16 @@ function p({
80
79
  }
81
80
  ) }) }) });
82
81
  }
83
- function me({
82
+ function ie({
84
83
  companyId: t,
85
84
  locationId: e,
86
- className: i,
85
+ className: n,
87
86
  children: r,
88
87
  ...s
89
88
  }) {
90
- return /* @__PURE__ */ o(z, { ...s, children: e ? /* @__PURE__ */ o(H, { companyId: t, locationId: e, className: i, children: r }) : /* @__PURE__ */ o(p, { companyId: t, className: i, children: r }) });
89
+ return /* @__PURE__ */ o(z, { ...s, children: e ? /* @__PURE__ */ o(H, { companyId: t, locationId: e, className: n, children: r }) : /* @__PURE__ */ o(p, { companyId: t, className: n, children: r }) });
91
90
  }
92
91
  export {
93
- me as LocationForm
92
+ ie as LocationForm
94
93
  };
95
94
  //# sourceMappingURL=LocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/LocationForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useLocationsUpdateMutation } from '@gusto/embedded-api/react-query/locationsUpdate'\nimport { useLocationsRetrieveSuspense } from '@gusto/embedded-api/react-query/locationsRetrieve'\nimport { useLocationsCreateMutation } from '@gusto/embedded-api/react-query/locationsCreate'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { Head } from './Head'\nimport type { LocationFormInputs } from './Form'\nimport { Form, LocationFormSchema } from './Form'\nimport { Actions } from './Actions'\nimport { LocationsFormProvider } from './useLocationForm'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport type { WithRequired } from '@/types/Helpers'\n\ninterface LocationFormProps extends CommonComponentInterface {\n companyId: string\n locationId?: string\n}\n\n/**Accounting for conditional logic where location data needs to be fetched only if locationId is present */\nfunction RootWithLocation(props: WithRequired<LocationFormProps, 'locationId'>) {\n const {\n data: { location },\n } = useLocationsRetrieveSuspense({ locationId: props.locationId })\n return <Root {...props} location={location} />\n}\n\nfunction Root({\n companyId,\n location,\n className,\n children,\n}: LocationFormProps & { location?: Location }) {\n useI18n('Company.Locations')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createLocation, isPending: isPendingCreate } = useLocationsCreateMutation()\n const { mutateAsync: updateLocation, isPending: isPendingUpdate } = useLocationsUpdateMutation()\n const addressType = ['mailingAddress', 'filingAddress'] as const\n\n const { control, ...methods } = useForm<LocationFormInputs>({\n resolver: zodResolver(LocationFormSchema),\n defaultValues: {\n city: location?.city ?? '',\n phoneNumber: location?.phoneNumber ?? '',\n street1: location?.street1 ?? '',\n street2: location?.street2 ?? '',\n state: location?.state ?? '',\n zip: location?.zip ?? '',\n addressType: addressType.filter(key => location?.[key] ?? false),\n },\n })\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n const onSubmit = async (data: LocationFormInputs) => {\n await baseSubmitHandler(data, async innerData => {\n const { addressType, ...payload } = innerData\n\n const requestBody = {\n ...payload,\n mailingAddress: addressType?.includes('mailingAddress'),\n filingAddress: addressType?.includes('filingAddress'),\n }\n\n if (location && location.version !== undefined) {\n // Edit existing location\n const { location: responseData } = await updateLocation({\n request: {\n locationId: location.uuid,\n requestBody: { ...requestBody, version: location.version },\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_UPDATED, responseData)\n } else {\n // Add new location\n const { location: responseData } = await createLocation({\n request: {\n companyId,\n requestBody,\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_CREATED, responseData)\n }\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <LocationsFormProvider\n value={{ handleCancel, isPending: isPendingCreate || isPendingUpdate }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nexport function LocationForm({\n companyId,\n locationId,\n className,\n children,\n ...props\n}: LocationFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n {locationId ? (\n <RootWithLocation companyId={companyId} locationId={locationId} className={className}>\n {children}\n </RootWithLocation>\n ) : (\n <Root companyId={companyId} className={className}>\n {children}\n </Root>\n )}\n </BaseComponent>\n )\n}\n"],"names":["RootWithLocation","props","location","useLocationsRetrieveSuspense","jsx","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createLocation","isPendingCreate","useLocationsCreateMutation","updateLocation","isPendingUpdate","useLocationsUpdateMutation","addressType","control","methods","useForm","zodResolver","LocationFormSchema","key","handleCancel","componentEvents","onSubmit","data","innerData","payload","requestBody","responseData","FormProvider","HtmlForm","LocationsFormProvider","Flex","jsxs","Fragment","Head","Form","Actions","LocationForm","locationId","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,SAASA,EAAiBC,GAAsD;AAC9E,QAAM;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAA6B,EAAE,YAAYF,EAAM,YAAY;AACjE,SAAO,gBAAAG,EAACC,GAAA,EAAM,GAAGJ,GAAO,UAAAC,EAAA,CAAoB;AAC9C;AAEA,SAASG,EAAK;AAAA,EACZ,WAAAC;AAAA,EACA,UAAAJ;AAAA,EACA,WAAAK;AAAA,EACA,UAAAC;AACF,GAAgD;AAC9C,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,aAAa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AA,UAAA;AAAA,QACF,CACD;AACD,QAAAtB,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SACE,gBAAA7B,EAAC,WAAA,EAAQ,WAAAG,GACP,UAAA,gBAAAH,EAAC8B,KAAc,GAAGb,GAAS,SAAAD,GACzB,UAAA,gBAAAhB,EAAC+B,GAAA,EAAS,UAAUd,EAAQ,aAAaO,CAAQ,GAC/C,UAAA,gBAAAxB;AAAA,IAACgC;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,cAAAV,GAAc,WAAWZ,KAAmBG,EAAA;AAAA,MAErD,UAAA,gBAAAb,EAACiC,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA7B,KAGC,gBAAA8B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAnC,EAACoC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;AAEO,SAASC,GAAa;AAAA,EAC3B,WAAArC;AAAA,EACA,YAAAsC;AAAA,EACA,WAAArC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGP;AACL,GAA+C;AAC7C,2BACG4C,GAAA,EAAe,GAAG5C,GAChB,UAAA2C,sBACE5C,GAAA,EAAiB,WAAAM,GAAsB,YAAAsC,GAAwB,WAAArC,GAC7D,UAAAC,GACH,IAEA,gBAAAJ,EAACC,KAAK,WAAAC,GAAsB,WAAAC,GACzB,UAAAC,GACH,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"LocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/LocationForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useLocationsUpdateMutation } from '@gusto/embedded-api/react-query/locationsUpdate'\nimport { useLocationsRetrieveSuspense } from '@gusto/embedded-api/react-query/locationsRetrieve'\nimport { useLocationsCreateMutation } from '@gusto/embedded-api/react-query/locationsCreate'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { Head } from './Head'\nimport type { LocationFormInputs } from './Form'\nimport { Form, LocationFormSchema } from './Form'\nimport { Actions } from './Actions'\nimport { LocationsFormProvider } from './useLocationForm'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport type { WithRequired } from '@/types/Helpers'\n\ninterface LocationFormProps extends CommonComponentInterface {\n companyId: string\n locationId?: string\n}\n\n/**Accounting for conditional logic where location data needs to be fetched only if locationId is present */\nfunction RootWithLocation(props: WithRequired<LocationFormProps, 'locationId'>) {\n const {\n data: { location },\n } = useLocationsRetrieveSuspense({ locationId: props.locationId })\n return <Root {...props} location={location} />\n}\n\nfunction Root({\n companyId,\n location,\n className,\n children,\n}: LocationFormProps & { location?: Location }) {\n useI18n('Company.Locations')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createLocation, isPending: isPendingCreate } = useLocationsCreateMutation()\n const { mutateAsync: updateLocation, isPending: isPendingUpdate } = useLocationsUpdateMutation()\n const addressType = ['mailingAddress', 'filingAddress'] as const\n\n const { control, ...methods } = useForm<LocationFormInputs>({\n resolver: zodResolver(LocationFormSchema),\n defaultValues: {\n city: location?.city ?? '',\n phoneNumber: location?.phoneNumber ?? '',\n street1: location?.street1 ?? '',\n street2: location?.street2 ?? '',\n state: location?.state ?? '',\n zip: location?.zip ?? '',\n addressType: addressType.filter(key => location?.[key] ?? false),\n },\n })\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n const onSubmit = async (data: LocationFormInputs) => {\n await baseSubmitHandler(data, async innerData => {\n const { addressType, ...payload } = innerData\n\n const requestBody = {\n ...payload,\n mailingAddress: addressType?.includes('mailingAddress'),\n filingAddress: addressType?.includes('filingAddress'),\n }\n\n if (location && location.version !== undefined) {\n // Edit existing location\n const { location: responseData } = await updateLocation({\n request: {\n locationId: location.uuid,\n requestBody: { ...requestBody, version: location.version },\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_UPDATED, responseData)\n } else {\n // Add new location\n const { location: responseData } = await createLocation({\n request: {\n companyId,\n requestBody,\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_CREATED, responseData)\n }\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <LocationsFormProvider\n value={{ handleCancel, isPending: isPendingCreate || isPendingUpdate }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nexport function LocationForm({\n companyId,\n locationId,\n className,\n children,\n ...props\n}: LocationFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n {locationId ? (\n <RootWithLocation companyId={companyId} locationId={locationId} className={className}>\n {children}\n </RootWithLocation>\n ) : (\n <Root companyId={companyId} className={className}>\n {children}\n </Root>\n )}\n </BaseComponent>\n )\n}\n"],"names":["RootWithLocation","props","location","useLocationsRetrieveSuspense","jsx","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createLocation","isPendingCreate","useLocationsCreateMutation","updateLocation","isPendingUpdate","useLocationsUpdateMutation","addressType","control","methods","useForm","zodResolver","LocationFormSchema","key","handleCancel","componentEvents","onSubmit","data","innerData","payload","requestBody","responseData","FormProvider","HtmlForm","LocationsFormProvider","Flex","jsxs","Fragment","Head","Form","Actions","LocationForm","locationId","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,SAASA,EAAiBC,GAAsD;AAC9E,Q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C,GAChB,UAAA2C,sBACE5C,GAAA,EAAiB,WAAAM,GAAsB,YAAAsC,GAAwB,WAAArC,GAC7D,UAAAC,GACH,IAEA,gBAAAJ,EAACC,KAAK,WAAAC,GAAsB,WAAAC,GACzB,UAAAC,GACH,GAEJ;AAEJ;"}
@@ -12,12 +12,13 @@ import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
14
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [L, f] = o(
17
+ const [f, v] = o(
17
18
  "CompanyDocumentFormContext"
18
19
  );
19
20
  export {
20
- f as LocationsFormProvider,
21
- L as useLocationsForm
21
+ v as LocationsFormProvider,
22
+ f as useLocationsForm
22
23
  };
23
24
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,23 +1,27 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { createMachine as a } from "robot3";
3
- import { locationsStateMachine as e } from "./stateMachine.js";
4
- import { LocationsListContextual as c } from "./locationsStateMachine.js";
5
- import { Flow as p } from "../../Flow/Flow.js";
6
- import { useComponentDictionary as s } from "../../../i18n/I18n.js";
7
- function C({ companyId: o, onEvent: t, dictionary: n }) {
8
- s("Company.Locations", n);
9
- const i = a(
10
- "index",
11
- e,
12
- (m) => ({
13
- ...m,
14
- component: c,
15
- companyId: o
16
- })
2
+ import { createMachine as e } from "robot3";
3
+ import { useMemo as a } from "react";
4
+ import { locationsStateMachine as c } from "./stateMachine.js";
5
+ import { LocationsListContextual as p } from "./locationsStateMachine.js";
6
+ import { Flow as s } from "../../Flow/Flow.js";
7
+ import { useComponentDictionary as f } from "../../../i18n/I18n.js";
8
+ function g({ companyId: o, onEvent: t, dictionary: i }) {
9
+ f("Company.Locations", i);
10
+ const n = a(
11
+ () => e(
12
+ "index",
13
+ c,
14
+ (m) => ({
15
+ ...m,
16
+ component: p,
17
+ companyId: o
18
+ })
19
+ ),
20
+ [o]
17
21
  );
18
- return /* @__PURE__ */ r(p, { machine: i, onEvent: t });
22
+ return /* @__PURE__ */ r(s, { machine: n, onEvent: t });
19
23
  }
20
24
  export {
21
- C as Locations
25
+ g as Locations
22
26
  };
23
27
  //# sourceMappingURL=Locations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Locations.js","sources":["../../../../src/components/Company/Locations/Locations.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { type LocationsContextInterface } from './locationsStateMachine'\nimport { locationsStateMachine } from './stateMachine'\nimport { LocationsListContextual } from './locationsStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface LocationsProps extends BaseComponentInterface<'Company.Locations'> {\n companyId: string\n}\n\nexport function Locations({ companyId, onEvent, dictionary }: LocationsProps) {\n useComponentDictionary('Company.Locations', dictionary)\n\n const manageLocations = createMachine(\n 'index',\n locationsStateMachine,\n (initialContext: LocationsContextInterface) => ({\n ...initialContext,\n component: LocationsListContextual,\n companyId,\n }),\n )\n return <Flow machine={manageLocations} onEvent={onEvent} />\n}\n"],"names":["Locations","companyId","onEvent","dictionary","useComponentDictionary","manageLocations","createMachine","locationsStateMachine","initialContext","LocationsListContextual","jsx","Flow"],"mappings":";;;;;;AAYO,SAASA,EAAU,EAAE,WAAAC,GAAW,SAAAC,GAAS,YAAAC,KAA8B;AAC5E,EAAAC,EAAuB,qBAAqBD,CAAU;AAEtD,QAAME,IAAkBC;AAAA,IACtB;AAAA,IACAC;AAAA,IACA,CAACC,OAA+C;AAAA,MAC9C,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAR;AAAA,IAAA;AAAA,EACF;AAEF,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAASN,GAAiB,SAAAH,EAAA,CAAkB;AAC3D;"}
1
+ {"version":3,"file":"Locations.js","sources":["../../../../src/components/Company/Locations/Locations.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { type LocationsContextInterface } from './locationsStateMachine'\nimport { locationsStateMachine } from './stateMachine'\nimport { LocationsListContextual } from './locationsStateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface LocationsProps extends BaseComponentInterface<'Company.Locations'> {\n companyId: string\n}\n\nexport function Locations({ companyId, onEvent, dictionary }: LocationsProps) {\n useComponentDictionary('Company.Locations', dictionary)\n\n const manageLocations = useMemo(\n () =>\n createMachine(\n 'index',\n locationsStateMachine,\n (initialContext: LocationsContextInterface) => ({\n ...initialContext,\n component: LocationsListContextual,\n companyId,\n }),\n ),\n [companyId],\n )\n return <Flow machine={manageLocations} onEvent={onEvent} />\n}\n"],"names":["Locations","companyId","onEvent","dictionary","useComponentDictionary","manageLocations","useMemo","createMachine","locationsStateMachine","initialContext","LocationsListContextual","jsx","Flow"],"mappings":";;;;;;;AAaO,SAASA,EAAU,EAAE,WAAAC,GAAW,SAAAC,GAAS,YAAAC,KAA8B;AAC5E,EAAAC,EAAuB,qBAAqBD,CAAU;AAEtD,QAAME,IAAkBC;AAAA,IACtB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAA+C;AAAA,QAC9C,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAT;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACA,CAAS;AAAA,EAAA;AAEZ,SAAO,gBAAAU,EAACC,GAAA,EAAK,SAASP,GAAiB,SAAAH,EAAA,CAAkB;AAC3D;"}
@@ -1,17 +1,18 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as s } from "react-i18next";
3
3
  import { useLocationsList as a } from "./useLocationsList.js";
4
4
  import "classnames";
5
+ import "../../../../shared/constants.js";
5
6
  import { ActionsLayout as e } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
7
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function L() {
8
- const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), n = m();
8
+ function h() {
9
+ const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), t = m();
9
10
  return /* @__PURE__ */ c(e, { children: [
10
- /* @__PURE__ */ t(n.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
11
- /* @__PURE__ */ t(n.Button, { onClick: r, children: o("continueCta") })
11
+ /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
12
+ /* @__PURE__ */ n(t.Button, { onClick: r, children: o("continueCta") })
12
13
  ] });
13
14
  }
14
15
  export {
15
- L as Actions
16
+ h as Actions
16
17
  };
17
18
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAA,IAAmBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,gBAAgB,EAAA,CACrB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAA,IAAmBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,gBAAgB,EAAA,CACrB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAA,CAAE;AAAA,EAAA,GAChE;AAEJ;"}
@@ -3,15 +3,16 @@ import { useTranslation as L } from "react-i18next";
3
3
  import { useLocationsList as C } from "./useLocationsList.js";
4
4
  import P from "../../../../assets/icons/pencil.svg.js";
5
5
  import "classnames";
6
- import { EmptyData as b } from "../../../Common/EmptyData/EmptyData.js";
7
- import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import "../../../../shared/constants.js";
7
+ import { EmptyData as y } from "../../../Common/EmptyData/EmptyData.js";
8
+ import { useComponentContext as b } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
9
  import { HamburgerMenu as x } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
9
- import { getStreet as T, getCityStateZip as A } from "../../../../helpers/formattedStrings.js";
10
- import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
- import { useDataView as D } from "../../../Common/DataView/useDataView.js";
12
- import { DataView as S } from "../../../Common/DataView/DataView.js";
13
- const Z = () => {
14
- const a = y(), {
10
+ import { getStreet as T, getCityStateZip as v } from "../../../../helpers/formattedStrings.js";
11
+ import { VisuallyHidden as A } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
12
+ import { useDataView as k } from "../../../Common/DataView/useDataView.js";
13
+ import { DataView as D } from "../../../Common/DataView/DataView.js";
14
+ const q = () => {
15
+ const a = b(), {
15
16
  locationList: o,
16
17
  handleEditLocation: s,
17
18
  currentPage: d,
@@ -22,21 +23,20 @@ const Z = () => {
22
23
  handleNextPage: g,
23
24
  handlePreviousPage: u,
24
25
  handleAddLocation: h
25
- } = C(), { t: e } = L("Company.Locations"), { ...f } = D({
26
+ } = C(), { t: e } = L("Company.Locations"), { ...f } = k({
26
27
  data: o,
27
28
  columns: [
28
29
  {
29
30
  key: "name",
30
31
  title: e("locationListCol1"),
31
32
  render: (i) => /* @__PURE__ */ t(r, { children: /* @__PURE__ */ n("address", { children: [
32
- /* @__PURE__ */ t(a.Text, { as: "span", children: T(i) }),
33
- /* @__PURE__ */ t("br", {}),
34
- /* @__PURE__ */ t(a.Text, { as: "span", size: "sm", children: A(i) })
33
+ /* @__PURE__ */ t(a.Text, { as: "div", children: T(i) }),
34
+ /* @__PURE__ */ t(a.Text, { as: "div", size: "sm", children: v(i) })
35
35
  ] }) })
36
36
  },
37
37
  {
38
38
  key: "status",
39
- title: /* @__PURE__ */ t(k, { children: e("locationListCol2") }),
39
+ title: /* @__PURE__ */ t(A, { children: e("locationListCol2") }),
40
40
  render: (i) => /* @__PURE__ */ n(r, { children: [
41
41
  i.mailingAddress && /* @__PURE__ */ t(a.Badge, { status: "info", children: e("mailingAddress") }),
42
42
  i.filingAddress && /* @__PURE__ */ n(r, { children: [
@@ -72,11 +72,11 @@ const Z = () => {
72
72
  currentPage: d,
73
73
  totalPages: l
74
74
  },
75
- emptyState: () => /* @__PURE__ */ t(b, { title: e("emptyTableTitle"), description: e("emptyTableDescription"), children: /* @__PURE__ */ t(a.Button, { variant: "secondary", onClick: h, children: e("addFirstLocationCta") }) })
75
+ emptyState: () => /* @__PURE__ */ t(y, { title: e("emptyTableTitle"), description: e("emptyTableDescription"), children: /* @__PURE__ */ t(a.Button, { variant: "secondary", onClick: h, children: e("addFirstLocationCta") }) })
76
76
  });
77
- return /* @__PURE__ */ t(S, { label: e("locationListLabel"), ...f });
77
+ return /* @__PURE__ */ t(D, { label: e("locationListLabel"), ...f });
78
78
  };
79
79
  export {
80
- Z as List
80
+ q as List
81
81
  };
82
82
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"span\">{getStreet(location)}</Components.Text>\n <br />\n <Components.Text as=\"span\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,GAAAC,EAAA,IA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A,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAa,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAAClB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"div\">{getStreet(location)}</Components.Text>\n <Components.Text as=\"div\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AA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OX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAV,EAAmBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAa,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAAClB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as p, Fragment as u } from "react/jsx-runtime";
2
2
  import { useLocationsGetSuspense as L } from "@gusto/embedded-api/react-query/locationsGet";
3
- import { useState as c } from "react";
3
+ import { useState as m } from "react";
4
4
  import { Head as f } from "./Head.js";
5
5
  import { List as C } from "./List.js";
6
6
  import { Actions as A } from "./Actions.js";
@@ -9,23 +9,22 @@ import { useI18n as O } from "../../../../i18n/I18n.js";
9
9
  import { BaseComponent as x } from "../../../Base/Base.js";
10
10
  import { useBase as E } from "../../../Base/useBase.js";
11
11
  import { Flex as I } from "../../../Common/Flex/Flex.js";
12
- import "react-i18next";
13
12
  import "classnames";
14
13
  import { companyEvents as i } from "../../../../shared/constants.js";
15
- function V(o) {
14
+ function U(o) {
16
15
  return /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
17
16
  }
18
17
  function v({ companyId: o, className: d, children: s }) {
19
18
  O("Company.Locations");
20
- const { onEvent: a } = E(), [m, n] = c(1), [l, h] = c(5), {
19
+ const { onEvent: a } = E(), [c, n] = m(1), [l, h] = m(5), {
21
20
  data: { locationList: P, httpMeta: g }
22
- } = L({ companyId: o, page: m, per: l }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
21
+ } = L({ companyId: o, page: c, per: l }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
23
22
  return /* @__PURE__ */ e("section", { className: d, children: /* @__PURE__ */ e(
24
23
  N,
25
24
  {
26
25
  value: {
27
26
  locationList: P ?? [],
28
- currentPage: m,
27
+ currentPage: c,
29
28
  totalPages: r,
30
29
  handleFirstPage: () => {
31
30
  n(1);
@@ -61,6 +60,6 @@ function v({ companyId: o, className: d, children: s }) {
61
60
  ) });
62
61
  }
63
62
  export {
64
- V as LocationsList
63
+ U as LocationsList
65
64
  };
66
65
  //# sourceMappingURL=LocationsList.js.map