@gusto/embedded-react-sdk 0.41.0 → 0.42.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 (506) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/assets/icons/house.svg.js +10 -0
  3. package/dist/assets/icons/house.svg.js.map +1 -0
  4. package/dist/components/Base/Base.js +2 -3
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/EmptyData/EmptyData.d.ts +3 -0
  7. package/dist/components/Common/EmptyData/EmptyData.js +11 -11
  8. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  9. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +8 -6
  10. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  11. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  12. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  13. package/dist/components/Common/UI/TextInput/TextInput.js +37 -35
  14. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  15. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  16. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
  18. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  20. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -7
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -3
  38. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  40. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  42. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
  44. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  46. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  48. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  50. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  52. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  54. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -10
  56. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  58. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  59. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -1
  60. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +9 -11
  61. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  62. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  63. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  64. package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -9
  65. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  66. package/dist/components/Company/FederalTaxes/Form.js +2 -3
  67. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  68. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  69. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  70. package/dist/components/Company/Industry/Actions.js +5 -7
  71. package/dist/components/Company/Industry/Actions.js.map +1 -1
  72. package/dist/components/Company/Industry/Context.js +6 -7
  73. package/dist/components/Company/Industry/Context.js.map +1 -1
  74. package/dist/components/Company/Industry/Edit.js +10 -12
  75. package/dist/components/Company/Industry/Edit.js.map +1 -1
  76. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  77. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  78. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  79. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  80. package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -4
  81. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  82. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  83. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  84. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  85. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  86. package/dist/components/Company/Locations/LocationsList/List.js +8 -10
  87. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  88. package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -8
  89. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  90. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  91. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  92. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +11 -15
  93. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  94. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +37 -35
  95. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  96. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  97. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  98. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +5 -6
  99. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  100. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
  101. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  102. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  103. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/PayScheduleForm.js +87 -100
  105. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  106. package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js +8 -10
  107. package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js.map +1 -1
  108. package/dist/components/Company/PaySchedule/PayScheduleList.js +2 -3
  109. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  110. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +11 -1
  111. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  112. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  113. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  114. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  115. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  116. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  117. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  118. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  119. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  120. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  121. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  122. package/dist/components/Contractor/Address/Address.js +2 -4
  123. package/dist/components/Contractor/Address/Address.js.map +1 -1
  124. package/dist/components/Contractor/Address/Form.js +6 -7
  125. package/dist/components/Contractor/Address/Form.js.map +1 -1
  126. package/dist/components/Contractor/Address/useAddress.js +5 -6
  127. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  128. package/dist/components/Contractor/ContractorList/index.js +2 -3
  129. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  130. package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
  131. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  132. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +13 -16
  133. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  134. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +61 -63
  135. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  136. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +4 -6
  137. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  138. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  139. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  140. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  141. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  142. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -3
  143. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  144. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +2 -3
  145. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  146. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +2 -3
  147. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  148. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +2 -3
  149. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  150. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +11 -11
  151. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
  152. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +88 -111
  153. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  154. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -3
  155. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  156. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +13 -14
  157. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  158. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -3
  159. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  160. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -3
  161. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  162. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  163. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  164. package/dist/components/Contractor/Submit/Submit.js +2 -3
  165. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  166. package/dist/components/Employee/Compensation/Actions.js +5 -6
  167. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  168. package/dist/components/Employee/Compensation/Edit.js +14 -15
  169. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  170. package/dist/components/Employee/Compensation/List.js +23 -25
  171. package/dist/components/Employee/Compensation/List.js.map +1 -1
  172. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +2 -0
  173. package/dist/components/Employee/Dashboard/DashboardComponents.js +18 -6
  174. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  175. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +2 -0
  176. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +55 -4
  177. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  178. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -3
  179. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  180. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -3
  181. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  182. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -3
  183. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  184. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +6 -7
  185. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  186. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
  187. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  188. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  189. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  190. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +9 -11
  191. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  192. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  193. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  194. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  195. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  196. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +7 -8
  197. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  198. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +0 -33
  199. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +130 -215
  200. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  201. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +79 -58
  202. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +2 -3
  204. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -1
  205. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/index.d.ts +2 -2
  206. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -1
  207. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js +33 -49
  208. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
  209. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +12 -3
  210. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  211. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -3
  212. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  213. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -0
  214. package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeListView.js +2 -3
  215. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -0
  216. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -0
  217. package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeListView.js +34 -35
  218. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -0
  219. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -0
  220. package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
  221. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  222. package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -6
  223. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  224. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  225. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  226. package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +6 -0
  227. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +48 -0
  228. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -0
  229. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +18 -0
  230. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +476 -0
  231. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -0
  232. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +8 -0
  233. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js +36 -0
  234. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -0
  235. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.test.d.ts +1 -0
  236. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +45 -0
  237. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +112 -0
  238. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -0
  239. package/dist/components/Employee/Landing/Landing.js +6 -7
  240. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  241. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  242. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  243. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  244. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
  246. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  247. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +6 -7
  248. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  249. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
  250. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  251. package/dist/components/Employee/PaymentMethod/Split.js +25 -25
  252. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  253. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -7
  254. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  255. package/dist/components/Employee/Profile/AdminProfile.js +42 -42
  256. package/dist/components/Employee/Profile/AdminProfile.js.map +1 -1
  257. package/dist/components/Employee/Profile/EmployeeProfile.js +40 -36
  258. package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -1
  259. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +37 -36
  260. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  261. package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +2 -0
  262. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.d.ts +3 -0
  263. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +24 -0
  264. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -0
  265. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +9 -3
  266. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +97 -97
  267. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  268. package/dist/components/Employee/Profile/shared/useWorkAddressForm/index.d.ts +2 -0
  269. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.d.ts +3 -0
  270. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +24 -0
  271. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -0
  272. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +10 -4
  273. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +95 -84
  274. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  275. package/dist/components/Employee/StateTaxes/Actions.js +8 -10
  276. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  277. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  278. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  279. package/dist/components/Employee/Taxes/Actions.js +8 -10
  280. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  281. package/dist/components/Employee/Taxes/FederalForm.js +4 -6
  282. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  283. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  284. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  285. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +2 -3
  286. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  287. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +11 -9
  288. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
  289. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +8 -9
  290. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  291. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +71 -89
  292. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
  293. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -3
  294. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  295. package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +6 -0
  296. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +48 -0
  297. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -0
  298. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +16 -0
  299. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +367 -0
  300. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -0
  301. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +4 -0
  302. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js +35 -0
  303. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -0
  304. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +45 -0
  305. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +143 -0
  306. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -0
  307. package/dist/components/Employee/exports/employeeManagement.d.ts +3 -1
  308. package/dist/components/Employee/exports/employeeManagement.js +12 -10
  309. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  310. package/dist/components/Employee/exports/employeeOnboarding.d.ts +1 -1
  311. package/dist/components/Employee/exports/employeeOnboarding.js +1 -1
  312. package/dist/components/Employee/index.d.ts +5 -1
  313. package/dist/components/Employee/index.js +37 -33
  314. package/dist/components/Employee/index.js.map +1 -1
  315. package/dist/components/Flow/Flow.js +23 -51
  316. package/dist/components/Flow/Flow.js.map +1 -1
  317. package/dist/components/Flow/FlowHeader.d.ts +16 -0
  318. package/dist/components/Flow/FlowHeader.js +89 -0
  319. package/dist/components/Flow/FlowHeader.js.map +1 -0
  320. package/dist/components/Flow/useFlow.d.ts +33 -6
  321. package/dist/components/Flow/useFlow.js.map +1 -1
  322. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +17 -18
  323. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  324. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +7 -8
  325. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  326. package/dist/components/InformationRequests/InformationRequests.js +2 -3
  327. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  328. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +0 -1
  329. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  330. package/dist/components/Payroll/Dismissal/DismissalFlow.js +20 -18
  331. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  332. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +10 -10
  333. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  334. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -9
  335. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  336. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +17 -19
  337. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -1
  338. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  339. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  340. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +13 -11
  341. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  342. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +9 -9
  343. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  344. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +25 -29
  345. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
  346. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +18 -19
  347. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  348. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -12
  349. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  350. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
  351. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  352. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -4
  353. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  354. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -8
  355. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  356. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +2 -3
  357. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  358. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
  359. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  360. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +4 -5
  361. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  362. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -42
  363. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  364. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -42
  365. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  366. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +18 -17
  367. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  368. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +69 -78
  369. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  370. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -3
  371. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  372. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +13 -12
  373. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  374. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +51 -82
  375. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  376. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +12 -13
  377. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  378. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +29 -30
  379. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  380. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +2 -3
  381. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  382. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
  383. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  384. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +45 -44
  385. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  386. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +0 -1
  387. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  388. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -3
  389. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  390. package/dist/components/Payroll/Transition/TransitionFlow.js +17 -15
  391. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  392. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +24 -24
  393. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  394. package/dist/components/Payroll/Transition/transitionStateMachine.js +25 -29
  395. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
  396. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +2 -3
  397. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  398. package/dist/components/Payroll/usePreparedPayrollData.js +6 -7
  399. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  400. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +12 -13
  401. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  402. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +2 -3
  403. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  404. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +2 -3
  405. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  406. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +22 -24
  407. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  408. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +2 -3
  409. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  410. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +1 -0
  411. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -12
  412. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  413. package/dist/helpers/breadcrumbHelpers.d.ts +35 -22
  414. package/dist/helpers/breadcrumbHelpers.js +45 -35
  415. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  416. package/dist/helpers/dateFormatting.d.ts +12 -0
  417. package/dist/helpers/dateFormatting.js +72 -65
  418. package/dist/helpers/dateFormatting.js.map +1 -1
  419. package/dist/helpers/formattedStrings.d.ts +2 -0
  420. package/dist/helpers/formattedStrings.js +30 -27
  421. package/dist/helpers/formattedStrings.js.map +1 -1
  422. package/dist/i18n/I18n.js +130 -35
  423. package/dist/i18n/I18n.js.map +1 -1
  424. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +60 -0
  425. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -0
  426. package/dist/i18n/en/Employee.HomeAddress.json.js +22 -20
  427. package/dist/i18n/en/Employee.HomeAddress.json.js.map +1 -1
  428. package/dist/i18n/en/Employee.I9SignatureForm.json.js +79 -75
  429. package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -1
  430. package/dist/i18n/en/Employee.PaymentMethod.json.js +13 -13
  431. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +62 -0
  432. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -0
  433. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
  434. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
  435. package/dist/i18n/en/common.json.d.ts +1 -0
  436. package/dist/i18n/en/common.json.js +28 -26
  437. package/dist/i18n/en/common.json.js.map +1 -1
  438. package/dist/index.d.ts +5 -5
  439. package/dist/index.js +72 -68
  440. package/dist/index.js.map +1 -1
  441. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +15 -18
  442. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  443. package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +4 -2
  444. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +19 -13
  445. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  446. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +21 -24
  447. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  448. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +15 -18
  449. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  450. package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
  451. package/dist/partner-hook-utils/form/fields/SelectHookField.js +29 -28
  452. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  453. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +16 -19
  454. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  455. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +22 -25
  456. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  457. package/dist/shared/constants.d.ts +4 -0
  458. package/dist/shared/constants.js +14 -12
  459. package/dist/shared/constants.js.map +1 -1
  460. package/dist/style.css +1 -1
  461. package/dist/types/i18next.d.ts +89 -1
  462. package/docs/reference/endpoint-inventory.json +72 -8
  463. package/package.json +7 -7
  464. package/dist/_virtual/dynamic-import-helper.js +0 -17
  465. package/dist/_virtual/dynamic-import-helper.js.map +0 -1
  466. package/dist/components/Common/SignatureForm/SignatureForm.d.ts +0 -14
  467. package/dist/components/Common/SignatureForm/SignatureForm.js +0 -28
  468. package/dist/components/Common/SignatureForm/SignatureForm.js.map +0 -1
  469. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +0 -10
  470. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js.map +0 -1
  471. package/dist/components/Common/SignatureForm/SignatureFormActions.d.ts +0 -8
  472. package/dist/components/Common/SignatureForm/SignatureFormActions.js +0 -22
  473. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +0 -1
  474. package/dist/components/Common/SignatureForm/SignatureFormFields.d.ts +0 -9
  475. package/dist/components/Common/SignatureForm/SignatureFormFields.js +0 -39
  476. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +0 -1
  477. package/dist/components/Common/SignatureForm/index.d.ts +0 -5
  478. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
  479. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js +0 -20
  480. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js.map +0 -1
  481. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.d.ts +0 -1
  482. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js +0 -20
  483. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +0 -1
  484. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.d.ts +0 -1
  485. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js +0 -35
  486. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js.map +0 -1
  487. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
  488. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js +0 -20
  489. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +0 -1
  490. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
  491. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +0 -21
  492. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
  493. package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +0 -1
  494. package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +0 -1
  495. package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +0 -1
  496. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +0 -1
  497. package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +0 -1
  498. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeList.d.ts +0 -0
  499. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeList.js +0 -0
  500. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeListView.d.ts +0 -0
  501. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeList.d.ts +0 -0
  502. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeList.js +0 -0
  503. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeListView.d.ts +0 -0
  504. /package/dist/components/Employee/{employee-list → EmployeeList}/shared/index.d.ts +0 -0
  505. /package/dist/components/Employee/{employee-list → EmployeeList}/shared/useEmployeeList.d.ts +0 -0
  506. /package/dist/components/Employee/{employee-list → EmployeeList}/shared/useEmployeeList.js +0 -0
