@gusto/embedded-react-sdk 0.24.1 → 0.25.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 (315) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/assets/icons/slash-circle.svg.js +10 -0
  3. package/dist/assets/icons/slash-circle.svg.js.map +1 -0
  4. package/dist/components/Base/Base.d.ts +1 -1
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/Fields/FileInputField/FileInputField.d.ts +5 -0
  7. package/dist/components/Common/Fields/FileInputField/FileInputField.js +34 -0
  8. package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -0
  9. package/dist/components/Common/Fields/FileInputField/index.d.ts +2 -0
  10. package/dist/components/Common/PaginationControl/PaginationControl.js +41 -40
  11. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  12. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -0
  13. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
  14. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  16. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  17. package/dist/components/Common/UI/FileInput/FileInput.d.ts +2 -0
  18. package/dist/components/Common/UI/FileInput/FileInput.js +151 -0
  19. package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -0
  20. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +34 -0
  21. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -0
  22. package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +45 -0
  23. package/dist/components/Common/UI/FileInput/FileInputTypes.js +8 -0
  24. package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -0
  25. package/dist/components/Common/UI/FileInput/index.d.ts +4 -0
  26. package/dist/components/Common/UI/TextInput/TextInput.js +27 -23
  27. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  28. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  29. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  31. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  32. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  33. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  38. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  39. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -4
  40. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  42. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  44. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  45. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  46. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  47. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  48. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
  49. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  50. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  51. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  52. package/dist/components/Company/FederalTaxes/Form.js +3 -2
  53. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  54. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
  55. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  56. package/dist/components/Company/Industry/Context.js +7 -6
  57. package/dist/components/Company/Industry/Context.js.map +1 -1
  58. package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
  59. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  60. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  61. package/dist/components/Company/Locations/LocationsList/List.js +35 -33
  62. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  63. package/dist/components/Company/Locations/LocationsList/LocationsList.js +30 -29
  64. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  65. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
  66. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  67. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  68. package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
  69. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  70. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
  71. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  72. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
  73. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  74. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  75. package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
  76. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
  77. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  78. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  79. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  80. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  81. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  82. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  83. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  84. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  85. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  86. package/dist/components/Contractor/Address/Address.js +2 -2
  87. package/dist/components/Contractor/Address/useAddress.js +6 -5
  88. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  89. package/dist/components/Contractor/ContractorList/index.js +31 -30
  90. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  91. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +61 -59
  92. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  93. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +34 -31
  94. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  95. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +29 -10
  96. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  97. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  98. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +33 -31
  99. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  100. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  101. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +25 -19
  102. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  103. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  104. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +86 -56
  105. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  106. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +1 -2
  107. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +46 -21
  108. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  109. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +6 -15
  110. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +116 -99
  111. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  112. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js +8 -0
  113. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js.map +1 -0
  114. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +8 -0
  115. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +51 -0
  116. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -0
  117. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +11 -0
  118. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +157 -0
  119. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -0
  120. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +22 -0
  121. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -0
  122. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +46 -48
  123. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  124. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  125. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  126. package/dist/components/Contractor/Submit/Submit.js +1 -1
  127. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +4 -3
  128. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  129. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +4 -3
  130. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  131. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +4 -3
  132. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  133. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  134. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
  135. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  136. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  137. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  138. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  139. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  140. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  141. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  142. package/dist/components/Employee/EmployeeList/EmployeeList.js +58 -56
  143. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  144. package/dist/components/Employee/EmployeeList/Head.js +3 -2
  145. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  146. package/dist/components/Employee/EmployeeList/List.js +34 -32
  147. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  148. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +1 -0
  149. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  150. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  151. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  152. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  153. package/dist/components/Employee/Landing/Landing.js +8 -8
  154. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  155. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  156. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  157. package/dist/components/Employee/Profile/useProfile.js +4 -3
  158. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  159. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  160. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  161. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  162. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  163. package/dist/components/Flow/Flow.js +3 -2
  164. package/dist/components/Flow/Flow.js.map +1 -1
  165. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +15 -0
  166. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +142 -0
  167. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
  168. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +18 -0
  169. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -0
  170. package/dist/components/Payroll/InformationRequests/InformationRequestForm/index.d.ts +2 -0
  171. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.d.ts +7 -0
  172. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +88 -0
  173. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
  174. package/dist/components/Payroll/InformationRequests/InformationRequestList/index.d.ts +2 -0
  175. package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +6 -0
  176. package/dist/components/Payroll/InformationRequests/InformationRequests.js +55 -0
  177. package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +1 -0
  178. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.d.ts +19 -0
  179. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js +20 -0
  180. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +1 -0
  181. package/dist/components/Payroll/InformationRequests/index.d.ts +3 -0
  182. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.d.ts +13 -0
  183. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js +47 -0
  184. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +1 -0
  185. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -6
  186. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  187. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +3 -2
  188. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  189. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +116 -130
  190. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  191. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -2
  192. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +107 -99
  193. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  194. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +2 -4
  195. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
  196. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +21 -0
  197. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +105 -0
  198. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -0
  199. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +41 -37
  200. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  201. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -4
  202. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +151 -145
  203. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  204. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -12
  205. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  206. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  207. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +174 -106
  208. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  209. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +28 -28
  210. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  211. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
  212. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +84 -102
  213. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  214. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +24 -20
  215. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  216. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
  217. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +51 -46
  218. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  219. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +2 -0
  220. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +111 -45
  221. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  222. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +137 -125
  223. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  224. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -4
  225. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
  226. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +117 -110
  227. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  228. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -2
  229. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +282 -278
  230. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  231. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.d.ts +6 -0
  232. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js +5 -0
  233. package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js.map +1 -0
  234. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
  235. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  236. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  237. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  238. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +6 -0
  239. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +55 -0
  240. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -0
  241. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +19 -0
  242. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js +19 -0
  243. package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js.map +1 -0
  244. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +7 -0
  245. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +73 -0
  246. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -0
  247. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +10 -0
  248. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -0
  249. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/index.d.ts +2 -0
  250. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +14 -0
  251. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +46 -0
  252. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -0
  253. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/index.d.ts +2 -0
  254. package/dist/components/Payroll/RecoveryCases/index.d.ts +3 -0
  255. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +13 -0
  256. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +47 -0
  257. package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -0
  258. package/dist/components/Payroll/helpers.d.ts +12 -0
  259. package/dist/components/Payroll/helpers.js +129 -117
  260. package/dist/components/Payroll/helpers.js.map +1 -1
  261. package/dist/components/Payroll/index.d.ts +2 -0
  262. package/dist/components/Payroll/index.js +18 -14
  263. package/dist/components/Payroll/index.js.map +1 -1
  264. package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
  265. package/dist/components/Payroll/usePreparedPayrollData.js +43 -31
  266. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  267. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +27 -25
  268. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  269. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  270. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  271. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +17 -15
  272. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  273. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  274. package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
  275. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  276. package/dist/helpers/dateFormatting.d.ts +1 -0
  277. package/dist/helpers/dateFormatting.js +1 -0
  278. package/dist/helpers/dateFormatting.js.map +1 -1
  279. package/dist/helpers/formattedStrings.d.ts +1 -0
  280. package/dist/helpers/formattedStrings.js +23 -18
  281. package/dist/helpers/formattedStrings.js.map +1 -1
  282. package/dist/helpers/responsive.js +1 -1
  283. package/dist/helpers/responsive.js.map +1 -1
  284. package/dist/i18n/I18n.js +3 -3
  285. package/dist/i18n/I18n.js.map +1 -1
  286. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -32
  287. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  288. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +11 -11
  289. package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js +28 -0
  290. package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js.map +1 -0
  291. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +14 -14
  292. package/dist/i18n/en/Payroll.InformationRequestForm.json.js +18 -0
  293. package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +1 -0
  294. package/dist/i18n/en/Payroll.InformationRequestList.json.js +18 -0
  295. package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +1 -0
  296. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +27 -21
  297. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  298. package/dist/i18n/en/Payroll.PayrollHistory.json.js +6 -6
  299. package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
  300. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
  301. package/dist/i18n/en/Payroll.PayrollOverview.json.js +32 -28
  302. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  303. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -0
  304. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -0
  305. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +8 -0
  306. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -0
  307. package/dist/i18n/en/common.json.d.ts +5 -0
  308. package/dist/i18n/en/common.json.js +4 -2
  309. package/dist/i18n/en/common.json.js.map +1 -1
  310. package/dist/shared/constants.d.ts +24 -0
  311. package/dist/shared/constants.js +70 -54
  312. package/dist/shared/constants.js.map +1 -1
  313. package/dist/style.css +1 -1
  314. package/dist/types/i18next.d.ts +119 -3
  315. package/package.json +31 -20