@@ -12,20 +12,19 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
12
12
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
13
13
  import "@gusto/embedded-api/models/errors/httpclienterrors";
14
14
  import "../../../shared/constants.js";
15
- import "classnames";
16
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
17
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const b = o.object({
17
+ const C = o.object({
19
18
  federalEin: o.string().optional(),
20
19
  taxPayerType: o.enum(Object.values(e)).optional(),
21
20
  filingForm: o.enum(Object.values(r)).optional(),
22
21
  legalName: o.string().min(1)
23
- }), [j, v] = t(
22
+ }), [b, j] = t(
24
23
  "CompanyFederalTaxesContext"
25
24
  );
26
25
  export {
27
- b as FederalTaxFormSchema,
28
- v as FederalTaxesProvider,
29
- j as useFederalTaxes
26
+ C as FederalTaxFormSchema,
27
+ j as FederalTaxesProvider,
28
+ b as useFederalTaxes
30
29
  };
31
30
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -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 { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\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":";;;;;;;;;;;;;;;;;AAMO,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 { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\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":";;;;;;;;;;;;;;;;AAMO,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,15 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { useIndustryApiState as s } from "./Context.js";
4
- import "../../../shared/constants.js";
5
- import "classnames";
2
+ import { useTranslation as s } from "react-i18next";
3
+ import { useIndustryApiState as i } from "./Context.js";
6
4
  import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
- const C = () => {
9
- const { t: o } = i("Company.Industry"), { isPending: n } = s(), r = e();
6
+ const f = () => {
7
+ const { t: o } = s("Company.Industry"), { isPending: n } = i(), r = e();
10
8
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
11
9
  };
12
10
  export {
13
- C as Actions
11
+ f as Actions
14
12
  };
15
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,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;"}
@@ -10,18 +10,17 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../shared/constants.js";
13
- import "classnames";
14
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
15
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const [P, f] = t("IndustryItems", {
15
+ const [A, P] = t("IndustryItems", {
17
16
  items: []
18
- }), [v, x] = t("IndustryApi", {
17
+ }), [f, v] = t("IndustryApi", {
19
18
  isPending: !1
20
19
  });
21
20
  export {
22
- x as IndustryApiStateProvider,
23
- f as IndustryItemsProvider,
24
- v as useIndustryApiState,
25
- P as useIndustryItems
21
+ v as IndustryApiStateProvider,
22
+ P as IndustryItemsProvider,
23
+ f as useIndustryApiState,
24
+ A as useIndustryItems
26
25
  };
27
26
  //# 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;"}
@@ -1,16 +1,14 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as e } from "react-i18next";
3
- import { useIndustryItems as m } from "./Context.js";
4
- import "../../../shared/constants.js";
5
- import "classnames";
6
- import { ComboBoxField as i } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
7
- const c = () => {
8
- const { t: o } = e("Company.Industry"), { items: r } = m();
9
- return /* @__PURE__ */ t(
10
- i,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as t } from "react-i18next";
3
+ import { useIndustryItems as s } from "./Context.js";
4
+ import { ComboBoxField as m } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
5
+ const p = () => {
6
+ const { t: o } = t("Company.Industry"), { items: e } = s();
7
+ return /* @__PURE__ */ r(
8
+ m,
11
9
  {
12
10
  isRequired: !0,
13
- options: r,
11
+ options: e,
14
12
  label: o("label"),
15
13
  name: "naics_code",
16
14
  placeholder: o("placeholder")
@@ -18,6 +16,6 @@ const c = () => {
18
16
  );
19
17
  };
20
18
  export {
21
- c as Edit
19
+ p as Edit
22
20
  };
23
21
  //# sourceMappingURL=Edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,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;"}
@@ -1,18 +1,16 @@
1
1
  import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useLocationsForm as e } from "./useLocationForm.js";
4
- import "../../../../shared/constants.js";
5
- import "classnames";
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: [
4
+ import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ const f = () => {
7
+ const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
8
+ return /* @__PURE__ */ r(c, { children: [
11
9
  /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
12
10
  /* @__PURE__ */ n(t.Button, { type: "submit", isLoading: s, "data-testid": "location-submit", children: o("saveCta") })
13
11
  ] });
14
12
  };
15
13
  export {
16
- x as Actions
14
+ f as Actions
17
15
  };
18
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,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";
8
7
  import { STATES_ABBR as c } from "../../../../shared/constants.js";
9
8
  import { useMaskedTransform as u, commonMasks as b } from "../../../../helpers/mask.js";
10
9
  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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ACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOb,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,qBAAqB;AAAA,YAC9B,aAAaA,EAAE,2BAA2B;AAAA,UAAA;AAAA,UAE5C;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,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;A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,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAM;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOb,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,qBAAqB;AAAA,YAC9B,aAAaA,EAAE,2BAA2B;AAAA,UAAA;AAAA,UAE5C;AAAA,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,8 +10,6 @@ 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
- import "classnames";
15
13
  import { BaseComponent as z } from "../../../Base/Base.js";
16
14
  import { useBase as U } from "../../../Base/useBase.js";
17
15
  import { useI18n as j } from "../../../../i18n/I18n.js";
@@ -80,7 +78,7 @@ function p({
80
78
  }
81
79
  ) }) }) });
82
80
  }
83
- function me({
81
+ function ne({
84
82
  companyId: t,
85
83
  locationId: e,
86
84
  className: n,
@@ -90,6 +88,6 @@ function me({
90
88
  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
89
  }
92
90
  export {
93
- me as LocationForm
91
+ ne as LocationForm
94
92
  };
95
93
  //# 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 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 const { location: responseData } = await createLocation({\n request: {\n companyId,\n companyLocationRequest: 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":";;;;;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ACA,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 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 const { location: responseData } = await createLocation({\n request: {\n companyId,\n companyLocationRequest: 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,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9D,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9DC,IAAc,CAAC,kBAAkB,eAAe,GAEhD,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA4B;AAAA,IAC1D,UAAUC,EAAYC,CAAkB;AAAA,IACxC,eAAe;AAAA,MACb,MAAMtB,GAAU,QAAQ;AAAA,MACxB,aAAaA,GAAU,eAAe;AAAA,MACtC,SAASA,GAAU,WAAW;AAAA,MAC9B,SAASA,GAAU,WAAW;AAAA,MAC9B,OAAOA,GAAU,SAAS;AAAA,MAC1B,KAAK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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;"}
@@ -10,14 +10,13 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
13
- import "classnames";
14
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [L, f] = o(
15
+ const [d, L] = o(
17
16
  "CompanyDocumentFormContext"
18
17
  );
19
18
  export {
20
- f as LocationsFormProvider,
21
- L as useLocationsForm
19
+ L as LocationsFormProvider,
20
+ d as useLocationsForm
22
21
  };
23
22
  //# 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,18 +1,16 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as s } from "react-i18next";
3
3
  import { useLocationsList as a } from "./useLocationsList.js";
4
- import "../../../../shared/constants.js";
5
- import "classnames";
6
4
  import { ActionsLayout as e } from "../../../Common/ActionsLayout/ActionsLayout.js";
7
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- function h() {
9
- const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), t = m();
6
+ function f() {
7
+ const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), n = m();
10
8
  return /* @__PURE__ */ c(e, { children: [
11
- /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
12
- /* @__PURE__ */ n(t.Button, { onClick: r, children: o("continueCta") })
9
+ /* @__PURE__ */ t(n.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
10
+ /* @__PURE__ */ t(n.Button, { onClick: r, children: o("continueCta") })
13
11
  ] });
14
12
  }
15
13
  export {
16
- h as Actions
14
+ f as Actions
17
15
  };
18
16
  //# 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;"}
@@ -2,8 +2,6 @@ import { jsx as t, Fragment as r, jsxs as n } from "react/jsx-runtime";
2
2
  import { useTranslation as P } from "react-i18next";
3
3
  import { useLocationsList as y } from "./useLocationsList.js";
4
4
  import b from "../../../../assets/icons/pencil.svg.js";
5
- import "../../../../shared/constants.js";
6
- import "classnames";
7
5
  import { EmptyData as x } from "../../../Common/EmptyData/EmptyData.js";
8
6
  import { useComponentContext as T } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
7
  import { getStreet as v, getCityStateZip as A } from "../../../../helpers/formattedStrings.js";
@@ -11,7 +9,7 @@ import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidd
11
9
  import { HamburgerMenu as D } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
12
10
  import { useDataView as S } from "../../../Common/DataView/useDataView.js";
13
11
  import { DataView as V } from "../../../Common/DataView/DataView.js";
14
- const J = () => {
12
+ const q = () => {
15
13
  const a = T(), {
16
14
  locationList: o,
17
15
  handleEditLocation: s,
@@ -19,9 +17,9 @@ const J = () => {
19
17
  totalPages: l,
20
18
  totalCount: m,
21
19
  handleFirstPage: c,
22
- handleItemsPerPageChange: p,
23
- handleLastPage: g,
24
- handleNextPage: u,
20
+ handleItemsPerPageChange: g,
21
+ handleLastPage: u,
22
+ handleNextPage: p,
25
23
  handlePreviousPage: h,
26
24
  handleAddLocation: f,
27
25
  itemsPerPage: L
@@ -66,11 +64,11 @@ const J = () => {
66
64
  }
67
65
  ),
68
66
  pagination: {
69
- handleNextPage: u,
67
+ handleNextPage: p,
70
68
  handleFirstPage: c,
71
- handleLastPage: g,
69
+ handleLastPage: u,
72
70
  handlePreviousPage: h,
73
- handleItemsPerPageChange: p,
71
+ handleItemsPerPageChange: g,
74
72
  currentPage: d,
75
73
  totalPages: l,
76
74
  totalCount: m,
@@ -81,6 +79,6 @@ const J = () => {
81
79
  return /* @__PURE__ */ t(V, { label: e("locationListLabel"), ...C });
82
80
  };
83
81
  export {
84
- J as List
82
+ q as List
85
83
  };
86
84
  //# 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 totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\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 totalCount,\n itemsPerPage,\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","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","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,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMhB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOa,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAI,MAEJ,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WAAA,EACC,UAAA;AAAA,UAAA,gBAAAD,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAO,UAAAsB,EAAUH,CAAQ,GAAE;AAAA,UAC/C,gBAAAC,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAM,MAAK,MAC5B,UAAAuB,EAAgBJ,CAAQ,EAAA,CAC3B;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,MAEJ;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAAI,MAEJ,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,UAAAF,EAAS,oCACPnB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAe,EAAE,gBAAgB,EAAA,CAAE;AAAA,UAExDI,EAAS,iBACR,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAD,EAACpB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAe,EAAE,eAAe,EAAA,CAAE;AAAA,UAAA,EAAA,CACxD;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAI,MAEN,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAZ,EAAmBgB,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,gBAAAL;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAO,EAACQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAA,gBAAAK,EAACpB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAAG,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 totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\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 totalCount,\n itemsPerPage,\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","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","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,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMhB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOa,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAI,MAEJ,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WAAA,EACC,UAAA;AAAA,UAAA,gBAAAD,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAO,UAAAsB,EAAUH,CAAQ,GAAE;AAAA,UAC/C,gBAAAC,EAACpB,EAAW,MAAX,EAAgB,IAAG,OAAM,MAAK,MAC5B,UAAAuB,EAAgBJ,CAAQ,EAAA,CAC3B;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,MAEJ;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OA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,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAA,EAAS,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -8,17 +8,15 @@ import { useI18n as E } from "../../../../i18n/I18n.js";
8
8
  import { BaseComponent as N } from "../../../Base/Base.js";
9
9
  import { useBase as P } from "../../../Base/useBase.js";
10
10
  import { Flex as _ } from "../../../Common/Flex/Flex.js";
11
- import "react-i18next";
12
- import "classnames";
13
11
  import { companyEvents as i } from "../../../../shared/constants.js";
14
12
  import { usePagination as g } from "../../../../hooks/usePagination/usePagination.js";
15
- function b(t) {
13
+ function H(t) {
16
14
  return /* @__PURE__ */ o(N, { ...t, children: /* @__PURE__ */ o(x, { ...t, children: t.children }) });
17
15
  }
18
16
  function x({ companyId: t, className: e, children: r }) {
19
17
  E("Company.Locations");
20
- const { onEvent: n } = P(), { getPaginationProps: m } = g(), {
21
- data: { companyLocationsList: s, httpMeta: a }
18
+ const { onEvent: n } = P(), { getPaginationProps: s } = g(), {
19
+ data: { companyLocationsList: m, httpMeta: a }
22
20
  } = u({ companyId: t }), c = () => {
23
21
  n(i.COMPANY_LOCATION_DONE);
24
22
  }, p = () => {
@@ -30,8 +28,8 @@ function x({ companyId: t, className: e, children: r }) {
30
28
  A,
31
29
  {
32
30
  value: {
33
- ...m(a.response.headers),
34
- locationList: s ?? [],
31
+ ...s(a.response.headers),
32
+ locationList: m ?? [],
35
33
  handleAddLocation: p,
36
34
  handleEditLocation: d,
37
35
  handleContinue: c
@@ -45,6 +43,6 @@ function x({ companyId: t, className: e, children: r }) {
45
43
  ) });
46
44
  }
47
45
  export {
48
- b as LocationsList
46
+ H as LocationsList
49
47
  };
50
48
  //# sourceMappingURL=LocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const { getPaginationProps } = usePagination()\n\n const {\n data: { companyLocationsList, httpMeta },\n } = useLocationsGetSuspense({ companyId })\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers),\n locationList: companyLocationsList ?? [],\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","getPaginationProps","usePagination","companyLocationsList","httpMeta","useLocationsGetSuspense","handleContinue","companyEvents","handleAddLocation","handleEditLocation","uuid","LocationsListProvider","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,G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sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const { getPaginationProps } = usePagination()\n\n const {\n data: { companyLocationsList, httpMeta },\n } = useLocationsGetSuspense({ companyId })\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n ...getPaginationProps(httpMeta.response.headers),\n locationList: companyLocationsList ?? [],\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","getPaginationProps","usePagination","companyLocationsList","httpMeta","useLocationsGetSuspense","handleContinue","companyEvents","handleAddLocation","handleEditLocation","uuid","LocationsListProvider","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAgBO,SAAS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+10,13 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
12
  import "../../../../shared/constants.js";
13
- import "classnames";
14
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
16
- const [f, v] = o(
15
+ const [d, f] = o(
17
16
  "CompanyDocumentListContext"
18
17
  );
19
18
  export {
20
- v as LocationsListProvider,
21
- f as useLocationsList
19
+ f as LocationsListProvider,
20
+ d as useLocationsList
22
21
  };
23
22
  //# sourceMappingURL=useLocationsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\nimport type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n totalCount: number\n currentPage: number\n itemsPerPage: PaginationItemsPerPage\n handleItemsPerPageChange: (n: PaginationItemsPerPage) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,30 +1,26 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { createMachine as m } from "robot3";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { createMachine as t } from "robot3";
3
3
  import { useMemo as p } from "react";
4
4
  import { onboardingMachine as a } from "./onboardingStateMachine.js";
5
5
  import { OnboardingOverviewContextual as c } from "./OnboardingFlowComponents.js";
6
- import { Flow as s } from "../../Flow/Flow.js";
7
- const h = ({ companyId: o, onEvent: e, defaultValues: r }) => {
8
- const n = p(
9
- () => m(
6
+ import { Flow as f } from "../../Flow/Flow.js";
7
+ const x = ({ companyId: o, onEvent: n, defaultValues: r }) => {
8
+ const i = p(
9
+ () => t(
10
10
  "overview",
11
11
  a,
12
- (t) => ({
13
- ...t,
12
+ (m) => ({
13
+ ...m,
14
14
  component: c,
15
15
  companyId: o,
16
- defaultValues: r,
17
- totalSteps: 8,
18
- currentStep: 1,
19
- progressBarType: null
20
- //Overview step does not show progress bar
16
+ defaultValues: r
21
17
  })
22
18
  ),
23
19
  [o, r]
24
20
  );
25
- return /* @__PURE__ */ i(s, { machine: n, onEvent: e });
21
+ return /* @__PURE__ */ e(f, { machine: i, onEvent: n });
26
22
  };
27
23
  export {
28
- h as OnboardingFlow
24
+ x as OnboardingFlow
29
25
  };
30
26
  //# sourceMappingURL=OnboardingFlow.js.map