@@ -5,11 +5,12 @@ import { TaxPayerType as y, FilingForm as u } from "@gusto/embedded-api/models/o
5
5
  import { useFederalTaxes as b } from "./useFederalTaxes.js";
6
6
  import { Flex as g } from "../../Common/Flex/Flex.js";
7
7
  import "classnames";
8
+ import "../../../shared/constants.js";
8
9
  import { useComponentContext as x } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
10
  import { usePlaceholderEin as F, normalizeEin as T } from "../../../helpers/federalEin.js";
10
11
  import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
11
12
  import { SelectField as l } from "../../Common/Fields/SelectField/SelectField.js";
12
- function O() {
13
+ function R() {
13
14
  const { t: e } = d("Company.FederalTaxes"), { federalTaxDetails: s } = b(), i = x(), m = F(s?.hasEin), p = n(
14
15
  () => Object.values(y).map((o) => ({
15
16
  value: o,
@@ -100,6 +101,6 @@ function O() {
100
101
  ] });
101
102
  }
102
103
  export {
103
- O as Form
104
+ R as Form
104
105
  };
105
106
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federalEinLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalEinDescription\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayerTypeLabel')}\n description={t('taxpayerTypeDescription')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federalFilingFormLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalFilingFormDescription\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legalEntityNameLabel')}\n description={t('legalEntityNameDescription')}\n isRequired\n errorMessage={t('legalEntityNameError')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":";;;;;;;;;;;AAWO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxBC,IAAaC,EAAA,GAEbC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAAC,OAAU;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA,GAGEY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAAF,OAAU;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA;AAGJ,SACE,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,iBAAiB;AAAA,QAC1B,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,WACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IAAA;AAAA,IAEf,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,mBAAmB;AAAA,QAC5B,aAAaA,EAAE,yBAAyB;AAAA,QACxC,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,wBAAwB;AAAA,QACjC,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,SACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,sBAAsB;AAAA,QAC/B,aAAaA,EAAE,4BAA4B;AAAA,QAC3C,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federalEinLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalEinDescription\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayerTypeLabel')}\n description={t('taxpayerTypeDescription')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federalFilingFormLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalFilingFormDescription\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legalEntityNameLabel')}\n description={t('legalEntityNameDescription')}\n isRequired\n errorMessage={t('legalEntityNameError')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":";;;;;;;;;;;;AAWO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxBC,IAAaC,EAAA,GAEbC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAAC,OAAU;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA,GAGEY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAAF,OAAU;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA;AAGJ,SACE,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,iBAAiB;AAAA,QAC1B,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,WACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IAAA;AAAA,IAEf,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,mBAAmB;AAAA,QAC5B,aAAaA,EAAE,yBAAyB;AAAA,QACxC,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,wBAAwB;AAAA,QACjC,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,SACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,sBAAsB;AAAA,QAC/B,aAAaA,EAAE,4BAA4B;AAAA,QAC3C,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
@@ -1,5 +1,5 @@
1
1
  import { z as o } from "zod";
2
- import { FilingForm as e, TaxPayerType as r } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
2
+ import { FilingForm as r, TaxPayerType as e } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-error-boundary";
@@ -11,19 +11,20 @@ import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
12
  import "classnames";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
15
  import "dompurify";
15
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const y = o.object({
17
+ const C = o.object({
17
18
  federalEin: o.string().optional(),
18
- taxPayerType: o.enum(Object.values(r)).optional(),
19
- filingForm: o.enum(Object.values(e)).optional(),
19
+ taxPayerType: o.enum(Object.values(e)).optional(),
20
+ filingForm: o.enum(Object.values(r)).optional(),
20
21
  legalName: o.string().min(1)
21
- }), [C, b] = t(
22
+ }), [b, j] = t(
22
23
  "CompanyFederalTaxesContext"
23
24
  );
24
25
  export {
25
- y as FederalTaxFormSchema,
26
- b as FederalTaxesProvider,
27
- C as useFederalTaxes
26
+ C as FederalTaxFormSchema,
27
+ j as FederalTaxesProvider,
28
+ b as useFederalTaxes
28
29
  };
29
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 {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -9,17 +9,18 @@ import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
14
- const [c, A] = t("IndustryItems", {
15
+ const [A, P] = t("IndustryItems", {
15
16
  items: []
16
- }), [P, f] = t("IndustryApi", {
17
+ }), [f, v] = t("IndustryApi", {
17
18
  isPending: !1
18
19
  });
19
20
  export {
20
- f as IndustryApiStateProvider,
21
- A as IndustryItemsProvider,
22
- P as useIndustryApiState,
23
- c as useIndustryItems
21
+ v as IndustryApiStateProvider,
22
+ P as IndustryItemsProvider,
23
+ f as useIndustryApiState,
24
+ A as useIndustryItems
24
25
  };
25
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;"}
@@ -10,14 +10,14 @@ import { Actions as I } from "./Actions.js";
10
10
  import { LocationsFormProvider as M } from "./useLocationForm.js";
11
11
  import { Form as _ } from "../../../Common/Form/Form.js";
12
12
  import { Flex as w } from "../../../Common/Flex/Flex.js";
13
- import "react-i18next";
14
13
  import "classnames";
14
+ import { componentEvents as a } from "../../../../shared/constants.js";
15
+ import "react-i18next";
15
16
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
17
  import "react";
17
18
  import { BaseComponent as z } from "../../../Base/Base.js";
18
19
  import { useBase as U } from "../../../Base/useBase.js";
19
20
  import { useI18n as j } from "../../../../i18n/I18n.js";
20
- import { componentEvents as a } from "../../../../shared/constants.js";
21
21
  function H(t) {
22
22
  const {
23
23
  data: { location: e }
@@ -9,13 +9,14 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
14
- const [F, d] = o(
15
+ const [d, L] = o(
15
16
  "CompanyDocumentFormContext"
16
17
  );
17
18
  export {
18
- d as LocationsFormProvider,
19
- F as useLocationsForm
19
+ L as LocationsFormProvider,
20
+ d as useLocationsForm
20
21
  };
21
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,43 +1,44 @@
1
1
  import { jsx as t, Fragment as r, jsxs as n } from "react/jsx-runtime";
2
2
  import { useTranslation as P } from "react-i18next";
3
- import { useLocationsList as C } from "./useLocationsList.js";
4
- import y from "../../../../assets/icons/pencil.svg.js";
3
+ import { useLocationsList as y } from "./useLocationsList.js";
4
+ import b from "../../../../assets/icons/pencil.svg.js";
5
5
  import "../../../../shared/constants.js";
6
6
  import "classnames";
7
- import { EmptyData as b } from "../../../Common/EmptyData/EmptyData.js";
8
- import { HamburgerMenu as x } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
9
- import { useComponentContext as T } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { getStreet as v, getCityStateZip as A } from "../../../../helpers/formattedStrings.js";
11
- import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
12
- import { useDataView as D } from "../../../Common/DataView/useDataView.js";
13
- import { DataView as S } from "../../../Common/DataView/DataView.js";
14
- const G = () => {
15
- const a = T(), {
7
+ import { EmptyData as x } from "../../../Common/EmptyData/EmptyData.js";
8
+ import { HamburgerMenu as T } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
9
+ import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import { getStreet as A, getCityStateZip as k } from "../../../../helpers/formattedStrings.js";
11
+ import { VisuallyHidden as D } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
12
+ import { useDataView as S } from "../../../Common/DataView/useDataView.js";
13
+ import { DataView as V } from "../../../Common/DataView/DataView.js";
14
+ const J = () => {
15
+ const a = v(), {
16
16
  locationList: o,
17
17
  handleEditLocation: s,
18
18
  currentPage: d,
19
19
  totalPages: l,
20
- handleFirstPage: m,
21
- handleItemsPerPageChange: c,
22
- handleLastPage: p,
23
- handleNextPage: g,
24
- handlePreviousPage: u,
25
- handleAddLocation: h,
26
- itemsPerPage: f
27
- } = C(), { t: e } = P("Company.Locations"), { ...L } = D({
20
+ totalCount: m,
21
+ handleFirstPage: c,
22
+ handleItemsPerPageChange: p,
23
+ handleLastPage: g,
24
+ handleNextPage: u,
25
+ handlePreviousPage: h,
26
+ handleAddLocation: f,
27
+ itemsPerPage: L
28
+ } = y(), { t: e } = P("Company.Locations"), { ...C } = S({
28
29
  data: o,
29
30
  columns: [
30
31
  {
31
32
  key: "name",
32
33
  title: e("locationListCol1"),
33
34
  render: (i) => /* @__PURE__ */ t(r, { children: /* @__PURE__ */ n("address", { children: [
34
- /* @__PURE__ */ t(a.Text, { as: "div", children: v(i) }),
35
- /* @__PURE__ */ t(a.Text, { as: "div", size: "sm", children: A(i) })
35
+ /* @__PURE__ */ t(a.Text, { as: "div", children: A(i) }),
36
+ /* @__PURE__ */ t(a.Text, { as: "div", size: "sm", children: k(i) })
36
37
  ] }) })
37
38
  },
38
39
  {
39
40
  key: "status",
40
- title: /* @__PURE__ */ t(k, { children: e("locationListCol2") }),
41
+ title: /* @__PURE__ */ t(D, { children: e("locationListCol2") }),
41
42
  render: (i) => /* @__PURE__ */ n(r, { children: [
42
43
  i.mailingAddress && /* @__PURE__ */ t(a.Badge, { status: "info", children: e("mailingAddress") }),
43
44
  i.filingAddress && /* @__PURE__ */ n(r, { children: [
@@ -48,7 +49,7 @@ const G = () => {
48
49
  }
49
50
  ],
50
51
  itemMenu: (i) => /* @__PURE__ */ t(
51
- x,
52
+ T,
52
53
  {
53
54
  items: [
54
55
  {
@@ -56,7 +57,7 @@ const G = () => {
56
57
  onClick: () => {
57
58
  s(i.uuid);
58
59
  },
59
- icon: /* @__PURE__ */ t(y, { "aria-hidden": !0 }),
60
+ icon: /* @__PURE__ */ t(b, { "aria-hidden": !0 }),
60
61
  "data-testid": "edit-location"
61
62
  }
62
63
  ],
@@ -65,20 +66,21 @@ const G = () => {
65
66
  }
66
67
  ),
67
68
  pagination: {
68
- handleNextPage: g,
69
- handleFirstPage: m,
70
- handleLastPage: p,
71
- handlePreviousPage: u,
72
- handleItemsPerPageChange: c,
69
+ handleNextPage: u,
70
+ handleFirstPage: c,
71
+ handleLastPage: g,
72
+ handlePreviousPage: h,
73
+ handleItemsPerPageChange: p,
73
74
  currentPage: d,
74
75
  totalPages: l,
75
- itemsPerPage: f
76
+ totalCount: m,
77
+ itemsPerPage: L
76
78
  },
77
- emptyState: () => /* @__PURE__ */ t(b, { title: e("emptyTableTitle"), description: e("emptyTableDescription"), children: /* @__PURE__ */ t(a.Button, { variant: "secondary", onClick: h, children: e("addFirstLocationCta") }) })
79
+ emptyState: () => /* @__PURE__ */ t(x, { title: e("emptyTableTitle"), description: e("emptyTableDescription"), children: /* @__PURE__ */ t(a.Button, { variant: "secondary", onClick: f, children: e("addFirstLocationCta") }) })
78
80
  });
79
- return /* @__PURE__ */ t(S, { label: e("locationListLabel"), ...L });
81
+ return /* @__PURE__ */ t(V, { label: e("locationListLabel"), ...C });
80
82
  };
81
83
  export {
82
- G as List
84
+ J as List
83
85
  };
84
86
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n 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 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","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,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,MAAMf;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOY,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAI,MAEJ,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WAAA,EACC,UAAA;AAAA,UAAA,gBAAAD,EAACnB,EAAW,MAAX,EAAgB,IAAG,OAAO,UAAAqB,EAAUH,CAAQ,GAAE;AAAA,UAC/C,gBAAAC,EAACnB,EAAW,MAAX,EAAgB,IAAG,OAAM,MAAK,MAC5B,UAAAsB,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,oCACPlB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAc,EAAE,gBAAgB,EAAA,CAAE;AAAA,UAExDI,EAAS,iBACR,gBAAAM,EAAAJ,GAAA,EACG,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAD,EAACnB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAc,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,cAAAX,EAAmBe,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,aAAAH;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,EAACnB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,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,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,33 +1,34 @@
1
- import { jsx as e, jsxs as p, Fragment as u } from "react/jsx-runtime";
2
- import { useLocationsGetSuspense as L } from "@gusto/embedded-api/react-query/locationsGet";
3
- import { useState as d } from "react";
4
- import { Head as f } from "./Head.js";
5
- import { List as C } from "./List.js";
6
- import { Actions as A } from "./Actions.js";
7
- import { LocationsListProvider as N } from "./useLocationsList.js";
1
+ import { jsx as e, jsxs as u, Fragment as L } from "react/jsx-runtime";
2
+ import { useLocationsGetSuspense as f } from "@gusto/embedded-api/react-query/locationsGet";
3
+ import { useState as l } from "react";
4
+ import { Head as C } from "./Head.js";
5
+ import { List as N } from "./List.js";
6
+ import { Actions as x } from "./Actions.js";
7
+ import { LocationsListProvider as A } from "./useLocationsList.js";
8
8
  import { useI18n as O } from "../../../../i18n/I18n.js";
9
- import { BaseComponent as x } from "../../../Base/Base.js";
10
- import { useBase as E } from "../../../Base/useBase.js";
11
- import { Flex as I } from "../../../Common/Flex/Flex.js";
12
- import "react-i18next";
9
+ import { BaseComponent as E } from "../../../Base/Base.js";
10
+ import { useBase as I } from "../../../Base/useBase.js";
11
+ import { Flex as v } from "../../../Common/Flex/Flex.js";
13
12
  import "classnames";
13
+ import { companyEvents as s } from "../../../../shared/constants.js";
14
+ import "react-i18next";
14
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import { companyEvents as i } from "../../../../shared/constants.js";
16
- function W(o) {
17
- return /* @__PURE__ */ e(x, { ...o, children: /* @__PURE__ */ e(v, { ...o, children: o.children }) });
16
+ function X(o) {
17
+ return /* @__PURE__ */ e(E, { ...o, children: /* @__PURE__ */ e(M, { ...o, children: o.children }) });
18
18
  }
19
- function v({ companyId: o, className: l, children: s }) {
19
+ function M({ companyId: o, className: h, children: i }) {
20
20
  O("Company.Locations");
21
- const { onEvent: a } = E(), [m, n] = d(1), [c, h] = d(5), {
22
- data: { locationList: P, httpMeta: g }
23
- } = L({ companyId: o, page: m, per: c }), r = Number(g.response.headers.get("x-total-pages") ?? 1);
24
- return /* @__PURE__ */ e("section", { className: l, children: /* @__PURE__ */ e(
25
- N,
21
+ const { onEvent: a } = I(), [m, n] = l(1), [c, P] = l(5), {
22
+ data: { locationList: g, httpMeta: d }
23
+ } = f({ companyId: o, page: m, per: c }), r = Number(d.response.headers.get("x-total-pages") ?? 1), p = Number(d.response.headers.get("x-total-count") ?? 0);
24
+ return /* @__PURE__ */ e("section", { className: h, children: /* @__PURE__ */ e(
25
+ A,
26
26
  {
27
27
  value: {
28
- locationList: P ?? [],
28
+ locationList: g ?? [],
29
29
  currentPage: m,
30
30
  totalPages: r,
31
+ totalCount: p,
31
32
  handleFirstPage: () => {
32
33
  n(1);
33
34
  },
@@ -41,28 +42,28 @@ function v({ companyId: o, className: l, children: s }) {
41
42
  n(r);
42
43
  },
43
44
  handleItemsPerPageChange: (t) => {
44
- h(t);
45
+ P(t);
45
46
  },
46
47
  handleAddLocation: () => {
47
- a(i.COMPANY_LOCATION_CREATE);
48
+ a(s.COMPANY_LOCATION_CREATE);
48
49
  },
49
50
  handleEditLocation: (t) => {
50
- a(i.COMPANY_LOCATION_EDIT, { uuid: t });
51
+ a(s.COMPANY_LOCATION_EDIT, { uuid: t });
51
52
  },
52
53
  handleContinue: () => {
53
- a(i.COMPANY_LOCATION_DONE);
54
+ a(s.COMPANY_LOCATION_DONE);
54
55
  },
55
56
  itemsPerPage: c
56
57
  },
57
- children: /* @__PURE__ */ e(I, { flexDirection: "column", gap: 32, children: s || /* @__PURE__ */ p(u, { children: [
58
- /* @__PURE__ */ e(f, {}),
58
+ children: /* @__PURE__ */ e(v, { flexDirection: "column", gap: 32, children: i || /* @__PURE__ */ u(L, { children: [
59
59
  /* @__PURE__ */ e(C, {}),
60
- /* @__PURE__ */ e(A, {})
60
+ /* @__PURE__ */ e(N, {}),
61
+ /* @__PURE__ */ e(x, {})
61
62
  ] }) })
62
63
  }
63
64
  ) });
64
65
  }
65
66
  export {
66
- W as LocationsList
67
+ X as LocationsList
67
68
  };
68
69
  //# 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 { useState } from 'react'\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 type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\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 [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState<PaginationItemsPerPage>(5)\n\n const {\n data: { locationList, httpMeta },\n } = useLocationsGetSuspense({ companyId, page: currentPage, per: itemsPerPage })\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: PaginationItemsPerPage) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\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 locationList: locationList ?? [],\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n itemsPerPage,\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","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","locationList","httpMeta","useLocationsGetSuspense","totalPages","LocationsListProvider","prevPage","newCount","companyEvents","uuid","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;;;;AAiBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAiC,CAAC,GAEpE;AAAA,IACJ,MAAM,EAAE,cAAAG,GAAc,UAAAC,EAAA;AAAA,EAAS,IAC7BC,EAAwB,EAAE,WAAAb,GAAW,MAAMM,GAAa,KAAKG,GAAc,GAEzEK,IAAa,OAAOF,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC;AA4B7E,SACE,gBAAAf,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAcJ,KAAgB,CAAA;AAAA,QAC9B,aAAAL;AAAA,QACA,YAAAQ;AAAA,QACA,iBA9BgB,MAAM;AAC5B,UAAAP,EAAe,CAAC;AAAA,QAClB;AAAA,QA6BQ,oBA5BmB,MAAM;AAC/B,UAAAA,EAAe,OAAY,KAAK,IAAIS,IAAW,GAAG,CAAC,CAAC;AAAA,QACtD;AAAA,QA2BQ,gBA1Be,MAAM;AAC3B,UAAAT,EAAe,OAAY,KAAK,IAAIS,IAAW,GAAGF,CAAU,CAAC;AAAA,QAC/D;AAAA,QAyBQ,gBAxBe,MAAM;AAC3B,UAAAP,EAAeO,CAAU;AAAA,QAC3B;AAAA,QAuBQ,0BArCyB,CAACG,MAAqC;AACrE,UAAAP,EAAgBO,CAAQ;AAAA,QAC1B;AAAA,QAoCQ,mBAnBkB,MAAM;AAC9B,UAAAb,EAAQc,EAAc,uBAAuB;AAAA,QAC/C;AAAA,QAkBQ,oBAjBmB,CAACC,MAAiB;AAC3C,UAAAf,EAAQc,EAAc,uBAAuB,EAAE,MAAAC,EAAA,CAAM;AAAA,QACvD;AAAA,QAgBQ,gBAxBe,MAAM;AAC3B,UAAAf,EAAQc,EAAc,qBAAqB;AAAA,QAC7C;AAAA,QAuBQ,cAAAT;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAZ,EAACuB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAlB,KAGC,gBAAAmB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAzB,EAAC0B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
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 { useState } from 'react'\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 type { PaginationItemsPerPage } from '@/components/Common/PaginationControl/PaginationControlTypes'\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 [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState<PaginationItemsPerPage>(5)\n\n const {\n data: { locationList, httpMeta },\n } = useLocationsGetSuspense({ companyId, page: currentPage, per: itemsPerPage })\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n const totalCount = Number(httpMeta.response.headers.get('x-total-count') ?? 0)\n\n const handleItemsPerPageChange = (newCount: PaginationItemsPerPage) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\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 locationList: locationList ?? [],\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n itemsPerPage,\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","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","locationList","httpMeta","useLocationsGetSuspense","totalPages","totalCount","LocationsListProvider","prevPage","newCount","companyEvents","uuid","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;;;;AAiBO,SAASA,EAAcC,GAA2B;AACvD,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAiC,CAAC,GAEpE;AAAA,IACJ,MAAM,EAAE,cAAAG,GAAc,UAAAC,EAAA;AAAA,EAAS,IAC7BC,EAAwB,EAAE,WAAAb,GAAW,MAAMM,GAAa,KAAKG,GAAc,GAEzEK,IAAa,OAAOF,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC,GACvEG,IAAa,OAAOH,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC;AA4B7E,SACE,gBAAAf,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAcL,KAAgB,CAAA;AAAA,QAC9B,aAAAL;AAAA,QACA,YAAAQ;AAAA,QACA,YAAAC;AAAA,QACA,iBA/BgB,MAAM;AAC5B,UAAAR,EAAe,CAAC;AAAA,QAClB;AAAA,QA8BQ,oBA7BmB,MAAM;AAC/B,UAAAA,EAAe,OAAY,KAAK,IAAIU,IAAW,GAAG,CAAC,CAAC;AAAA,QACtD;AAAA,QA4BQ,gBA3Be,MAAM;AAC3B,UAAAV,EAAe,OAAY,KAAK,IAAIU,IAAW,GAAGH,CAAU,CAAC;AAAA,QAC/D;AAAA,QA0BQ,gBAzBe,MAAM;AAC3B,UAAAP,EAAeO,CAAU;AAAA,QAC3B;AAAA,QAwBQ,0BAtCyB,CAACI,MAAqC;AACrE,UAAAR,EAAgBQ,CAAQ;AAAA,QAC1B;AAAA,QAqCQ,mBApBkB,MAAM;AAC9B,UAAAd,EAAQe,EAAc,uBAAuB;AAAA,QAC/C;AAAA,QAmBQ,oBAlBmB,CAACC,MAAiB;AAC3C,UAAAhB,EAAQe,EAAc,uBAAuB,EAAE,MAAAC,EAAA,CAAM;AAAA,QACvD;AAAA,QAiBQ,gBAzBe,MAAM;AAC3B,UAAAhB,EAAQe,EAAc,qBAAqB;AAAA,QAC7C;AAAA,QAwBQ,cAAAV;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAZ,EAACwB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA1B,EAAC2B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -3,6 +3,7 @@ import { PaginationItemsPerPage } from '../../../Common/PaginationControl/Pagina
3
3
  type LocationsListContextType = {
4
4
  locationList: Location[];
5
5
  totalPages: number;
6
+ totalCount: number;
6
7
  currentPage: number;
7
8
  itemsPerPage: PaginationItemsPerPage;
8
9
  handleItemsPerPageChange: (n: PaginationItemsPerPage) => void;
@@ -9,13 +9,14 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
14
- const [x, d] = o(
15
+ const [d, f] = o(
15
16
  "CompanyDocumentListContext"
16
17
  );
17
18
  export {
18
- d as LocationsListProvider,
19
- x as useLocationsList
19
+ f as LocationsListProvider,
20
+ d as useLocationsList
20
21
  };
21
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 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":";;;;;;;;;;;;;AAmBA,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;"}
@@ -3,9 +3,10 @@ import { useTranslation as m } from "react-i18next";
3
3
  import { useOnboardingOverview as l } from "./context.js";
4
4
  import { Flex as p } from "../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
+ import "../../../shared/constants.js";
6
7
  import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
8
  import "react";
8
- const x = () => {
9
+ const b = () => {
9
10
  const e = a(), { onboardingCompleted: t, handleDone: r } = l(), { t: o } = m("Company.OnboardingOverview");
10
11
  return t ? /* @__PURE__ */ i(p, { alignItems: "center", flexDirection: "column", gap: 8, children: [
11
12
  /* @__PURE__ */ n(e.Heading, { as: "h2", textAlign: "center", children: o("onboardingCompletedTitle") }),
@@ -14,6 +15,6 @@ const x = () => {
14
15
  ] }) : null;
15
16
  };
16
17
  export {
17
- x as Completed
18
+ b as Completed
18
19
  };
19
20
  //# sourceMappingURL=Completed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Completed.js","sources":["../../../../src/components/Company/OnboardingOverview/Completed.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Completed = () => {\n const Components = useComponentContext()\n const { onboardingCompleted, handleDone } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n if (!onboardingCompleted) {\n return null\n }\n return (\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('onboardingCompletedTitle')}\n </Components.Heading>\n <p>{t('onboardingCompletedDescription')}</p>\n <Components.Button variant=\"secondary\" onClick={handleDone}>\n {t('onboardingCompletedCta')}\n </Components.Button>\n </Flex>\n )\n}\n"],"names":["Completed","Components","useComponentContext","onboardingCompleted","handleDone","useOnboardingOverview","t","useTranslation","Flex","jsx"],"mappings":";;;;;;;AAKO,MAAMA,IAAY,MAAM;AAC7B,QAAMC,IAAaC,EAAA,GACb,EAAE,qBAAAC,GAAqB,YAAAC,EAAA,IAAeC,EAAA,GACtC,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AACzD,SAAKJ,sBAIFK,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAK,EAAE,0BAA0B,EAAA,CAC/B;AAAA,IACA,gBAAAG,EAAC,KAAA,EAAG,UAAAH,EAAE,gCAAgC,EAAA,CAAE;AAAA,IACxC,gBAAAG,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASG,GAC7C,UAAAE,EAAE,wBAAwB,EAAA,CAC7B;AAAA,EAAA,GACF,IAXO;AAaX;"}
1
+ {"version":3,"file":"Completed.js","sources":["../../../../src/components/Company/OnboardingOverview/Completed.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Completed = () => {\n const Components = useComponentContext()\n const { onboardingCompleted, handleDone } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n if (!onboardingCompleted) {\n return null\n }\n return (\n <Flex alignItems=\"center\" flexDirection=\"column\" gap={8}>\n <Components.Heading as=\"h2\" textAlign=\"center\">\n {t('onboardingCompletedTitle')}\n </Components.Heading>\n <p>{t('onboardingCompletedDescription')}</p>\n <Components.Button variant=\"secondary\" onClick={handleDone}>\n {t('onboardingCompletedCta')}\n </Components.Button>\n </Flex>\n )\n}\n"],"names":["Completed","Components","useComponentContext","onboardingCompleted","handleDone","useOnboardingOverview","t","useTranslation","Flex","jsx"],"mappings":";;;;;;;;AAKO,MAAMA,IAAY,MAAM;AAC7B,QAAMC,IAAaC,EAAA,GACb,EAAE,qBAAAC,GAAqB,YAAAC,EAAA,IAAeC,EAAA,GACtC,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AACzD,SAAKJ,sBAIFK,GAAA,EAAK,YAAW,UAAS,eAAc,UAAS,KAAK,GACpD,UAAA;AAAA,IAAA,gBAAAC,EAACR,EAAW,SAAX,EAAmB,IAAG,MAAK,WAAU,UACnC,UAAAK,EAAE,0BAA0B,EAAA,CAC/B;AAAA,IACA,gBAAAG,EAAC,KAAA,EAAG,UAAAH,EAAE,gCAAgC,EAAA,CAAE;AAAA,IACxC,gBAAAG,EAACR,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASG,GAC7C,UAAAE,EAAE,wBAAwB,EAAA,CAC7B;AAAA,EAAA,GACF,IAXO;AAaX;"}
@@ -3,11 +3,12 @@ import { useTranslation as l } from "react-i18next";
3
3
  import { useOnboardingOverview as a } from "./context.js";
4
4
  import { Flex as c } from "../../Common/Flex/Flex.js";
5
5
  import "classnames";
6
+ import "../../../shared/constants.js";
6
7
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
7
8
  import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
9
  import "react";
9
10
  import { RequirementsList as g } from "../../Common/RequirementsList/RequirementsList.js";
10
- const D = () => {
11
+ const O = () => {
11
12
  const r = d(), { onboardingSteps: n, onboardingCompleted: s, handleContinue: m } = a(), { t: e } = l("Company.OnboardingOverview");
12
13
  if (s)
13
14
  return null;
@@ -29,6 +30,6 @@ const D = () => {
29
30
  ] });
30
31
  };
31
32
  export {
32
- D as MissingRequirements
33
+ O as MissingRequirements
33
34
  };
34
35
  //# sourceMappingURL=MissingRequirements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MissingRequirements.js","sources":["../../../../src/components/Company/OnboardingOverview/MissingRequirements.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { RequirementsList } from '@/components/Common/RequirementsList/RequirementsList'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const MissingRequirements = () => {\n const Components = useComponentContext()\n const { onboardingSteps, onboardingCompleted, handleContinue } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n\n if (onboardingCompleted) {\n return null\n }\n\n const isInitialSetup = !onboardingSteps?.some(step => step.required && step.completed)\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"flex-start\" gap={8}>\n <Components.Heading as=\"h2\">\n {t(isInitialSetup ? 'initialSetupTitle' : 'missingRequirementsTitle')}\n </Components.Heading>\n <p>{t(isInitialSetup ? 'initialSetupDescription' : 'missingRequirementsDescription')}</p>\n {onboardingSteps && (\n <RequirementsList\n requirements={onboardingSteps.map(step => ({\n completed: step.completed!,\n title: t(`stepTitles.${step.id!}`),\n description: t(`stepDescriptions.${step.id!}`),\n }))}\n />\n )}\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleContinue}>\n {t(isInitialSetup ? 'initialSetupCta' : 'missingRequirementsCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["MissingRequirements","Components","useComponentContext","onboardingSteps","onboardingCompleted","handleContinue","useOnboardingOverview","t","useTranslation","isInitialSetup","step","Flex","jsx","RequirementsList","ActionsLayout"],"mappings":";;;;;;;;;AAMO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,iBAAAC,GAAiB,qBAAAC,GAAqB,gBAAAC,EAAA,IAAmBC,EAAA,GAC3D,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AAEzD,MAAIJ;AACF,WAAO;AAGT,QAAMK,IAAiB,CAACN,GAAiB,KAAK,OAAQO,EAAK,YAAYA,EAAK,SAAS;AAErF,2BACGC,GAAA,EAAK,eAAc,UAAS,YAAW,cAAa,KAAK,GACxD,UAAA;AAAA,IAAA,gBAAAC,EAACX,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAM,EAAEE,IAAiB,sBAAsB,0BAA0B,EAAA,CACtE;AAAA,sBACC,KAAA,EAAG,UAAAF,EAAEE,IAAiB,4BAA4B,gCAAgC,GAAE;AAAA,IACpFN,KACC,gBAAAS;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAcV,EAAgB,IAAI,CAAAO,OAAS;AAAA,UACzC,WAAWA,EAAK;AAAA,UAChB,OAAOH,EAAE,cAAcG,EAAK,EAAG,EAAE;AAAA,UACjC,aAAaH,EAAE,oBAAoBG,EAAK,EAAG,EAAE;AAAA,QAAA,EAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,IAGN,gBAAAE,EAACE,GAAA,EACC,UAAA,gBAAAF,EAACX,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASI,GAC7C,UAAAE,EAAEE,IAAiB,oBAAoB,wBAAwB,GAClE,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"MissingRequirements.js","sources":["../../../../src/components/Company/OnboardingOverview/MissingRequirements.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useOnboardingOverview } from './context'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { RequirementsList } from '@/components/Common/RequirementsList/RequirementsList'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const MissingRequirements = () => {\n const Components = useComponentContext()\n const { onboardingSteps, onboardingCompleted, handleContinue } = useOnboardingOverview()\n const { t } = useTranslation('Company.OnboardingOverview')\n\n if (onboardingCompleted) {\n return null\n }\n\n const isInitialSetup = !onboardingSteps?.some(step => step.required && step.completed)\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"flex-start\" gap={8}>\n <Components.Heading as=\"h2\">\n {t(isInitialSetup ? 'initialSetupTitle' : 'missingRequirementsTitle')}\n </Components.Heading>\n <p>{t(isInitialSetup ? 'initialSetupDescription' : 'missingRequirementsDescription')}</p>\n {onboardingSteps && (\n <RequirementsList\n requirements={onboardingSteps.map(step => ({\n completed: step.completed!,\n title: t(`stepTitles.${step.id!}`),\n description: t(`stepDescriptions.${step.id!}`),\n }))}\n />\n )}\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleContinue}>\n {t(isInitialSetup ? 'initialSetupCta' : 'missingRequirementsCta')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n )\n}\n"],"names":["MissingRequirements","Components","useComponentContext","onboardingSteps","onboardingCompleted","handleContinue","useOnboardingOverview","t","useTranslation","isInitialSetup","step","Flex","jsx","RequirementsList","ActionsLayout"],"mappings":";;;;;;;;;;AAMO,MAAMA,IAAsB,MAAM;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,iBAAAC,GAAiB,qBAAAC,GAAqB,gBAAAC,EAAA,IAAmBC,EAAA,GAC3D,EAAE,GAAAC,EAAA,IAAMC,EAAe,4BAA4B;AAEzD,MAAIJ;AACF,WAAO;AAGT,QAAMK,IAAiB,CAACN,GAAiB,KAAK,OAAQO,EAAK,YAAYA,EAAK,SAAS;AAErF,2BACGC,GAAA,EAAK,eAAc,UAAS,YAAW,cAAa,KAAK,GACxD,UAAA;AAAA,IAAA,gBAAAC,EAACX,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAM,EAAEE,IAAiB,sBAAsB,0BAA0B,EAAA,CACtE;AAAA,sBACC,KAAA,EAAG,UAAAF,EAAEE,IAAiB,4BAA4B,gCAAgC,GAAE;AAAA,IACpFN,KACC,gBAAAS;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAcV,EAAgB,IAAI,CAAAO,OAAS;AAAA,UACzC,WAAWA,EAAK;AAAA,UAChB,OAAOH,EAAE,cAAcG,EAAK,EAAG,EAAE;AAAA,UACjC,aAAaH,EAAE,oBAAoBG,EAAK,EAAG,EAAE;AAAA,QAAA,EAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,IAGN,gBAAAE,EAACE,GAAA,EACC,UAAA,gBAAAF,EAACX,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASI,GAC7C,UAAAE,EAAEE,IAAiB,oBAAoB,wBAAwB,GAClE,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -7,11 +7,11 @@ import { BaseComponent as f } from "../../Base/Base.js";
7
7
  import { useBase as v } from "../../Base/useBase.js";
8
8
  import { useI18n as C, useComponentDictionary as g } from "../../../i18n/I18n.js";
9
9
  import { Flex as h } from "../../Common/Flex/Flex.js";
10
- import "react-i18next";
11
10
  import "classnames";
11
+ import { componentEvents as i } from "../../../shared/constants.js";
12
+ import "react-i18next";
12
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
14
  import "react";
14
- import { componentEvents as i } from "../../../shared/constants.js";
15
15
  function F(o) {
16
16
  return C("Company.OnboardingOverview"), g("Company.OnboardingOverview", o.dictionary), /* @__PURE__ */ n(f, { ...o, children: /* @__PURE__ */ n(b, { ...o, children: o.children }) });
17
17
  }
@@ -9,11 +9,12 @@ import "../../Base/useBase.js";
9
9
  import "../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
14
- const [w, x] = o("OnboardingOverviewContext");
15
+ const [x, C] = o("OnboardingOverviewContext");
15
16
  export {
16
- x as OnboardingOverviewProvider,
17
- w as useOnboardingOverview
17
+ C as OnboardingOverviewProvider,
18
+ x as useOnboardingOverview
18
19
  };
19
20
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../src/components/Company/OnboardingOverview/context.ts"],"sourcesContent":["import type { OnboardingStep } from '@gusto/embedded-api/models/components/companyonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\ntype OnboardingOverviewContextType = {\n onboardingCompleted?: boolean\n onboardingSteps?: OnboardingStep[]\n handleDone: () => void\n handleContinue: () => void\n}\n\nconst [useOnboardingOverview, OnboardingOverviewProvider] =\n createCompoundContext<OnboardingOverviewContextType>('OnboardingOverviewContext')\n\nexport { useOnboardingOverview, OnboardingOverviewProvider }\n"],"names":["useOnboardingOverview","OnboardingOverviewProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAuBC,CAA0B,IACtDC,EAAqD,2BAA2B;"}